收银台打印小票
This commit is contained in:
parent
5a5ec7c43c
commit
daa07fbb4b
@ -180,7 +180,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>
|
||||
@ -418,7 +418,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>
|
||||
@ -470,7 +470,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>
|
||||
@ -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()
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user