Merge branches 'master' and 'xzj' of https://gitee.com/darlk/ShengTangManage into xzj

This commit is contained in:
xiezhijun
2021-03-11 18:43:55 +08:00
10 changed files with 196 additions and 47 deletions

View File

@ -111,18 +111,31 @@
label="创建时间"
align="center"
prop="createTime"
width="166"
/>
width="100"
>
<template slot-scope="scope">
<div v-for="time in scope.row.createTime.split(' ')" :key="time">
{{ time }}
</div>
</template>
</el-table-column>
<el-table-column
label="进粉时间"
align="center"
prop="fansTime"
width="120"
width="100"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.fansTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="进粉渠道"
align="center"
prop="fansChannel"
:formatter="fansChannelFormat"
>
</el-table-column>
<el-table-column label="客户姓名" align="center" prop="name" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column
@ -316,7 +329,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="进粉时间" prop="fansTime">
<el-date-picker
v-model="form.fansTime"
@ -329,6 +342,18 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="进粉渠道" prop="fansChannel">
<el-select v-model="form.fansChannel" placeholder="请选择">
<el-option
v-for="dict in fansChannelOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
/>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div slot="footer" class="dialog-footer">
@ -346,7 +371,7 @@
<!-- 外食热量统计 -->
<heatStatisticsDrawer ref="heatStatisticsRef"></heatStatisticsDrawer>
<!-- 食谱计划抽屉 -->
<RecipesPlanDrawer ref="recipesPlanDrawerRef"/>
<RecipesPlanDrawer ref="recipesPlanDrawerRef" />
</div>
</template>
@ -365,7 +390,7 @@ import OrderDrawer from "@/components/OrderDrawer";
import PhysicalSignsDialog from "@/components/PhysicalSignsDialog";
import ContractDrawer from "@/components/ContractDrawer";
import HeatStatisticsDrawer from "@/components/HeatStatisticsDrawer";
import RecipesPlanDrawer from '@/components/RecipesPlanDrawer'
import RecipesPlanDrawer from "@/components/RecipesPlanDrawer";
import { mapGetters } from "vuex";
export default {
@ -375,7 +400,7 @@ export default {
"physical-signs-dialog": PhysicalSignsDialog,
"contract-drawer": ContractDrawer,
heatStatisticsDrawer: HeatStatisticsDrawer,
RecipesPlanDrawer
RecipesPlanDrawer,
},
data() {
const userId = store.getters && store.getters.userId;
@ -395,6 +420,8 @@ export default {
total: 0,
// 客户档案表格数据
customerCenterList: [],
//
fansChannelOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
@ -450,6 +477,9 @@ export default {
};
},
created() {
this.getDicts("customer_fans_channel").then((response) => {
this.fansChannelOptions = response.data;
});
this.getList();
},
computed: {
@ -496,6 +526,9 @@ export default {
row.assistantDietitian
);
},
fansChannelFormat(row, column) {
return this.selectDictLabel(this.fansChannelOptions, row.fansChannel);
},
handleOnOrderClick(row) {
this.$refs["cusOrderDrawerRef"].showDrawer(row);
},
@ -510,7 +543,7 @@ export default {
},
handleOnMenuClick(row) {
// console.log(row);
this.$refs['recipesPlanDrawerRef'].showDrawer(row);
this.$refs["recipesPlanDrawerRef"].showDrawer(row);
},
handleClickHeatStatistics(row) {
this.$refs["heatStatisticsRef"].showDrawer(row);
@ -537,6 +570,8 @@ export default {
afterDietitian: null,
salesman: null,
chargePerson: null,
fansChannel: 0,
fansTime: null,
followStatus: 0,
createTime: null,
createBy: null,

View File

@ -24,7 +24,10 @@
{{ totalHeat.toFixed(1) }}千卡
</div>
</div>
<div style="text-align: right; margin-top: 4px">
<div
style="text-align: right; margin-top: 4px"
v-if="recipesData.length > 1"
>
<el-button size="mini" type="text" @click="backToAll"
>查看全部</el-button
>
@ -39,7 +42,7 @@ require("@/utils/echarts/myShine");
import resize from "@/views/dashboard/mixins/resize";
import TextInfo from "@/components/TextInfo";
import { createNamespacedHelpers } from "vuex";
const { mapMutations } = createNamespacedHelpers("recipes");
const { mapMutations, mapState } = createNamespacedHelpers("recipes");
export default {
mixins: [resize],
@ -99,6 +102,7 @@ export default {
// console.log(mData);
return mData;
},
...mapState(["recipesData"]),
},
mounted() {
this.$nextTick(() => {

View File

@ -2,10 +2,12 @@
<div class="recipes_header_com_wrapper">
<div class="header_btns" v-loading="loading">
<section>
<div>食谱制作</div>
<el-button
size="mini"
v-if="!!recipesId"
type="primary"
style="margin-left: 12px"
icon="el-icon-document-copy"
@click="handleOnTemplateClick"
>
@ -103,13 +105,11 @@ export default {
],
};
},
updated() {
},
updated() {},
computed: {
...mapState(["recipesId", "reviewStatus", "fontSize"]),
},
watch: {
},
watch: {},
methods: {
handleOnSizeChange(fontSize) {
this.updateFontSize({ fontSize });

View File

@ -1,10 +1,10 @@
<template>
<div class="template_view_wrapper">
<div class="header">
<div style="fontWeight: bold">选择模板</div>
<el-button size="mini" @click="handleOnBackClick">返回</el-button>
</div>
<div class="content">
<h2>选择模板</h2>
<!-- 筛选 -->
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="模板名称" prop="name">
@ -116,7 +116,7 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
@ -162,12 +162,13 @@ export default {
.header {
height: 32px;
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.content {
height: calc(100% - 32px);
padding-top: 12px;
overflow: auto;
}
}
</style>