You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
374 lines
11 KiB
374 lines
11 KiB
<template>
|
|
<div style="display: flex;">
|
|
<div :style="`width: ${window.pageWidth - 120}px;`">
|
|
<el-table :data="phoneFollowUp" border
|
|
:height="window.pageHeight < 600 ? 124 : Math.floor((window.pageHeight - 228) / 3)" size="small"
|
|
highlight-current-row ref="phoneFollowUp" @row-click="rowick">
|
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
|
<el-table-column prop="patientName" label="姓名" min-width="80" />
|
|
<el-table-column prop="mobileTelephone" label="手机号" min-width="130" align="center" />
|
|
<!-- <el-table-column prop="SmsTypeName" label="短信类别" min-width="80" align="center">
|
|
</el-table-column> -->
|
|
<el-table-column prop="content" label="短信内容" min-width="300" />
|
|
<el-table-column prop="isComplete" label="完成" min-width="40" align="center">
|
|
<template slot-scope="scope">
|
|
<el-checkbox v-model="scope.row.isComplete" true-label="Y" false-label="N" disabled />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="planSendDate" label="推送时间" min-width="300" />
|
|
<el-table-column prop="lastModifierName" label="修改人" min-width="80" align="center" />
|
|
<el-table-column prop="lastModificationTime" label="修改日期" min-width="100" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="creatorName" label="登记人" min-width="80" align="center" />
|
|
<el-table-column prop="creationTime" label="登记日期" min-width="100" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 120px;margin-top: 50px">
|
|
<div style="margin-left: 10px">
|
|
<el-button class="commonbutton" type="primary" @click="btnAdd" >新增随访</el-button>
|
|
</div>
|
|
<!-- <div style="margin: 10px;">
|
|
<el-button class="commonbutton" type="primary" @click="btnEdit">编辑随访</el-button>
|
|
</div> -->
|
|
<div style="margin: 10px;">
|
|
<el-button class="commonbutton" type="primary" @click="btnDel" >删除随访</el-button>
|
|
</div>
|
|
</div>
|
|
<el-dialog
|
|
:title="title == 1 ? '新增' : '修改'"
|
|
:visible.sync="dialogVisible"
|
|
width="75%"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|
<el-row>
|
|
<el-col :span="6">
|
|
<el-form-item label="编号">
|
|
<el-input
|
|
v-model="form.id"
|
|
style="width: 65%"
|
|
disabled
|
|
size="small"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="随访模式">
|
|
<el-select
|
|
v-model="form.followUpMode"
|
|
placeholder="请选择"
|
|
size="small"
|
|
>
|
|
<el-option
|
|
v-for="item in followUpMode"
|
|
:key="item.id"
|
|
:label="item.displayName"
|
|
:value="item.id"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="截止时间" v-if="form.followUpMode == 0">
|
|
<el-date-picker
|
|
type="datetime"
|
|
placeholder="选择日期时间"
|
|
size="small"
|
|
v-model="form.endDate"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
editable
|
|
style="width: 177px"
|
|
>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item
|
|
:label="form.followUpMode == 0 ? 'corn表达式' : '生成天数'"
|
|
>
|
|
<!-- <el-input
|
|
v-model="form.parmValue"
|
|
size="small"
|
|
></el-input> -->
|
|
<el-input v-model="form.modeValue"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="短信内容">
|
|
<!-- <el-input
|
|
v-model="form.parmValue"
|
|
size="small"
|
|
></el-input> -->
|
|
<el-input v-model="form.content"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-divider></el-divider>
|
|
<el-col :span="4" style="margin-left: 15px">
|
|
<el-form-item label="创建者">
|
|
<el-input
|
|
v-model="form.creatorName"
|
|
disabled
|
|
size="small"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="创建时间">
|
|
<el-input
|
|
:value="form.creationTime | dateFormat"
|
|
disabled
|
|
size="small"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item label="修改者">
|
|
<el-input
|
|
v-model="form.lastModifierName"
|
|
disabled
|
|
size="small"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="修改时间">
|
|
<el-input
|
|
style="width: 85%"
|
|
:value="form.lastModificationTime | dateFormat"
|
|
disabled
|
|
size="small"
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogVisible = false" class="difference"
|
|
>取 消</el-button
|
|
>
|
|
<el-button type="primary" @click="addoredit" class="commonbutton"
|
|
>确 定</el-button
|
|
>
|
|
</span>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import moment from "moment";
|
|
import { mapState } from "vuex";
|
|
import { dddw } from "../../utlis/proFunc";
|
|
import { getapi, postapi, putapi, deletapi } from "../../api/api";
|
|
|
|
export default {
|
|
components: {},
|
|
data() {
|
|
return {
|
|
phoneFollowUp: [], // 电话随访
|
|
curRow: {},
|
|
dialogVisible:false,
|
|
form: {
|
|
followUpMode:"",
|
|
modeValue:"",
|
|
content:"",
|
|
endDate:""
|
|
},
|
|
followUpMode: [
|
|
{
|
|
id: "0",
|
|
displayName: "corn表达式",
|
|
},
|
|
{
|
|
id: "1",
|
|
displayName: "按天",
|
|
},
|
|
{
|
|
id: "2",
|
|
displayName: "按周",
|
|
},
|
|
{
|
|
id: "3",
|
|
displayName: "按月",
|
|
},
|
|
{
|
|
id: "4",
|
|
displayName: "按年",
|
|
},
|
|
],
|
|
title: "",
|
|
};
|
|
},
|
|
|
|
created() {
|
|
|
|
},
|
|
|
|
updated() {
|
|
this.$nextTick(() => {
|
|
this.$refs['phoneFollowUp'].doLayout()
|
|
})
|
|
},
|
|
|
|
//挂载完成
|
|
mounted() {
|
|
this.dictInit()
|
|
|
|
},
|
|
|
|
computed: {
|
|
...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
|
|
},
|
|
methods: {
|
|
dddw, moment,
|
|
|
|
// 初始化字典信息
|
|
dictInit() {
|
|
// 获取组合项目包含的明细
|
|
postapi('/api/app/Asbitem/GetSimpleAsbitemWithDetails')
|
|
.then(res => {
|
|
if (res.code > -1) this.asbItems = res.data
|
|
})
|
|
},
|
|
getLists() {
|
|
postapi("/api/app/SmsSend/GetList", {
|
|
followUpId: this.dataTransOpts.tableS.patient_register.followUpId,
|
|
}).then((res) => {
|
|
if (res.code > -1) this.phoneFollowUp = res.data;
|
|
});
|
|
},
|
|
rowick(row) {
|
|
this.curRow = { ...row };
|
|
},
|
|
addoredit() {
|
|
if (this.title == 1) {
|
|
if (this.form.followUpMode == "") {
|
|
this.$message.warning("请选择随访模式");
|
|
} else if (this.form.followUpMode == 0 && this.form.modeValue == "") {
|
|
this.$message.warning("请输入corn表达式");
|
|
} else if (this.form.followUpMode == 0 && this.form.endDate == "") {
|
|
this.$message.warning("请选择截止时间");
|
|
} else if (this.form.followUpMode != 0 && this.form.modeValue == "") {
|
|
this.$message.warning("请输入生成天数");
|
|
}else if (this.form.content== "") {
|
|
this.$message.warning("请输入短信内容");
|
|
} else {
|
|
postapi("/api/app/SmsSend/AutoCreate", {
|
|
followUpId: this.dataTransOpts.tableS.patient_register.followUpId,
|
|
followUpMode: this.form.followUpMode,
|
|
modeValue: this.form.modeValue,
|
|
endDate: this.form.endDate,
|
|
content: this.form.content
|
|
}).then((res) => {
|
|
if (res.code > -1) {
|
|
this.getLists();
|
|
this.dialogVisible = false;
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
postapi("/api/app/PhoneFollowUp/Update", {
|
|
phoneFollowUpId: this.form.id,
|
|
planFollowDate: this.form.planFollowDate,
|
|
followUpContent: this.form.followUpContent,
|
|
replyContent: this.form.replyContent,
|
|
isComplete:this.form.isComplete
|
|
}).then((res) => {
|
|
if (res.code > -1) {
|
|
this.getLists();
|
|
this.dialogVisible = false;
|
|
}
|
|
});
|
|
}
|
|
},
|
|
// 设置颜色
|
|
setColor(checkCompleteFlag) {
|
|
let color = "#52555F"
|
|
switch (checkCompleteFlag) {
|
|
case '0':
|
|
color = "#FF5054"
|
|
break;
|
|
case '2':
|
|
color = "#396FFA"
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return color
|
|
},
|
|
|
|
// 新增
|
|
btnAdd(){
|
|
this.dialogVisible = true;
|
|
this.title = 1;
|
|
this.form = this.$options.data().form;
|
|
},
|
|
|
|
// 编辑
|
|
btnEdit(){
|
|
|
|
},
|
|
|
|
// 删除
|
|
btnDel(){
|
|
if (this.curRow.id == undefined) {
|
|
this.$message.warning("请选择删除的数据");
|
|
} else {
|
|
this.$confirm("是否确认删除,是否继续", "提示", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
cancelButtonClass: "difference",
|
|
confirmButtonClass: "commonbutton",
|
|
})
|
|
.then(() => {
|
|
postapi("/api/app/SmsSend/Delete",{
|
|
smsSendId:this.curRow.id
|
|
}).then((res) => {
|
|
if (res.code != -1) {
|
|
this.curRow=this.$options.data().curRow
|
|
this.getLists();
|
|
//this.$message.success("删除成功");
|
|
}
|
|
});
|
|
})
|
|
.catch(() => {});
|
|
}
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
//监听事件
|
|
watch: {
|
|
//人员ID未切换换时 也可以强制刷新数据
|
|
"dataTransOpts.refresh.register_check_asbitem.M": {
|
|
// immediate:true,
|
|
handler(newVal, oldVal) {
|
|
console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
|
|
// if (newVal != oldVal)
|
|
this.getLists();
|
|
}
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
@import "../../assets/css/global.css";
|
|
|
|
.box {
|
|
display: flex;
|
|
}
|
|
</style>
|