| @@ -141,7 +141,7 @@ | ||||
|                 and (sc.name like concat('%',#{customer},'%') or sc.phone like concat('%',#{customer},'%')) | ||||
|             </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="payTypeId != null ">and pay_type_id = #{payTypeId}</if> | ||||
|             <if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if> | ||||
|   | ||||
| @@ -7,9 +7,9 @@ | ||||
|       @closed="handleOnClosed" | ||||
|       size="40%" | ||||
|     > | ||||
|       <div class="app-container"> | ||||
|         <el-row :gutter="10" class="mb8"> | ||||
|           <el-col :span="1.5"> | ||||
|       <div class="app-container contract_drawer_wrapper"> | ||||
|         <div class="header"> | ||||
|           <section> | ||||
|             <el-button | ||||
|               type="primary" | ||||
|               icon="el-icon-plus" | ||||
| @@ -18,10 +18,18 @@ | ||||
|               @click="handleAdd" | ||||
|               >创建合同 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
|           </section> | ||||
|           <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 | ||||
|             label="合同编号" | ||||
|             align="center" | ||||
| @@ -62,7 +70,7 @@ | ||||
|                 >复制 | ||||
|               </el-button> | ||||
|               <el-popover placement="top" trigger="click"> | ||||
|                 <VueQr :text="copyValue" :logoSrc="logo" size="256"/> | ||||
|                 <VueQr :text="copyValue" :logoSrc="logo" size="256" /> | ||||
|                 <el-button | ||||
|                   slot="reference" | ||||
|                   icon="el-icon-picture-outline" | ||||
| @@ -126,6 +134,7 @@ export default { | ||||
|   data() { | ||||
|     return { | ||||
|       logo, | ||||
|       loading: false, | ||||
|       visible: false, | ||||
|       title: "", | ||||
|       data: undefined, | ||||
| @@ -140,12 +149,16 @@ export default { | ||||
|         return; | ||||
|       } | ||||
|       this.title = `「${this.data.name}」合同列表`; | ||||
|       this.fetchContractList(data.id); | ||||
|       this.visible = true; | ||||
|       this.fetchContractList(); | ||||
|     }, | ||||
|     fetchContractList(cusId) { | ||||
|       listContract({ customerId: cusId }).then((res) => { | ||||
|         this.contractList = res.rows; | ||||
|         this.visible = true; | ||||
|     fetchContractList() { | ||||
|       this.loading = true; | ||||
|       listContract({ customerId: this.data.id }).then((res) => { | ||||
|         if (res.code === 200) { | ||||
|           this.contractList = res.rows; | ||||
|         } | ||||
|         this.loading = false; | ||||
|       }); | ||||
|     }, | ||||
|     handleAdd() { | ||||
| @@ -207,4 +220,12 @@ export default { | ||||
| /deep/ :focus { | ||||
|   outline: 0; | ||||
| } | ||||
| .contract_drawer_wrapper { | ||||
|   .header { | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     align-items: center; | ||||
|     margin-bottom: 8px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -7,26 +7,45 @@ | ||||
|       @closed="handleOnClosed" | ||||
|       size="40%" | ||||
|     > | ||||
|       <div class="app-container"> | ||||
|         <el-row :gutter="10" class="mb8"> | ||||
|           <el-col :span="1.5"> | ||||
|       <div class="app-container heat_statisitcs_wrapper"> | ||||
|         <div class="header"> | ||||
|           <section> | ||||
|             <el-button | ||||
|               icon="el-icon-share" | ||||
|               size="small" | ||||
|               size="mini" | ||||
|               title="点击复制链接" | ||||
|               class="copyBtn" | ||||
|               type="primary" | ||||
|               :data-clipboard-text="copyValue" | ||||
|               @click="handleCopy()" | ||||
|               >外食计算器</el-button | ||||
|               @click="handleCopy" | ||||
|               >外食计算器 | ||||
|             </el-button> | ||||
|             <el-popover | ||||
|               placement="bottom" | ||||
|               trigger="click" | ||||
|               style="margin: 0 12px" | ||||
|             > | ||||
|           </el-col> | ||||
|           <el-popover placement="bottom" trigger="click"> | ||||
|             <VueQr :text="copyValue" :logoSrc="logo" size="256" /> | ||||
|             <el-button slot="reference">二维码</el-button> | ||||
|           </el-popover> | ||||
|         </el-row> | ||||
|         <el-table :data="foodHeatStatisticsList"> | ||||
|               <VueQr :text="copyValue" :logoSrc="logo" size="256" /> | ||||
|               <el-button | ||||
|                 slot="reference" | ||||
|                 size="mini" | ||||
|                 icon="el-icon-picture-outline" | ||||
|                 type="primary" | ||||
|                 >二维码 | ||||
|               </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 | ||||
|             label="日期" | ||||
|             align="center" | ||||
| @@ -127,6 +146,7 @@ export default { | ||||
|     return { | ||||
|       logo, | ||||
|       visible: false, | ||||
|       loading: false, | ||||
|       title: "", | ||||
|       data: undefined, | ||||
|       foodHeatStatisticsList: [], | ||||
| @@ -148,6 +168,7 @@ export default { | ||||
|         return; | ||||
|       } | ||||
|       this.title = `「${this.data.name}」热量统计列表`; | ||||
|       this.visible = true; | ||||
|       this.queryParams.customerId = data.id; | ||||
|       this.copyValue = | ||||
|         window.location.origin.replace("manage", "sign") + | ||||
| @@ -156,10 +177,11 @@ export default { | ||||
|       this.fetchHeatList(); | ||||
|     }, | ||||
|     fetchHeatList() { | ||||
|       this.loading = true; | ||||
|       listFoodHeatStatistics(this.queryParams).then((response) => { | ||||
|         this.foodHeatStatisticsList = response.rows; | ||||
|         this.total = response.total; | ||||
|         this.visible = true; | ||||
|         this.loading = false; | ||||
|       }); | ||||
|     }, | ||||
|     handleAdd() {}, | ||||
| @@ -205,4 +227,13 @@ export default { | ||||
| /deep/ :focus { | ||||
|   outline: 0; | ||||
| } | ||||
|  | ||||
| .heat_statisitcs_wrapper { | ||||
|   .header { | ||||
|     margin-bottom: 8px; | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     justify-content: space-between; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -7,9 +7,9 @@ | ||||
|       @closed="handleOnClosed" | ||||
|       size="40%" | ||||
|     > | ||||
|       <div class="app-container"> | ||||
|         <el-row :gutter="10" class="mb8"> | ||||
|           <el-col :span="1.5"> | ||||
|       <div class="app-container order_drawer_wrapper"> | ||||
|         <div class="header"> | ||||
|           <section> | ||||
|             <el-button | ||||
|               type="primary" | ||||
|               icon="el-icon-plus" | ||||
| @@ -18,11 +18,20 @@ | ||||
|               @click="handleAdd" | ||||
|               >创建订单 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
|           </section> | ||||
|           <section> | ||||
|             <el-button | ||||
|               icon="el-icon-refresh" | ||||
|               size="mini" | ||||
|               @click="fetchOrderList" | ||||
|               circle | ||||
|             /> | ||||
|           </section> | ||||
|         </div> | ||||
|  | ||||
|         <el-table | ||||
|           :data="orderList" | ||||
|           v-loading="loading" | ||||
|           row-key="orderId" | ||||
|           default-expand-all | ||||
|           :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" | ||||
| @@ -132,6 +141,7 @@ export default { | ||||
|   data() { | ||||
|     return { | ||||
|       visible: false, | ||||
|       loading: false, | ||||
|       title: "", | ||||
|       data: undefined, | ||||
|       orderList: [], | ||||
| @@ -149,10 +159,13 @@ export default { | ||||
|         return; | ||||
|       } | ||||
|       this.title = `「${this.data.name}」订单列表`; | ||||
|       this.fetchOrderList(data.id); | ||||
|       this.visible = true; | ||||
|  | ||||
|       this.fetchOrderList(); | ||||
|     }, | ||||
|     fetchOrderList(cusId) { | ||||
|       listOrder({ cusId }).then((res) => { | ||||
|     fetchOrderList() { | ||||
|       this.loading = true; | ||||
|       listOrder({ cusId: this.data.id }).then((res) => { | ||||
|         this.orderList = res.rows.reduce((arr, cur) => { | ||||
|           const tarOrder = arr.find((ord) => ord.startTime === cur.startTime); | ||||
|           if (tarOrder) { | ||||
| @@ -171,8 +184,7 @@ export default { | ||||
|           return arr; | ||||
|         }, []); | ||||
|         // console.log(this.orderList); | ||||
|  | ||||
|         this.visible = true; | ||||
|         this.loading = false; | ||||
|       }); | ||||
|     }, | ||||
|     handleAdd() { | ||||
| @@ -228,4 +240,12 @@ export default { | ||||
| /deep/ :focus { | ||||
|   outline: 0; | ||||
| } | ||||
| .order_drawer_wrapper { | ||||
|   .header { | ||||
|     margin-bottom: 8px; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     align-items: center; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -7,8 +7,8 @@ | ||||
|     size="45%" | ||||
|   > | ||||
|     <div class="app-container recipes_plan_drawer_wrapper"> | ||||
|       <el-row :gutter="10" class="mb8"> | ||||
|         <el-col :span="1.5"> | ||||
|       <div class="header"> | ||||
|         <section> | ||||
|           <el-button | ||||
|             v-if="cusOutId" | ||||
|             type="primary" | ||||
| @@ -46,8 +46,16 @@ | ||||
|           > | ||||
|             生成7天体验计划 | ||||
|           </el-button> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|         </section> | ||||
|         <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-column label="审核状态" align="center" width="80"> | ||||
| @@ -271,5 +279,12 @@ export default { | ||||
|  | ||||
| .recipes_plan_drawer_wrapper { | ||||
|   height: calc(100vh - 77px); | ||||
|  | ||||
|   .header { | ||||
|     margin-bottom: 8px; | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     justify-content: space-between; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -270,7 +270,7 @@ export const makeFoodTypeArray = [ | ||||
|   { name: "运动饮食", value: "5" } | ||||
| ]; | ||||
|  | ||||
| export const yesNoDict = { 0: "是", 1: "否" }; | ||||
| export const yesNoDict = { 0: "否", 1: "是" }; | ||||
| export const sexDict = { 0: "男", 1: "女" }; | ||||
| export const positionDict = { 0: "南方", 1: "北方" }; | ||||
| export const makeFoodTypeDict = { 0: "自己做", 1: "外面吃" }; | ||||
| @@ -409,13 +409,15 @@ export const bloodDataArray = [ | ||||
| ]; | ||||
|  | ||||
| export const moistureDateArray = [ | ||||
|   { value: "1", name: "1.体质虚弱,免疫力差" }, | ||||
|   { value: "2", name: "2.畏寒肢冷,自汗,头晕耳鸣" }, | ||||
|   { value: "3", name: "3.心悸气短,神疲乏力,气短懒言" }, | ||||
|   { value: "4", name: "4.失眠多梦,健忘,精神恍惚" }, | ||||
|   { value: "5", name: "5.面色淡白或萎黄,皮肤干燥,毛发枯萎" }, | ||||
|   { value: "6", name: "6.女性月经量少,延期或闭经" }, | ||||
|   { value: "7", name: "7.唇甲色淡,舌淡脉虚" } | ||||
|   { value: "1", name: "1.头发爱出油,头一天刚洗头第二天就油油的" }, | ||||
|   { value: "2", name: "2.面部油亮" }, | ||||
|   { value: "3", name: "3.睡觉流口水" }, | ||||
|   { value: "4", name: "4.排便粘稠且多便" }, | ||||
|   { value: "5", name: "5.小肚子大" }, | ||||
|   { value: "6", name: "6.耳内湿" }, | ||||
|   { value: "7", name: "7.头重脚轻" }, | ||||
|   { value: "8", name: "8.头晕没精神,特别疲劳" }, | ||||
|   { value: "9", name: "9.经常感觉很累很困,怎么都睡不够" } | ||||
| ]; | ||||
|  | ||||
| const moduleObj = { | ||||
|   | ||||
							
								
								
									
										78
									
								
								stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								stdiet-ui/src/views/custom/recipesBuild/InfoView/index.vue
									
									
									
									
									
										Normal 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> | ||||
| @@ -1,7 +1,8 @@ | ||||
| <template> | ||||
|   <div class="recipes_header_com_wrapper"> | ||||
|     <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> | ||||
|         <el-button | ||||
|           size="mini" | ||||
| @@ -165,6 +166,10 @@ export default { | ||||
|     align-items: center; | ||||
|     justify-content: space-between; | ||||
|     padding-bottom: 8px; | ||||
|  | ||||
|     .collapse_btn { | ||||
|  | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .font_size_style { | ||||
|   | ||||
| @@ -27,7 +27,7 @@ export default { | ||||
|   data() { | ||||
|     return {}; | ||||
|   }, | ||||
|   props: ["data", "analyseData", "name", "numRange"], | ||||
|   props: ["data", "name"], | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped > | ||||
|   | ||||
| @@ -1,48 +1,16 @@ | ||||
| <template> | ||||
|   <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 | ||||
|         v-if="!!recipesData.length" | ||||
|         :data="recipesData" | ||||
|         :name="healthyData.name" | ||||
|         :analyseData="analyseData" | ||||
|       /> | ||||
|       <RecommendView v-else /> | ||||
|     </div> | ||||
|     <div class="right" v-loading="healthDataLoading"> | ||||
|       <div class="top" v-if="!!recipesData.length"> | ||||
|         <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> | ||||
|       <InfoView /> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
| @@ -54,14 +22,9 @@ const { | ||||
|   mapMutations, | ||||
|   mapGetters, | ||||
| } = createNamespacedHelpers("recipes"); | ||||
|  | ||||
| import HealthyView from "@/components/HealthyView"; | ||||
| import BodySignView from "@/components/BodySignView"; | ||||
| import RecipesView from "./RecipesView/index"; | ||||
| import RecipesView from "./RecipesView"; | ||||
| import RecommendView from "./RecommendView"; | ||||
| import TemplateInfoView from "./TemplateInfoView"; | ||||
| import BarChart from "./BarChart"; | ||||
| import PieChart from "./PieChart"; | ||||
| import InfoView from "./InfoView"; | ||||
|  | ||||
| export default { | ||||
|   name: "BuildRecipies", | ||||
| @@ -87,25 +50,18 @@ export default { | ||||
|   }, | ||||
|   created() {}, | ||||
|   components: { | ||||
|     BarChart, | ||||
|     PieChart, | ||||
|     HealthyView, | ||||
|     BodySignView, | ||||
|     RecipesView, | ||||
|     RecommendView, | ||||
|     TemplateInfoView, | ||||
|     InfoView, | ||||
|   }, | ||||
|   props: ["name", "planId"], | ||||
|   computed: { | ||||
|     ...mapState([ | ||||
|       "healthyData", | ||||
|       "healthyDataType", | ||||
|       "templateInfo", | ||||
|       "recipesData", | ||||
|       "recipesDataLoading", | ||||
|       "healthDataLoading", | ||||
|     ]), | ||||
|     ...mapGetters(["analyseData"]), | ||||
|   }, | ||||
|   methods: { | ||||
|     ...mapActions(["init"]), | ||||
| @@ -119,6 +75,8 @@ export default { | ||||
|   display: flex; | ||||
|   height: 100vh; | ||||
|   .left { | ||||
|   } | ||||
|   .content { | ||||
|     flex: 4; | ||||
|     border-right: 1px solid #e6ebf5; | ||||
|     height: 100%; | ||||
| @@ -129,15 +87,6 @@ export default { | ||||
|     flex: 1; | ||||
|     height: 100%; | ||||
|     padding-left: 20px; | ||||
|  | ||||
|     .top { | ||||
|       height: 160px; | ||||
|     } | ||||
|  | ||||
|     .content { | ||||
|       overflow: auto; | ||||
|       height: calc(100% - 160px); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user