From 40f52e42782c5312299ae52a0b38339269cac558 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Tue, 17 Jun 2025 14:03:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order/offline.js | 24 +++-- src/api/order/reserve.js | 25 +++-- src/api/superStore/device.js | 2 +- src/api/superStore/orderShenhe.js | 15 +-- src/api/superStore/salesSummary.js | 2 +- src/api/superStore/superOrder.js | 97 +------------------ .../accountCenter/account/consume/index.vue | 2 +- .../canteen/base/canteenStall/area/index.vue | 2 +- .../base/canteenStall/canteen/index.vue | 17 ++-- .../canteen/base/canteenStall/stall/index.vue | 8 +- .../canteen/base/mobile/bannerList/index.vue | 20 +++- src/views/canteen/dish/dish/index.vue | 21 +++- .../canteen/order/offlineManagement/index.vue | 61 +++++++++--- .../canteen/order/reserveManagement/index.vue | 71 ++++++++++---- .../canteen/reportCenter/consumeSum/index.vue | 4 +- .../canteen/superstore/doubleScreen/index.vue | 12 +-- .../components/MaterialDialog.vue | 15 ++- src/views/canteen/superstore/super/index.vue | 52 +++++----- .../canteen/superstore/superOrder/index.vue | 35 +++---- src/views/monitor/job/log.vue | 2 +- src/views/system/dict/data.vue | 2 +- src/views/system/role/authUser.vue | 2 +- src/views/system/user/authRole.vue | 2 +- 23 files changed, 234 insertions(+), 259 deletions(-) diff --git a/src/api/order/offline.js b/src/api/order/offline.js index 8cab4949..326b1bd6 100644 --- a/src/api/order/offline.js +++ b/src/api/order/offline.js @@ -17,18 +17,7 @@ export function orderPageListApi(data) { pageSize:data.pageSize } }) -} -// 订单详情 -export function orderDetailInfoApi(data) { - return request({ - url: '/smart-canteen/api/v2/web/order/info', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} +} // 订单-部分退款 export function refundOrderPartApi(data) { @@ -67,7 +56,16 @@ export function writeOffOrderApi(data) { }) } - +//获取订单评价 +export function getEvaluaOrderDetailApi(orderId) { + return request({ + url: '/smart-canteen/cook_evalua_order/orderId/'+orderId, + method: 'get', + headers: { + "merchant-id":"378915229716713472", + } + }) + } diff --git a/src/api/order/reserve.js b/src/api/order/reserve.js index 77b5196d..094f8c0e 100644 --- a/src/api/order/reserve.js +++ b/src/api/order/reserve.js @@ -15,18 +15,7 @@ export function orderPageListApi(data) { } }) } - -// 订单详情 -export function orderDetailInfoApi(data) { - return request({ - url: '/smart-canteen/api/v2/web/order/info', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} + // 订单-部分退款 export function refundOrderPartApi(data) { @@ -65,8 +54,16 @@ export function writeOffOrderApi(data) { } - - +//获取订单评价 +export function getEvaluaOrderDetailApi(orderId) { + return request({ + url: '/smart-canteen/cook_evalua_order/orderId/'+orderId, + method: 'get', + headers: { + "merchant-id":"378915229716713472", + } + }) + } diff --git a/src/api/superStore/device.js b/src/api/superStore/device.js index 48a8c0fe..159ad24b 100644 --- a/src/api/superStore/device.js +++ b/src/api/superStore/device.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 通过区域Id查询超市 export function getSupermarketByAreaApi(data) { return request({ - url: '/smart-canteen/supermarket_info/list', + url: '/smart-canteen/supermarket_info/listAll', method: 'get', headers: { "merchant-id":"378915229716713472", diff --git a/src/api/superStore/orderShenhe.js b/src/api/superStore/orderShenhe.js index 5a865578..2847124b 100644 --- a/src/api/superStore/orderShenhe.js +++ b/src/api/superStore/orderShenhe.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 通过区域Id查询超市 export function getSupermarketByAreaApi(data) { return request({ - url: '/smart-canteen/supermarket_info/list', + url: '/smart-canteen/supermarket_info/listAll', method: 'get', headers: { "merchant-id":"378915229716713472", @@ -110,18 +110,7 @@ export function refundOrderPageListApi(data) { }, data: data }) -} -// 订单详情 -export function orderDetailInfoApi(data) { - return request({ - url: '/smart-canteen/api/v2/web/order/info', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} +} // 订单-部分退款 export function refundOrderPartApi(data) { diff --git a/src/api/superStore/salesSummary.js b/src/api/superStore/salesSummary.js index c9dbaf4e..d7c7b37c 100644 --- a/src/api/superStore/salesSummary.js +++ b/src/api/superStore/salesSummary.js @@ -2,7 +2,7 @@ import request from '@/utils/request' // 通过区域Id查询超市 export function getSupermarketByAreaApi(data) { return request({ - url: '/smart-canteen/supermarket_info/list', + url: '/smart-canteen/supermarket_info/listAll', method: 'get', headers: { "merchant-id":"378915229716713472", diff --git a/src/api/superStore/superOrder.js b/src/api/superStore/superOrder.js index 0a54910f..b36d3277 100644 --- a/src/api/superStore/superOrder.js +++ b/src/api/superStore/superOrder.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 通过区域Id查询超市 export function getSupermarketByAreaApi(data) { return request({ - url: '/smart-canteen/supermarket_info/list', + url: '/smart-canteen/supermarket_info/listAll', method: 'get', headers: { "merchant-id":"378915229716713472", @@ -11,87 +11,7 @@ export function getSupermarketByAreaApi(data) { params: data }) } - -// 通过区域Id查询食堂 -export function getCanteenByAreaApi(data) { - return request({ - url: '/smart-canteen/api/v2/alloc/canteen/list-all-auth-canteen', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -// 通过食堂Id查询档口 -export function getStallByCanteenApi(data) { - return request({ - url: '/smart-canteen/api/v2/alloc/canteen/list-multiple-auth-stall', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} - -// 订单类型 -export function orderTypeListApi(data) { - return request({ - url: '/smart-canteen/api/v2/order/enums/type-list', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -// 配送方式 -export function deliveryTypeListApi(data) { - return request({ - url: '/smart-canteen/api/v2/alloc/canteen/list-delivery-type-enum', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} - - -// 订单状态 -export function orderStateListApi(data) { - return request({ - url: '/smart-canteen/api/v2/order/enums/state-mix-list', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} -// 订单支付状态 -export function orderPayAllTypeApi(data) { - return request({ - url: '/smart-canteen/api/v2/pay/all/type', - method: 'get', - headers: { - "merchant-id":"378915229716713472", - }, - params: data - }) -} -// 核身方式 -export function orderNuclearModeListApi(data) { - return request({ - url: '/smart-canteen/api/v2/order/enums/nuclear/mode-list', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} + // 订单列表-分页 export function orderPageListApi(data) { @@ -107,18 +27,7 @@ export function orderPageListApi(data) { pageSize:data.pageSize } }) -} -// 订单详情 -export function orderDetailInfoApi(data) { - return request({ - url: '/smart-canteen/api/v2/web/order/info', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} +} // 订单-部分退款 export function refundOrderPartApi(data) { diff --git a/src/views/canteen/accountCenter/account/consume/index.vue b/src/views/canteen/accountCenter/account/consume/index.vue index 756ea879..17491900 100644 --- a/src/views/canteen/accountCenter/account/consume/index.vue +++ b/src/views/canteen/accountCenter/account/consume/index.vue @@ -90,7 +90,7 @@ {{ (scope.row.amount/100).toFixed(2) }} - + {{ (scope.row.walletBal/100).toFixed(2) }} diff --git a/src/views/canteen/base/canteenStall/area/index.vue b/src/views/canteen/base/canteenStall/area/index.vue index 81d64a2f..462f1911 100644 --- a/src/views/canteen/base/canteenStall/area/index.vue +++ b/src/views/canteen/base/canteenStall/area/index.vue @@ -104,7 +104,7 @@ - + {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} diff --git a/src/views/canteen/base/canteenStall/canteen/index.vue b/src/views/canteen/base/canteenStall/canteen/index.vue index 55dec066..df0f548d 100644 --- a/src/views/canteen/base/canteenStall/canteen/index.vue +++ b/src/views/canteen/base/canteenStall/canteen/index.vue @@ -45,7 +45,7 @@ {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} - + @@ -388,23 +388,21 @@ }, /** 提交按钮 */ submitForm: function() { - console.log(this.baseForm) - console.log(this.rangeTime) + // 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.baseForm.imgUrl = this.checkUrlList[0] - let param = this.baseForm + this.baseForm.bizEndTime=this.rangeTime[1] if (this.canteenId != "") { param.canteenId = this.canteenId - updateCanteenApi(param).then(response => { + updateCanteenApi(this.baseForm).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { - addCanteenApi(param).then(response => { + addCanteenApi(this.baseForm).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -433,8 +431,10 @@ if (res.code == 200) { this.checkUrlList.push(res.data.url) this.checkUrlNameList.push(res.data.name) + this.$set(this.baseForm,"imgUrl",res.data.url) } else { this.$modal.msgError(res.msg) + this.$set(this.baseForm,"imgUrl","") } }) .catch((error) => { @@ -464,6 +464,7 @@ }) this.checkUrlNameList.splice(sum, 1) this.checkUrlList.splice(sum, 1) + this.$set(this.baseForm,"imgUrl","") }, //图片点击查看 handlePictureCardPreview(file) { diff --git a/src/views/canteen/base/canteenStall/stall/index.vue b/src/views/canteen/base/canteenStall/stall/index.vue index d0bbccd5..e4576775 100644 --- a/src/views/canteen/base/canteenStall/stall/index.vue +++ b/src/views/canteen/base/canteenStall/stall/index.vue @@ -54,7 +54,7 @@ {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} - + @@ -637,7 +637,6 @@ export default { if (valid) { this.baseForm.bizStartTime=this.rangeTime[0] this.baseForm.bizEndTime=this.rangeTime[1] - this.baseForm.imgUrl = this.checkUrlList[0] this.baseForm.basicStallMealtimeList = this.mealtimeList let param = this.baseForm if (this.stallId != "") { @@ -710,9 +709,11 @@ export default { imgUpLoadTwo(param).then((res) => { if (res.code == 200) { this.checkUrlList.push(res.data.url) - this.checkUrlNameList.push(res.data.name) + this.checkUrlNameList.push(res.data.name) + this.$set(this.baseForm,"imgUrl",res.data.url) } else { this.$modal.msgError(res.msg) + this.$set(this.baseForm,"imgUrl","") } }) .catch((error) => { @@ -742,6 +743,7 @@ export default { }) this.checkUrlNameList.splice(sum, 1) this.checkUrlList.splice(sum, 1) + this.$set(this.baseForm,"imgUrl","") }, //图片点击查看 handlePictureCardPreview(file) { diff --git a/src/views/canteen/base/mobile/bannerList/index.vue b/src/views/canteen/base/mobile/bannerList/index.vue index db6eea80..1e10a807 100644 --- a/src/views/canteen/base/mobile/bannerList/index.vue +++ b/src/views/canteen/base/mobile/bannerList/index.vue @@ -23,7 +23,7 @@ - + {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} @@ -133,6 +133,7 @@ :on-change="handleFileChange" :on-success="handleAvatarSuccess" :class="{ disabled: uploadDisabled }" + :before-upload="handleBeforeUpload" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" > @@ -283,9 +284,9 @@ export default { }, /** 提交按钮 */ submitForm: function() { + console.log(this.form) this.$refs["form"].validate(valid => { if (valid) { - this.form.imgUrl = this.checkUrlList[0] if (this.form.id != undefined) { updateCarouselApi(this.form).then(response => { this.$modal.msgSuccess("修改成功"); @@ -332,10 +333,11 @@ export default { imgUpLoadTwo(param).then((res) => { if (res.code == 200) { this.checkUrlList.push(res.data.url) - this.checkUrlNameList.push(res.data.name) - this.form.imgUrl = this.checkUrlList[0] + this.checkUrlNameList.push(res.data.name) + this.$set(this.form,"imgUrl",res.data.url) } else { this.$modal.msgError(res.msg) + this.$set(this.form,"imgUrl","") } }) .catch((error) => { @@ -363,7 +365,7 @@ export default { this.checkUrlList=[] this.fileList=[] // 清空当前上传的文件 - this.form[fileType] = '' + this.$set(this.form,"imgUrl","") this.$refs['form'].validateField(fileType) } @@ -378,6 +380,13 @@ export default { handleAvatarSuccess(res, file) { console.log('success') }, + handleBeforeUpload(file) { + const isLt = file.size / 1024 / 1024 < 5 + if (!isLt) { + this.$modal.msgError(`图片大小不能超过 5 MB`) + return false + } + }, handleExceed(files, fileList) { this.$message.warning('最多只可以上传一张图片') }, @@ -390,6 +399,7 @@ export default { }) this.checkUrlNameList.splice(sum, 1) this.checkUrlList.splice(sum, 1) + this.$set(this.form,"imgUrl","") }, //图片点击查看 handlePictureCardPreview(file) { diff --git a/src/views/canteen/dish/dish/index.vue b/src/views/canteen/dish/dish/index.vue index cf97f894..a8c5f7af 100644 --- a/src/views/canteen/dish/dish/index.vue +++ b/src/views/canteen/dish/dish/index.vue @@ -506,6 +506,7 @@ list-type="picture-card" accept=".png, .jpg, .jpeg" :on-success="handleAvatarSuccess" + :before-upload="handleBeforeUpload" :class="{ disabled: uploadDisabled }" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" @@ -845,7 +846,7 @@ effectId:null, suitIdList:[], remark:"", - imageUr:"", + imageUrl:"", dishesNutrition:{} }, formTable:[], @@ -1116,7 +1117,7 @@ effectId:null, suitIdList:[], remark:"", - imageUr:"", + imageUrl:"", dishesNutrition:{} } this.formTable=[] @@ -1297,8 +1298,7 @@ this.$refs.baseForm.validate(valid => { if (valid) { if(!this.btnLoading){ - this.btnLoading=true - this.baseForm.imageUrl = this.checkUrlList[0]; + this.btnLoading=true this.baseForm.arr = this.checkUrlList; let param = {...this.baseForm} if(param.sizeType==1){ @@ -1400,11 +1400,13 @@ imgUpLoadTwo(param).then((res) => { if (res.code == 200) { this.checkUrlList.push(res.data.url) - this.checkUrlNameList.push(res.data.name) + this.checkUrlNameList.push(res.data.name) + this.$set(this.baseForm,"imageUrl",res.data.url) } else { this.fileList=[] this.checkUrlList=[] this.checkUrlNameList=[] + this.$set(this.baseForm,"imageUrl",'') this.$modal.msgError(res.msg) } }).catch((error) => { @@ -1417,6 +1419,14 @@ handleAvatarSuccess(res, file) { console.log('success') }, + // 上传之前 + handleBeforeUpload(file) { + const isLt = file.size / 1024 / 1024 < 5 + if (!isLt) { + this.$modal.msgError(`图片大小不能超过 5 MB`) + return false + } + }, handleExceed(files, fileList) { this.$message.warning('最多只可以上传一张图片') }, @@ -1429,6 +1439,7 @@ }) this.checkUrlNameList.splice(sum, 1) this.checkUrlList.splice(sum, 1) + this.$set(this.baseForm,"imageUrl",'') }, //图片点击查看 handlePictureCardPreview(file) { diff --git a/src/views/canteen/order/offlineManagement/index.vue b/src/views/canteen/order/offlineManagement/index.vue index 3de483d8..beb34ad3 100644 --- a/src/views/canteen/order/offlineManagement/index.vue +++ b/src/views/canteen/order/offlineManagement/index.vue @@ -191,7 +191,7 @@ >详情 部分退款 退单 + 评价 + + + + + {{ item.dishesName }} + + + + + + + + 请问是否对以下可{{handleType}}订单进行{{handleType}}操作? @@ -480,7 +501,7 @@