From 2175bcd77ca97d4e96ac1a2b6b92738599493b13 Mon Sep 17 00:00:00 2001 From: xiezhijun <15270898033@163.com> Date: Wed, 9 Jun 2021 18:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=93=81=E6=8B=B7=E8=B4=9D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E3=80=81=E9=A3=9F=E8=B0=B1=E8=AE=A1=E5=88=92=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BC=98=E5=8C=96=EF=BC=8C=E7=A7=BB=E9=99=A4=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=81=94=E6=9F=A5=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=A1=A3=E6=A1=88=E8=81=94=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/custom/SysRecipesPlanMapper.xml | 8 +++----- .../ImportFanRecord/ImportFan/index.vue | 3 ++- .../custom/dishes/EditDishesDrawer/index.vue | 14 ++++++++++---- stdiet-ui/src/views/custom/dishes/index.vue | 16 ++++++++++++++-- stdiet-ui/src/views/custom/order/index.vue | 18 ++++++++++++++---- .../src/views/custom/recipesPlan/index.vue | 4 ++-- 6 files changed, 45 insertions(+), 18 deletions(-) diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml index 83da1ad1d..1bde54407 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml @@ -184,13 +184,11 @@ srp.start_date,srp.end_date,srp.send_flag,srp.send_time, sc.name as customer, srp.review_status, srp.subscribed FROM sys_recipes_plan srp - LEFT JOIN sys_order sr ON sr.order_id = srp.order_id LEFT JOIN sys_customer sc ON sc.id = srp.cus_id - LEFT JOIN sys_user su_nutritionist ON su_nutritionist.user_id = sr.nutritionist_id AND su_nutritionist.del_flag - = 0 - LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sr.nutri_assis_id AND + LEFT JOIN sys_user su_nutritionist ON su_nutritionist.user_id = sc.main_dietitian AND su_nutritionist.del_flag = 0 + LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sc.assistant_dietitian AND su_nutritionist_assis.del_flag = 0 - WHERE srp.del_flag = 0 AND sr.del_flag = 0 AND srp.type = 0 + WHERE srp.del_flag = 0 AND sc.del_flag = 0 AND srp.type = 0 AND srp.order_id = #{orderId} AND srp.send_flag = #{sendFlag} AND (sc.name like concat('%',#{customer},'%') OR sc.phone like diff --git a/stdiet-ui/src/components/ImportFanRecord/ImportFan/index.vue b/stdiet-ui/src/components/ImportFanRecord/ImportFan/index.vue index 6b2b3df6c..72fef3edd 100644 --- a/stdiet-ui/src/components/ImportFanRecord/ImportFan/index.vue +++ b/stdiet-ui/src/components/ImportFanRecord/ImportFan/index.vue @@ -362,7 +362,8 @@ export default { return (value == undefined || value == null || value == "") ? "" : value; }, autoSelectLive(row){ - if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == ""){ + if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == "" + || row.fanTime == undefined || row.fanTime == null || row.fanTime == ""){ row.importFanLive = null; return; } diff --git a/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue b/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue index f16bb14cb..5ae04be75 100644 --- a/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue +++ b/stdiet-ui/src/views/custom/dishes/EditDishesDrawer/index.vue @@ -261,6 +261,7 @@ export default { selNotRec: [], selRecIds: [], selNotRecIds: [], + copyFlag: false //是否为拷贝 }; }, props: [ @@ -316,9 +317,10 @@ export default { }, }, methods: { - showDrawer(id) { + showDrawer(id, copyFlag) { this.open = true; - this.title = id ? "修改菜品" : "新建菜品"; + this.copyFlag = (copyFlag != undefined && copyFlag) ? true : false; + this.title = id ? (this.copyFlag ? "拷贝菜品" : "修改菜品") : "新建菜品"; this.reset(); if (id) { this.fetchDishesDetail(id); @@ -390,7 +392,7 @@ export default { data.type = data.type.join(","); data.recIds = this.selRecIds; data.notRecIds = this.selNotRecIds; - if (data.id != null) { + if (data.id != null && !this.copyFlag) { updateDishes(data).then((response) => { if (response.code === 200) { this.msgSuccess("修改成功"); @@ -399,9 +401,13 @@ export default { } }); } else { + if(this.copyFlag){ + //拷贝时不需要传id + data.id = null; + } addDishes(data).then((response) => { if (response.code === 200) { - this.msgSuccess("新增成功"); + this.msgSuccess(this.copyFlag ? "拷贝成功" : "新增成功"); this.open = false; this.$emit("onSuccess"); } diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue index 1690b4d8a..5bb6ed356 100644 --- a/stdiet-ui/src/views/custom/dishes/index.vue +++ b/stdiet-ui/src/views/custom/dishes/index.vue @@ -149,7 +149,7 @@ > 修改 拷贝 + + - {{ scope.row.preSaleId ? scope.row.preSale : scope.row.onSale }} + + + {{ scope.row.preSaleId ? scope.row.preSale : "无" }} + + + {{scope.row.onSaleId ? scope.row.onSale : "无" }} + + + + {{scope.row.preSaleId ? scope.row.preSale : scope.row.onSale}} + - + />--> diff --git a/stdiet-ui/src/views/custom/recipesPlan/index.vue b/stdiet-ui/src/views/custom/recipesPlan/index.vue index e21c723a4..7b5c9f05c 100644 --- a/stdiet-ui/src/views/custom/recipesPlan/index.vue +++ b/stdiet-ui/src/views/custom/recipesPlan/index.vue @@ -83,12 +83,12 @@ > - +