miaofuhao 1 gadu atpakaļ
vecāks
revīzija
78d8166cc0

BIN
CallCenterWeb.UI/RMYY/0120-1dist.zip


+ 1 - 1
CallCenterWeb.UI/RMYY/config/dev.env.js

@@ -3,7 +3,7 @@
3 3
 module.exports = {
4 4
   NODE_ENV: '"development"',
5 5
   ENV_CONFIG: '"dev"',
6
-  BASE_API: '"http://192.168.8.20:1028/"', // 这里放测试API
6
+  BASE_API: '"https://zyfb.zzrmyy.com/"', // 这里放测试API http://192.168.8.20:1028/   https://zyfb.zzrmyy.com/
7 7
   SOCKET_IP: '"192.168.5.41"', // WebSocket通讯ip
8 8
   SOCKET_PORT: '"28822"', // WebSocket通讯端口
9 9
   PAGESIZES: '[10, 20, 50, 100]', // number[] 表格每页显示个数选择器的选项设置

+ 2 - 1
CallCenterWeb.UI/RMYY/src/api/commonAPI.js

@@ -11,7 +11,8 @@ export function getoldmsg(params) {
11 11
 // 获取来电人院区信息
12 12
 export function GetModelByTel(params) {
13 13
   return request({
14
-    url: 'Cooperate/GetModelByTel',
14
+    // url: 'Cooperate/GetModelByTel',
15
+    url: 'Cooperate/GetYqLinkmanByTel',
15 16
     method: 'get',
16 17
     params
17 18
   })

+ 4 - 4
CallCenterWeb.UI/RMYY/src/api/systemSetup/roleSetting/hospitalArea.js

@@ -48,18 +48,18 @@ export function getCooperateList(params) {
48 48
     params
49 49
   })
50 50
 }
51
-export function addCooperate(params) {
51
+export function addCooperate(data) {
52 52
   return request({
53 53
     url: 'Cooperate/Add',
54 54
     method: 'post',
55
-    params
55
+    data
56 56
   })
57 57
 }
58
-export function updateCooperate(params) {
58
+export function updateCooperate(data) {
59 59
   return request({
60 60
     url: 'Cooperate/Update',
61 61
     method: 'post',
62
-    params
62
+    data
63 63
   })
64 64
 }
65 65
 export function deleteCooperate(params) {

+ 26 - 24
CallCenterWeb.UI/RMYY/src/components/workOrder/information/addOrEditInfOrder.vue

@@ -469,6 +469,7 @@
469 469
               </el-form-item>
470 470
             </el-col>
471 471
           </el-row>
472
+
472 473
           <el-row :md="24">
473 474
             <el-form-item>
474 475
               <el-button type="primary" @click="submitForm">提交工单</el-button>
@@ -497,7 +498,7 @@
497 498
     getClassByDeptId,
498 499
     GetDicValue
499 500
   } from '@/api/commonAPI'
500
-  import { GetPatientModel } from '@/api/callScreen/callScreen'
501
+  import { GetPatientModel,GetModelList } from '@/api/callScreen/callScreen'
501 502
   import { GetCompleteCustomer, GetLsyyxxList } from '@/api/customerManagement/customerList'
502 503
   import { addCooperate } from '@/api/systemSetup/roleSetting/hospitalArea'
503 504
   import { encrypt, decrypt } from '@/utils/secretKey'
@@ -554,6 +555,7 @@
554 555
 
555 556
     data() {
556 557
       return {
558
+        modelListData:{},
557 559
         lasxTabs: [{
558 560
           title: '患者1',
559 561
           datas: {},
@@ -767,7 +769,6 @@
767 769
     },
768 770
     watch: {
769 771
       'patientDatas': function () {
770
-        console.log(this.patientDatas, 'patientDatapatientDatapatientDat888888888888')
771 772
         this.zsyh = this.patientDatas.zsyh
772 773
         this.ruleForm.F_Customer = this.patientDatas.hzxm
773 774
         this.ruleForm.F_FullName = this.patientDatas.hzxm
@@ -789,7 +790,6 @@
789 790
             this.$store.getters.workTypeMap[
790 791
               parseInt(this.orderTypeData.F_Type2)
791 792
             ].tag
792
-          console.log(this.worktypeInfo3, '标识标识标识')
793 793
           if (this.ruleForm.type2Arr.length > 1) {
794 794
             this.worktypeInfo2 =
795 795
               this.$store.getters.workTypeMap[
@@ -843,7 +843,7 @@
843 843
       ])
844 844
     },
845 845
     created() {
846
-      // this.callinNum = '666'
846
+      // this.callinNum = '15636363636'
847 847
       if (this.callinNum) {
848 848
         this.ruleForm.F_Phon = this.callinNum
849 849
         this.getOldMsg() // 老患者信息
@@ -890,15 +890,12 @@
890 890
         return age;
891 891
       },
892 892
       sfzhChange(val) {
893
-        console.log(val)
894 893
         // 获取年龄
895 894
         const age = this.getAgeFromIdCard(val);
896
-        console.log(age, 'age');
897 895
         if (isNaN(age)) return;
898 896
         if (!isNaN(age)) {
899 897
 
900 898
           const index = this.lasxTabs.findIndex((o) => { return o.title === this.lasxTabsValue });
901
-          console.log(index, this.lasxTabsValue, 'lasxTabsValue');
902 899
           if (index >= 0) this.lasxTabs[index].datas.yynl = age;
903 900
         }
904 901
 
@@ -931,7 +928,6 @@
931 928
           typeId: this.orderTypeData.F_Type2,
932 929
           cardID: val,
933 930
         }).then((res) => {
934
-          // console.log(res, 'res');
935 931
           if (!res.rows || res.rows.length <= 0) return;
936 932
           const h = this.$createElement;
937 933
           let msgContent = [];
@@ -1013,13 +1009,27 @@
1013 1009
           this.patientMsgAll[this.currentIndex].F_Sex = this.getIdCardSex(e)
1014 1010
           this.ruleForm.patientNl =  this.getIdCardAge(e)
1015 1011
           this.ruleForm.F_Sex =  this.getIdCardAge(e)
1012
+          this.getModelData(e)
1016 1013
         } else {
1017 1014
           this.$message.error('身份证号位数不正确')
1018 1015
         }
1019
-        
1016
+      },
1017
+      getModelData(sfzh){
1018
+        const params ={
1019
+          sfzh
1020
+        }
1021
+        GetModelList(params).then((response) => {
1022
+          // this.taskDataLists = response.rows
1023
+          if (response.rows.length>0) {
1024
+            this.modelListData = response.rows[0]
1025
+            if (this.modelListData.hzxm) {
1026
+              this.patientMsgAll[this.currentIndex].name = this.modelListData.hzxm
1027
+              this.patientMsgAll[this.currentIndex].tel = this.modelListData.lxdh
1028
+            }
1029
+          }
1030
+        })
1020 1031
       },
1021 1032
       getIdCardAge(val){
1022
-        console.log(val)
1023 1033
         let birthYear, birthMonth, birthDay;
1024 1034
         if (val.length === 18) {
1025 1035
           birthYear = parseInt(val.slice(6, 10));
@@ -1045,7 +1055,6 @@
1045 1055
       },
1046 1056
       getIdCardSex(val){
1047 1057
         let genderCode;
1048
-        console.log(val)
1049 1058
         if (val.length === 18) {
1050 1059
           genderCode = parseInt(val.slice(16, 17));
1051 1060
         } else if (val.length === 15) {
@@ -1084,11 +1093,9 @@
1084 1093
         }
1085 1094
       },
1086 1095
       jzksChange(e){
1087
-        console.log('jzksChange',e)
1088 1096
         this.ruleForm.jzks = e
1089 1097
       },
1090 1098
       patientNameChange(e){
1091
-        console.log(e)
1092 1099
         this.ruleForm.patientName = e
1093 1100
       },
1094 1101
       patientIdCardChange(e){
@@ -1147,7 +1154,9 @@
1147 1154
           this.ruleForm.F_CusAddress = decrypt(this.ruleForm.F_CusAddressShow)
1148 1155
           this.clickbefore = 1
1149 1156
         } else if (this.zsyh) {
1150
-          this.ruleForm.F_IDNumber = decrypt(window.localStorage.getItem('huancardShow'))
1157
+          if (window.localStorage.getItem('huancardShow')) {
1158
+            this.ruleForm.F_IDNumber = decrypt(window.localStorage.getItem('huancardShow'))
1159
+          }
1151 1160
           this.ruleForm.F_CusAddress = decrypt(window.localStorage.getItem('huanaddressShow'))
1152 1161
           this.clickbefore = 1
1153 1162
         }
@@ -1159,6 +1168,7 @@
1159 1168
         GetModelByTel(params).then(res => {
1160 1169
           if (res.state == 'success' && res.data) {
1161 1170
             this.ruleForm.F_Yqname = res.data.F_YqName
1171
+            // res.data.F_LinkMan && (this.ruleForm.F_Customer = res.data.F_LinkMan)
1162 1172
           } else {
1163 1173
             this.ruleForm.F_Yqname = ''
1164 1174
             this.isAddHos = 1 // 没有数据存标识,提交工单调添加合作院区接口
@@ -1173,7 +1183,6 @@
1173 1183
           telephone: this.callinNum
1174 1184
         }
1175 1185
         getoldmsg(params).then((res) => {
1176
-          console.log(res, 'res')
1177 1186
           if (res.rows.length > 0) {
1178 1187
             this.customerid = res.rows[0].F_CustomerId
1179 1188
             this.ruleForm.F_Customer = res.rows[0].F_CustomerName || ''
@@ -1194,7 +1203,6 @@
1194 1203
           if (!this.ruleForm.F_Customer) {
1195 1204
             setTimeout(() => {
1196 1205
               const this_ = this
1197
-              console.log(window.localStorage.getItem('zsyh'), 'zsyh')
1198 1206
               this_.zsyh = window.localStorage.getItem('zsyh') || ''
1199 1207
               this_.ruleForm.F_Customer = window.localStorage.getItem('huanxm') || ''
1200 1208
             }, 1000)
@@ -1249,7 +1257,6 @@
1249 1257
         //   this.ruleForm.clid = this.$store.getters.serverConfig.ZJYY_CODE;
1250 1258
         // }
1251 1259
         // if (this.includeType(type, "ywzx_ysfw")) {
1252
-        //   console.log("ysfw");
1253 1260
         //   this.ruleForm.clid = this.$store.getters.serverConfig.YSFW_CODE;
1254 1261
         // }
1255 1262
         // if (this.includeType(type, "ywzx_ts,ywzx_jy,ywzx_by")) {
@@ -1328,7 +1335,6 @@
1328 1335
                 this.firstOrderTypeParam.name = res.typename1
1329 1336
                 this.$emit('r2type', res.F_type2)
1330 1337
                 this.ruleForm.F_Type2 = res.F_type2 // 工单子类
1331
-                console.log(this.ruleForm.F_Type2, 'this.ruleForm.F_Type2')
1332 1338
                 this.F_Type2 = res.F_type2
1333 1339
                 if (res.F_type2) {
1334 1340
                   this.ruleForm.type2Arr =
@@ -1389,7 +1395,6 @@
1389 1395
                     yysj: res.F_AppointmentTime,
1390 1396
                   }
1391 1397
                 }];
1392
-                console.log(res)
1393 1398
                 this.ruleForm.jzks = res.F_Jzks
1394 1399
                 this.ruleForm.patientName = res.F_FullName
1395 1400
                 this.ruleForm.patientIdCard = decrypt(res.F_IDNumberShow)
@@ -1469,8 +1474,7 @@
1469 1474
           .catch(() => { })
1470 1475
       },
1471 1476
       async submitForm() {
1472
-        // console.log(this.patientMsgAll)
1473
-        // return
1477
+        
1474 1478
         if (this.telTopRightState == '通话中') {
1475 1479
           this.$message('请挂断后再提交工单')
1476 1480
           return
@@ -1500,7 +1504,6 @@
1500 1504
 
1501 1505
           for (let index = 0; index < this.lasxTabs.length; index++) {
1502 1506
             const o = this.lasxTabs[index];
1503
-            console.log(o, 'o');
1504 1507
             if (!o.datas.yyhzxm || !o.datas.yysfzh || !o.datas.yynl || !o.datas.yylxfs || !o.datas.yyhjxx || !o.datas.yyxm || !o.datas.yysj) {
1505 1508
               this.lasxTabsValue = o.title;
1506 1509
               return this.$message.error('请确认患者信息是否完整');
@@ -1512,7 +1515,6 @@
1512 1515
           }
1513 1516
 
1514 1517
         }
1515
-        console.log(lascParams, 'lascParams');
1516 1518
         
1517 1519
         if (this.orderTypeSzData.indexOf(this.worktypeInfo3) !== -1) {
1518 1520
           this.ruleForm.F_sfjhz = ''
@@ -1523,7 +1525,6 @@
1523 1525
           }
1524 1526
           var noindex = 1
1525 1527
           this.patientMsgAll.forEach((o) => {
1526
-            console.log(o)
1527 1528
             if (!o.name) {
1528 1529
               noindex = 0
1529 1530
               this.$message.error('请填入患者姓名')
@@ -1600,6 +1601,7 @@
1600 1601
           delete this.ruleForm.F_Sex
1601 1602
           delete this.ruleForm.F_nl
1602 1603
         }
1604
+        
1603 1605
         await this.clickEye()
1604 1606
         this.$refs.ruleForm.validate((valid) => {
1605 1607
           if (valid) {

+ 1 - 0
CallCenterWeb.UI/RMYY/src/views/orderManage/MydoubleList/index.vue

@@ -95,6 +95,7 @@
95 95
       <el-table-column prop="F_ssyy" label="医联体单位" align="center" min-width />
96 96
       <el-table-column prop="F_FullName" label="患者姓名" align="center" min-width />
97 97
       <el-table-column prop="F_hzdh" label="患者电话" align="center" min-width />
98
+      
98 99
       <el-table-column prop="F_nl" label="年龄" align="center" min-width />
99 100
       <el-table-column label="性别" align="center" min-width>
100 101
         <template slot-scope="scope">

+ 7 - 0
CallCenterWeb.UI/RMYY/src/views/orderManage/components/askdetail.vue

@@ -74,6 +74,13 @@
74 74
                 <th>接诊科室:</th>
75 75
                 <td>{{ orderDetailData.F_Jzks || '-' }}</td>
76 76
               </tr>
77
+              <tr v-show="isMen && orderDetailData.F_IDNumber">
78
+                <th>来电人身份证号:</th>
79
+                <td>
80
+                  {{ orderDetailData.F_IDNumber || "-" }}
81
+                  <i v-show="clickbefore==0" style="color: #55aaff;" class="el-icon-view" @click="clickEye"/>
82
+                </td>
83
+              </tr>
77 84
               <tr v-show="isMen">
78 85
                 <th>患者年龄:</th>
79 86
                 <td>{{ orderDetailData.F_nl || '-' }}</td>

+ 11 - 0
CallCenterWeb.UI/RMYY/src/views/orderManage/doubleList/index.vue

@@ -95,6 +95,11 @@
95 95
       <el-table-column prop="F_ssyy" label="医联体单位" align="center" min-width />
96 96
       <el-table-column prop="F_FullName" label="患者姓名" align="center" min-width />
97 97
       <el-table-column prop="F_hzdh" label="患者电话" align="center" min-width />
98
+      <el-table-column label="身份证号" align="center" min-width>
99
+        <template slot-scope="scope">
100
+          {{scope.row.F_IDNumberShow ?  decryptIDcard(scope.row.F_IDNumberShow) :''}}
101
+        </template>
102
+      </el-table-column>
98 103
       <el-table-column prop="F_nl" label="年龄" align="center" min-width />
99 104
       <el-table-column label="性别" align="center" min-width>
100 105
         <template slot-scope="scope">
@@ -195,10 +200,13 @@
195 200
 
196 201
 <script>
197 202
 import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
203
+import { decrypt } from '@/utils/secretKey'
198 204
 import { getCooperateList, getListyqRepairlist } from '@/api/systemSetup/roleSetting/hospitalArea'
199 205
 import askDetail from '../components/askdetail.vue'
200 206
 import addOrEditOrder from '../../callScreen/components/AddOrEditOrder.vue'
201 207
 import OrderButtonOperation from '@/components/button/orderList'
208
+
209
+
202 210
 import {
203 211
   getGongDanType,
204 212
   GetAllSZList,
@@ -266,6 +274,9 @@ export default {
266 274
         this.btn_edit(wocode, row.F_type1, row.F_type2)
267 275
       }
268 276
     },
277
+    decryptIDcard(IDNumber){
278
+      return decrypt(IDNumber)
279
+    },
269 280
     // 编辑
270 281
     btn_edit(rid, rtype, r2type) {
271 282
       this.$layer.iframe({

+ 63 - 8
CallCenterWeb.UI/RMYY/src/views/systemSetup/roleSetting/hospitalCooperate/component/addOrEditHospital.vue

@@ -7,12 +7,36 @@
7 7
       <el-form-item label="院区地址" prop="F_YqAddress">
8 8
         <el-input v-model="ruleForm.F_YqAddress" placeholder="请输入院区地址" />
9 9
       </el-form-item>
10
-      <el-form-item label="联系人" prop="F_LinkMan">
10
+
11
+      <el-form-item label="联系人信息">
12
+        <el-row v-for="(item, index) in autolist" :key="index" style="margin-bottom: 10px;">
13
+          <el-input v-model="item.linkman" placeholder="请输入联系人" style="width: 30%;" />
14
+          <el-input v-model="item.tel" placeholder="请输入联系人电话" style="width: 30%;"/>
15
+          <!-- <el-select v-model="item.autoyq" clearable placeholder="请选择院区" @change="(autoyq)=>changeyq(autoyq,index)"
16
+            @clear="clearyq(autoyq,index)">
17
+            <el-option label="全部" value="0" />
18
+            <el-option v-for="(itemval, index) in yqarr" :key="itemval.T_Woid" :label="itemval.T_Woname"
19
+              :value="itemval.T_Woid.toString()" />
20
+          </el-select>
21
+          <el-cascader ref="cascader" :span="24" v-model="item.autodept" :options="orderData" :props="defaultProps"
22
+            style="width: 30%;" placeholder="请选择科室" filterable clearable
23
+            @change="(autodept)=>handleChangeDept(autodept,index)" />
24
+          <el-select v-model="item.autousercode" filterable clearable placeholder="请选择人员" style="width: 30%">
25
+            <el-option v-for="itemper in autolist[index].personarr" :key="itemper.usercode" :label="itemper.username"
26
+              :value="itemper.usercode" />
27
+          </el-select> -->
28
+          <el-button v-if="index==0" type="primary" icon="el-icon-plus" circle @click="addItem()" />
29
+          <el-button v-if="index>0" type="primary" icon="el-icon-close" circle @click="removeItem(index)" />
30
+        </el-row>
31
+      </el-form-item>
32
+
33
+      <!-- <el-form-item label="联系人" prop="F_LinkMan">
11 34
         <el-input v-model="ruleForm.F_LinkMan" placeholder="请输入联系人" />
12 35
       </el-form-item>
13 36
       <el-form-item label="联系人电话" prop="F_Tel">
14 37
         <el-input v-model="ruleForm.F_Tel" placeholder="请输入联系人电话" />
15
-      </el-form-item>
38
+      </el-form-item> -->
39
+
16 40
       <!-- <el-form-item label="排序" prop="sore">
17 41
         <el-input-number v-model="ruleForm.T_Wosort"></el-input-number>
18 42
       </el-form-item> -->
@@ -54,6 +78,10 @@ export default {
54 78
     return {
55 79
       editId: '',
56 80
       loading: false,
81
+      autolist: [{
82
+        linkman: '',
83
+        tel: '',
84
+      }],
57 85
       ruleForm: {
58 86
         F_YqName: '',
59 87
         F_YqAddress: '',
@@ -82,6 +110,16 @@ export default {
82 110
     }
83 111
   },
84 112
   methods: {
113
+    addItem() {
114
+      const params = {
115
+        linkman: '',
116
+        tel: ''
117
+      }
118
+      this.autolist.push(params)
119
+    },
120
+    removeItem(index) {
121
+      this.autolist.splice(index, 1)
122
+    },
85 123
     // 获取菜单详情
86 124
     getTypeDetails(rid) {
87 125
       const params = {
@@ -90,8 +128,15 @@ export default {
90 128
       getCosModule(params).then((res) => {
91 129
         this.ruleForm.F_YqName = res.data.F_YqName
92 130
         this.ruleForm.F_YqAddress = res.data.F_YqAddress
93
-        this.ruleForm.F_LinkMan = res.data.F_LinkMan
94
-        this.ruleForm.F_Tel = res.data.F_Tel
131
+        console.log(res.data.F_Remark)
132
+        if (res.data.F_Remark && JSON.parse(res.data.F_Remark).length) {
133
+          this.autolist = []
134
+          JSON.parse(res.data.F_Remark).map((item)=>{
135
+            this.autolist.push(item)
136
+          })
137
+        }
138
+        // this.ruleForm.F_LinkMan = res.data.F_LinkMan
139
+        // this.ruleForm.F_Tel = res.data.F_Tel
95 140
         this.editId = res.data.F_YqId
96 141
       })
97 142
     },
@@ -100,12 +145,21 @@ export default {
100 145
         if (valid) {
101 146
           this.loading = true
102 147
           if (this.state === 0) {
148
+            // const params = {
149
+            //   F_YqName: this.ruleForm.F_YqName,
150
+            //   F_YqAddress: this.ruleForm.F_YqAddress,
151
+            //   F_LinkMan: this.ruleForm.F_LinkMan,
152
+            //   F_Tel: this.ruleForm.F_Tel
153
+            // }
103 154
             const params = {
104 155
               F_YqName: this.ruleForm.F_YqName,
105 156
               F_YqAddress: this.ruleForm.F_YqAddress,
106
-              F_LinkMan: this.ruleForm.F_LinkMan,
107
-              F_Tel: this.ruleForm.F_Tel
157
+              // F_LinkMan: this.ruleForm.F_LinkMan,
158
+              // F_Tel: this.ruleForm.F_Tel
108 159
             }
160
+            params.linkTels = this.autolist
161
+            console.log(params)
162
+            
109 163
             addCooperate(params)
110 164
               .then((res) => {
111 165
                 if (res.state.toLowerCase() === 'success') {
@@ -127,10 +181,11 @@ export default {
127 181
             const params = {
128 182
               F_YqName: this.ruleForm.F_YqName,
129 183
               F_YqAddress: this.ruleForm.F_YqAddress,
130
-              F_LinkMan: this.ruleForm.F_LinkMan,
131
-              F_Tel: this.ruleForm.F_Tel,
184
+              // F_LinkMan: this.ruleForm.F_LinkMan,
185
+              // F_Tel: this.ruleForm.F_Tel,
132 186
               F_YqId: this.editId
133 187
             }
188
+            params.linkTels = this.autolist
134 189
             updateCooperate(params)
135 190
               .then((response) => {
136 191
                 this.loading = false

+ 24 - 12
CallCenterWeb.UI/RMYY/src/views/systemSetup/roleSetting/hospitalCooperate/index.vue

@@ -58,18 +58,21 @@
58 58
             align="center"
59 59
             min-width
60 60
           />
61
-          <el-table-column
62
-            prop="F_LinkMan"
63
-            label="联系人"
64
-            align="center"
65
-            min-width
66
-          />
67
-          <el-table-column
68
-            prop="F_Tel"
69
-            label="联系人电话"
70
-            align="center"
71
-            min-width
72
-          />
61
+
62
+          <el-table-column label="联系人" align="center"  width="380" >
63
+            <template slot-scope="scope">
64
+              <div v-if="JSON.parse(scope.row.F_Remark).length" v-for="(item,index) in JSON.parse(scope.row.F_Remark)" :key="index">
65
+                
66
+                <span style="margin-right: 30px;">联系人:{{item.linkman}}</span>
67
+                <span>联系电话:{{item.tel}}</span>
68
+                
69
+              </div>
70
+            </template>
71
+          </el-table-column>
72
+
73
+          <!-- <el-table-column prop="F_LinkMan" label="联系人" align="center"  min-width />
74
+          <el-table-column prop="F_Tel" label="联系人电话" align="center" min-width /> -->
75
+
73 76
           <el-table-column
74 77
             prop="F_CreateTime"
75 78
             label="创建时间"
@@ -149,6 +152,15 @@ export default {
149 152
     }
150 153
   },
151 154
   methods: {
155
+    getRemarkData(data){
156
+      let resutlData = []
157
+      data.map((item)=>{
158
+        const obj = {}
159
+
160
+        resutlData.push(obj)
161
+      })
162
+      return resutlData
163
+    },
152 164
     // 院区分类
153 165
     getHosList() {
154 166
       return new Promise((resolve) => {

+ 258 - 265
CallCenterWeb.UI/RMYY/src/views/systemSetup/sysSetting/orderTypeManage/addOrEditOrderType.vue

@@ -26,38 +26,31 @@
26 26
       <el-form-item label="可催办次数">
27 27
         <el-input-number v-model="ruleForm.F_CanUrgeCount" :step="1" :min="-1" />
28 28
       </el-form-item>
29
-	  <el-form-item label="自动派单">
30
-		<el-switch v-model="ruleForm.F_AutoTransfer" active-color="#13ce66" active-value="1" inactive-value="0"  inactive-color="#ff4949"></el-switch>
29
+      <el-form-item label="自动派单">
30
+        <el-switch v-model="ruleForm.F_AutoTransfer" active-color="#13ce66" active-value="1" inactive-value="0"
31
+          inactive-color="#ff4949"></el-switch>
31 32
       </el-form-item>
32 33
       <el-form-item label="流转部门">
33 34
         <el-row v-for="(item, index) in autolist" :key="index" style="margin-bottom: 10px;">
34
-          <el-select v-model="item.autoyq" clearable placeholder="请选择院区" @change="(autoyq)=>changeyq(autoyq,index)" @clear="clearyq(autoyq,index)">
35
-            <el-option label="全部" value="0"/>
36
-            <el-option v-for="(itemval, index) in yqarr" :key="itemval.T_Woid" :label="itemval.T_Woname" :value="itemval.T_Woid.toString()"/>
35
+          <el-select v-model="item.autoyq" clearable placeholder="请选择院区" @change="(autoyq)=>changeyq(autoyq,index)"
36
+            @clear="clearyq(autoyq,index)">
37
+            <el-option label="全部" value="0" />
38
+            <el-option v-for="(itemval, index) in yqarr" :key="itemval.T_Woid" :label="itemval.T_Woname"
39
+              :value="itemval.T_Woid.toString()" />
37 40
           </el-select>
38
-          <el-cascader
39
-            ref="cascader"
40
-            :span="24"
41
-            v-model="item.autodept"
42
-            :options="orderData"
43
-            :props="defaultProps"
44
-            style="width: 30%;"
45
-            placeholder="请选择科室"
46
-            filterable
47
-            clearable
48
-            @change="(autodept)=>handleChangeDept(autodept,index)"/>
41
+          <el-cascader ref="cascader" :span="24" v-model="item.autodept" :options="orderData" :props="defaultProps"
42
+            style="width: 30%;" placeholder="请选择科室" filterable clearable
43
+            @change="(autodept)=>handleChangeDept(autodept,index)" />
49 44
           <el-select v-model="item.autousercode" filterable clearable placeholder="请选择人员" style="width: 30%">
50
-            <el-option v-for="itemper in autolist[index].personarr" :key="itemper.usercode" :label="itemper.username" :value="itemper.usercode" />
45
+            <el-option v-for="itemper in autolist[index].personarr" :key="itemper.usercode" :label="itemper.username"
46
+              :value="itemper.usercode" />
51 47
           </el-select>
52
-          <el-button v-if="index==0" type="primary" icon="el-icon-plus" circle @click="addItem()"/>
53
-          <el-button v-if="index>0" type="primary" icon="el-icon-close" circle @click="removeItem(index)"/>
48
+          <el-button v-if="index==0" type="primary" icon="el-icon-plus" circle @click="addItem()" />
49
+          <el-button v-if="index>0" type="primary" icon="el-icon-close" circle @click="removeItem(index)" />
54 50
         </el-row>
55 51
       </el-form-item>
56 52
       <el-form-item label="备注" prop="F_Remark">
57
-        <el-input
58
-          v-model="ruleForm.F_Remark"
59
-          :autosize="{ minRows: 4, maxRows: 8 }"
60
-          type="textarea"
53
+        <el-input v-model="ruleForm.F_Remark" :autosize="{ minRows: 4, maxRows: 8 }" type="textarea"
61 54
           placeholder="请输入备注" />
62 55
       </el-form-item>
63 56
       <el-form-item label="排序" prop="F_Sort">
@@ -71,205 +64,223 @@
71 64
   </div>
72 65
 </template>
73 66
 <script>
74
-import {
75
-  GetYuanqu
76
-} from '@/api/telCall/report'
77
-import {
78
-  GetUsersByDeptId
79
-} from '@/api/commonAPI'
80
-import {
81
-  getDeptTree
82
-} from '@/api/systemSetup/roleSetting/userManage'
83
-import {
84
-  getOrderType,
85
-  addOrderType,
86
-  editOrderType
87
-} from '@/api/systemSetup/roleSetting/orderTypeManage'
88
-import {
89
-  validateSort
90
-} from '@/utils/validate'
91
-import {
92
-  filterContent
93
-} from '@/utils'
94
-import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
95
-const validateSortRule = (rule, value, callback) => {
96
-  if (!validateSort(value)) {
97
-    callback(new Error('请输入有效的排序编号(正整数、负整数、0)'))
98
-  } else {
99
-    callback()
67
+  import {
68
+    GetYuanqu
69
+  } from '@/api/telCall/report'
70
+  import {
71
+    GetUsersByDeptId
72
+  } from '@/api/commonAPI'
73
+  import {
74
+    getDeptTree
75
+  } from '@/api/systemSetup/roleSetting/userManage'
76
+  import {
77
+    getOrderType,
78
+    addOrderType,
79
+    editOrderType
80
+  } from '@/api/systemSetup/roleSetting/orderTypeManage'
81
+  import {
82
+    validateSort
83
+  } from '@/utils/validate'
84
+  import {
85
+    filterContent
86
+  } from '@/utils'
87
+  import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
88
+  const validateSortRule = (rule, value, callback) => {
89
+    if (!validateSort(value)) {
90
+      callback(new Error('请输入有效的排序编号(正整数、负整数、0)'))
91
+    } else {
92
+      callback()
93
+    }
100 94
   }
101
-}
102 95
 
103
-export default {
104
-  name: 'AddOrEditOrderType',
105
-  components: {
106
-    selectDeptTree
107
-  },
108
-  props: {
109
-    rowid: {
110
-      type: String,
111
-      default: ''
112
-    },
113
-    parentId: {
114
-      type: String,
115
-      default: ''
116
-    },
117
-    parentText: {
118
-      type: String,
119
-      default: ''
120
-    },
121
-    orderGrade: {
122
-      type: Number,
123
-      default: 0
96
+  export default {
97
+    name: 'AddOrEditOrderType',
98
+    components: {
99
+      selectDeptTree
124 100
     },
125
-    layerid: {
126
-      type: String,
127
-      default: ''
128
-    }
129
-  },
130
-  data() {
131
-    return {
132
-      parentTexts: '',
133
-      ruleForm: {
134
-        F_ParentID: 0, // 父id
135
-        F_GDId: '', // 工单类型id
136
-        F_TypeId: 0, // 四大类id
137
-        F_Name: '', // 工单类型名称
138
-        F_TimeOut: 1,
139
-        F_RepairTimeLimit: 1,
140
-        F_Remark: '', // 工单类型备注
141
-        F_Sort: '', // 排序
142
-        F_Identification: '',
143
-        F_CanReplayCount: 0,
144
-        F_CanUrgeCount: -1,
145
-		F_AutoTransfer: 0,
146
-        autodept: []
147
-        // F_AutoDept: '' // 流转部门
101
+    props: {
102
+      rowid: {
103
+        type: String,
104
+        default: ''
148 105
       },
149
-      autolist: [{
150
-        autoyq: '',
151
-        autodept: '',
152
-        autousercode: '',
153
-        personarr: []
154
-      }],
155
-      rules: {
156
-        F_Name: [{
157
-          required: true,
158
-          message: '请选择工单类型',
159
-          trigger: 'blur'
160
-        }]
106
+      parentId: {
107
+        type: String,
108
+        default: ''
161 109
       },
162
-      defaultProps: {
163
-        checkStrictly: true,
164
-        children: 'children',
165
-        label: 'text',
166
-        value: 'id',
167
-        emitPath: false
110
+      parentText: {
111
+        type: String,
112
+        default: ''
168 113
       },
169
-      orderData: [],
170
-      deptidArr: [],
171
-      yqarr: [],
172
-      loading: false,
173
-      yqdata:[]
174
-    }
175
-  },
176
-  created() {
177
-    this.parentTexts = this.parentText
178
-    this.getHos()
179
-    this.getTreeList()
180
-    if (this.rowid) {
181
-      this.ruleForm.F_GDId = this.rowid
182
-      this.getDetail(this.rowid)
183
-    }
184
-    if (this.orderGrade) {
185
-      this.ruleForm.F_TypeId = this.orderGrade
186
-    }
187
-    if (this.parentId) {
188
-      this.ruleForm.F_ParentID = this.parentId
189
-    }
190
-  },
191
-  methods: {
192
-    addItem() {
193
-      const params = {
194
-        autoyq: '',
195
-        autodept: '',
196
-        autousercode: '',
197
-        personarr: []
114
+      orderGrade: {
115
+        type: Number,
116
+        default: 0
117
+      },
118
+      layerid: {
119
+        type: String,
120
+        default: ''
198 121
       }
199
-      this.autolist.push(params)
200
-    },
201
-    removeItem(index) {
202
-      this.autolist.splice(index, 1)
203
-    },
204
-    getHos() {
205
-      const params = {}
206
-      GetYuanqu(params).then((res) => {
207
-        this.yqarr = res.data
208
-      })
209 122
     },
210
-    getTreeList() {
211
-      return new Promise((resolve) => {
212
-        const params = {}
213
-        getDeptTree(params).then((response) => {
214
-          if (response.state.toLowerCase() === 'success') {
215
-            this.orderData = response.data
216
-          }
217
-        })
218
-        resolve()
219
-      })
123
+    data() {
124
+      return {
125
+        parentTexts: '',
126
+        ruleForm: {
127
+          F_ParentID: 0, // 父id
128
+          F_GDId: '', // 工单类型id
129
+          F_TypeId: 0, // 四大类id
130
+          F_Name: '', // 工单类型名称
131
+          F_TimeOut: 1,
132
+          F_RepairTimeLimit: 1,
133
+          F_Remark: '', // 工单类型备注
134
+          F_Sort: '', // 排序
135
+          F_Identification: '',
136
+          F_CanReplayCount: 0,
137
+          F_CanUrgeCount: -1,
138
+          F_AutoTransfer: 0,
139
+          autodept: []
140
+          // F_AutoDept: '' // 流转部门
141
+        },
142
+        autolist: [{
143
+          autoyq: '',
144
+          autodept: '',
145
+          autousercode: '',
146
+          personarr: []
147
+        }],
148
+        rules: {
149
+          F_Name: [{
150
+            required: true,
151
+            message: '请选择工单类型',
152
+            trigger: 'blur'
153
+          }]
154
+        },
155
+        defaultProps: {
156
+          checkStrictly: true,
157
+          children: 'children',
158
+          label: 'text',
159
+          value: 'id',
160
+          emitPath: false
161
+        },
162
+        orderData: [],
163
+        deptidArr: [],
164
+        yqarr: [],
165
+        loading: false,
166
+        yqdata: []
167
+      }
220 168
     },
221
-    changeyq(data, index) {
222
-      console.log('changeyq',data, index)
223
-      this.yqdata = []
224
-      for (var i = 0; i < this.autolist.length - 1; i++) {
225
-        this.yqdata.push(this.autolist[i].autoyq)
169
+    created() {
170
+      this.parentTexts = this.parentText
171
+      this.getHos()
172
+      this.getTreeList()
173
+      if (this.rowid) {
174
+        this.ruleForm.F_GDId = this.rowid
175
+        this.getDetail(this.rowid)
226 176
       }
227
-      if (this.yqdata.indexOf(data) >= 0) {
228
-        this.$message.warning('该院区已存在,请重新选择院区')
229
-        this.autolist[index].autoyq = ''
177
+      if (this.orderGrade) {
178
+        this.ruleForm.F_TypeId = this.orderGrade
230 179
       }
231
-    },
232
-    clearyq(data, index){
233
-        console.log('clearyq',data, index)
234
-        this.yqdata[index].autoyq = ''
235
-    },
236
-    handleChangeDept(data, index) {
237
-      this.autolist[index].personarr = []
238
-      this.autolist[index].autousercode = ''
239
-      this.getRepairman(data, index)
240
-      this.$forceUpdate()
241
-    },
242
-    getRepairman(id, index) {
243
-      const params = {
244
-        deptid: id
180
+      if (this.parentId) {
181
+        this.ruleForm.F_ParentID = this.parentId
245 182
       }
246
-      GetUsersByDeptId(params).then((res) => {
247
-        // this.autolist[index].personarr = res.rows
248
-        this.$set(this.autolist[index], 'personarr', res.rows)
249
-      })
250 183
     },
251
-    submitForm() {
252
-      var autoarr = []
253
-      if (this.autolist && this.autolist[0].autoyq && this.autolist[0].autodept) {
254
-        this.autolist.find(item => {
255
-          autoarr.push({
256
-            autoyq: item.autoyq,
257
-            autodept: item.autodept,
258
-            autousercode: item.autousercode
184
+    methods: {
185
+      addItem() {
186
+        const params = {
187
+          autoyq: '',
188
+          autodept: '',
189
+          autousercode: '',
190
+          personarr: []
191
+        }
192
+        this.autolist.push(params)
193
+      },
194
+      removeItem(index) {
195
+        this.autolist.splice(index, 1)
196
+      },
197
+      getHos() {
198
+        const params = {}
199
+        GetYuanqu(params).then((res) => {
200
+          this.yqarr = res.data
201
+        })
202
+      },
203
+      getTreeList() {
204
+        return new Promise((resolve) => {
205
+          const params = {}
206
+          getDeptTree(params).then((response) => {
207
+            if (response.state.toLowerCase() === 'success') {
208
+              this.orderData = response.data
209
+            }
259 210
           })
211
+          resolve()
260 212
         })
261
-      } else {
262
-        autoarr = ''
263
-      }
264
-      console.log(autoarr)
265
-      // return;
266
-      this.$refs.ruleForm.validate((valid) => {
267
-        if (valid) {
268
-          this.loading = true
269
-          this.ruleForm.autodept = autoarr
270
-          // 添加
271
-          if (!this.rowid) {
272
-            addOrderType(this.ruleForm).then(response => {
213
+      },
214
+      changeyq(data, index) {
215
+        console.log('changeyq', data, index)
216
+        this.yqdata = []
217
+        for (var i = 0; i < this.autolist.length - 1; i++) {
218
+          this.yqdata.push(this.autolist[i].autoyq)
219
+        }
220
+        if (this.yqdata.indexOf(data) >= 0) {
221
+          this.$message.warning('该院区已存在,请重新选择院区')
222
+          this.autolist[index].autoyq = ''
223
+        }
224
+      },
225
+      clearyq(data, index) {
226
+        console.log('clearyq', data, index)
227
+        this.yqdata[index].autoyq = ''
228
+      },
229
+      handleChangeDept(data, index) {
230
+        this.autolist[index].personarr = []
231
+        this.autolist[index].autousercode = ''
232
+        this.getRepairman(data, index)
233
+        this.$forceUpdate()
234
+      },
235
+      getRepairman(id, index) {
236
+        const params = {
237
+          deptid: id
238
+        }
239
+        GetUsersByDeptId(params).then((res) => {
240
+          // this.autolist[index].personarr = res.rows
241
+          this.$set(this.autolist[index], 'personarr', res.rows)
242
+        })
243
+      },
244
+      submitForm() {
245
+        var autoarr = []
246
+        if (this.autolist && this.autolist[0].autoyq && this.autolist[0].autodept) {
247
+          this.autolist.find(item => {
248
+            autoarr.push({
249
+              autoyq: item.autoyq,
250
+              autodept: item.autodept,
251
+              autousercode: item.autousercode
252
+            })
253
+          })
254
+        } else {
255
+          autoarr = ''
256
+        }
257
+        console.log(autoarr)
258
+        // return;
259
+        this.$refs.ruleForm.validate((valid) => {
260
+          if (valid) {
261
+            this.loading = true
262
+            this.ruleForm.autodept = autoarr
263
+            // 添加
264
+            if (!this.rowid) {
265
+              addOrderType(this.ruleForm).then(response => {
266
+                this.loading = false
267
+                if (response.state.toLowerCase() === 'success') {
268
+                  this.$parent.$layer.close(this.layerid)
269
+                  if (this.orderGrade === 1) {
270
+                    this.$parent.getList() // 重新加载父级数据
271
+                  } else if (this.orderGrade >= 2) {
272
+                    this.$parent.getTreeList()
273
+                  }
274
+
275
+                  this.$message.success('恭喜你,添加成功!')
276
+                }
277
+              }).catch(() => {
278
+                this.loading = false
279
+              })
280
+              return
281
+            }
282
+            // 编辑
283
+            editOrderType(this.ruleForm).then(response => {
273 284
               this.loading = false
274 285
               if (response.state.toLowerCase() === 'success') {
275 286
                 this.$parent.$layer.close(this.layerid)
@@ -278,75 +289,57 @@ export default {
278 289
                 } else if (this.orderGrade >= 2) {
279 290
                   this.$parent.getTreeList()
280 291
                 }
281
-
282
-                this.$message.success('恭喜你,添加成功!')
292
+                this.$message.success('恭喜你,编辑成功!')
293
+                this.$parent.getList()
283 294
               }
284 295
             }).catch(() => {
285 296
               this.loading = false
286 297
             })
287
-            return
298
+          } else {
299
+            this.$message.error('请输入有效的必填项信息!')
300
+            return false
288 301
           }
289
-          // 编辑
290
-          editOrderType(this.ruleForm).then(response => {
291
-            this.loading = false
292
-            if (response.state.toLowerCase() === 'success') {
293
-              this.$parent.$layer.close(this.layerid)
294
-              if (this.orderGrade === 1) {
295
-                this.$parent.getList() // 重新加载父级数据
296
-              } else if (this.orderGrade >= 2) {
297
-                this.$parent.getTreeList()
302
+        })
303
+      },
304
+      resetForm() {
305
+        this.$refs.ruleForm.resetFields()
306
+      },
307
+      // 获取角色详情
308
+      getDetail(rid) {
309
+        getOrderType(rid).then(response => {
310
+          if (response.state.toLowerCase() === 'success') {
311
+            const res = response.data
312
+            const parTypeText = this.$store.getters.workTypeMap[parseInt(res.fid)].text
313
+            this.ruleForm.F_ParentID = res.fid // 父id
314
+            this.parentTexts = parTypeText || '暂无'
315
+            this.ruleForm.F_Name = res.name // 角色名称
316
+            this.ruleForm.F_Remark = res.remark // 角色编号
317
+            this.ruleForm.F_Sort = res.sort // 备注
318
+            this.ruleForm.F_TypeId = res.tid
319
+            this.ruleForm.F_TimeOut = res.cstime
320
+            this.ruleForm.F_RepairTimeLimit = res.fxtime
321
+            this.ruleForm.F_Identification = res.identification
322
+            this.ruleForm.F_CanReplayCount = res.canreplaycount
323
+            this.ruleForm.F_CanUrgeCount = res.canurgecount
324
+            this.ruleForm.F_AutoTransfer = !res.autotransfer ? '0' : '1';
325
+            if (res.autodept && JSON.parse(res.autodept)[0].autoyq) {
326
+              this.autolist = JSON.parse(res.autodept)
327
+              console.log(JSON.parse(res.autodept))
328
+              for (var i = 0; i < this.autolist.length; i++) {
329
+                this.getRepairman(this.autolist[i].autodept, i)
330
+                this.autolist[i].autousercode = this.autolist[i].autousercode
298 331
               }
299
-              this.$message.success('恭喜你,编辑成功!')
300
-              this.$parent.getList()
301
-            }
302
-          }).catch(() => {
303
-            this.loading = false
304
-          })
305
-        } else {
306
-          this.$message.error('请输入有效的必填项信息!')
307
-          return false
308
-        }
309
-      })
310
-    },
311
-    resetForm() {
312
-      this.$refs.ruleForm.resetFields()
313
-    },
314
-    // 获取角色详情
315
-    getDetail(rid) {
316
-      getOrderType(rid).then(response => {
317
-        if (response.state.toLowerCase() === 'success') {
318
-          const res = response.data
319
-          const parTypeText = this.$store.getters.workTypeMap[parseInt(res.fid)].text
320
-          this.ruleForm.F_ParentID = res.fid // 父id
321
-          this.parentTexts = parTypeText || '暂无'
322
-          this.ruleForm.F_Name = res.name // 角色名称
323
-          this.ruleForm.F_Remark = res.remark // 角色编号
324
-          this.ruleForm.F_Sort = res.sort // 备注
325
-          this.ruleForm.F_TypeId = res.tid
326
-          this.ruleForm.F_TimeOut = res.cstime
327
-          this.ruleForm.F_RepairTimeLimit = res.fxtime
328
-          this.ruleForm.F_Identification = res.identification
329
-          this.ruleForm.F_CanReplayCount = res.canreplaycount
330
-          this.ruleForm.F_CanUrgeCount = res.canurgecount
331
-		  this.ruleForm.F_AutoTransfer = !res.autotransfer ? '0' : '1';
332
-          if (res.autodept && JSON.parse(res.autodept)[0].autoyq) {
333
-            this.autolist = JSON.parse(res.autodept)
334
-            console.log(JSON.parse(res.autodept))
335
-            for (var i = 0; i < this.autolist.length; i++) {
336
-              this.getRepairman(this.autolist[i].autodept, i)
337
-              this.autolist[i].autousercode = this.autolist[i].autousercode
338 332
             }
339 333
           }
340
-        }
341
-      })
342
-    },
343
-    getDeptid(data) {
344
-      // this.ruleForm.F_AutoDept = data[data.length - 1]
334
+        })
335
+      },
336
+      getDeptid(data) {
337
+        // this.ruleForm.F_AutoDept = data[data.length - 1]
338
+      }
345 339
     }
346 340
   }
347
-}
348 341
 </script>
349 342
 
350 343
 <style rel="stylesheet/scss" lang="scss" scoped>
351 344
 
352
-</style>
345
+</style>