From 7c9d18ecedcb5a8d157cd7703c0c6932e0eeb3ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com>
Date: Thu, 31 Oct 2024 11:19:37 +0800
Subject: [PATCH] 1
---
.../views/EventMarketing/SaveBlock/index.vue | 98 +++++++++++--------
1 file changed, 57 insertions(+), 41 deletions(-)
diff --git a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
index de28da6ca..65c7a4b29 100644
--- a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
@@ -131,7 +131,7 @@
>
@@ -162,7 +162,7 @@
label="订单状态">
@@ -183,7 +183,7 @@
ref="drawer"
>
-
+
@@ -421,7 +421,7 @@
-
+
@@ -473,7 +473,7 @@
- 保存
+ 保存
取消
@@ -494,6 +494,7 @@ import {
cardValueRule,
saveOrUpdate,
cardValueRecordList,
+ cardValueRecordLists,
updateStatus
} from "@/api/EventMarketing/SaveBlock";
import {oilNumberList1} from "@/api/order/oilnumgun";
@@ -526,7 +527,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
ordertype:'',
cardValueId:'',
pageNo:1,
- pageSize:10
+ pageSize:10,
+ storeId:''
},
dataRange:[],
orderData: [{
@@ -563,6 +565,9 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
isonline: '0',
dialog: false,
rules: {
+ name: [
+ { required: true, message: '不能为空', trigger: 'blur' },
+ ],
startTime: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
@@ -688,8 +693,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
this.oilnumList = res.data.records
})
},
- submitForms(formName) {
- this.$refs[formName].validate((valid) => {
+ submitForms(ruleForm1 ) {
+ this.$refs[ruleForm1].validate((valid) => {
if (valid) {
this.ruleForm.oilNumber = this.ruleForm.oilNumber.join(',')
saveOrUpdate(this.ruleForm).then(res=>{
@@ -839,9 +844,13 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
this.RecordList()
},
RecordList(){
-
- cardValueRecordList(this.addDateRange(this.order,this.dataRange)).then(res=>{
- this.orderData = res.data.records
+ console.log(this.dataRange)
+ cardValueRecordLists({
+ cardValueId: this.order.cardValueId,
+ dataRange: this.dataRange,
+ orderNo:this.order.orderNo
+ }).then(res=>{
+ this.orderData = res.data
this.order.total = res.data.total
})
},
@@ -997,39 +1006,46 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
// this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
// this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
- submitForm(){
- this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);
+ submitForm(ruleForm){
+ this.$refs[ruleForm].validate((valid) => {
+ if (valid) {
+ this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);
- if(this.form.id){
- eitList(this.form).then(res=>{
- if (res.code == 200){
- this.$message({
- message: '修改成功',
- type: 'success'
- });
- this.getlist()
+ if (this.form.id) {
+ eitList(this.form).then(res => {
+ if (res.code == 200) {
+ this.$message({
+ message: '修改成功',
+ type: 'success'
+ });
+ this.getlist()
+ } else {
+ this.$message.error('修改失败');
+ }
+ })
+ } else {
+ addList(this.form).then(res => {
+ if (res.code == 200) {
+ this.$message({
+ message: '新增成功',
+ type: 'success'
+ });
+ this.getlist()
+ } else {
+ this.$message.error('新增失败');
+ }
+ })
+
+ }
+
+
+ this.dialog = false
+ this.chongzhi()
}else {
- this.$message.error('修改失败');
+ console.log('error submit!!');
+ return false;
}
- })
- }else{
- addList(this.form).then(res=>{
- if (res.code == 200){
- this.$message({
- message: '新增成功',
- type: 'success'
- });
- this.getlist()
- }else {
- this.$message.error('新增失败');
- }
- })
-
- }
-
-
- this.dialog = false
- this.chongzhi()
+ });
},