diff --git a/src/api/dish/nutritionInfo.js b/src/api/dish/nutritionInfo.js index b8e8b851..f006b1a7 100644 --- a/src/api/dish/nutritionInfo.js +++ b/src/api/dish/nutritionInfo.js @@ -43,7 +43,10 @@ export function listNutrition(query) { url: '/smart-canteen/menu_nutrition/list', method: 'post', data: query, - params:query + params:{ + pageNum:query.pageNum, + pageSize:query.pageSize + } }) } diff --git a/src/utils/request.js b/src/utils/request.js index f5ebacec..bae61fb9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -83,10 +83,11 @@ service.interceptors.request.use(config => { const requestObj = { url: config.url, data: data, time: Date.now() } console.log(sessionObj) console.log(requestObj) - - if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 5000 && sessionObj.url === requestObj.url) { - console.warn(`[${sessionObj.url}]: 数据正在处理,请勿重复提交`) - return Promise.reject(new Error('数据正在处理,请勿重复提交')) + if(requestObj.data&&requestObj.data.indexOf('pageNum')==-1){ + if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 3000 && sessionObj.url === requestObj.url) { + console.warn(`[${sessionObj.url}]: 数据正在处理,请勿重复提交`) + return Promise.reject(new Error('数据正在处理,请勿重复提交')) + } } cache.session.setJSON('sessionObj', requestObj) } diff --git a/src/views/accountCenter/account/accountManager/index.vue b/src/views/accountCenter/account/accountManager/index.vue index 7483e0b7..4efe9b8a 100644 --- a/src/views/accountCenter/account/accountManager/index.vue +++ b/src/views/accountCenter/account/accountManager/index.vue @@ -21,14 +21,14 @@ - + + 正常 + 停用 用户类别 - {{ form.userTypeName }} + @@ -224,8 +226,8 @@ }" clearable collapse-tags > - - + + - - + + + + + + - - + + + + + + {{ (scope.row.amount/100).toFixed(2) }} @@ -332,11 +342,13 @@ 账户状态 - {{ form.accStatusName }} + + 正常 + 停用 用户类别 - {{ form.userTypeName }} + @@ -410,8 +422,8 @@ }" clearable collapse-tags > - - + + - - + + + + + + - - + + + + + + {{ (scope.row.amount/100).toFixed(2) }} @@ -551,7 +571,7 @@ deptIdList:[], hasSum:true, searchValue:null, - psnType:null + userType:null }, dialogTableData:[], dialogTotal: 0, @@ -759,7 +779,7 @@ "deptIdList": this.dialogParams.deptIdList, // "hasSum": this.dialogParams.hasSum, "searchValue": this.dialogParams.searchValue, - "psnType": this.dialogParams.psnType + "userType": this.dialogParams.userType } accInfoPageApi(param).then(response => { this.dialogTableData = response.rows; diff --git a/src/views/dish/dish/index.vue b/src/views/dish/dish/index.vue index 317ac138..3697a202 100644 --- a/src/views/dish/dish/index.vue +++ b/src/views/dish/dish/index.vue @@ -604,8 +604,15 @@ - - + + + + + + + 组成成分 + + 增加 @@ -637,7 +644,7 @@ - + (scope.row.weight=v.replace(/[^\d]/g,''))"> g @@ -695,10 +702,10 @@ 增加 删除 - --> - - - + --> + + + 每{{ baseForm.weight }}g 含营养信息 diff --git a/src/views/dish/material/components/MaterialDialog.vue b/src/views/dish/material/components/MaterialDialog.vue index 31c10f53..e9940274 100644 --- a/src/views/dish/material/components/MaterialDialog.vue +++ b/src/views/dish/material/components/MaterialDialog.vue @@ -379,9 +379,9 @@ export default { // unitId: [{ required: true, message: '请选择原料单位', trigger: 'change' }] }, nutritionFields: [ - { label: '可食部分', prop: 'ediblePart', unit: 'g/100g' }, + { label: '可食部分', prop: 'edible', unit: 'g/100g' }, { label: '水分', prop: 'water', unit: 'g/100g' }, - { label: '热量', prop: 'heat', unit: '千卡/100g' }, + { label: '热量', prop: 'calories', unit: '千卡/100g' }, { label: '蛋白质', prop: 'protein', unit: 'g/100g' }, { label: '脂肪', prop: 'fat', unit: 'g/100g' }, { label: '碳水化合物', prop: 'carbohydrate', unit: 'g/100g' }, @@ -538,9 +538,9 @@ export default { }, //选中营养信息 chosenNutrition(){ - console.log("选中营养信息",this.form.nutritionId) - + console.log("选中营养信息",this.form.nutritionId) getNutrition({nutritionId: this.form.nutritionId}).then((response) => { + this.form.menuMaterialNutritionDTO = response.data }); }, diff --git a/src/views/dish/menu/detail.vue b/src/views/dish/menu/detail.vue index 8d86549a..766cbcae 100644 --- a/src/views/dish/menu/detail.vue +++ b/src/views/dish/menu/detail.vue @@ -875,8 +875,8 @@ export default { let index = this.dishesList.findIndex(v=>v.dishesId==obj.dishesId) if(index==-1){ let dish = Object.assign({}, obj) - this.$set(dish,'salePrice',Number(dish.unitPrice/100)||Number(dish.unitPrice/100)) - this.$set(dish,'price',Number(dish.unitPrice/100)) + this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100)) + this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'supplyNum',dish.supplyNum||99999) this.$set(dish,'restrictNum',dish.restrictNum||99999) this.dishesList.push(dish) diff --git a/src/views/dish/menu/edit.vue b/src/views/dish/menu/edit.vue index f02c7ccf..7f01fe56 100644 --- a/src/views/dish/menu/edit.vue +++ b/src/views/dish/menu/edit.vue @@ -1059,8 +1059,8 @@ export default { let index = this.dishesList.findIndex(v=>v.dishesId==obj.dishesId) if(index==-1){//新-加入 let dish = Object.assign({}, obj) - this.$set(dish,'salePrice',Number(dish.unitPrice/100)||Number(dish.unitPrice/100)) - this.$set(dish,'price',Number(dish.unitPrice/100)) + this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100)) + this.$set(dish,'price',Number(dish.price/100)) this.$set(dish,'supplyNum',dish.supplyNum||99999) this.$set(dish,'restrictNum',dish.restrictNum||99999) this.dishesList.push(dish) diff --git a/src/views/dish/menu/index.vue b/src/views/dish/menu/index.vue index 599a668e..adf312f1 100644 --- a/src/views/dish/menu/index.vue +++ b/src/views/dish/menu/index.vue @@ -145,26 +145,30 @@ - - - 设备详情 - 编辑 - 删除 - + + + 设备详情 + + + + + 编辑 + 删除 + diff --git a/src/views/dish/nutritionInfo/index.vue b/src/views/dish/nutritionInfo/index.vue index 36a69ebb..6c4df8ed 100644 --- a/src/views/dish/nutritionInfo/index.vue +++ b/src/views/dish/nutritionInfo/index.vue @@ -227,7 +227,7 @@ @@ -238,7 +238,7 @@ @@ -251,7 +251,7 @@ @@ -262,7 +262,7 @@ @@ -275,7 +275,7 @@ @@ -286,7 +286,7 @@ @@ -299,7 +299,7 @@ @@ -310,7 +310,7 @@ @@ -323,7 +323,7 @@ @@ -334,7 +334,7 @@ @@ -347,7 +347,7 @@ @@ -358,7 +358,7 @@ @@ -371,7 +371,7 @@ @@ -382,7 +382,7 @@ @@ -396,7 +396,7 @@ @@ -407,7 +407,7 @@ @@ -420,7 +420,7 @@ @@ -431,7 +431,7 @@ @@ -444,7 +444,7 @@ @@ -455,7 +455,7 @@ @@ -468,7 +468,7 @@ @@ -479,7 +479,7 @@ @@ -492,7 +492,7 @@ @@ -503,7 +503,7 @@ @@ -516,7 +516,7 @@ @@ -527,7 +527,7 @@ @@ -540,7 +540,7 @@ @@ -748,7 +748,7 @@ export default { this.$modal .confirm("是否确认删除数据项?") .then(function () { - return nutritionTypeDelApi({ids:[data.value]}); + return nutritionTypeDelApi({ids:[data.id]}); }) .then(() => { this.$modal.msgSuccess("删除成功");