From f914a79ba53f181cf1bce1fd69104bc5ebf5dc01 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Thu, 6 Mar 2025 18:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9F=E5=A0=82=E6=A1=A3=E5=8F=A3=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/canteen.js | 81 +- src/api/base/stall.js | 205 ++++++ src/views/base/area/index.vue | 11 +- src/views/base/canteen/index.vue | 216 +++--- src/views/base/canteen/temp.vue | 612 ++++++++-------- src/views/base/stall/index.vue | 1183 ++++++++++++++++++++++-------- 6 files changed, 1570 insertions(+), 738 deletions(-) create mode 100644 src/api/base/stall.js diff --git a/src/api/base/canteen.js b/src/api/base/canteen.js index b3862be1..76519abc 100644 --- a/src/api/base/canteen.js +++ b/src/api/base/canteen.js @@ -37,10 +37,52 @@ export function addCanteenApi(data) { data: data }) } +// 获取食堂 +export function getCanteenInfoModifyApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/get-canteen-for-modify', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 修改食堂 +export function updateCanteenApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/modify-canteen', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 删除食堂 +export function removeCanteenApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/remove-canteen', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} - - +// 查询食堂编号 +export function getCanteenNumApi(data) { + return request({ + url: 'smart-canteen/api/v2/alloc/canteen/get-canteen-num', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} // 查询食堂标签列表(分页) export function getCanteenLabelApi(data) { @@ -76,11 +118,6 @@ export function queryCustJobPageApi(data) { }) } - - - - - // 查询餐次时段列表 export function getMealtimeListApi(data) { return request({ @@ -92,4 +129,32 @@ export function getMealtimeListApi(data) { data: data }) } - \ No newline at end of file + + +// 修改食堂 是否支持预订餐 +export function changeIfReserveApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/modify-canteen-if-reserve', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + +// 修改食堂/档口 营业状态 +export function changeBusinessStateApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/modify-business-state', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + + diff --git a/src/api/base/stall.js b/src/api/base/stall.js new file mode 100644 index 00000000..abea2cf9 --- /dev/null +++ b/src/api/base/stall.js @@ -0,0 +1,205 @@ +import request from '@/utils/request' + +// export function listData(query) { +// return request({ +// url: '/system/dict/data/list', +// method: 'get', +// params: query +// }) +// } + +// export function getDicts(dictType) { +// return request({ +// url: '/system/dict/data/type/' + dictType, +// method: 'get' +// }) +// } + + +// 通过区域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 + }) +} + +// 通过食堂查询档口 +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 getPageStallApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/page-stall', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 新增档口 +export function addStallApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/add-stall', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 获取档口 +export function getStallInfoModifyApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/get-stall-for-modify', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 修改档口 +export function updateStallApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/modify-stall', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 删除档口 +export function removeStallApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/remove-stall', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + +// 查询档口编号 +export function getStallNumApi(data) { + return request({ + url: 'smart-canteen/api/v2/alloc/canteen/get-canteen-num', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 查询标签列表(分页) +export function getLabelListApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/label/page', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 查询品类列表(分页) +export function getKindListApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/kind/list-name', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + + +// 人员职位职称查询 +export function queryAllCustJobApi(data) { + return request({ + url: '/smart-canteen/custJob/queryAllCustJob', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} +// 分页查询人员及职位信息 +export function queryCustJobPageApi(data) { + return request({ + url: '/smart-canteen/custInfo/page-cust-job-info', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 查询餐次时段列表 +export function getMealtimeListApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/mealtime/list-by-param', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + +// 修改档口 是否支持预订餐 +export function changeIfReserveApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/modify-stall-if-reserve', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + +// 修改档口/档口 营业状态 +export function changeBusinessStateApi(data) { + return request({ + url: '/smart-canteen/api/v2/alloc/canteen/modify-business-state', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + + diff --git a/src/views/base/area/index.vue b/src/views/base/area/index.vue index 6b101515..d7285c15 100644 --- a/src/views/base/area/index.vue +++ b/src/views/base/area/index.vue @@ -80,10 +80,10 @@ v-show="showSearch" label-width="68px" > - +
- + @@ -63,6 +63,7 @@ inactive-text="关闭" :active-value="1" :inactive-value="2" + @change="changeIfReserve(scope.row)" > @@ -92,7 +93,7 @@ @@ -121,20 +122,17 @@ @@ -170,9 +168,13 @@ - @@ -182,6 +184,7 @@ 取 消
- - + @@ -348,9 +350,7 @@ 取 消 - - - + @@ -364,7 +364,8 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/base/stall/index.vue b/src/views/base/stall/index.vue index bf28e6ca..1c8987ca 100644 --- a/src/views/base/stall/index.vue +++ b/src/views/base/stall/index.vue @@ -1,323 +1,890 @@ - - - \ No newline at end of file + } + }); + }, + + //基础设置-选择区域 + handleTreeChange2(val){ + setTimeout(()=>{ + let arr=[val] + let param= { areaIdList:arr } + // 选择区域后获取相应食堂 + getCanteenByAreaApi(param).then((response) => { + this.canteenOptions2=response||[] + this.baseForm.canteenId=null + this.baseForm.stallNum=null + }); + },800) + }, + //选择食堂后获取档口编号 + chosenCanteen(e){ + console.log(e) + this.baseForm.canteenId=e + this.$refs['baseForm'].clearValidate(['canteenId']); + this.getStallNum() + }, + //获取档口编号 + async getStallNum() { + let params= { + "superId":this.baseForm.canteenId, + "canteenTreeType":2 + } + const res = await getStallNumApi(params); + this.$set(this.baseForm,"stallNum",res.data) + this.$forceUpdate() + }, + //查询标签下拉 + getLabel() { + let param = { "current": 1,"size": -1} + getLabelListApi(param).then((response) => { + this.labelOptions = response.records; + }); + }, + //查询标签下拉 + getKind() { + let param = { "current": 1,"size": -1} + getKindListApi(param).then((response) => { + this.kindOptions = response.records; + }); + }, + //选择负责人 + chosenCharger(){ + this.queryCustJobPage() + this.openJob=true + }, + //人员职位职称下拉 + queryAllCustJob() { + queryAllCustJobApi({}).then((response) => { + this.jobOptions = response.data + console.log(response) + }); + }, + //负责人弹窗-查询按钮 + handleDialogQuery(){ + this.dialogQueryParams.pageNum=1 + this.queryCustJobPage() + }, + //负责人弹窗-人员分页查询接口 + queryCustJobPage() { + let param = { + "current": this.dialogQueryParams.pageNum, + "ifQueryJob": 1, + "size": this.dialogQueryParams.pageSize + } + queryCustJobPageApi(param).then((response) => { + this.jobTableData = response.records + this.dialogTotal = Number(response.total); + console.log(response) + }); + }, + // 档口图片上传 + handleRemove(file, fileList) { + console.log(file, fileList); + }, + handlePictureCardPreview(file) { + this.dialogImageUrl = file.url; + this.dialogVisible = true; + }, + openImg(row) { + this.dialogImageUrl = row.imgUrl; + this.dialogVisible = true; + }, + // 图片上传 + imgUpLoad(param, name, index) { + // console.log(param,'image') + param.type = 'stall' + imgUpLoadTwo(param).then((res) => { + if (res.code == 200) { + this.checkUrlList.push(res.data.fileUrl) + this.checkUrlNameList.push(res.data.fileName) + } else { + this.$modal.msgError(res.msg) + } + }) + .catch((error) => { + this.$modal.msgError(error) + }) + }, + handleAvatarSuccess(res, file) { + console.log('success') + }, + handleExceed(files, fileList) { + this.$message.warning('最多只可以上传一张图片') + }, + handleRemove(file, fileList) { + let sum = 0 + this.checkUrlNameList.forEach((item, index) => { + if (item == file.name) { + sum = index + } + }) + this.checkUrlNameList.splice(sum, 1) + this.checkUrlList.splice(sum, 1) + }, + //图片点击查看 + handlePictureCardPreview(file) { + console.log(file) + this.dialogImageUrl = file.url + this.dialogVisible = true + }, + //查询餐次时段列表 + getMealtimeList() { + getMealtimeListApi({}).then((response) => { + this.mealtimeList = response + console.log(response) + }); + }, + + + + + + + + + } +}; +