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 <if test="orderId != null">AND srp.order_id = #{orderId}</if> <if test="sendFlag != null">AND srp.send_flag = #{sendFlag}</if> <if test="customer != null and customer != ''">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 @@ > <template slot-scope="scope"> <el-button - size="mini" + size="normal" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" @@ -157,7 +157,15 @@ >修改 </el-button> <el-button - size="mini" + size="normal" + type="text" + icon="el-icon-document-copy" + @click="handleCopy(scope.row)" + v-hasPermi="['custom:dishes:add']" + >拷贝 + </el-button> + <el-button + size="normal" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" @@ -378,6 +386,10 @@ export default { handleUpdate(row) { this.$refs.dishesDrawerRef.showDrawer(row.id); }, + /** 拷贝按钮操作 */ + handleCopy(row) { + this.$refs.dishesDrawerRef.showDrawer(row.id, true); + }, /** 删除按钮操作 */ handleDelete(row) { this.$confirm("是否确认删除菜品「" + row.name + "」的数据项?", "警告", { diff --git a/stdiet-ui/src/views/custom/order/index.vue b/stdiet-ui/src/views/custom/order/index.vue index 1973a1abb..d8d1ba943 100644 --- a/stdiet-ui/src/views/custom/order/index.vue +++ b/stdiet-ui/src/views/custom/order/index.vue @@ -395,7 +395,17 @@ <el-table-column label="服务时长" align="center" prop="serveTime" /> <el-table-column label="销售/售中" align="center" prop="preSale" > <template slot-scope="scope"> - {{ scope.row.preSaleId ? scope.row.preSale : scope.row.onSale }} + <div v-if="scope.row.orderType == 2"> + <div> + {{ scope.row.preSaleId ? scope.row.preSale : "无" }} + </div> + <div> + {{scope.row.onSaleId ? scope.row.onSale : "无" }} + </div> + </div> + <div v-else> + {{scope.row.preSaleId ? scope.row.preSale : scope.row.onSale}} + </div> </template> </el-table-column> <el-table-column @@ -416,7 +426,7 @@ align="center" prop="nutriAssis" /> - <el-table-column + <!--<el-table-column v-if="!isMobile" label="策划" align="center" @@ -427,7 +437,7 @@ label="策划助理" align="center" prop="plannerAssis" - /> + />--> <el-table-column v-if="!isMobile" label="运营" @@ -444,7 +454,7 @@ <template slot-scope="scope"> <auto-hide-message :data="scope.row.remark == null ? '' : scope.row.remark + ''" - :maxLength="20" + :maxLength="10" /> </template> </el-table-column> 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 @@ > </el-form-item> </el-form> - <div> + <!--<div> <span style="color: #e6a23c; font-family: PingFang SC"> 注意事项: <br />1、2021年1月开始的订单才会自动生成食谱计划</span > - </div> + </div>--> <el-row :gutter="10" class="mb8" style="margin-top: 10px"> <el-col :span="1.5"> <el-button