客户健康信息加上备注编辑修改
This commit is contained in:
parent
d78cb2f870
commit
87735820d9
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
) AS up GROUP BY user_id ) AS ups USING(user_id)
|
) AS up GROUP BY user_id ) AS ups USING(user_id)
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
<if test="userName != null and userName != ''">
|
<if test="userName != null and userName != ''">
|
||||||
AND user_name like concat('%', #{userName}, '%')
|
AND (user_name like concat('%', #{userName}, '%') OR nick_name like concat('%', #{userName}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND status = #{status}
|
AND status = #{status}
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<div v-if="showFlag">
|
<div v-if="showFlag">
|
||||||
<div style="float:right;margin-top:-10px;margin-bottom: 10px;" v-show="dataList.length > 0">
|
<div style="float:right;margin-top:-10px;margin-bottom: 10px;" v-show="dataList.length > 0">
|
||||||
<!-- 只有新版健康评估信息才可修改,旧的体征数据不支持修改 -->
|
<!-- 只有新版健康评估信息才可修改,旧的体征数据不支持修改 -->
|
||||||
<el-button v-hasPermi="['custom:healthy:edit']" type="primary" v-show="dataType == 0" @click="handleEditHealthyClick()" plain>修改信息</el-button>
|
<el-button v-hasPermi="['custom:healthy:edit']" type="info" v-show="dataType == 0" @click="handleEditRemarkClick()" plain>修改备注</el-button>
|
||||||
|
<el-button v-hasPermi="['custom:healthy:edit']" type="warning" v-show="dataType == 0" @click="handleEditHealthyClick()" plain>修改信息</el-button>
|
||||||
<el-button type="danger" v-hasPermi="['custom:healthy:remove']" @click="handleDelete()" plain>删除信息</el-button>
|
<el-button type="danger" v-hasPermi="['custom:healthy:remove']" @click="handleDelete()" plain>删除信息</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 客户健康评估 -->
|
<!-- 客户健康评估 -->
|
||||||
@ -14,6 +15,15 @@
|
|||||||
<p class="p_title_1" style="margin-top: 5px;">{{titleArray[index]}}</p>
|
<p class="p_title_1" style="margin-top: 5px;">{{titleArray[index]}}</p>
|
||||||
<table-detail-message :data="item" ></table-detail-message>
|
<table-detail-message :data="item" ></table-detail-message>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 备注 -->
|
||||||
|
<el-table :data="remarkList" :show-header="false" border :cell-style="remarkColumnStyle" style="width: 100%;">
|
||||||
|
<el-table-column width="140" prop="remarkTitle">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="remarkValue">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<auto-hide-message :data="scope.row.remarkValue" :maxLength="100"/></template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 其他信息 -->
|
<!-- 其他信息 -->
|
||||||
<div style="height:400px;overflow: auto">
|
<div style="height:400px;overflow: auto">
|
||||||
@ -59,7 +69,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<physicalSigns-edit ref="physicalSignsEditDialog" @refreshHealthyData="getCustomerHealthyByCusId()"></physicalSigns-edit>
|
<physicalSigns-edit ref="physicalSignsEditDialog" @refreshHealthyData="getCustomerHealthyByCusId()"></physicalSigns-edit>
|
||||||
|
<!-- 编辑备注 -->
|
||||||
|
<physicalSigns-remark ref="physicalSignsRemarkDialog" @refreshHealthyData="getCustomerHealthyByCusId()"></physicalSigns-remark>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -69,13 +80,14 @@ import AutoHideMessage from "@/components/AutoHideMessage";
|
|||||||
import * as healthyData from "@/utils/healthyData";
|
import * as healthyData from "@/utils/healthyData";
|
||||||
import Clipboard from 'clipboard';
|
import Clipboard from 'clipboard';
|
||||||
import PhysicalSignsEdit from "@/components/PhysicalSignsEdit";
|
import PhysicalSignsEdit from "@/components/PhysicalSignsEdit";
|
||||||
|
import PhysicalSignsRemark from "@/components/PhysicalSignsRemark";
|
||||||
export default {
|
export default {
|
||||||
name: "PhysicalSignsDialog",
|
name: "PhysicalSignsDialog",
|
||||||
components: {
|
components: {
|
||||||
"auto-hide-message": AutoHideMessage,
|
"auto-hide-message": AutoHideMessage,
|
||||||
"table-detail-message": TableDetailMessage,
|
"table-detail-message": TableDetailMessage,
|
||||||
"physicalSigns-edit":PhysicalSignsEdit
|
"physicalSigns-edit":PhysicalSignsEdit,
|
||||||
|
"physicalSigns-remark":PhysicalSignsRemark
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -86,6 +98,7 @@ export default {
|
|||||||
dataList: [],
|
dataList: [],
|
||||||
dataType: 0,
|
dataType: 0,
|
||||||
healthyData: null,
|
healthyData: null,
|
||||||
|
remarkList:[{"remarkTitle": "备注信息", "remarkValue": ""}],
|
||||||
// 体征标题
|
// 体征标题
|
||||||
signTitleData: [
|
signTitleData: [
|
||||||
["创建时间", "姓名", "年龄"],
|
["创建时间", "姓名", "年龄"],
|
||||||
@ -204,13 +217,21 @@ export default {
|
|||||||
return "background:#ffffff;";
|
return "background:#ffffff;";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 自定义备注列背景色
|
||||||
|
remarkColumnStyle({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex % 2 === 0) {
|
||||||
|
//第三第四列的背景色就改变了2和3都是列数的下标
|
||||||
|
return "background:#f3f6fc;font-weight:bold";
|
||||||
|
} else {
|
||||||
|
return "background:#ffffff;";
|
||||||
|
}
|
||||||
|
},
|
||||||
showDialog(data) {
|
showDialog(data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.title = `「${data.name}」客户健康评估信息`;
|
this.title = `「${data.name}」客户健康评估信息`;
|
||||||
this.getCustomerHealthyByCusId();
|
this.getCustomerHealthyByCusId();
|
||||||
},
|
},
|
||||||
getCustomerHealthyByCusId(){
|
getCustomerHealthyByCusId(){
|
||||||
|
|
||||||
getCustomerPhysicalSignsByCusId(this.data.id).then((res) => {
|
getCustomerPhysicalSignsByCusId(this.data.id).then((res) => {
|
||||||
this.showFlag = false;
|
this.showFlag = false;
|
||||||
if (res.data.customerHealthy) {
|
if (res.data.customerHealthy) {
|
||||||
@ -218,6 +239,7 @@ export default {
|
|||||||
this.dataType = res.data.type;
|
this.dataType = res.data.type;
|
||||||
if(this.dataType == 0){
|
if(this.dataType == 0){
|
||||||
this.healthyData = Object.assign({}, res.data.customerHealthy);
|
this.healthyData = Object.assign({}, res.data.customerHealthy);
|
||||||
|
this.remarkList[0].remarkValue = this.healthyData.remark;
|
||||||
this.getDataListByHealthyMessage(res.data.customerHealthy);
|
this.getDataListByHealthyMessage(res.data.customerHealthy);
|
||||||
}else{
|
}else{
|
||||||
this.getDataListBySignMessage(res.data.customerHealthy)
|
this.getDataListBySignMessage(res.data.customerHealthy)
|
||||||
@ -443,6 +465,9 @@ export default {
|
|||||||
handleEditHealthyClick() {
|
handleEditHealthyClick() {
|
||||||
//console.log(JSON.stringify(this.healthyData));
|
//console.log(JSON.stringify(this.healthyData));
|
||||||
this.$refs["physicalSignsEditDialog"].showDialog(this.data, this.healthyData);
|
this.$refs["physicalSignsEditDialog"].showDialog(this.data, this.healthyData);
|
||||||
|
},
|
||||||
|
handleEditRemarkClick(){
|
||||||
|
this.$refs["physicalSignsRemarkDialog"].showDialog(this.data, this.healthyData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
88
stdiet-ui/src/components/PhysicalSignsRemark/index.vue
Normal file
88
stdiet-ui/src/components/PhysicalSignsRemark/index.vue
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :visible.sync="visible" :title="title" width="500px" append-to-body @closed="onClosed">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-position="top" label-width="100px">
|
||||||
|
<el-form-item label="" prop="remark" >
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
maxlength="300"
|
||||||
|
show-word-limit
|
||||||
|
placeholder="请输入备注"
|
||||||
|
v-model="form.remark">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submit()">确 定</el-button>
|
||||||
|
<el-button @click="onClosed()">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getCustomerPhysicalSignsByCusId } from "@/api/custom/customer";
|
||||||
|
import { updateHealthy } from "@/api/custom/healthy";
|
||||||
|
export default {
|
||||||
|
name: "PhysicalSignsRemark",
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
title: "",
|
||||||
|
data: undefined,
|
||||||
|
form: {
|
||||||
|
id: null,
|
||||||
|
remark: null
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showDialog(data, healthy) {
|
||||||
|
this.data = data;
|
||||||
|
this.title = "修改"+`「${data.name}」`+"备注";
|
||||||
|
this.form.id = healthy.id;
|
||||||
|
this.form.remark = healthy.remark;
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
onClosed() {
|
||||||
|
this.visible = false;
|
||||||
|
this.data = null;
|
||||||
|
},
|
||||||
|
submit(){
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.editCustomerHealthy();
|
||||||
|
} else {
|
||||||
|
this.$message({message: "数据未填写完整", type: "warning"});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
editCustomerHealthy(){
|
||||||
|
updateHealthy(this.form).then((response) => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.onClosed();
|
||||||
|
this.$emit('refreshHealthyData');
|
||||||
|
}
|
||||||
|
}).catch(function() {
|
||||||
|
console.log("error");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.margin-top-20{
|
||||||
|
margin-top:20px;
|
||||||
|
}
|
||||||
|
.p_title_1{
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user