From 01f619fab1595720b744f34e6aa3315426b93750 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Fri, 9 May 2025 16:09:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E8=B6=85=E8=AE=BE=E5=A4=87=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E5=95=86=E8=B6=85=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/superStore/device.js | 56 +---- src/api/superStore/superOrder.js | 8 +- src/views/superstore/doubleScreen/index.vue | 86 ++++--- src/views/superstore/superOrder/index.vue | 246 +++++++------------- vue.config.js | 8 +- 5 files changed, 146 insertions(+), 258 deletions(-) diff --git a/src/api/superStore/device.js b/src/api/superStore/device.js index 440040b4..6ff91182 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/api/v1/basics-supermarket/page-supermarket', + url: '/smart-canteen/supermarket_info/getSupermarketList', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -15,12 +15,12 @@ export function getSupermarketByAreaApi(data) { // 分页查询设备信息 export function getDeviceListPageApi(data) { return request({ - url: '/smart-canteen/api/v2/device/page', - method: 'post', + url: '/smart-canteen/supermarket_device/list', + method: 'get', headers: { "merchant-id":"378915229716713472", - }, - data: data + }, + params:data }) } @@ -28,7 +28,7 @@ export function getDeviceListPageApi(data) { // 新增设备 export function addDeviceApi(data) { return request({ - url: '/smart-canteen/api/v2/device/insert', + url: '/smart-canteen/supermarket_device/add', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -40,7 +40,7 @@ export function addDeviceApi(data) { // 修改设备信息 export function updateDeviceApi(data) { return request({ - url: '/smart-canteen/api/v2/device/update', + url: '/smart-canteen/supermarket_device/update', method: 'post', headers: { "merchant-id":"378915229716713472", @@ -51,22 +51,11 @@ export function updateDeviceApi(data) { // 删除设备信息 -// export function deleteDeviceApi(data) { -// return request({ -// url: '/smart-canteen/api/v2/device/delete', -// method: 'post', -// headers: { -// "merchant-id":"378915229716713472", -// }, -// data: data -// }) -// } - -export function deleteDeviceApi(deviceId){ + export function deleteDeviceApi(deviceId){ const formData = new FormData() formData.append('deviceId', deviceId) return request({ - url: '/smart-canteen/api/v2/device/delete', + url: '/smart-canteen/doubleScreenMachine/delete', method: 'post', data: formData, headers: { @@ -76,33 +65,6 @@ export function deleteDeviceApi(deviceId){ }) } -//{"page":{"current":1,"size":20,"total":0},"object":{"deviceSn":"124"}} -// 分页查询设备异常信息 -export function getDeviceStateLogApi(data) { - return request({ - url: '/smart-canteen/api/v2/device/statelog/page', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) - } - - -// 获取指定日期菜谱计划菜品详情 -export function getMenuRecipeDetailApi(data) { - return request({ - url: '/smart-canteen/menu_recipe/getDetailByDate', - method: 'post', - headers: { - "merchant-id":"378915229716713472", - }, - data: data - }) -} - - diff --git a/src/api/superStore/superOrder.js b/src/api/superStore/superOrder.js index 71f0ae6f..562af61c 100644 --- a/src/api/superStore/superOrder.js +++ b/src/api/superStore/superOrder.js @@ -108,12 +108,16 @@ export function orderNuclearModeListApi(data) { // 订单列表-分页 export function orderPageListApi(data) { return request({ - url: '/smart-canteen/api/v2/web/order/page/detail', + url: '/smart-canteen/supermarket_info/order/list', method: 'post', headers: { "merchant-id":"378915229716713472", }, - data: data + data: data, + params:{ + pageNum:data.pageNum, + pageSize:data.pageSize + } }) } // 订单详情 diff --git a/src/views/superstore/doubleScreen/index.vue b/src/views/superstore/doubleScreen/index.vue index 8922194a..770edace 100644 --- a/src/views/superstore/doubleScreen/index.vue +++ b/src/views/superstore/doubleScreen/index.vue @@ -7,8 +7,8 @@ :options="treeOptions" :props="treeProps" collapse-tags clearable @change="handleTreeChange"> - - + + - + + + + - + + @@ -240,7 +250,7 @@ queryParams: { pageNum: 1, pageSize: 10, - deviceSearchInfo:"",//关键字 + keyWord:"",//关键字 areaId:null,//区域 canteenId:null,//食堂 }, @@ -291,16 +301,13 @@ }); }, //查询-区域树 - handleTreeChange(e){ - console.log(this.queryParams.areaIdList) + handleTreeChange(e){ let param= { - areaIdList:this.queryParams.areaIdList, - current:1, - size:-1 + areaId:this.queryParams.areaId } getSupermarketByAreaApi(param).then((response) => { - this.supermarketOptions=response.records||[] - this.queryParams.canteenIdList = [] + this.supermarketOptions=response.rows||[] + this.queryParams.canteenId = null }); }, /** 搜索按钮操作 */ @@ -317,20 +324,15 @@ getList() { this.loading = true; let param = { - "page":{"current":this.queryParams.pageNum,"size":this.queryParams.pageSize}, - "object":{ - "areaIdList":this.queryParams.areaIdList, - "canteenIdList":this.queryParams.canteenIdList, - "mealLineIdList":[], - "deviceSearchInfo":this.queryParams.deviceSearchInfo, - "deviceType":53 - } - } - - let str = base64.encode(JSON.stringify(param)) - // console.log(str) - getDeviceListPageApi({"content":str}).then(response => { - this.tableListData = response.records; + "pageNum":this.queryParams.pageNum, + "pageSize":this.queryParams.pageSize, + "areaId":this.queryParams.areaId, + "canteenId":this.queryParams.canteenId, + "keyWord":this.queryParams.keyWord, + "deviceType":53 + } + getDeviceListPageApi(param).then(response => { + this.tableListData = response.rows; this.total = Number(response.total); this.loading = false; }); @@ -355,16 +357,14 @@ handleUpdate(row) { this.reset(); let param= { - areaIdList:[row.bindList[0].areaId], - current:1, - size:-1 + areaId:row.areaId } getSupermarketByAreaApi(param).then((response) => { - this.supermarketOptions2=response.records||[] + this.supermarketOptions2=response.rows||[] }); this.baseForm = Object.assign({}, row) - this.$set(this.baseForm,"areaId",row.bindList[0].areaId) - this.$set(this.baseForm,"canteenId",row.bindList[0].canteenId) + this.$set(this.baseForm,"areaId",row.areaId) + this.$set(this.baseForm,"canteenId",row.canteenId) this.title = "修改"; this.open = true; }, @@ -372,16 +372,14 @@ handleView(row) { this.reset(); let param= { - areaIdList:[row.bindList[0].areaId], - current:1, - size:-1 + areaId:row.areaId } getSupermarketByAreaApi(param).then((response) => { - this.supermarketOptions2=response.records||[] + this.supermarketOptions2=response.rows||[] }); this.baseForm = Object.assign({}, row) - this.$set(this.baseForm,"areaId",row.bindList[0].areaId) - this.$set(this.baseForm,"canteenId",row.bindList[0].canteenId) + this.$set(this.baseForm,"areaId",row.areaId) + this.$set(this.baseForm,"canteenId",row.canteenId) this.title = "查看"; this.open = true; }, @@ -392,12 +390,10 @@ handleTreeChange2(val){ setTimeout(()=>{ let param= { - areaIdList:[val], - current:1, - size:-1 + areaId:val } getSupermarketByAreaApi(param).then((response) => { - this.supermarketOptions2=response.records||[] + this.supermarketOptions2=response.rows||[] this.$set(this.baseForm,"canteenId",null) }); },800) diff --git a/src/views/superstore/superOrder/index.vue b/src/views/superstore/superOrder/index.vue index 5f361847..5d71ede6 100644 --- a/src/views/superstore/superOrder/index.vue +++ b/src/views/superstore/superOrder/index.vue @@ -14,8 +14,8 @@ :picker-options="pickerOptions" > - - + - - + + - - + - + - - + + - - + + - - - - - - - - 搜索 重置 @@ -90,7 +80,7 @@ - + @@ -122,18 +112,16 @@ - + - - + + - - - - - - - - - - - + + + + + + + + + + + + + @@ -225,21 +209,21 @@ - {{ orderInfoData.custName }} + {{ orderInfoData.nickName }} - {{ orderInfoData.custNum }} + {{ orderInfoData.userId }} - {{ orderInfoData.mobile }} + {{ orderInfoData.phoneNumber }} - {{ orderInfoData.orgFullName }} + {{ orderInfoData.deptFullName }} @@ -260,9 +244,9 @@ -
+ @@ -280,9 +264,9 @@ -
+ @@ -387,10 +371,10 @@
请问是否对以下可{{handleType}}订单进行{{handleType}}操作?
可{{handleType}}订单 {{ableList.length}} 笔
-
{{ (index+1) }}. 订单编号:{{item.orderId}},用户姓名:{{item.custName}},用户编号:{{item.custNum}},订单金额:{{(item.payableAmount/100).toFixed(2)}}
+
{{ (index+1) }}. 订单编号:{{item.orderId}},用户姓名:{{item.nickName}},用户编号:{{item.userId}},订单金额:{{(item.payableAmount/100).toFixed(2)}}
不可{{handleType}}订单 {{unableList.length}} 笔
-
{{ (index+1) }}. 订单编号:{{item.orderId}},用户姓名:{{item.custName}}:{{item.custNum}},订单金额:{{(item.payableAmount/100).toFixed(2)}}
+
{{ (index+1) }}. 订单编号:{{item.orderId}},用户姓名:{{item.nickName}}:{{item.userId}},订单金额:{{(item.payableAmount/100).toFixed(2)}}