!284 菜品拷贝功能、食谱计划列表优化,移除订单联查,改为客户档案联查
Merge pull request !284 from 德仔/xzj
This commit is contained in:
commit
ebbf04ddb1
@ -184,13 +184,11 @@
|
|||||||
srp.start_date,srp.end_date,srp.send_flag,srp.send_time, sc.name as customer, srp.review_status,
|
srp.start_date,srp.end_date,srp.send_flag,srp.send_time, sc.name as customer, srp.review_status,
|
||||||
srp.subscribed
|
srp.subscribed
|
||||||
FROM sys_recipes_plan srp
|
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_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
|
LEFT JOIN sys_user su_nutritionist ON su_nutritionist.user_id = sc.main_dietitian AND su_nutritionist.del_flag = 0
|
||||||
= 0
|
LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sc.assistant_dietitian AND
|
||||||
LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sr.nutri_assis_id AND
|
|
||||||
su_nutritionist_assis.del_flag = 0
|
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="orderId != null">AND srp.order_id = #{orderId}</if>
|
||||||
<if test="sendFlag != null">AND srp.send_flag = #{sendFlag}</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
|
<if test="customer != null and customer != ''">AND (sc.name like concat('%',#{customer},'%') OR sc.phone like
|
||||||
|
@ -362,7 +362,8 @@ export default {
|
|||||||
return (value == undefined || value == null || value == "") ? "" : value;
|
return (value == undefined || value == null || value == "") ? "" : value;
|
||||||
},
|
},
|
||||||
autoSelectLive(row){
|
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;
|
row.importFanLive = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -261,6 +261,7 @@ export default {
|
|||||||
selNotRec: [],
|
selNotRec: [],
|
||||||
selRecIds: [],
|
selRecIds: [],
|
||||||
selNotRecIds: [],
|
selNotRecIds: [],
|
||||||
|
copyFlag: false //是否为拷贝
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
@ -316,9 +317,10 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDrawer(id) {
|
showDrawer(id, copyFlag) {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = id ? "修改菜品" : "新建菜品";
|
this.copyFlag = (copyFlag != undefined && copyFlag) ? true : false;
|
||||||
|
this.title = id ? (this.copyFlag ? "拷贝菜品" : "修改菜品") : "新建菜品";
|
||||||
this.reset();
|
this.reset();
|
||||||
if (id) {
|
if (id) {
|
||||||
this.fetchDishesDetail(id);
|
this.fetchDishesDetail(id);
|
||||||
@ -390,7 +392,7 @@ export default {
|
|||||||
data.type = data.type.join(",");
|
data.type = data.type.join(",");
|
||||||
data.recIds = this.selRecIds;
|
data.recIds = this.selRecIds;
|
||||||
data.notRecIds = this.selNotRecIds;
|
data.notRecIds = this.selNotRecIds;
|
||||||
if (data.id != null) {
|
if (data.id != null && !this.copyFlag) {
|
||||||
updateDishes(data).then((response) => {
|
updateDishes(data).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
@ -399,9 +401,13 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if(this.copyFlag){
|
||||||
|
//拷贝时不需要传id
|
||||||
|
data.id = null;
|
||||||
|
}
|
||||||
addDishes(data).then((response) => {
|
addDishes(data).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess(this.copyFlag ? "拷贝成功" : "新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.$emit("onSuccess");
|
this.$emit("onSuccess");
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="normal"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
@ -157,7 +157,15 @@
|
|||||||
>修改
|
>修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<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"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
@ -378,6 +386,10 @@ export default {
|
|||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.$refs.dishesDrawerRef.showDrawer(row.id);
|
this.$refs.dishesDrawerRef.showDrawer(row.id);
|
||||||
},
|
},
|
||||||
|
/** 拷贝按钮操作 */
|
||||||
|
handleCopy(row) {
|
||||||
|
this.$refs.dishesDrawerRef.showDrawer(row.id, true);
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm("是否确认删除菜品「" + row.name + "」的数据项?", "警告", {
|
this.$confirm("是否确认删除菜品「" + row.name + "」的数据项?", "警告", {
|
||||||
|
@ -395,7 +395,17 @@
|
|||||||
<el-table-column label="服务时长" align="center" prop="serveTime" />
|
<el-table-column label="服务时长" align="center" prop="serveTime" />
|
||||||
<el-table-column label="销售/售中" align="center" prop="preSale" >
|
<el-table-column label="销售/售中" align="center" prop="preSale" >
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -416,7 +426,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="nutriAssis"
|
prop="nutriAssis"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!--<el-table-column
|
||||||
v-if="!isMobile"
|
v-if="!isMobile"
|
||||||
label="策划"
|
label="策划"
|
||||||
align="center"
|
align="center"
|
||||||
@ -427,7 +437,7 @@
|
|||||||
label="策划助理"
|
label="策划助理"
|
||||||
align="center"
|
align="center"
|
||||||
prop="plannerAssis"
|
prop="plannerAssis"
|
||||||
/>
|
/>-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="!isMobile"
|
v-if="!isMobile"
|
||||||
label="运营"
|
label="运营"
|
||||||
@ -444,7 +454,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<auto-hide-message
|
<auto-hide-message
|
||||||
:data="scope.row.remark == null ? '' : scope.row.remark + ''"
|
:data="scope.row.remark == null ? '' : scope.row.remark + ''"
|
||||||
:maxLength="20"
|
:maxLength="10"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -83,12 +83,12 @@
|
|||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div>
|
<!--<div>
|
||||||
<span style="color: #e6a23c; font-family: PingFang SC">
|
<span style="color: #e6a23c; font-family: PingFang SC">
|
||||||
注意事项:
|
注意事项:
|
||||||
<br />1、2021年1月开始的订单才会自动生成食谱计划</span
|
<br />1、2021年1月开始的订单才会自动生成食谱计划</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>-->
|
||||||
<el-row :gutter="10" class="mb8" style="margin-top: 10px">
|
<el-row :gutter="10" class="mb8" style="margin-top: 10px">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user