commit
3be0f80ebb
@ -154,6 +154,10 @@ public class SysCustomerServiceImpl implements ISysCustomerService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getPhysicalSignsById(Long id) {
|
public Map<String, Object> getPhysicalSignsById(Long id) {
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
|
||||||
|
SysCustomer customer = sysCustomerMapper.selectSysCustomerById(id);
|
||||||
|
result.put("customerInfo", customer);
|
||||||
|
|
||||||
String key = "customerHealthy";
|
String key = "customerHealthy";
|
||||||
result.put("type", 0);
|
result.put("type", 0);
|
||||||
//查询健康评估信息
|
//查询健康评估信息
|
||||||
|
@ -20,6 +20,12 @@
|
|||||||
:value.sync="data.avoidFood"
|
:value.sync="data.avoidFood"
|
||||||
@onConfirm="handleOnConfirm"
|
@onConfirm="handleOnConfirm"
|
||||||
/>
|
/>
|
||||||
|
<RemarkCom
|
||||||
|
v-if="dev && showRemark"
|
||||||
|
title="营养师点评"
|
||||||
|
:value.sync="data.recipesPlanRemark"
|
||||||
|
@onConfirm="handleOnRemarkConfirm"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -39,6 +45,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
showRemark: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
"text-info": TextInfo,
|
"text-info": TextInfo,
|
||||||
@ -115,6 +125,21 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
data(val, oldVal) {
|
||||||
|
if (
|
||||||
|
val &&
|
||||||
|
val.dietitianName &&
|
||||||
|
!this.basicInfo[3].some((obj) => obj.value === "dietitianName")
|
||||||
|
) {
|
||||||
|
this.basicInfo.splice(3, 0, [
|
||||||
|
{ title: "主营养师", value: "dietitianName" },
|
||||||
|
{ title: "营养师助理", value: "assDietitianName" },
|
||||||
|
{ title: "售后营养师", value: "afterDietitianName" },
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
@onConfirm="handleOnConfirm"
|
@onConfirm="handleOnConfirm"
|
||||||
/>
|
/>
|
||||||
<RemarkCom
|
<RemarkCom
|
||||||
v-if="dev"
|
v-if="dev && showRemark"
|
||||||
title="营养师点评"
|
title="营养师点评"
|
||||||
:value.sync="data.recipesPlanRemark"
|
:value.sync="data.recipesPlanRemark"
|
||||||
@onConfirm="handleOnRemarkConfirm"
|
@onConfirm="handleOnRemarkConfirm"
|
||||||
@ -76,6 +76,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
showRemark: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
"text-info": TextInfo,
|
"text-info": TextInfo,
|
||||||
@ -258,6 +262,21 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
data(val, oldVal) {
|
||||||
|
if (
|
||||||
|
val &&
|
||||||
|
val.dietitianName &&
|
||||||
|
!this.basicInfo[3].some((obj) => obj.value === "dietitianName")
|
||||||
|
) {
|
||||||
|
this.basicInfo.splice(3, 0, [
|
||||||
|
{ title: "主营养师", value: "dietitianName" },
|
||||||
|
{ title: "营养师助理", value: "assDietitianName" },
|
||||||
|
{ title: "售后营养师", value: "afterDietitianName" },
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
getCustomerPhysicalSignsByCusId,
|
getCustomerPhysicalSignsByCusId
|
||||||
getCustomer
|
// getCustomer
|
||||||
} from "@/api/custom/customer";
|
} from "@/api/custom/customer";
|
||||||
import { dealHealthy } from "@/utils/healthyData";
|
import { dealHealthy } from "@/utils/healthyData";
|
||||||
import {
|
import {
|
||||||
@ -34,8 +34,6 @@ const oriState = {
|
|||||||
healthyDataType: 0,
|
healthyDataType: 0,
|
||||||
avoidFoodIds: [],
|
avoidFoodIds: [],
|
||||||
//
|
//
|
||||||
customerData: {},
|
|
||||||
//
|
|
||||||
planList: [],
|
planList: [],
|
||||||
planListLoading: false
|
planListLoading: false
|
||||||
};
|
};
|
||||||
@ -130,7 +128,8 @@ const actions = {
|
|||||||
dispatch("fetchTopicDetailActions", {
|
dispatch("fetchTopicDetailActions", {
|
||||||
topicId: defTopic.topicId,
|
topicId: defTopic.topicId,
|
||||||
id: defTopic.id,
|
id: defTopic.id,
|
||||||
uid: defTopic.uid
|
uid: defTopic.uid,
|
||||||
|
callback: payload.callback
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
mTopicList = result.rows;
|
mTopicList = result.rows;
|
||||||
@ -145,7 +144,6 @@ const actions = {
|
|||||||
const {
|
const {
|
||||||
healthyData,
|
healthyData,
|
||||||
planList,
|
planList,
|
||||||
customerData,
|
|
||||||
topicList,
|
topicList,
|
||||||
customerList
|
customerList
|
||||||
} = state;
|
} = state;
|
||||||
@ -158,11 +156,6 @@ const actions = {
|
|||||||
if (!planList.length || planList[0].cusId !== parseInt(uid)) {
|
if (!planList.length || planList[0].cusId !== parseInt(uid)) {
|
||||||
dispatch("getRecipesPlanActions", { cusId: uid });
|
dispatch("getRecipesPlanActions", { cusId: uid });
|
||||||
}
|
}
|
||||||
// 客户档案
|
|
||||||
if (customerData.id !== parseInt(uid)) {
|
|
||||||
dispatch("getCustomerFileActions", { cusId: uid });
|
|
||||||
}
|
|
||||||
//
|
|
||||||
const result = await fetchTopicDetail({ topicId, id });
|
const result = await fetchTopicDetail({ topicId, id });
|
||||||
if (result.code === 200) {
|
if (result.code === 200) {
|
||||||
// 设置已读
|
// 设置已读
|
||||||
@ -184,12 +177,6 @@ const actions = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getCustomerFileActions({ commit }, payload) {
|
|
||||||
const result = await getCustomer(payload.cusId);
|
|
||||||
if (result.code === 200) {
|
|
||||||
commit("save", { customerData: result.data });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async postTopicReplyActions(
|
async postTopicReplyActions(
|
||||||
{ commit, rootGetters, dispatch, state },
|
{ commit, rootGetters, dispatch, state },
|
||||||
payload
|
payload
|
||||||
@ -223,7 +210,7 @@ const actions = {
|
|||||||
const healthyDataResult = await getCustomerPhysicalSignsByCusId(
|
const healthyDataResult = await getCustomerPhysicalSignsByCusId(
|
||||||
payload.cusId
|
payload.cusId
|
||||||
);
|
);
|
||||||
const newState = {};
|
const newState = { healthyData: {}, avoidFoodIds: [] };
|
||||||
if (healthyDataResult.code === 200) {
|
if (healthyDataResult.code === 200) {
|
||||||
if (!healthyDataResult.data.customerHealthy) {
|
if (!healthyDataResult.data.customerHealthy) {
|
||||||
// throw new Error("客户还没填写健康评估表");
|
// throw new Error("客户还没填写健康评估表");
|
||||||
@ -236,6 +223,12 @@ const actions = {
|
|||||||
newState.avoidFoodIds = (newState.healthyData.avoidFood || []).map(
|
newState.avoidFoodIds = (newState.healthyData.avoidFood || []).map(
|
||||||
obj => obj.id
|
obj => obj.id
|
||||||
);
|
);
|
||||||
|
newState.healthyData.dietitianName =
|
||||||
|
healthyDataResult.data.customerInfo.dietitianName;
|
||||||
|
newState.healthyData.assDietitianName =
|
||||||
|
healthyDataResult.data.customerInfo.assDietitianName;
|
||||||
|
newState.healthyData.afterDietitianName =
|
||||||
|
healthyDataResult.data.customerInfo.afterDietitianName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
commit("save", {
|
commit("save", {
|
||||||
|
@ -237,7 +237,12 @@ export default {
|
|||||||
this.replyTarget = "";
|
this.replyTarget = "";
|
||||||
this.replyContent = "";
|
this.replyContent = "";
|
||||||
this.replyObj = {};
|
this.replyObj = {};
|
||||||
this.fetchTopicListApi({ fromUid: data.uid });
|
this.fetchTopicListApi({
|
||||||
|
fromUid: data.uid,
|
||||||
|
callback: (msg) => {
|
||||||
|
this.$message.error(msg);
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleOnTopicClick(data) {
|
handleOnTopicClick(data) {
|
||||||
|
@ -15,22 +15,6 @@
|
|||||||
:data="healthyDataType === 1 ? healthyData : {}"
|
:data="healthyDataType === 1 ? healthyData : {}"
|
||||||
v-show="healthyDataType === 1"
|
v-show="healthyDataType === 1"
|
||||||
/>
|
/>
|
||||||
<div v-if="customerData.id" class="customer_service_info">
|
|
||||||
<div class="info_item">
|
|
||||||
<span>主任营养师:</span>
|
|
||||||
<span>
|
|
||||||
{{ customerData.dietitianName || "无" }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="info_item">
|
|
||||||
<span>营养师助理:</span>
|
|
||||||
<span>{{ customerData.assDietitianName || "无" }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="info_item">
|
|
||||||
<span>售后营养师:</span>
|
|
||||||
<span>{{ customerData.afterDietitianName || "无" }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="食谱计划" name="plan">
|
<el-tab-pane label="食谱计划" name="plan">
|
||||||
@ -69,12 +53,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState(["healthyData", "healthyDataType", "healthDataLoading"]),
|
||||||
"healthyData",
|
|
||||||
"healthyDataType",
|
|
||||||
"healthDataLoading",
|
|
||||||
"customerData",
|
|
||||||
]),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -10,11 +10,13 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<HealthyView
|
<HealthyView
|
||||||
dev
|
dev
|
||||||
|
showRemark
|
||||||
:data="healthyDataType === 0 ? healthyData : {}"
|
:data="healthyDataType === 0 ? healthyData : {}"
|
||||||
v-show="healthyDataType === 0"
|
v-show="healthyDataType === 0"
|
||||||
/>
|
/>
|
||||||
<BodySignView
|
<BodySignView
|
||||||
dev
|
dev
|
||||||
|
showRemark
|
||||||
:data="healthyDataType === 1 ? healthyData : {}"
|
:data="healthyDataType === 1 ? healthyData : {}"
|
||||||
v-show="healthyDataType === 1"
|
v-show="healthyDataType === 1"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user