修改样式,修改逻辑

This commit is contained in:
huangdeliang
2021-02-24 18:20:45 +08:00
parent 13727e8d39
commit 31088215b5
23 changed files with 423 additions and 216 deletions

View File

@ -113,18 +113,24 @@
>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="客户姓名" align="center" prop="customer" />
<!-- <el-table-column
<el-table-column
label="客户手机号"
align="center"
prop="hidePhone"
width="180"
/> -->
/>
<el-table-column
label="食谱日期范围"
align="center"
prop="scopeDate"
width="200"
/>
<el-table-column
label="食谱天数范围"
align="center"
prop="scopeDay"
width="200"
/>
<el-table-column label="营养师" align="center" prop="nutritionist" />
<el-table-column
label="营养师助理"
@ -447,8 +453,9 @@ export default {
this.recipesPlanList.forEach(function (item, index) {
item.scopeDate =
dayjs(item.startDate).format("YYYY-MM-DD") +
" " +
" " +
dayjs(item.endDate).format("YYYY-MM-DD");
item.scopeDay = `${item.startNumDay}${item.endNumDay}`;
});
this.total = response.total;
this.loading = false;
@ -603,25 +610,25 @@ export default {
},
handleBuild(data) {
// console.log(data);
const { startDate, endDate, id, cusId, recipesId } = data;
const { id, cusId, recipesId, customer, startNumDay, endNumDay } = data;
// const params = { id: data.id, cusId: data.orderId };
// const path = `/recipes/build/${orderId}/${id}/${recipesId || 0}`;
// this.$router.push({
// name: "build",
// params,
// });
const queryParam = {
planId: id,
cusId,
name: customer,
};
if (!recipesId) {
queryParam.startDate = startDate;
queryParam.endDate = endDate;
} else {
if (recipesId) {
queryParam.recipesId = recipesId;
} else {
queryParam.startNum = startNumDay;
queryParam.endNum = endNumDay;
}
this.$router.push({ path: "/recipes/build", query: queryParam });
const routeUrl = this.$router.resolve({
path: "/recipes/build",
query: queryParam,
});
window.open(routeUrl.href, "_blank");
// this.$router.push({ path: "/recipes/build", query: queryParam });
},
},
};