<template>
|
<div class="app-container">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form-item label="姓名" prop="name">
|
<el-input ref="inputName" v-model="queryParams.name" placeholder="请输入姓名" style="width: 100px"
|
@keyup.enter.native="handleQuery" />
|
</el-form-item>
|
<el-form-item label="体检号" prop="tjNum">
|
<el-input style="width: 170px" v-model="queryParams.tjNum" placeholder="请输入体检号" clearable ref="inputName" @blur="hb"
|
@keyup.enter.native="handleQuery" />
|
</el-form-item>
|
<el-form-item label="登记时间" prop="createTimeList">
|
<el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions"
|
style="width: 310px" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:00:00']"
|
format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item label="单位名称" prop="firmId">
|
<el-select :remote-method="getRemoteData" v-model="queryParams.firmId" value-key="drugManufacturerId" remote
|
filterable placeholder="请选择单位名称" clearable @change="searchSelect">
|
<el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName"
|
:value="dict.drugManufacturerId" />
|
</el-select>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
</el-form-item>
|
</el-form>
|
|
<!-- <el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button
|
style="margin-left: 13px"
|
type="primary"
|
icon="el-icon-download"
|
size="mini"
|
@click="handleExport"
|
v-hasPermi="['hosp:order:export']"
|
>导出</el-button
|
>
|
</el-col>
|
<right-toolbar
|
:showSearch.sync="showSearch"
|
@queryTable="getList"
|
></right-toolbar>
|
</el-row> -->
|
|
<template>
|
<el-table border style="margin: 14px; width: 99%" v-loading="loading" :data="orderList"
|
@selection-change="handleSelectionChange" ref="multipleTable">
|
<!-- <el-table-column type="selection" width="40px" align="center" height="10px" fixed="left" /> -->
|
<el-table-column label="序号" align="center" prop="newID" width="50px" fixed="left" height="10px" />
|
<el-table-column label="姓名" align="center" prop="tjCustomerName" height="10px" width="90px" fixed="left"
|
:show-overflow-tooltip="true" />
|
<el-table-column label="性别" align="center" prop="tjCustomerSex" width="50px" height="10px"
|
:show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span v-if="scope.row.tjCustomerSex == '0'">男</span>
|
<span v-if="scope.row.tjCustomerSex == '1'">女</span>
|
<span v-if="scope.row.tjCustomerSex == '2'">未知</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="年龄" align="center" prop="tjCustomerAge" height="10px" width="60px"
|
:show-overflow-tooltip="true" />
|
<el-table-column label="电话" align="center" prop="tjCustomerPhone" :show-overflow-tooltip="true" height="10px"
|
width="110px" />
|
<el-table-column label="体检类型" align="center" prop="tjType" height="10px" width="80px"
|
:show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span v-if="scope.row.tjType == '1'">个人</span>
|
<span v-if="scope.row.tjType == '2'">团队</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="体检号" align="center" prop="tjNumber" :show-overflow-tooltip="true" width="160px" />
|
<el-table-column label="所选套餐" align="center" prop="pacName" height="10px" :show-overflow-tooltip="true"
|
width="140px" />
|
<el-table-column label="登记人" align="center" prop="createBy" height="10px" :show-overflow-tooltip="true"
|
width="100px" />
|
<el-table-column label="登记时间" align="center" prop="createTime" width="155px" height="10px"
|
:show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="报告时间" align="center" prop="reportTime" width="155px" height="10px"
|
:show-overflow-tooltip="true">
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.reportTime) }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="备注" align="center" prop="remark" height="10px" :show-overflow-tooltip="true" />
|
<!-- <el-table-column label="创建人" align="center" prop="createBy" /> -->
|
<!-- <el-table-column label="更新人" align="center" prop="updateBy" /> -->
|
<!-- <el-table-column label="单位名称" align="center" prop="dictCompName" :show-overflow-tooltip="true" height="10px" /> -->
|
<!-- <el-table-column label="部门名" align="center" prop="firmDeptName" /> -->
|
<!-- <el-table-column label="在单位工号" align="center" prop="firmWorkId" height="10px" /> -->
|
<!-- <el-table-column label="客户照片" align="center" prop="photo" /> -->
|
<!-- <el-table-column prop="checkStatus" label="审核状态" width="180">
|
<template slot-scope="scope">
|
<span>{{
|
scope.row.checkStatus == "1" ? "已审核" : "待审核"
|
}}</span>
|
</template>
|
</el-table-column> -->
|
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" height="10px"
|
width="100px">
|
<template slot-scope="scope">
|
<el-button size="mini" type="text" icon="el-icon-document" @click="investigation(scope.row)" title="详情"
|
style="margin-right: 15px"></el-button>
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-time"
|
@click="handleUpdate(scope.row)"
|
v-hasPermi="['hosp:order:edit']"
|
title="问卷记录"
|
style="margin-right: 15px"
|
></el-button>
|
|
</template>
|
</el-table-column>
|
</el-table>
|
</template>
|
|
<div class="pag">
|
<div class="pag1">
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
@pagination="getList" />
|
</div>
|
</div>
|
|
<el-drawer title="我是标题" :visible.sync="drawer" :with-header="false" size="65%">
|
<el-divider content-position="center"><span style="font-size:18px;font-weight: 800;">满意度调查</span></el-divider>
|
<div class="drawer1">
|
<el-row>
|
<el-col :span="12">
|
<div>
|
<div class="drawer2">
|
<span style="margin-bottom: 10px">体检人:{{ gation.tjCustomerName }}</span><br />
|
<span>联系电话:{{ gation.tjCustomerPhone }}
|
<a class="a">切换号码</a></span>
|
<el-button style="margin-top: 10px; width: 80px" type="primary" size="mini"
|
@click="dialogVisibles">拨号</el-button>
|
</div>
|
<el-tabs v-model="activeNames" type="card" @tab-click="handleClick">
|
<el-tab-pane label="基本信息" name="first">
|
<div class="drawer3">
|
<span>姓名:{{ gation.tjCustomerName }}</span>
|
<span>年龄:{{ gation.tjCustomerAge }}</span>
|
<span>团体/个人:{{ gation.tjType ? "团队" : "个人" }}</span>
|
<span>联系人:{{ gation.checkDoctor }}</span>
|
<span>体检次数:{{ gation.tjCount }}</span>
|
<span>性别:{{ gation.tjCustomerSex ? "女" : "男" }}</span>
|
<span>体检号:{{ gation.tjNumber }}</span>
|
<span>报告时间:{{ gation.createTime }}</span>
|
<span>体检时间:{{ gation.finishTime }}</span>
|
<el-button type="primary" size="mini" @click="viewReport1">最近一次体检报告</el-button>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane label="发送短信" name="second">
|
<el-form ref="form" :model="form" label-width="80px">
|
<el-form-item label="短信通知">
|
<el-select v-model="form.region" placeholder="请选择短信通知" @change="sendtext">
|
<el-option v-for="dict in sendtextList" :key="dict.id" :label="dict.tempTitle"
|
:value="dict.id"></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="短信内容">
|
<el-input style="width: 230px" type="textarea" :rows="13" placeholder="请输入短信内容" v-model="textarea">
|
</el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" size="mini" @click="sendingtext">提交发送</el-button>
|
<el-button>取消</el-button>
|
</el-form-item>
|
</el-form>
|
</el-tab-pane>
|
<el-tab-pane label="发送邮件" name="third">
|
<el-form ref="form" :model="form" label-width="80px">
|
<el-form-item label="邮件通知">
|
<el-select v-model="form.region1" placeholder="请选择邮件通知" @change="sendTemplate">
|
<el-option v-for="dict in sendTemplateList" :key="dict.id" :label="dict.tempTitle"
|
:value="dict.id"></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="邮件内容">
|
<el-input style="width: 230px" type="textarea" :rows="13" placeholder="请输入邮件内容" v-model="textarea1">
|
</el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" size="mini" @click="sendingmail">提交发送</el-button>
|
</el-form-item>
|
</el-form>
|
</el-tab-pane>
|
<el-tab-pane label="健康宣教" name="fourth">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
label-width="100px">
|
<el-form-item label="知识库类型" prop="emertype">
|
<el-select v-model="queryParam.emertype" filterable placeholder="请选择知识库类型" clearable>
|
<el-option v-for="dict in emertype" :key="dict.emertype" :label="dict.emertype"
|
:value="dict.emertype" />
|
</el-select> </el-form-item><br />
|
<el-form-item label="知识库标题" prop="emertitle">
|
<el-select v-model="queryParam.emertitle" filterable placeholder="请选择知识库标题" clearable>
|
<el-option v-for="dict in emertype" :key="dict.emertitle" :label="dict.emertitle"
|
:value="dict.emertitle" />
|
</el-select>
|
</el-form-item>
|
|
<el-form-item>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuerys">搜索</el-button>
|
</el-form-item>
|
<el-table height="600px" v-loading="loading" :data="emerList" v-show="emerc" style="width: 400px">
|
<el-table-column label="知识库内容" prop="emercontent" />
|
</el-table>
|
</el-form>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div v-if="wenjuan == true">
|
<div>
|
<el-form v-for="(item, index) in intList" :key="index">
|
<el-form-item>{{ index + 1 > 9 ? index + 1 : "0" + (index + 1) }}.{{
|
item.question
|
}}(必填)<br />
|
<!-- <el-radio-group v-for="item4 in item.tjSurveyOptionsList" :key="item4.oid">
|
<el-radio>{{item4.ooption}}</el-radio>
|
</el-radio-group> -->
|
<label v-for="(item5, index) in item.tjSurveyOptionsList" :key="index">
|
<!-- <img v-show="item.type == '1'" v-if="item5.qid ==item.qid" class="select-radio" src="../../../assets/images/weixuanzhong.png" alt="">
|
<img v-show="item.type == '1'" v-else class="select-radio1" src="../../../assets/images/xuanzhong.png" alt=""> -->
|
<input v-show="item.type == '1'" type="radio" :name="item5.qid" :value="item5.oid" @click="fn" /><label
|
class="inp">{{ item5.ooption }}</label>
|
<el-rate v-show="item.type == '3'" v-model="myscore" show-text></el-rate>
|
</label>
|
</el-form-item>
|
</el-form>
|
</div>
|
<el-button type="primary" size="mini" @click="tijiao">提交</el-button>
|
</div>
|
<div v-if="wenjuan == false">
|
<Write :forms="formss" @fMethod="fatherSub"></Write>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
</el-drawer>
|
<el-dialog
|
title="PDF 预览"
|
:visible.sync="dialogVisible"
|
:close-on-click-modal="false"
|
>
|
<div class="main">
|
<iframe
|
id="printIframe"
|
:src="url"
|
frameborder="0"
|
style="width: 100%; height: 100%"
|
></iframe>
|
</div>
|
</el-dialog>
|
<!-- 问卷记录对话框 -->
|
<el-dialog :visible.sync="wenjuanopen" width="800px" append-to-body>
|
<div style="width: 100%" class="outside">
|
<el-timeline>
|
<el-timeline-item
|
placement="top"
|
v-for="(item, index) in suifangList"
|
:key="index"
|
>
|
<el-card>
|
{{ item.createTime }}
|
<h4>体检号:{{ item.tjNumber }}</h4>
|
<span class="mx" @click="lookmingxi(item)">查看明细</span>
|
</el-card>
|
</el-timeline-item>
|
</el-timeline>
|
</div>
|
</el-dialog>
|
|
<DataView
|
v-if="formModel && formKey"
|
ref="viewOrUpdateDialog"
|
:fields="fields"
|
:form-key="formKey"
|
:form-model="formModel"
|
/>
|
</div>
|
</template>
|
|
<script>
|
var inpArr = document.getElementsByTagName("input"),
|
result = "";
|
import print from "print-js";
|
import DataView from "@/components/dataView";
|
import {
|
listSendTemplate,
|
} from "@/api/hosp/sendTemplate";
|
import Write from "@/components/write";
|
import {
|
getPdf,
|
getOrderList,
|
printCode,getRecordByTjNumber,listFormDataTableRequest,listFormFieldsRequest,
|
getNewDateList
|
} from "@/api/hosp/order";
|
import { getsendEmail, getsendMessage } from "@/api/hosp/order";
|
import moment from "moment";
|
import { addSurveyRecord } from "@/api/hosp/surveyRecord";
|
import { getDictEmerList, listEmer } from "@/api/system/emer";
|
import ViewPdf from "@/components/ViewPdf";
|
import { getCompany, queryCompany } from "@/api/team/tuanti";
|
export default {
|
components: {
|
ViewPdf,Write,DataView
|
},
|
name: "Order",
|
inject: ["reload"],
|
data() {
|
return {
|
radio: "",
|
formss: {
|
tjNumber: "",
|
formkey: "",
|
},
|
|
formModel: {},
|
formKey: "",
|
fields: [],
|
suifangList: [],
|
wenjuanopen: false,
|
wenjuan: true,
|
myscore: this.value,
|
mytempscore: this.value,
|
rad: true,
|
Star: false,
|
data: [],
|
ooption: "",
|
qid: "",
|
qname: "",
|
tjSurveyRecordDetailList: [],
|
ooids: "",
|
tjSurveyList: [],
|
intList: {},
|
mid: "2",
|
emerc: false,
|
// 知识库表格数据
|
emertype: [],
|
emertitle: [],
|
emerList: [],
|
activeNames: "first",
|
textarea1: "",
|
textarea: "",
|
createTimeList: "",
|
report: "",
|
gation: {},
|
drawer: false,
|
barcode: null,
|
value: 0,
|
dialogVisible: false,
|
daoZhenDan: false,
|
Projectopen: false,
|
src: "",
|
url: "",
|
flag: true,
|
bill: null,
|
Treedata: [],
|
defaultProps: {
|
children: "tjProjectList",
|
label: "proName",
|
},
|
discount: 100,
|
DataList: [],
|
DataList1: [],
|
// 套餐提交按钮
|
confirm: false,
|
list1: true,
|
activeName: "1",
|
proIds: [],
|
TotalPrice1: 0,
|
numberList: [],
|
tjOrderList: [],
|
dialogVisible: false,
|
// 遮罩层
|
loading: true,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
userId: "",
|
// 总条数
|
total: 0,
|
// 体检记录表格数据
|
orderList: [],
|
CompanyList: [],
|
ordersList: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 日期范围
|
datetimerange: [],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
tjType: undefined,
|
tjNumber: undefined,
|
firmId: undefined,
|
createTime: undefined,
|
finishTime: undefined,
|
reportTime: undefined,
|
djbeginTime: undefined,
|
djendTime: undefined,
|
name: undefined,
|
},
|
queryParam: {
|
emertitle: null,
|
emertype: null,
|
},
|
sendTemplateList: [],
|
sendtextList: [],
|
dataList: [],
|
tempId: null,
|
tempIds: null,
|
// 查询参数
|
querySendTemplate: {
|
pageNum: 1,
|
pageSize: 10,
|
tempTitle: null,
|
tempContent: null,
|
tempType: null,
|
},
|
startTime: "",
|
en: {},
|
// 表单参数
|
form: {
|
tjType: 2,
|
},
|
// 表单校验
|
rules: {},
|
pickerOptions: {
|
shortcuts: [
|
{
|
text: "最近一周",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date();
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
{
|
text: "最近一个月",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date();
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
{
|
text: "最近三个月",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date();
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
],
|
},
|
};
|
},
|
watch: {
|
myscore(val) {
|
this.$emit("input", val);
|
|
this.ooption = this.myscore;
|
},
|
},
|
created() {
|
// this.getNowTime();
|
|
this.Company();
|
this.getListEmer();
|
this.getdate();
|
},
|
mounted() {
|
this.$nextTick(() => {
|
this.$refs.inputName.focus();
|
});
|
},
|
methods: {
|
getdate() {
|
getNewDateList().then((res) => {
|
this.createTimeList = [
|
moment(res.data).format("YYYY-MM-DD 00:00:00"),
|
moment(res.data).format("YYYY-MM-DD 23:59:00")
|
];;
|
this.getList();
|
});
|
},
|
dialogVisibles() {
|
this.$message.error("请连接拨号器!");
|
},
|
handleClick(tab, event) {
|
// console.log(tab, event);
|
},
|
// / 处理默认选中当前日期
|
getNowTime() {
|
var curDate = new Date().getTime();
|
var dayNum = 7 * 24 * 3600 * 1000;
|
var threeDays = curDate - dayNum;
|
var sDay = this.getLocalTime(threeDays);
|
var end = this.getLocalTime(curDate);
|
this.createTimeList = [sDay, end];
|
},
|
add0(m) {
|
return m < 10 ? "0" + m : m;
|
},
|
getLocalTime(nS) {
|
var time = new Date(nS);
|
var y = time.getFullYear();
|
var m = time.getMonth() + 1;
|
var d = time.getDate();
|
var h = time.getHours();
|
var mm = time.getMinutes();
|
return (
|
y +
|
"-" +
|
this.add0(m) +
|
"-" +
|
this.add0(d) +
|
" " +
|
this.add0(h) +
|
":" +
|
this.add0(mm)
|
);
|
},
|
|
doPrint(val) {
|
var ordonnance = document.getElementById(val).contentWindow;
|
setTimeout(() => {
|
ordonnance.print();
|
}, 100);
|
},
|
|
// 最近一次体检报告
|
viewReport1() {
|
const tjNumber = this.gation.tjNumber;
|
const flag = true;
|
getPdf(tjNumber, flag).then((response) => {
|
if (response.size === 0) {
|
this.$message.error("该用户体检报告暂未完成!");
|
this.dialogVisible = false;
|
} else {
|
this.dialogVisible = true;
|
this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
|
}
|
});
|
},
|
|
// onSubmit() {
|
// console.log("submit!");
|
// },
|
dateChangebirthday1(val) {
|
this.startTime = val;
|
},
|
/** 查询体检记录列表 */
|
getList() {
|
if( this.createTimeList){
|
this.queryParams.djbeginTime = this.createTimeList[0];
|
this.queryParams.djendTime = this.createTimeList[1];
|
}else if(this.createTimeList == null){
|
this.queryParams.djbeginTime = null;
|
this.queryParams.djendTime = null;
|
}
|
|
|
this.loading = true;
|
getOrderList(this.queryParams).then((response) => {
|
this.orderList = response.data.list;
|
if (this.orderList) {
|
this.orderList.forEach((item, index) => {
|
item.newID =
|
(this.queryParams.pageNum - 1) * this.queryParams.pageSize +
|
index +
|
1;
|
});
|
}
|
this.total = response.data.total;
|
this.loading = false;
|
});
|
},
|
/** 查询知识库列表 */
|
getListEmer() {
|
getDictEmerList().then((response) => {
|
this.emertype = response.data.emertype;
|
// this.emertitle = response.data.emertitle;
|
});
|
},
|
/** 查询知识库列表 */
|
getLlistEmers() {
|
listEmer(this.queryParam).then((response) => {
|
this.emerList = response.rows;
|
});
|
},
|
// 获取单位信息集合
|
Company() {
|
getCompany(this.queryParams).then((response) => {
|
this.CompanyList = response.data;
|
});
|
},
|
|
// 选框数据
|
searchSelect(val) { },
|
|
// 搜索
|
getRemoteData(query) {
|
if (query) {
|
let compName = query;
|
queryCompany(compName).then((response) => {
|
this.CompanyList = response.data;
|
this.CompanyList.forEach((item) => {
|
this.queryParams = item;
|
});
|
});
|
}
|
},
|
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
orderId: null,
|
userId: null,
|
tjType: null,
|
tjNumber: null,
|
tjSerialNumber: null,
|
pacId: null,
|
createTime: null,
|
finishTime: null,
|
updateTime: null,
|
reportTime: null,
|
createBy: null,
|
updateBy: null,
|
deleted: null,
|
firmId: null,
|
firmDeptName: null,
|
firmWorkId: null,
|
photo: null,
|
name: null,
|
};
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
hb() {
|
if (this.queryParams.tjNum != undefined) {
|
this.handleQuery();
|
}
|
},
|
handleQuerys() {
|
this.emerc = true;
|
this.queryParam.pageNum = 1;
|
this.getLlistEmers();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.createTimeList = []
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
// 多选框选中数据
|
handleSelectionChange(selection) {
|
this.ids = selection.map((item) => item.orderId);
|
this.DataList1 = this.$refs.multipleTable.selection;
|
this.DataList1.forEach((item) => {
|
this.barcode = item.tjNumber;
|
});
|
this.single = selection.length !== 1;
|
// if (selection.length > 1) {
|
// let del_row = selection.shift()
|
// this.$refs.multipleTable.toggleRowSelection(del_row, false)
|
// }
|
this.report = selection.map((item) => item.tjNumber);
|
},
|
|
investigation(row) {
|
this.gation = row;
|
this.formss.tjNumber = this.gation.tjNumber;
|
let mid = "2";
|
printCode(mid).then((response) => {
|
if (response.data) {
|
this.intList = response.data;
|
this.wenjuan = true;
|
} else {
|
this.formss.formkey = response.msg;
|
this.wenjuan = false;
|
}
|
this.drawer = true;
|
});
|
this.querySendTemplate.tempType = 1
|
listSendTemplate(this.querySendTemplate).then(response => {
|
// 邮件模板
|
this.sendTemplateList = response.rows;
|
});
|
this.querySendTemplate.tempType = 2
|
listSendTemplate(this.querySendTemplate).then(response => {
|
// 短信模板
|
this.sendtextList = response.rows;
|
});
|
},
|
|
handleUpdate(row) {
|
this.reset();
|
let tjNumber = row.tjNumber;
|
getRecordByTjNumber(tjNumber).then((res) => {
|
if (res.data.length != 0) {
|
this.wenjuanopen = true;
|
res.data.sort(
|
(a, b) =>
|
|
new Date(b.createTime).getTime() -
|
new Date(a.createTime).getTime()
|
);
|
this.suifangList = res.data;
|
} else {
|
this.$message.warning("暂无问卷记录!");
|
}
|
});
|
},
|
lookmingxi(val) {
|
this.formKey = val.formKey;
|
let data = {
|
formKey: this.formKey,
|
};
|
if(this.suifangList.length <= 1 ){
|
this.wenjuanopen = false;
|
}
|
listFormDataTableRequest(data).then((res) => {
|
res.data.rows.forEach((item) => {
|
if (item.id == val.id) {
|
this.formModel = item;
|
}
|
});
|
listFormFieldsRequest(this.formKey).then((res) => {
|
this.fields = res.data;
|
this.$refs.viewOrUpdateDialog.showDialog();
|
});
|
});
|
},
|
|
fatherSub() {
|
this.hangshu = false;
|
this.reload();
|
},
|
sendTemplate(val) {
|
this.tempIds = val
|
this.sendTemplateList.forEach(item => {
|
if (item.id == val) {
|
this.textarea1 = item.tempContent
|
}
|
})
|
},
|
sendtext(val) {
|
this.tempId = val
|
this.sendtextList.forEach(item => {
|
if (item.id == val) {
|
this.textarea = item.tempContent
|
}
|
})
|
},
|
// 发送短信
|
sendingtext() {
|
if (this.tempId) {
|
let orderIds = []
|
orderIds.push(this.gation.orderId)
|
let data = {
|
orderIds: orderIds,
|
tempId: this.tempId
|
}
|
getsendMessage(data).then((res) => {
|
if (res.code === 200) {
|
this.$modal.msgSuccess("发送成功");
|
this.getList()
|
}
|
})
|
this.drawer = false
|
} else {
|
this.$modal.msgError("请选择短信模板");
|
}
|
},
|
|
// 发送邮件
|
sendingmail() {
|
if (this.tempId) {
|
let orderIds = []
|
orderIds.push(this.gation.orderId)
|
let data = {
|
orderIds: orderIds,
|
tempId: this.tempIds
|
}
|
getsendEmail(data).then((res) => {
|
if (res.code === 200) {
|
this.$modal.msgSuccess("发送成功");
|
this.getList()
|
}
|
})
|
this.drawer = false
|
} else {
|
this.$modal.msgError("请选择邮件模板");
|
}
|
|
},
|
|
//提交按钮
|
fn(evt) {
|
var evt = evt || window.event;
|
var e = evt.srcElement || evt.target;
|
this.en = evt.target
|
let result = e.value
|
this.tjSurveyRecordDetailList = [];
|
this.intList.forEach((item1) => {
|
item1.tjSurveyOptionsList.forEach((item2) => {
|
if (result === item2.oid) {
|
this.qid = item1.qid;
|
this.qname = item1.question;
|
if (item1.type === "3") {
|
this.tjSurveyRecordDetailList.push({
|
qid: this.qid,
|
qname: this.qname,
|
oid: result,
|
ooption: this.myscore,
|
// myscore:this.myscore,
|
});
|
} else {
|
this.ooption = item2.ooption;
|
this.tjSurveyRecordDetailList.push({
|
qid: this.qid,
|
qname: this.qname,
|
oid: result,
|
ooption: this.ooption,
|
// myscore:this.myscore,
|
});
|
}
|
|
let mid = "2";
|
let mname = "体检调查满意度模板2";
|
let fromBy = "pc端";
|
this.data.push({
|
tjnumber: this.gation.tjNumber,
|
phone: this.gation.tjCustomerPhone,
|
userName: this.gation.tjCustomerName,
|
mid: mid,
|
mname: mname,
|
qid: this.qid,
|
qname: this.qname,
|
fromBy: fromBy,
|
tjSurveyRecordDetailList: this.tjSurveyRecordDetailList,
|
});
|
}
|
});
|
});
|
|
// this.tjSurveyRecordDetailList.push({
|
// qid: this.qid,
|
// qname: this.qname,
|
// oid: result,
|
// ooption: this.ooption,
|
// });
|
|
// let mid = "1";
|
// let mname = "满意度回访模板";
|
// let data = {
|
// tjNumber: this.gation.tjNumber,
|
// phone: this.gation.tjCustomerPhone,
|
// userName: this.gation.tjCustomerName,
|
// mid: mid,
|
// mname: mname,
|
// qid: this.qid,
|
// qname: this.qname,
|
// tjSurveyRecordDetailList: this.tjSurveyRecordDetailList,
|
// };
|
},
|
tijiao() {
|
addSurveyRecord(this.data).then((res) => {
|
this.$modal.msgSuccess("问卷提交成功");
|
this.drawer = false
|
this.data = []
|
});
|
},
|
|
/** 导出按钮操作 */
|
handleExport() {
|
this.download(
|
"hosp/order/export",
|
{
|
...this.queryParams,
|
},
|
`order_${new Date().getTime()}.xlsx`
|
);
|
},
|
},
|
};
|
</script>
|
<style lang="scss">
|
.pag {
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
}
|
|
.pag1 {
|
width: 30%;
|
}
|
|
.main {
|
height: 700px;
|
overflow: hidden;
|
}
|
.mx {
|
color: #1890ff;
|
cursor: pointer;
|
}
|
|
#printIframe::-webkit-scrollbar {
|
width: 6px;
|
}
|
|
/* 修改 滚动条的 下面 的 样式 */
|
#printIframe::-webkit-scrollbar-track {
|
background-color: white;
|
-webkit-border-radius: 2em;
|
-moz-border-radius: 2em;
|
border-radius: 2em;
|
}
|
|
/* 修改 滑块 */
|
#printIframe::-webkit-scrollbar-thumb {
|
background-color: #dcdfe6;
|
-webkit-border-radius: 2em;
|
-moz-border-radius: 2em;
|
border-radius: 2em;
|
}
|
|
.tab1 {
|
width: 700px;
|
display: flex;
|
margin-top: 8px;
|
}
|
|
.drawer1 {
|
// display: flex;
|
// flex-direction: row;
|
// justify-content: space-evenly;
|
// align-items: flex-start;
|
// margin-top: 20px;
|
padding:10px 20px;
|
}
|
|
.drawer2 {
|
height: 100px;
|
display: flex;
|
justify-content: space-evenly;
|
align-items: flex-start;
|
flex-direction: column;
|
margin-top: 20px;
|
font-size: 16px;
|
margin-bottom: 20px;
|
}
|
|
.a {
|
font-size: 14px;
|
color: #409eff;
|
}
|
|
.drawer3 {
|
min-height: 400px;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-evenly;
|
align-items: flex-start;
|
font-size: 14px;
|
}
|
|
.drawer4 {
|
width: 100%;
|
height: 20px;
|
display: flex;
|
justify-content: center;
|
margin-top: 10px;
|
}
|
|
.drawer4 {
|
display: flex;
|
justify-content: center;
|
}
|
|
.ap {
|
font-size: 14px;
|
color: #606266;
|
font-weight: 600;
|
}
|
|
.inp {
|
font-weight: normal;
|
}
|
|
.select-radio {
|
width: 14px;
|
height: 14px;
|
position: relative;
|
left: 19px;
|
}
|
|
.select-radio1 {
|
width: 17px;
|
height: 17px;
|
position: relative;
|
left: 20px;
|
top: 2px;
|
}
|
</style>
|