This commit is contained in:
齐天大圣 2024-10-31 11:19:37 +08:00
parent 9662e2951c
commit 7c9d18eced

View File

@ -131,7 +131,7 @@
>
</el-table-column>
<el-table-column
prop="orderNo"
prop="paymentNo"
label="订单号"
>
</el-table-column>
@ -162,7 +162,7 @@
label="订单状态">
</el-table-column>
<el-table-column
prop="payTime"
prop="updateTime"
label="订单完成时间">
</el-table-column>
</el-table>
@ -183,7 +183,7 @@
ref="drawer"
>
<div class="demo-drawer__content">
<el-form :model="form" :rules="rules" :inline="true" :label-position="labelPosition" label-width="100px" >
<el-form :model="form" ref="ruleForm" :rules="rules" :inline="true" :label-position="labelPosition" label-width="100px" >
<el-form-item label="活动名称" prop="activeName">
<el-input style="width: 300px" v-model="form.activeName"></el-input>
@ -421,7 +421,7 @@
</el-dialog>
<!-- 规则-->
<el-dialog title="编辑储值卡规则" :visible.sync="Crule">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :label-position="labelPosition">
<el-form :model="ruleForm" ref="ruleForm1" :rules="rules" label-width="100px" class="demo-ruleForm" :label-position="labelPosition">
<el-form-item label="名称" prop="name">
<el-input disabled v-model="ruleForm.name"></el-input>
</el-form-item>
@ -473,7 +473,7 @@
<el-form-item>
<el-button type="primary" @click="submitForms('ruleForm')">保存</el-button>
<el-button type="primary" @click="submitForms('ruleForm1')">保存</el-button>
<el-button @click="resetForm('ruleForm')">取消</el-button>
</el-form-item>
</el-form>
@ -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()
});
},