diff --git a/src/views/canteen/base/canteenStall/canteen/index.vue b/src/views/canteen/base/canteenStall/canteen/index.vue
index df0f548d..fa0a5f3c 100644
--- a/src/views/canteen/base/canteenStall/canteen/index.vue
+++ b/src/views/canteen/base/canteenStall/canteen/index.vue
@@ -331,7 +331,6 @@
this.loading = false;
});
},
-
handleTabClick(tab, event) {
console.log(tab, event);
},
@@ -388,15 +387,13 @@
},
/** 提交按钮 */
submitForm: function() {
- // console.log(this.baseForm)
- console.log(this.checkUrlList)
this.$refs["baseForm"].validate(valid => {//基本设置表单校验
if (valid) {
this.baseForm.bizStartTime=this.rangeTime[0]
this.baseForm.bizEndTime=this.rangeTime[1]
+ // this.$set(this.baseForm,"imgUrl",this.checkUrlList[0])
if (this.canteenId != "") {
- param.canteenId = this.canteenId
- updateCanteenApi(this.baseForm).then(response => {
+ updateCanteenApi(this.baseForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
@@ -431,7 +428,7 @@
if (res.code == 200) {
this.checkUrlList.push(res.data.url)
this.checkUrlNameList.push(res.data.name)
- this.$set(this.baseForm,"imgUrl",res.data.url)
+ this.$set(this.baseForm,"imgUrl",res.data.url)
} else {
this.$modal.msgError(res.msg)
this.$set(this.baseForm,"imgUrl","")
@@ -443,7 +440,7 @@
},
// 上传之前
handleBeforeUpload(file) {
- const isLt = file.size / 1024 / 1024 < 5
+ const isLt = file.size / 1024 / 1024 < 10
if (!isLt) {
this.$modal.msgError(`图片大小不能超过 5 MB`)
return false
diff --git a/src/views/canteen/dish/dish/index.vue b/src/views/canteen/dish/dish/index.vue
index e4ee3adb..32c8102f 100644
--- a/src/views/canteen/dish/dish/index.vue
+++ b/src/views/canteen/dish/dish/index.vue
@@ -605,40 +605,40 @@
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/views/canteen/dish/material/components/MaterialDialog.vue b/src/views/canteen/dish/material/components/MaterialDialog.vue
index 8ca55b76..c6046dad 100644
--- a/src/views/canteen/dish/material/components/MaterialDialog.vue
+++ b/src/views/canteen/dish/material/components/MaterialDialog.vue
@@ -285,6 +285,7 @@ export default {
}
],
rules: {
+ materialCode: [{ required: true, message: '请输入原料编码', trigger: 'blur' }],
materialName: [{ required: true, message: '请输入原料名称', trigger: 'blur' }],
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
diff --git a/src/views/canteen/order/offlineManagement/index.vue b/src/views/canteen/order/offlineManagement/index.vue
index ac25fbcc..9bcddc36 100644
--- a/src/views/canteen/order/offlineManagement/index.vue
+++ b/src/views/canteen/order/offlineManagement/index.vue
@@ -715,7 +715,7 @@
this.orderDetailList.forEach((item,index)=>{
this.$set(this.orderDetailList[index],"unRefundNum",item.quantity-item.refundNum)
this.$set(this.orderDetailList[index],"goRefundNum",item.unRefundNum)
- this.$set(this.orderDetailList[index],"refundMoney",Number(item.quantity)*(item.salePrice).toFixed(2))
+ this.$set(this.orderDetailList[index],"refundMoney",Number(item.goRefundNum)*(item.salePrice).toFixed(2))
})
this.refundList=[]
this.openPart = true;
@@ -725,11 +725,16 @@
this.$modal.msgError("退款数量不能大于可退款数量!");
row.goRefundNum=row.unRefundNum
}
- row.refundMoney = Number(row.goRefundNum)*(row.salePrice).toFixed(2)
+ row.refundMoney = Number(row.goRefundNum)*(row.salePrice).toFixed(2)
+ this.refundList.forEach((item) => {
+ if(item.detailId==row.detailId){
+ this.$set(item,"quantity",row.goRefundNum)
+ }
+ })
},
choseRefundTypeRadio(e){},
handleSelectionChange(selection){
- console.log(selection)
+ // console.log(selection)
this.refundList = selection.map((item) => {
let obj = {'detailId':item.detailId,'quantity':item.goRefundNum}
return obj
@@ -774,12 +779,8 @@
this.openPart = false;
});
}
- });
-
+ });
}
-
-
-
},
/** 退单按钮操作 */
handleRefund(row) {
@@ -858,18 +859,18 @@
if(this.ableList.length>0){
if(this.handleType=="退单"){
this.ableList.forEach(item=>{
- let param = {
- backType: 1,
- macOrderId:item.macOrderId,
- orderId:item.orderId
- }
- refundOrderApi(param).then(response => {
- if(response.code!=200){
- this.$modal.msgError(response.msg);
- }
- });
+ let param = {
+ backType: 1,
+ macOrderId:item.macOrderId,
+ orderId:item.orderId
+ }
+ refundOrderApi(param).then(response => {
+ // if(response.code!=200){
+ // this.$modal.msgError(response.msg);
+ // }
+ });
})
- this.$modal.msgSuccess("退单成功");
+ this.$modal.msgSuccess("批量退单完成");
}
if(this.handleType=="核销"){
this.ableList.forEach(item=>{
@@ -877,16 +878,17 @@
orderId:item.orderId
}
writeOffOrderApi(param).then(response => {
- if(response.code!=200){
- this.$modal.msgError(response.msg);
- }
+ // if(response.code!=200){
+ // this.$modal.msgError(response.msg);
+ // }
});
})
- this.$modal.msgSuccess("核销成功");
+ this.$modal.msgSuccess("批量核销完成");
}
setTimeout(()=>{
this.getList()
- this.$refs.multipleTable.clearSelection()
+ this.$refs.multipleTable.clearSelection()
+ this.openRemind = false
},1000)
}
},
diff --git a/src/views/canteen/order/reserveManagement/index.vue b/src/views/canteen/order/reserveManagement/index.vue
index c116ac96..d95a05df 100644
--- a/src/views/canteen/order/reserveManagement/index.vue
+++ b/src/views/canteen/order/reserveManagement/index.vue
@@ -685,7 +685,7 @@ export default {
this.orderDetailList.forEach((item,index)=>{
this.$set(this.orderDetailList[index],"unRefundNum",item.quantity-item.refundNum)
this.$set(this.orderDetailList[index],"goRefundNum",item.unRefundNum)
- this.$set(this.orderDetailList[index],"refundMoney",Number(item.quantity)*(item.salePrice).toFixed(2))
+ this.$set(this.orderDetailList[index],"refundMoney",Number(item.goRefundNum)*(item.salePrice).toFixed(2))
})
this.refundList=[]
this.openPart = true;
@@ -695,7 +695,12 @@ export default {
this.$modal.msgError("退款数量不能大于可退款数量!");
row.goRefundNum=row.unRefundNum
}
- row.refundMoney = Number(row.goRefundNum)*(row.salePrice).toFixed(2)
+ row.refundMoney = Number(row.goRefundNum)*(row.salePrice).toFixed(2)
+ this.refundList.forEach((item) => {
+ if(item.detailId==row.detailId){
+ this.$set(item,"quantity",row.goRefundNum)
+ }
+ })
},
//数量退款/金额退款
choseRefundTypeRadio(e){},
@@ -712,45 +717,45 @@ export default {
},
//部分退款提交
confirmRefund(){
- if(this.refundType==1){
- if(this.refundList.length==0){
- this.$modal.msgError("请先勾选退款菜品!");
- }else{
- console.log(this.refundList)
- let param = {
- orderPartRefundDetailList:this.refundList,
- orderId:this.rowData.orderId
- }
+ if(this.refundType==1){
+ if(this.refundList.length==0){
+ this.$modal.msgError("请先勾选退款菜品!");
+ }else{
+ console.log(this.refundList)
+ let param = {
+ orderPartRefundDetailList:this.refundList,
+ orderId:this.rowData.orderId
+ }
+ refundOrderPartApi(param).then(response => {
+ if(response.code==200){
+ this.$modal.msgSuccess("退款成功");
+ }
+ this.getList()
+ this.openPart = false;
+ }).catch(err => {
+ this.refundList = []
+ this.$refs.multiplePartTable.clearSelection()
+ })
+ }
+ }
+ if(this.refundType==2){
+ this.$refs["rowData"].validate(valid => {
+ if (valid) {
+ let param = {
+ refundAmount:Number(this.rowData.refundMoney*100),
+ orderId:this.rowData.orderId
+ }
refundOrderPartApi(param).then(response => {
- if(response.code==200){
- this.$modal.msgSuccess("退款成功");
- }
- this.getList()
- this.openPart = false;
- }).catch(err => {
- this.refundList = []
- this.$refs.multiplePartTable.clearSelection()
- })
- }
- }
- if(this.refundType==2){
- this.$refs["rowData"].validate(valid => {
- if (valid) {
- let param = {
- refundAmount:Number(this.rowData.refundMoney*100),
- orderId:this.rowData.orderId
- }
- refundOrderPartApi(param).then(response => {
- if(response.code==200){
- this.$modal.msgSuccess("退款成功");
- }
- this.getList()
- this.openPart = false;
- });
- }
- });
-
- }
+ if(response.code==200){
+ this.$modal.msgSuccess("退款成功");
+ }
+ this.getList()
+ this.openPart = false;
+ });
+ }
+ });
+
+ }
@@ -836,12 +841,12 @@ export default {
orderId:item.orderId
}
refundOrderApi(param).then(response => {
- if(response.code!=200){
- this.$modal.msgError(response.msg);
- }
+ // if(response.code!=200){
+ // this.$modal.msgError(response.msg);
+ // }
});
})
- this.$modal.msgSuccess("退单成功");
+ this.$modal.msgSuccess("批量退单完成");
}
if(this.handleType=="核销"){
this.ableList.forEach(item=>{
@@ -849,18 +854,18 @@ export default {
orderIdList:[item.orderId ]
}
writeOffOrderApi(param).then(response => {
- if(response.code!=200){
- this.$modal.msgError(response.msg);
- }
+ // if(response.code!=200){
+ // this.$modal.msgError(response.msg);
+ // }
});
})
- this.$modal.msgSuccess("核销成功");
+ this.$modal.msgSuccess("批量核销完成");
}
- this.openRemind = true
this.$refs.multipleTable.clearSelection()
setTimeout(()=>{
+ this.openRemind = false
this.getList()
- },1000)
+ },500)
}
},
//同步订单状态
diff --git a/src/views/canteen/superstore/superOrder/index.vue b/src/views/canteen/superstore/superOrder/index.vue
index 0d9790d1..64cce908 100644
--- a/src/views/canteen/superstore/superOrder/index.vue
+++ b/src/views/canteen/superstore/superOrder/index.vue
@@ -550,7 +550,7 @@
this.orderDetailList.forEach((item,index)=>{
this.$set(this.orderDetailList[index],"unRefundNum",item.quantity-item.refundNum)
this.$set(this.orderDetailList[index],"goRefundNum",item.unRefundNum)
- this.$set(this.orderDetailList[index],"refundMoney",Number(item.quantity)*(item.salePrice).toFixed(2))
+ this.$set(this.orderDetailList[index],"refundMoney",Number(item.goRefundNum)*(item.salePrice).toFixed(2))
})
this.refundList=[]
this.openPart = true;
@@ -560,7 +560,12 @@
this.$modal.msgError("退款数量不能大于可退款数量!");
row.goRefundNum=row.unRefundNum
}
- row.refundMoney = Number(row.goRefundNum)*(row.salePrice).toFixed(2)
+ row.refundMoney = Number(row.goRefundNum)*(row.salePrice).toFixed(2)
+ this.refundList.forEach((item) => {
+ if(item.detailId==row.detailId){
+ this.$set(item,"quantity",row.goRefundNum)
+ }
+ })
},
selectable(row){
return row.unRefundNum>0
@@ -663,12 +668,12 @@
orderId:item.orderId
}
refundOrderApi(param).then(response => {
- if(response.code!=200){
- this.$modal.msgError(response.msg);
- }
+ // if(response.code!=200){
+ // this.$modal.msgError(response.msg);
+ // }
});
})
- this.$modal.msgSuccess("退单成功");
+ this.$modal.msgSuccess("批量退单完成");
}
if(this.handleType=="核销"){
this.ableList.forEach(item=>{
@@ -676,17 +681,18 @@
orderId:item.orderId
}
writeOffOrderApi(param).then(response => {
- if(response.code!=200){
- this.$modal.msgError(response.msg);
- }
+ // if(response.code!=200){
+ // this.$modal.msgError(response.msg);
+ // }
});
})
- this.$modal.msgSuccess("核销成功");
+ this.$modal.msgSuccess("批量核销完成");
}
setTimeout(()=>{
+ this.openRemind = false
this.getList()
this.$refs.multipleTable.clearSelection()
- },1000)
+ },500)
}
},
//同步订单状态