|
|
@@ -0,0 +1,405 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
|
|
|
+ <el-form-item label="订单号 患者姓名" prop="orderSn">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.keyword"
|
|
|
+ placeholder="请输入订单号 患者姓名"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+<!-- <el-form-item label="公司名称" prop="companyId" >-->
|
|
|
+<!-- <el-select v-model="queryParams.companyId" placeholder="请选择所属公司" clearable filterable size="small">-->
|
|
|
+<!-- <el-option v-for="(option, index) in companyList" :key="index" :value="option.dictValue" :label="option.dictLabel"></el-option>-->
|
|
|
+<!-- </el-select>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item label="员工" prop="companyUserNickName">-->
|
|
|
+<!-- <el-input v-model="queryParams.companyUserNickName" placeholder="请输入员工名称" clearable size="small" @keyup.enter.native="handleQuery"/>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item label="病人电话" prop="phone">-->
|
|
|
+<!-- <el-input v-model="queryParams.phone" placeholder="请输入病人电话" clearable size="small" @keyup.enter.native="handleQuery"/>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item label="问诊开始时间" prop="startTime">-->
|
|
|
+<!-- <el-date-picker v-model="startTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>-->
|
|
|
+<!-- </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>
|
|
|
+ <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
|
|
|
+ <el-tab-pane label="全部订单" name="10"></el-tab-pane>
|
|
|
+ <el-tab-pane v-for="(item,index) in inquiryStatusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-table v-loading="loading" border :data="inquiryOrderList" @selection-change="handleSelectionChange" >
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="信息id" align="center" prop="id" />
|
|
|
+ <el-table-column label="套餐包订单号" align="center" prop="packageOrderCode" />
|
|
|
+ <el-table-column label="患者姓名" align="center" prop="patientName" />
|
|
|
+ <el-table-column v-if="doctorType===1" label="医生是否审核" align="center" prop="doctorConfirm" width="80" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="inquiryStatusOptions" :value="scope.row.doctorConfirm" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="doctorType===2" label="药师是否审核" align="center" prop="doctorType2Confirm" width="80" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="inquiryStatusOptions" :value="scope.row.doctorType2Confirm" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" />
|
|
|
+
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ round
|
|
|
+ size="medium"
|
|
|
+ @click="openInformation(scope.row)"
|
|
|
+ >详情</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-drawer :with-header="false" size="75%" :title="show.title" :visible.sync="show.open">
|
|
|
+ <userInfoDetail ref="userInfoDetail" />
|
|
|
+ </el-drawer>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getOrderUserPhone,getCompanyList,getInquiryOrderList,receiveOrder,refuseOrder,closeOrder } from "@/api/inquiryOrder";
|
|
|
+import inquiryOrderDetails from '../../components/order/inquiryOrderDetails.vue';
|
|
|
+import msgDetails from '@/views/components/msg/followMsgDetails.vue';
|
|
|
+import way from '@/utils/way.js';
|
|
|
+import {getCollectionList} from "@/api/userInformation";
|
|
|
+import userInfoDetail from '@/views/order/userInformationOrder/userInfoDetail.vue';
|
|
|
+import {mapState} from "vuex";
|
|
|
+export default {
|
|
|
+ name: "inquiryOrder",
|
|
|
+ components: { inquiryOrderDetails ,msgDetails,userInfoDetail},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+
|
|
|
+ show:{
|
|
|
+ title:"问诊详情",
|
|
|
+ open:false,
|
|
|
+ },
|
|
|
+ companyList:[],
|
|
|
+ startTime:null,
|
|
|
+ msgDialog:{
|
|
|
+ open:false,
|
|
|
+ title:"聊天记录"
|
|
|
+ },
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ actName:"10",
|
|
|
+ // 导出遮罩层
|
|
|
+ exportLoading: false,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ inquirySubTypeOptions:[],
|
|
|
+ createTimeRange:[],
|
|
|
+ payTimeRange:[],
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 问诊订单表格数据
|
|
|
+ inquiryOrderList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ doctorType2Confirm:"",
|
|
|
+ patientName:"",
|
|
|
+ packageOrderCode:"",
|
|
|
+ doctorType2Id:"",
|
|
|
+ doctorType:"",
|
|
|
+ doctorConfirm:"",
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ receiveOrderForm:{},
|
|
|
+ refuseOrderForm:{},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ },
|
|
|
+ inquiryStatusOptions:[
|
|
|
+ { dictValue: "0", dictLabel: '未审核' },
|
|
|
+ { dictValue: "1", dictLabel: '已审核' },
|
|
|
+ ],
|
|
|
+ inquiryTypeOptions:[],
|
|
|
+ inquiryPayOptions:[],
|
|
|
+ inquiryOrderOptions:[],
|
|
|
+ orOptions:[],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ userID: state => state.imuser.userID,
|
|
|
+ doctorType: state => state.user.doctor.doctorType,
|
|
|
+ }),
|
|
|
+ },
|
|
|
+
|
|
|
+ created() {
|
|
|
+ this.getDicts("sys_inquiry_type").then(response => {
|
|
|
+ this.inquiryTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_inquiry_pay").then(response => {
|
|
|
+ this.inquiryPayOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_inquiry_order_type").then(response => {
|
|
|
+ this.inquiryOrderOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_company_or").then(response => {
|
|
|
+ this.orOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_inquiry_sub_type").then(response => {
|
|
|
+ this.inquirySubTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ getCompanyList().then(response => {
|
|
|
+ this.companyList = response.list;
|
|
|
+
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ openInformation(row){
|
|
|
+ console.log("qwertttttttt",row)
|
|
|
+ var that=this;
|
|
|
+ var userInformationId=row.id;
|
|
|
+ this.show.open=true;
|
|
|
+ this.show.type=3;
|
|
|
+ this.show.title="用户信息采集表"
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.userInfoDetail.getDetails(userInformationId,this.doctorType);
|
|
|
+ }, 500);
|
|
|
+ },
|
|
|
+ closeDetails(){
|
|
|
+ this.show.open=false;
|
|
|
+ },
|
|
|
+ handleContinue(){
|
|
|
+ way.$emit('open',1);
|
|
|
+ },
|
|
|
+ handleCloseOrder(row){
|
|
|
+ console.log(row)
|
|
|
+ closeOrder(row.orderId).then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: "关闭成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ followMsg(row){
|
|
|
+ const userId = row.userId;
|
|
|
+ const followDoctorId =row.doctorId;
|
|
|
+ const doctorName = row.doctorName;
|
|
|
+ const patientName = row.patientName;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.msgDetails.getDetails(userId,followDoctorId,doctorName,patientName);
|
|
|
+ }, 500);
|
|
|
+ this.msgDialog.open = true;
|
|
|
+ },
|
|
|
+ msgDialogClose(){
|
|
|
+ this.dialogVisible = false;
|
|
|
+ },
|
|
|
+ getMappedValue(key, options) {
|
|
|
+ return options[key];
|
|
|
+ },
|
|
|
+ change(){
|
|
|
+ if(this.startTime!=null){
|
|
|
+ this.queryParams.sTime=this.startTime[0];
|
|
|
+ this.queryParams.eTime=this.startTime[1];
|
|
|
+ }else{
|
|
|
+ this.queryParams.sTime=null;
|
|
|
+ this.queryParams.eTime=null;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ handleReceiveOrder(row){
|
|
|
+ const orderId = row.orderId
|
|
|
+ this.receiveOrderForm.orderId = orderId;
|
|
|
+ console.log(this.receiveOrderForm)
|
|
|
+ this.$confirm('确认接单吗?', "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ return receiveOrder(this.receiveOrderForm);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("接单成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+
|
|
|
+ handleRefuseOrder(row){
|
|
|
+ const orderId = row.orderId
|
|
|
+ this.refuseOrderForm.orderId = orderId;
|
|
|
+ this.$confirm('确认拒单吗?', "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ return refuseOrder(this.refuseOrderForm);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("拒单成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+
|
|
|
+ handledetails(row){
|
|
|
+
|
|
|
+ this.show.open=true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.Details.getDetails(row.orderId);
|
|
|
+ }, 1);
|
|
|
+ },
|
|
|
+ /** 查询问诊订单列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+
|
|
|
+ this.queryParams.doctorType = this.doctorType
|
|
|
+ console.log(this.queryParams)
|
|
|
+ getCollectionList(this.queryParams).then(response => {
|
|
|
+ console.log( response)
|
|
|
+ this.inquiryOrderList = response.data.list;
|
|
|
+ console.log(this.inquiryOrderList)
|
|
|
+ this.total = response.data.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ doctorType2Confirm:null,
|
|
|
+ patientName:null,
|
|
|
+ packageOrderCode:null,
|
|
|
+ doctorType2Id:null,
|
|
|
+ };
|
|
|
+
|
|
|
+ this.resetForm("form");
|
|
|
+
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.createTimeRange=null;
|
|
|
+ this.payTimeRange=null;
|
|
|
+ this.startTime=null;
|
|
|
+ this.queryParams.keyword=null;
|
|
|
+ this.queryParams.sTime=null;
|
|
|
+ this.queryParams.eTime=null;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.orderId)
|
|
|
+ this.single = selection.length!==1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加问诊订单";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const orderId = row.orderId || this.ids
|
|
|
+ getinquiryOrder(orderId).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改问诊订单";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleClickX(tab, event) {
|
|
|
+ console.log( tab.name)
|
|
|
+ if (this.doctorType==2){
|
|
|
+ if(tab.name=="0"){
|
|
|
+ this.queryParams.doctorType2Confirm=0;
|
|
|
+ }else if(tab.name=="1"){
|
|
|
+ this.queryParams.doctorType2Confirm=1;
|
|
|
+ }else if (tab.name=="10"){
|
|
|
+ this.queryParams.doctorType2Confirm="";
|
|
|
+ }
|
|
|
+ }else if(this.doctorType==1){
|
|
|
+ if(tab.name=="0"){
|
|
|
+ this.queryParams.doctorConfirm=0;
|
|
|
+ }else if(tab.name=="1"){
|
|
|
+ this.queryParams.doctorConfirm=1;
|
|
|
+ }else if (tab.name=="10"){
|
|
|
+ this.queryParams.doctorConfirm="";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.orderId != null) {
|
|
|
+ updateinquiryOrder(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addinquiryOrder(this.form).then(response => {
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const orderIds = row.orderId || this.ids;
|
|
|
+ this.$confirm('是否确认删除问诊订单编号为"' + orderIds + '"的数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return delinquiryOrder(orderIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|