售中体验单提成计算、高血糖血压问卷优化

This commit is contained in:
xiezhijun 2021-06-24 16:23:43 +08:00
parent 64cfe472bc
commit b24571fe40
8 changed files with 73 additions and 32 deletions

View File

@ -42,9 +42,9 @@
<if test="endTime != null and endTime != ''">AND date_format(order_time,'%y%m%d') &lt;=
date_format(${endTime},'%y%m%d')
</if>
<!-- 因为体验单、售中单都存在售中,所以售中的提成金额只计算售中单的,不计算体验单 -->
<!-- 因为体验单、售中单都存在售中,存在两种情况需要计算提成1、售中单 2、售中自己开的体验单通过售前是否为NULL或0判断售前不为空则表示售前开的体验单不计算售中提成 -->
<if test="postCode != null and postCode == 'on_sale_id'">
and order_type = 3
AND (order_type = 3 OR (order_type = 2 AND (pre_sale_id IS NULL || pre_sale_id = 0)))
</if>
GROUP BY ${column}
</sql>

View File

@ -1,34 +1,34 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][1]}}</p>
<p class="p_title_2">1减脂经历</p>
<el-form-item label="(1) 用过哪些减脂方法(重点)" prop="experience" class="margin-left">
<p class="p_title_1">{{getTitle()}}</p>
<p class="p_title_2">1{{getTitleKey()}}经历</p>
<el-form-item :label="'(1) 用过哪些'+getTitleKey()+'方法(重点)'" prop="experience" class="margin-left">
<el-input
type="textarea"
placeholder="请描述减脂方法"
:placeholder="'请描述'+getTitleKey()+'方法'"
v-model="form.experience"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
<el-form-item label="(2) 减脂中遇到的困难(重点)" prop="difficulty" class="margin-left">
<el-form-item :label="'(2) '+getTitleKey()+'中遇到的困难(重点)'" prop="difficulty" class="margin-left">
<el-input
type="textarea"
placeholder="请描述减脂中遇到的困难"
:placeholder="'请描述'+getTitleKey()+'中遇到的困难'"
v-model="form.difficulty"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
<el-form-item label="(3) 减脂过程中是否反弹" prop="rebound" class="margin-left">
<el-form-item :label="'(3)'+getTitleKey()+'过程中是否反弹'" prop="rebound" class="margin-left">
<el-radio-group v-model="form.rebound" style="margin-left: 10px;">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(4) 是否意识到生活习惯是减脂关键" prop="crux" class="margin-left">
<el-form-item :label="'(4) 是否意识到生活习惯是'+getTitleKey()+'关键'" prop="crux" class="margin-left">
<el-radio-group v-model="form.crux" style="margin-left: 10px;">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
@ -49,7 +49,12 @@ export default {
};
},
methods: {
getTitle(){
return this.healthyData.getTitle(this.form.conditioningProjectId, 1);
},
getTitleKey(){
return this.healthyData.getTitleKey(this.form.conditioningProjectId);
}
},
props: {
form: {

View File

@ -1,6 +1,6 @@
<template>
<div>
<p class="p_title_1">{{titleNumFlag ? '十、体检报告' : healthyData['titleArray'][8]}}</p>
<p class="p_title_1">{{healthyData.extendHealthyIndex.indexOf(form.conditioningProjectId) != -1 ? '十、体检报告' : healthyData['titleArray'][8]}}</p>
<p class="p_title_2">1体检报告</p>
<el-form-item label="(1) 请上传相应的体检报告" prop="fileList" class="margin-left">
<el-upload style="margin-left: 20px;"

View File

@ -1,6 +1,6 @@
<template>
<div>
<p class="p_title_1">{{projectName[form.conditioningProjectId+'']}}信息评估</p>
<p class="p_title_1">{{healthyData.projectName[form.conditioningProjectId+'']}}信息评估</p>
<!--高血糖-->
<div v-show="form.conditioningProjectId == 6 || form.conditioningProjectId == 5">
<div v-show="form.conditioningProjectId == 6">
@ -198,8 +198,7 @@ export default {
},
data() {
return {
healthyData:healthyData,
projectName:{'0':'减脂','5':'高血压','6':'高血糖'}
healthyData:healthyData
};
},
methods: {

View File

@ -25,7 +25,7 @@
v-show="dataType == 0"
@click="handleEditGuidanceClick"
plain
>减脂指导</el-button
>{{guidanceButtonNmae ? guidanceButtonNmae : '减脂指导'}}</el-button
>
<el-button
v-hasPermi="['custom:healthy:edit']"
@ -60,7 +60,7 @@
>
<div>
<p class="p_title_1" style="margin-top: 5px">
{{ titleArray[index] }}
{{ getTitle(index) }}
</p>
<table-detail-message :data="item"></table-detail-message>
</div>
@ -110,15 +110,15 @@
>
<div>
<p class="p_title_1" style="margin-top: 5px">
{{ titleArray[index + 1] }}
{{ getTitle(index+1) }}
</p>
<table-detail-message
:data="item"
v-if="index != dataList.length - 2"
v-if="index < 7"
></table-detail-message>
<el-table
:show-header="false"
v-if="index == dataList.length - 2"
v-if="index == 7"
:data="item"
border
:cell-style="columnStyle"
@ -287,6 +287,7 @@ export default {
healthyData: null,
remarkList: [{ remarkTitle: "备注信息", remarkValue: "" }],
guidanceList: [{ guidanceTitle: "减脂指导", guidanceValue: "" }],
guidanceButtonNmae:"减脂指导",
//
signTitleData: [
["创建时间", "姓名", "年龄"],
@ -463,6 +464,9 @@ export default {
};
},
methods: {
getTitle(index){
return healthyData.getTitle(this.healthyData.conditioningProjectId, index)
},
getImgUrl(idx) {
return `${window.location.origin}${this.medicalReportPathArray[idx]}`;
},
@ -562,7 +566,12 @@ export default {
//
getDataListByHealthyMessage(healthy) {
let detailHealthy = this.dealHealthy(healthy);
console.log(detailHealthy.longEatDrugClassify);
//
this.healthyTitleData[1] = healthyData.getTitleShowArray(healthy.conditioningProjectId);
//
this.guidanceList[0].guidanceTitle = healthyData.extendHealthyTitle[healthy.conditioningProjectId+""] + "指导";
this.guidanceButtonNmae = healthyData.extendHealthyTitle[healthy.conditioningProjectId+""] + "指导";
//
detailHealthy.sex =
detailHealthy.sex == 0 ? "男" : detailHealthy.sex == 1 ? "女" : "未知";
@ -807,14 +816,12 @@ export default {
).toFixed(1);
//
let eatFruitsMessage = "";
console.log(detailHealthy.healthyExtend.eatFruitsMessage);
if(detailHealthy.healthyExtend.eatFruitsMessage != null && detailHealthy.healthyExtend.eatFruitsMessage.length > 0){
detailHealthy.healthyExtend.eatFruitsMessage.forEach((item,index) => {
eatFruitsMessage += (eatFruitsMessage == "" ? "" : ", ") + item.name + "/" + item.num;
});
}
detailHealthy.healthyExtend.eatFruitsMessage = eatFruitsMessage;
console.log(detailHealthy.healthyExtend.bloodSugarMessage.inferiorSymptom.join(","));
detailHealthy.mealBloodSugar = "餐前血糖:"+(detailHealthy.healthyExtend.bloodSugarMessage.beforeMealBloodSugar == null ? "" : (detailHealthy.healthyExtend.bloodSugarMessage.beforeMealBloodSugar+"mmol/L"))+", "
+"餐后两小时血糖:"+(detailHealthy.healthyExtend.bloodSugarMessage.afterMealBloodSugar == null ? "" : (detailHealthy.healthyExtend.bloodSugarMessage.afterMealBloodSugar+"mmol/L"));
detailHealthy.measureBloodSugarFlag = detailHealthy.healthyExtend.bloodSugarMessage.measureBloodSugarFlag == 1 ? "是" : "否";
@ -847,10 +854,8 @@ export default {
detailHealthy.noFunLiving = detailHealthy.healthyExtend.depressedStateMessage.noFunLiving == 1 ? "是" : "否";
this.detailHealthy = detailHealthy;
console.log("---");
for (let i = 0; i < this.healthyTitleData.length; i++) {
let stepArray = [];
console.log(i);
for (let j = 0; j < this.healthyTitleData[i].length; j++) {
stepArray[j] = {
attr_name_one: this.healthyTitleData[i][j][0],

View File

@ -18,7 +18,7 @@
v-for="(item, index) in healthyData['titleArray']"
:label="index"
:key="index"
>{{ item }}</el-checkbox
>{{ getTitle(index) }}</el-checkbox
>
</el-checkbox-group>
</el-form-item>
@ -232,7 +232,10 @@ export default {
}
});
this.form.healthyExtend.longEatDrugMessage[index].drug.push({'name':'','num':'','time':''});
}
},
getTitle(index){
return this.healthyData.getTitle(this.form.conditioningProjectId, index);
},
},
watch:{
'form.healthyExtend.eatFruitsNameArray'(newArray, oldArray){

View File

@ -328,7 +328,7 @@ export const syndromeNameArray = [
{ name: "麻木", value: "4" },
{ name: "皮肤瘙痒", value: "5" },
{ name: "性欲减退", value: "6" },
{ name: "男性勃起功能障碍", value: "7" },
{ name: "男性勃起功能障碍", value: "7" },
{ name: "视力下降", value: "8" }
];
@ -697,3 +697,34 @@ export function dealHealthy(customerHealthy) {
return customerHealthy;
}
export const extendHealthyTitle = {"0":"减脂","5":"降血压","6":"降血糖"};
export const projectName = {"0":"减脂","5":"高血压","6":"高血糖"};
export const extendHealthyIndex = [5, 6];
export function getTitleKey(projectId){
return extendHealthyTitle[projectId+""] ? extendHealthyTitle[projectId+""] : extendHealthyTitle["0"];
}
export function getTitle(projectId, index){
if(extendHealthyIndex.includes(projectId)){
if(index == 1){
return "二、"+getTitleKey(projectId)+"经历评估";
}else{
return titleArray[index];
}
}else{
return titleArray[index];
}
}
//获取展示时,根据项目不同返回不同标题
export function getTitleShowArray(projectId){
let keyName = getTitleKey(projectId);
let array = [
[keyName+"经历", keyName+"遇到的困难", keyName+"是否反弹"],
["是否意识到生活习惯是"+keyName+"关键", "", ""],
];
return array;
}

View File

@ -32,7 +32,6 @@
<healthy-form9
v-show="stepArray[9]"
ref="fileForm"
:titleNumFlag="extendedProjectIdArray.indexOf(this.form.conditioningProjectId) != -1"
@addOrEditHealthy="addCustomerHealthy()"
:form.sync="form"
></healthy-form9>
@ -91,7 +90,6 @@ export default {
submitFlag: false,
stepArray: [true, false, false, false, false, false, false, false, false, false],
stepActive: 0,
extendedProjectIdArray:[5,6],
form: {
customerEncId: null,
name: null,
@ -402,8 +400,8 @@ export default {
}
}
if((this.stepActive == 7 && step > 0) || (this.stepActive == 9 && step < 0)){
//
if(this.extendedProjectIdArray.indexOf(this.form.conditioningProjectId) == -1){
//
if(this.healthyData.extendHealthyIndex.indexOf(this.form.conditioningProjectId) == -1){
step = step * 2;
}
}