收银台打印小票
This commit is contained in:
parent
5a5ec7c43c
commit
daa07fbb4b
@ -180,7 +180,7 @@
|
|||||||
ref="drawer"
|
ref="drawer"
|
||||||
>
|
>
|
||||||
<div class="demo-drawer__content">
|
<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-form-item label="活动名称" prop="activeName">
|
||||||
<el-input style="width: 300px" v-model="form.activeName"></el-input>
|
<el-input style="width: 300px" v-model="form.activeName"></el-input>
|
||||||
@ -418,7 +418,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 规则-->
|
<!-- 规则-->
|
||||||
<el-dialog title="编辑储值卡规则" :visible.sync="Crule">
|
<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-form-item label="名称" prop="name">
|
||||||
<el-input disabled v-model="ruleForm.name"></el-input>
|
<el-input disabled v-model="ruleForm.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -470,7 +470,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<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-button @click="resetForm('ruleForm')">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -491,6 +491,7 @@ import {
|
|||||||
cardValueRule,
|
cardValueRule,
|
||||||
saveOrUpdate,
|
saveOrUpdate,
|
||||||
cardValueRecordList,
|
cardValueRecordList,
|
||||||
|
cardValueRecordLists,
|
||||||
updateStatus
|
updateStatus
|
||||||
} from "@/api/EventMarketing/SaveBlock";
|
} from "@/api/EventMarketing/SaveBlock";
|
||||||
import {oilNumberList1} from "@/api/order/oilnumgun";
|
import {oilNumberList1} from "@/api/order/oilnumgun";
|
||||||
@ -523,7 +524,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
ordertype:'',
|
ordertype:'',
|
||||||
cardValueId:'',
|
cardValueId:'',
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
pageSize:10
|
pageSize:10,
|
||||||
|
storeId:''
|
||||||
},
|
},
|
||||||
dataRange:[],
|
dataRange:[],
|
||||||
orderData: [{
|
orderData: [{
|
||||||
@ -560,6 +562,9 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
isonline: '0',
|
isonline: '0',
|
||||||
dialog: false,
|
dialog: false,
|
||||||
rules: {
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
startTime: [
|
startTime: [
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@ -685,8 +690,8 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
this.oilnumList = res.data.records
|
this.oilnumList = res.data.records
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForms(formName) {
|
submitForms(ruleForm1 ) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[ruleForm1].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.ruleForm.oilNumber = this.ruleForm.oilNumber.join(',')
|
this.ruleForm.oilNumber = this.ruleForm.oilNumber.join(',')
|
||||||
saveOrUpdate(this.ruleForm).then(res=>{
|
saveOrUpdate(this.ruleForm).then(res=>{
|
||||||
@ -832,11 +837,10 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
|
|||||||
},
|
},
|
||||||
viewOrder(id){
|
viewOrder(id){
|
||||||
this.orderShow =! this.orderShow
|
this.orderShow =! this.orderShow
|
||||||
this.order.cardValueId = id
|
this.order.storeId = id
|
||||||
this.RecordList()
|
this.RecordList()
|
||||||
},
|
},
|
||||||
RecordList(){
|
RecordList(){
|
||||||
|
|
||||||
cardValueRecordList(this.addDateRange(this.order,this.dataRange)).then(res=>{
|
cardValueRecordList(this.addDateRange(this.order,this.dataRange)).then(res=>{
|
||||||
this.orderData = res.data.records
|
this.orderData = res.data.records
|
||||||
this.order.total = res.data.total
|
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.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||||
// this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
// this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||||
submitForm(){
|
submitForm(ruleForm){
|
||||||
this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);
|
this.$refs[ruleForm].validate((valid) => {
|
||||||
|
console.log(11111)
|
||||||
|
if (valid) {
|
||||||
|
this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);
|
||||||
|
|
||||||
if(this.form.id){
|
if (this.form.id) {
|
||||||
eitList(this.form).then(res=>{
|
eitList(this.form).then(res => {
|
||||||
if (res.code == 200){
|
if (res.code == 200) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '修改成功',
|
message: '修改成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
this.getlist()
|
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 {
|
}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()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user