修复健康信息

This commit is contained in:
huangdeliang 2021-03-12 14:50:35 +08:00
parent 9b3e474023
commit a2773a75c3
13 changed files with 231 additions and 110 deletions

View File

@ -141,7 +141,7 @@
and (sc.name like concat('%',#{customer},'%') or sc.phone like concat('%',#{customer},'%')) and (sc.name like concat('%',#{customer},'%') or sc.phone like concat('%',#{customer},'%'))
</if> </if>
<if test="cusId != null and cusId != ''">and cus_id = #{cusId}</if> <if test="cusId != null and cusId != ''">and cus_id = #{cusId}</if>
<!--<if test="phone != null and phone != ''">and phone = #{phone}</if>--> <if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="status != null ">and status = #{status}</if> <if test="status != null ">and status = #{status}</if>
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if> <if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
<if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if> <if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if>

View File

@ -7,9 +7,9 @@
@closed="handleOnClosed" @closed="handleOnClosed"
size="40%" size="40%"
> >
<div class="app-container"> <div class="app-container contract_drawer_wrapper">
<el-row :gutter="10" class="mb8"> <div class="header">
<el-col :span="1.5"> <section>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@ -18,10 +18,18 @@
@click="handleAdd" @click="handleAdd"
>创建合同 >创建合同
</el-button> </el-button>
</el-col> </section>
</el-row> <section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="fetchContractList"
circle
/>
</section>
</div>
<el-table :data="contractList"> <el-table :data="contractList" v-loading="loading">
<el-table-column <el-table-column
label="合同编号" label="合同编号"
align="center" align="center"
@ -62,7 +70,7 @@
>复制 >复制
</el-button> </el-button>
<el-popover placement="top" trigger="click"> <el-popover placement="top" trigger="click">
<VueQr :text="copyValue" :logoSrc="logo" size="256"/> <VueQr :text="copyValue" :logoSrc="logo" size="256" />
<el-button <el-button
slot="reference" slot="reference"
icon="el-icon-picture-outline" icon="el-icon-picture-outline"
@ -126,6 +134,7 @@ export default {
data() { data() {
return { return {
logo, logo,
loading: false,
visible: false, visible: false,
title: "", title: "",
data: undefined, data: undefined,
@ -140,12 +149,16 @@ export default {
return; return;
} }
this.title = `${this.data.name}」合同列表`; this.title = `${this.data.name}」合同列表`;
this.fetchContractList(data.id); this.visible = true;
this.fetchContractList();
}, },
fetchContractList(cusId) { fetchContractList() {
listContract({ customerId: cusId }).then((res) => { this.loading = true;
this.contractList = res.rows; listContract({ customerId: this.data.id }).then((res) => {
this.visible = true; if (res.code === 200) {
this.contractList = res.rows;
}
this.loading = false;
}); });
}, },
handleAdd() { handleAdd() {
@ -207,4 +220,12 @@ export default {
/deep/ :focus { /deep/ :focus {
outline: 0; outline: 0;
} }
.contract_drawer_wrapper {
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
}
</style> </style>

View File

@ -7,26 +7,45 @@
@closed="handleOnClosed" @closed="handleOnClosed"
size="40%" size="40%"
> >
<div class="app-container"> <div class="app-container heat_statisitcs_wrapper">
<el-row :gutter="10" class="mb8"> <div class="header">
<el-col :span="1.5"> <section>
<el-button <el-button
icon="el-icon-share" icon="el-icon-share"
size="small" size="mini"
title="点击复制链接" title="点击复制链接"
class="copyBtn" class="copyBtn"
type="primary" type="primary"
:data-clipboard-text="copyValue" :data-clipboard-text="copyValue"
@click="handleCopy()" @click="handleCopy"
>外食计算器</el-button >外食计算器
</el-button>
<el-popover
placement="bottom"
trigger="click"
style="margin: 0 12px"
> >
</el-col> <VueQr :text="copyValue" :logoSrc="logo" size="256" />
<el-popover placement="bottom" trigger="click"> <el-button
<VueQr :text="copyValue" :logoSrc="logo" size="256" /> slot="reference"
<el-button slot="reference">二维码</el-button> size="mini"
</el-popover> icon="el-icon-picture-outline"
</el-row> type="primary"
<el-table :data="foodHeatStatisticsList"> >二维码
</el-button>
</el-popover>
</section>
<section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="fetchHeatList"
circle
/>
</section>
</div>
<el-table :data="foodHeatStatisticsList" v-loading="loading">
<el-table-column <el-table-column
label="日期" label="日期"
align="center" align="center"
@ -127,6 +146,7 @@ export default {
return { return {
logo, logo,
visible: false, visible: false,
loading: false,
title: "", title: "",
data: undefined, data: undefined,
foodHeatStatisticsList: [], foodHeatStatisticsList: [],
@ -148,6 +168,7 @@ export default {
return; return;
} }
this.title = `${this.data.name}」热量统计列表`; this.title = `${this.data.name}」热量统计列表`;
this.visible = true;
this.queryParams.customerId = data.id; this.queryParams.customerId = data.id;
this.copyValue = this.copyValue =
window.location.origin.replace("manage", "sign") + window.location.origin.replace("manage", "sign") +
@ -156,10 +177,11 @@ export default {
this.fetchHeatList(); this.fetchHeatList();
}, },
fetchHeatList() { fetchHeatList() {
this.loading = true;
listFoodHeatStatistics(this.queryParams).then((response) => { listFoodHeatStatistics(this.queryParams).then((response) => {
this.foodHeatStatisticsList = response.rows; this.foodHeatStatisticsList = response.rows;
this.total = response.total; this.total = response.total;
this.visible = true; this.loading = false;
}); });
}, },
handleAdd() {}, handleAdd() {},
@ -205,4 +227,13 @@ export default {
/deep/ :focus { /deep/ :focus {
outline: 0; outline: 0;
} }
.heat_statisitcs_wrapper {
.header {
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: space-between;
}
}
</style> </style>

View File

@ -7,9 +7,9 @@
@closed="handleOnClosed" @closed="handleOnClosed"
size="40%" size="40%"
> >
<div class="app-container"> <div class="app-container order_drawer_wrapper">
<el-row :gutter="10" class="mb8"> <div class="header">
<el-col :span="1.5"> <section>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@ -18,11 +18,20 @@
@click="handleAdd" @click="handleAdd"
>创建订单 >创建订单
</el-button> </el-button>
</el-col> </section>
</el-row> <section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="fetchOrderList"
circle
/>
</section>
</div>
<el-table <el-table
:data="orderList" :data="orderList"
v-loading="loading"
row-key="orderId" row-key="orderId"
default-expand-all default-expand-all
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
@ -132,6 +141,7 @@ export default {
data() { data() {
return { return {
visible: false, visible: false,
loading: false,
title: "", title: "",
data: undefined, data: undefined,
orderList: [], orderList: [],
@ -149,10 +159,13 @@ export default {
return; return;
} }
this.title = `${this.data.name}」订单列表`; this.title = `${this.data.name}」订单列表`;
this.fetchOrderList(data.id); this.visible = true;
this.fetchOrderList();
}, },
fetchOrderList(cusId) { fetchOrderList() {
listOrder({ cusId }).then((res) => { this.loading = true;
listOrder({ cusId: this.data.id }).then((res) => {
this.orderList = res.rows.reduce((arr, cur) => { this.orderList = res.rows.reduce((arr, cur) => {
const tarOrder = arr.find((ord) => ord.startTime === cur.startTime); const tarOrder = arr.find((ord) => ord.startTime === cur.startTime);
if (tarOrder) { if (tarOrder) {
@ -171,8 +184,7 @@ export default {
return arr; return arr;
}, []); }, []);
// console.log(this.orderList); // console.log(this.orderList);
this.loading = false;
this.visible = true;
}); });
}, },
handleAdd() { handleAdd() {
@ -228,4 +240,12 @@ export default {
/deep/ :focus { /deep/ :focus {
outline: 0; outline: 0;
} }
.order_drawer_wrapper {
.header {
margin-bottom: 8px;
display: flex;
justify-content: space-between;
align-items: center;
}
}
</style> </style>

View File

@ -7,8 +7,8 @@
size="45%" size="45%"
> >
<div class="app-container recipes_plan_drawer_wrapper"> <div class="app-container recipes_plan_drawer_wrapper">
<el-row :gutter="10" class="mb8"> <div class="header">
<el-col :span="1.5"> <section>
<el-button <el-button
v-if="cusOutId" v-if="cusOutId"
type="primary" type="primary"
@ -46,8 +46,16 @@
> >
生成7天体验计划 生成7天体验计划
</el-button> </el-button>
</el-col> </section>
</el-row> <section>
<el-button
icon="el-icon-refresh"
size="mini"
@click="getList"
circle
/>
</section>
</div>
<el-table :data="planList" v-loading="planLoading" height="80%"> <el-table :data="planList" v-loading="planLoading" height="80%">
<el-table-column label="审核状态" align="center" width="80"> <el-table-column label="审核状态" align="center" width="80">
@ -271,5 +279,12 @@ export default {
.recipes_plan_drawer_wrapper { .recipes_plan_drawer_wrapper {
height: calc(100vh - 77px); height: calc(100vh - 77px);
.header {
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: space-between;
}
} }
</style> </style>

View File

@ -270,7 +270,7 @@ export const makeFoodTypeArray = [
{ name: "运动饮食", value: "5" } { name: "运动饮食", value: "5" }
]; ];
export const yesNoDict = { 0: "是", 1: "否" }; export const yesNoDict = { 0: "否", 1: "是" };
export const sexDict = { 0: "男", 1: "女" }; export const sexDict = { 0: "男", 1: "女" };
export const positionDict = { 0: "南方", 1: "北方" }; export const positionDict = { 0: "南方", 1: "北方" };
export const makeFoodTypeDict = { 0: "自己做", 1: "外面吃" }; export const makeFoodTypeDict = { 0: "自己做", 1: "外面吃" };
@ -409,13 +409,15 @@ export const bloodDataArray = [
]; ];
export const moistureDateArray = [ export const moistureDateArray = [
{ value: "1", name: "1.体质虚弱,免疫力差" }, { value: "1", name: "1.头发爱出油,头一天刚洗头第二天就油油的" },
{ value: "2", name: "2.畏寒肢冷,自汗,头晕耳鸣" }, { value: "2", name: "2.面部油亮" },
{ value: "3", name: "3.心悸气短,神疲乏力,气短懒言" }, { value: "3", name: "3.睡觉流口水" },
{ value: "4", name: "4.失眠多梦,健忘,精神恍惚" }, { value: "4", name: "4.排便粘稠且多便" },
{ value: "5", name: "5.面色淡白或萎黄,皮肤干燥,毛发枯萎" }, { value: "5", name: "5.小肚子大" },
{ value: "6", name: "6.女性月经量少,延期或闭经" }, { value: "6", name: "6.耳内湿" },
{ value: "7", name: "7.唇甲色淡,舌淡脉虚" } { value: "7", name: "7.头重脚轻" },
{ value: "8", name: "8.头晕没精神,特别疲劳" },
{ value: "9", name: "9.经常感觉很累很困,怎么都睡不够" }
]; ];
const moduleObj = { const moduleObj = {

View File

@ -0,0 +1,78 @@
<template>
<div class="recipes_build_info_view_wrapper">
<div class="top" v-if="!!recipesData.length">
<BarChart
v-if="analyseData.length > 1"
:data="analyseData"
height="160px"
width="100%"
:max="max"
/>
<PieChart
v-if="analyseData.length === 1"
:data="analyseData"
height="160px"
width="100%"
/>
</div>
<div class="content">
<TemplateInfoView v-if="!!temId" :data="templateInfo" />
<HealthyView :data="healthyData" v-else-if="healthyDataType === 0" dev />
<BodySignView :data="healthyData" v-else dev />
</div>
</div>
</template>
<script>
import { createNamespacedHelpers } from "vuex";
const {
mapActions,
mapState,
mapGetters,
} = createNamespacedHelpers("recipes");
import BarChart from "./BarChart";
import PieChart from "./PieChart";
import TemplateInfoView from "./TemplateInfoView";
import HealthyView from "@/components/HealthyView";
import BodySignView from "@/components/BodySignView";
export default {
name: "InfoView",
data() {
const { temId } = this.$route.query;
return { temId };
},
components: {
BarChart,
PieChart,
HealthyView,
BodySignView,
TemplateInfoView,
},
computed: {
max() {
const { basicBMR } = this.healthyData || {};
return basicBMR
? parseFloat(basicBMR.substring(0, basicBMR.indexOf("千卡")))
: 0;
},
...mapState([
"recipesData",
"healthyData",
"healthyDataType",
"templateInfo",
]),
...mapGetters(["analyseData"]),
},
};
</script>
<style lang="scss" scoped>
.recipes_build_info_view_wrapper {
.top {
height: 160px;
}
.content {
overflow: auto;
height: calc(100% - 160px);
}
}
</style>

View File

@ -1,7 +1,8 @@
<template> <template>
<div class="recipes_header_com_wrapper"> <div class="recipes_header_com_wrapper">
<div class="header_btns" v-loading="loading"> <div class="header_btns" v-loading="loading">
<section> <section style="display: flex; align-items: center">
<em class="el-icon-s-unfold collapse_btn" />
<div>食谱制作</div> <div>食谱制作</div>
<el-button <el-button
size="mini" size="mini"
@ -165,6 +166,10 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-bottom: 8px; padding-bottom: 8px;
.collapse_btn {
}
} }
.font_size_style { .font_size_style {

View File

@ -27,7 +27,7 @@ export default {
data() { data() {
return {}; return {};
}, },
props: ["data", "analyseData", "name", "numRange"], props: ["data", "name"],
}; };
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >

View File

@ -1,48 +1,16 @@
<template> <template>
<div class="recipes_build_wrapper" v-title :data-title="name"> <div class="recipes_build_wrapper" v-title :data-title="name">
<div class="left" v-loading="recipesDataLoading"> <div class="left"></div>
<div class="content" v-loading="recipesDataLoading">
<RecipesView <RecipesView
v-if="!!recipesData.length" v-if="!!recipesData.length"
:data="recipesData" :data="recipesData"
:name="healthyData.name" :name="healthyData.name"
:analyseData="analyseData"
/> />
<RecommendView v-else /> <RecommendView v-else />
</div> </div>
<div class="right" v-loading="healthDataLoading"> <div class="right" v-loading="healthDataLoading">
<div class="top" v-if="!!recipesData.length"> <InfoView />
<BarChart
v-if="analyseData.length > 1"
:data="analyseData"
height="160px"
width="100%"
:max="
healthyData.basicBMR
? parseFloat(
healthyData.basicBMR.substring(
0,
healthyData.basicBMR.indexOf('千卡')
)
)
: 0
"
/>
<PieChart
v-if="analyseData.length === 1"
:data="analyseData"
height="160px"
width="100%"
/>
</div>
<div class="content">
<TemplateInfoView v-if="!!temId" :data="templateInfo" />
<HealthyView
:data="healthyData"
v-else-if="healthyDataType === 0"
dev
/>
<BodySignView :data="healthyData" v-else dev />
</div>
</div> </div>
</div> </div>
</template> </template>
@ -54,14 +22,9 @@ const {
mapMutations, mapMutations,
mapGetters, mapGetters,
} = createNamespacedHelpers("recipes"); } = createNamespacedHelpers("recipes");
import RecipesView from "./RecipesView";
import HealthyView from "@/components/HealthyView";
import BodySignView from "@/components/BodySignView";
import RecipesView from "./RecipesView/index";
import RecommendView from "./RecommendView"; import RecommendView from "./RecommendView";
import TemplateInfoView from "./TemplateInfoView"; import InfoView from "./InfoView";
import BarChart from "./BarChart";
import PieChart from "./PieChart";
export default { export default {
name: "BuildRecipies", name: "BuildRecipies",
@ -87,25 +50,18 @@ export default {
}, },
created() {}, created() {},
components: { components: {
BarChart,
PieChart,
HealthyView,
BodySignView,
RecipesView, RecipesView,
RecommendView, RecommendView,
TemplateInfoView, InfoView,
}, },
props: ["name", "planId"], props: ["name", "planId"],
computed: { computed: {
...mapState([ ...mapState([
"healthyData", "healthyData",
"healthyDataType",
"templateInfo",
"recipesData", "recipesData",
"recipesDataLoading", "recipesDataLoading",
"healthDataLoading", "healthDataLoading",
]), ]),
...mapGetters(["analyseData"]),
}, },
methods: { methods: {
...mapActions(["init"]), ...mapActions(["init"]),
@ -119,6 +75,8 @@ export default {
display: flex; display: flex;
height: 100vh; height: 100vh;
.left { .left {
}
.content {
flex: 4; flex: 4;
border-right: 1px solid #e6ebf5; border-right: 1px solid #e6ebf5;
height: 100%; height: 100%;
@ -129,15 +87,6 @@ export default {
flex: 1; flex: 1;
height: 100%; height: 100%;
padding-left: 20px; padding-left: 20px;
.top {
height: 160px;
}
.content {
overflow: auto;
height: calc(100% - 160px);
}
} }
} }
</style> </style>