From daa07fbb4bbbed3d542e6160b47102b243b995f0 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: Tue, 29 Oct 2024 16:48:20 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0=E6=89=93=E5=8D=B0?=
=?UTF-8?q?=E5=B0=8F=E7=A5=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/EventMarketing/SaveBlock/index.vue | 88 +++++++++++--------
1 file changed, 50 insertions(+), 38 deletions(-)
diff --git a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
index f48888dec..17eef3d71 100644
--- a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue
@@ -180,7 +180,7 @@
ref="drawer"
>
-
+
@@ -418,7 +418,7 @@
-
+
@@ -470,7 +470,7 @@
- 保存
+ 保存
取消
@@ -491,6 +491,7 @@ import {
cardValueRule,
saveOrUpdate,
cardValueRecordList,
+ cardValueRecordLists,
updateStatus
} from "@/api/EventMarketing/SaveBlock";
import {oilNumberList1} from "@/api/order/oilnumgun";
@@ -523,7 +524,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
ordertype:'',
cardValueId:'',
pageNo:1,
- pageSize:10
+ pageSize:10,
+ storeId:''
},
dataRange:[],
orderData: [{
@@ -560,6 +562,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' },
],
@@ -685,8 +690,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=>{
@@ -832,11 +837,10 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
},
viewOrder(id){
this.orderShow =! this.orderShow
- this.order.cardValueId = id
+ this.order.storeId = id
this.RecordList()
},
RecordList(){
-
cardValueRecordList(this.addDateRange(this.order,this.dataRange)).then(res=>{
this.orderData = res.data.records
this.order.total = res.data.total
@@ -994,39 +998,47 @@ 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) => {
+ console.log(11111)
+ 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()
+ });
},