liuzhihui лет назад: 2
Родитель
Сommit
ea179a93aa

+ 51 - 6
CallCenterWeb.UI/RMYY/src/views/faultRepairManagement/repairList/index.vue

@@ -163,10 +163,14 @@
163 163
             @click="redeployZuzhang(scope.row.F_WorkOrderCode)">
164 164
             转组长
165 165
           </el-button>
166
-          <el-button v-if="isShowButton(scope.row, 'zhuanbumen')" type="text"
167
-            @click="redeployDept(scope.row.F_WorkOrderCode)">
168
-            转部门
169
-          </el-button>
166
+          <el-button type="text"
167
+            @click="redeployDept(scope.row.F_WorkOrderCode,scope.row.F_WorkOrderCategory,scope.row.F_ApplicationDept)">
168
+            转基建
169
+          </el-button>
170
+          <!-- <el-button v-if="isShowButton(scope.row, 'zhuanbumen')" type="text"
171
+            @click="redeployDept(scope.row.F_WorkOrderCode)">
172
+            转部门
173
+          </el-button> -->
170 174
           <el-button type="text" v-if="isShowButton(scope.row, 'wancheng')" @click="
171 175
               doneWorkOrder(
172 176
                 scope.row.F_WorkOrderCode,
@@ -1200,9 +1204,50 @@
1200 1204
         this.dialogtongshi = true;
1201 1205
         this.redeploytongshiForm.workordercode = code;
1202 1206
       },
1203
-      redeployDept(code) {
1207
+      redeployDept(code,type,applyid) {
1204 1208
         this.dialogdept = true;
1205
-        this.redeploydeptForm.WorkOrderCode = code;
1209
+        this.redeploydeptForm.WorkOrderCode = code;
1210
+        //清空
1211
+        this.deptidArr1 = []
1212
+        this.redeploydeptForm.ToDept = ""
1213
+        this.redeploydeptForm.ToUserCode = ""
1214
+        //获取配置信息
1215
+        if (this.$store.getters.workTypeMap[parseInt(type)]) {
1216
+          const autoData = JSON.parse(
1217
+            this.$store.getters.workTypeMap[parseInt(type)].autoDept || "[]"
1218
+          );
1219
+          const applyHos = this.$store.getters.deptmap[parseInt(applyid)].ids[0];
1220
+          this.applyHos = applyHos
1221
+          console.log(autoData,applyHos,'autoDataapplyHos')
1222
+          if (!autoData || autoData[0] == null) {
1223
+            // 没有配置信息['4005','89']['1','6']
1224
+            this.deptidArr1 = ['1','6']
1225
+            this.redeploydeptForm.ToDept = this.deptidArr1[this.deptidArr1.length-1]
1226
+            this.getDeptman(this.deptidArr1[this.deptidArr1.length-1]);
1227
+            return;
1228
+          }
1229
+          var hosall = [];
1230
+          for (var i = 0; i < autoData.length; i++) {
1231
+            hosall.push(autoData[i].autoyq);
1232
+          }
1233
+          for (var i = 0; i < autoData.length; i++) {
1234
+            if (autoData[i].autoyq == applyHos) {
1235
+              //有院区
1236
+              this.deptidArr1 =
1237
+                this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids;
1238
+              this.redeploydeptForm.ToDept = autoData[i].autodept;
1239
+              this.getDeptman(autoData[i].autodept);
1240
+              this.redeploydeptForm.ToUserCode = autoData[i].autousercode;
1241
+            } else if (autoData[i].autoyq == "0" && hosall.indexOf(applyHos) < 0) {
1242
+              //全部
1243
+              this.deptidArr1 =
1244
+                this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids;
1245
+              this.redeploydeptForm.ToDept = autoData[i].autodept;
1246
+              this.getDeptman(autoData[i].autodept);
1247
+              this.redeploydeptForm.ToUserCode = autoData[i].autousercode;
1248
+            }
1249
+          }
1250
+        }
1206 1251
       },
1207 1252
       redeployZuzhang(code) {
1208 1253
         this.getReason("ZUZHANG");