liuzhihui il y a 2 ans
Parent
commit
4e3fc3950f

+ 42 - 11
CallCenterWeb.UI/RMYY/src/components/button/orderList.vue

@@ -1270,14 +1270,14 @@ export default {
1270 1270
       dispatchhaocaiarrError: [
1271 1271
         {
1272 1272
           F_DicId: "",
1273
-          F_Number: 1,
1273
+          F_Number: 0,
1274 1274
           F_ReceiveUser: "",
1275 1275
         },
1276 1276
       ],
1277 1277
       dispatchhaocaiarrEdit:[
1278 1278
         {
1279 1279
           F_DicId: '',
1280
-          F_Number: 1,
1280
+          F_Number: 0,
1281 1281
           F_ReceiveUser: "",
1282 1282
         },
1283 1283
       ],
@@ -1642,26 +1642,33 @@ export default {
1642 1642
       });
1643 1643
     },
1644 1644
     zhddToColleagueFormChange(data) {
1645
-      console.log(data, "zhddToColleagueFormChange");
1646 1645
       this.zhddToColleagueForm.ToUserCode = data;
1647 1646
     },
1648 1647
     removeItem(index) {
1649
-      console.log(index);
1650 1648
       this.dispatchhaocaiarrError.splice(index, 1);
1651 1649
     },
1652 1650
     removeItemEdit(index) {
1653
-      console.log(index);
1654 1651
       this.dispatchhaocaiarrEdit.splice(index, 1);
1655 1652
     },
1656 1653
     handleChange(data, index) {
1657
-      const obj = this.$refs["cascaderbb"][index].getCheckedNodes();
1658
-      this.dispatchhaocaiarrError[index].F_DicId = data;
1659
-      this.dispatchhaocaiarrError[index].F_DicName = obj[0].data.text;
1654
+      if(data){
1655
+        const obj = this.$refs["cascaderbb"][index].getCheckedNodes();
1656
+        this.dispatchhaocaiarrError[index].F_DicId = data;
1657
+        this.dispatchhaocaiarrError[index].F_DicName = obj[0].data.text;
1658
+      }else{
1659
+        this.dispatchhaocaiarrError[index].F_DicId = ""
1660
+        this.dispatchhaocaiarrError[index].F_DicName = ""
1661
+      }
1660 1662
     },
1661 1663
     handleChangeEdit(data, index) {
1662
-      const obj = this.$refs["cascaderbbedit"][index].getCheckedNodes();
1663
-      this.dispatchhaocaiarrEdit[index].F_DicId = data;
1664
-      this.dispatchhaocaiarrEdit[index].F_DicName = obj[0].data.text;
1664
+      if(data){
1665
+        const obj = this.$refs["cascaderbbedit"][index].getCheckedNodes();
1666
+        this.dispatchhaocaiarrEdit[index].F_DicId = data;
1667
+        this.dispatchhaocaiarrEdit[index].F_DicName = obj[0].data.text;
1668
+      }else{
1669
+        this.dispatchhaocaiarrEdit[index].F_DicId = ""
1670
+        this.dispatchhaocaiarrEdit[index].F_DicName = ""
1671
+      }
1665 1672
     },
1666 1673
     handleChange1(data) {
1667 1674
       this.returnWorkForm.key = data.split(",")[0];
@@ -2238,6 +2245,30 @@ export default {
2238 2245
       this.imgrepairUrl = url;
2239 2246
     },
2240 2247
     submitForm(formName) {
2248
+      // console.log(this.dispatchhaocaiarrError)
2249
+      // return;
2250
+      if(formName === "dealWorkForm"){
2251
+        if(this.dispatchhaocaiarrError.length>0){
2252
+          const index = this.dispatchhaocaiarrError.findIndex((o) => {
2253
+            return !o.F_ReceiveUser || !o.F_DicName || !o.F_Number;
2254
+          });
2255
+          if (index >= 0) {
2256
+            this.$message.error("请选择对应物资信息");
2257
+            return;
2258
+          }
2259
+        }
2260
+      }
2261
+      if(formName === "dealEditWorkForm"){
2262
+        if(this.dispatchhaocaiarrEdit.length>0){
2263
+          const index = this.dispatchhaocaiarrEdit.findIndex((o) => {
2264
+            return !o.F_ReceiveUser || !o.F_DicName || !o.F_Number;
2265
+          });
2266
+          if (index >= 0) {
2267
+            this.$message.error("请选择对应物资信息");
2268
+            return;
2269
+          }
2270
+        }
2271
+      }
2241 2272
       if (formName === "zhddtransferForm") {
2242 2273
         const arrlist = [];
2243 2274
         this.xylxdatas.forEach(function (v, n) {

+ 10 - 4
CallCenterWeb.UI/RMYY/src/components/workOrder/dispatching/addOrEditDispatch.vue

@@ -970,13 +970,19 @@ export default {
970 970
       });
971 971
     },
972 972
     handleChange(data, index) {
973
-      const obj = this.$refs["cascaderbb"][index].getCheckedNodes();
974
-      this.devList[index].devname = obj[0].data.text + "," + data;
973
+      if(data){
974
+        const obj = this.$refs["cascaderbb"][index].getCheckedNodes();
975
+        this.devList[index].devname = obj[0].data.text + "," + data;
976
+      }else{
977
+        this.devList[index].devname = ""
978
+      }
975 979
     },
976 980
     handleDeptChange(data, index) {
977
-      const obj = this.$refs["cascaderdept"][index].getCheckedNodes();
978
-      if (obj) {
981
+      if(data){
982
+        const obj = this.$refs["cascaderdept"][index].getCheckedNodes();
979 983
         this.devList[index].F_ToDept = obj[0].data.id;
984
+      }else{
985
+        this.devList[index].F_ToDept = ""
980 986
       }
981 987
     },
982 988
     getUserData() {

+ 12 - 0
CallCenterWeb.UI/RMYY/src/views/comDispatch/components/dispatchdetail.vue

@@ -530,6 +530,18 @@ export default {
530 530
                 res.PSInfo[i].F_DicName = "";
531 531
               }
532 532
             }
533
+            for (var i = 0; i < res.SDInfo.length; i++) {
534
+              if (
535
+                this.$store.getters.bbxxTypeMap[parseInt(res.SDInfo[i].F_DicId)]
536
+              ) {
537
+                res.SDInfo[i].F_DicName =
538
+                  this.$store.getters.bbxxTypeMap[
539
+                    parseInt(res.SDInfo[i].F_DicId)
540
+                  ].text;
541
+              } else {
542
+                res.SDInfo[i].F_DicName = "";
543
+              }
544
+            }
533 545
           }
534 546
         }
535 547
       });