liyg 2 rokov pred
rodič
commit
1977d51233

+ 20 - 10
src/views/TMS/components/domesticMine/wagonLoadEdit.vue

@@ -163,30 +163,40 @@ export default {
       let tmstrainLoadingResult = {
         resultId: this.$route.params.resultId,
         resultWagonNo: this.form1.resultWagonNo,
-        purchaseOrderRailPlanId:this.form1.purchaseOrderNo,
+        purchaseOrderNo:this.form1.purchaseOrderNo,
         sendStationId: this.sendStationId,
         arrivalStationId: this.toTheStationId,
         resultLoadingDate: sjTime(this.form1.resultLoadingDate),
-        resultRemarks: this.form1.resultRemarks
+        resultRemarks: this.form1.resultRemarks,
+        resultType:3
       };
       console.log(tmstrainLoadingResult)
       if (
       tmstrainLoadingResult.resultWagonNo==null||
       tmstrainLoadingResult.sendStationId==null||
       tmstrainLoadingResult.arrivalStationId==null||
-      tmstrainLoadingResult.resultLoadingDate==null||
-      tmstrainLoadingResult.purchaseOrderRailPlanId==null
+      tmstrainLoadingResult.resultLoadingDate==null
+     // || tmstrainLoadingResult.purchaseOrderNo==null
       ) this.$message.error("必填项存在空值!");
       else{
           this.axios
           .post("/api/v1/tms/upadteTmstrainLoadingResultByResultId",
             tmstrainLoadingResult)
-          .then(() => {
-            this.$message({
-              type: "success",  
-              message: "修改成功!",
-            });
-            this.$router.go(-1);
+          .then((res) => {
+            console.log(res.data.message);
+            if(res.data.code=='200'){
+              this.$message({
+                type: "success",  
+                message: "修改成功!",
+              });
+              this.$router.go(-1);
+            }else{
+              this.$message({
+                type: "error",  
+                message: res.data.data,
+              });
+            }
+           
           });
       }
     },

+ 2 - 1
src/views/TMS/components/importedEmergency/editWagonLoadEmergency.vue

@@ -182,6 +182,7 @@ export default {
         resultMaterialNumber: this.form1.resultMaterialNumber,
         resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
         resultRemarks: this.form1.resultRemarks,
+        resultType:2
       };
       console.log(tmstrainLoadingResult)
       if (
@@ -191,7 +192,7 @@ export default {
         tmstrainLoadingResult.resultLoadingDate == null ||
         tmstrainLoadingResult.batchId == null
       )
-        this.$message.error("必填项存在空值!");
+        this.$message.error("必填项存在空值!2");
       else
         this.axios
           .post(

+ 12 - 2
src/views/TMS/components/importedMine/editWagonLoad.vue

@@ -167,24 +167,29 @@ export default {
     onClickConfirm() {
       let tmstrainLoadingResult = {
         resultId: this.$route.params.resultId,
-        resultIsclear: this.form1.resultIsclear,
+        resultWagonNo: this.form1.resultWagonNo,
+        resultBillableTonnage: this.form1.resultBillableTonnage,
         resultClass: this.form1.resultClass,
+        resultIsclear: this.form1.resultIsclear,
         sendStationId: this.sendStationId,
         arrivalStationId: this.toTheStationId,
         resultLoadingDate: sjTime(this.form1.resultLoadingDate),
+        batchId: this.form1.batchId,
         capacityId: this.form1.capacityId,
         resultMaterialNumber: this.form1.resultMaterialNumber,
         resultMaterialTheoryweight: this.form1.resultMaterialTheoryweight,
         resultRemarks: this.form1.resultRemarks,
+        resultType:1
       };
       if (
+        tmstrainLoadingResult.resultId ==null ||
         tmstrainLoadingResult.resultIsclear == null ||
         tmstrainLoadingResult.resultClass == null ||
         tmstrainLoadingResult.sendStationId == null ||
         tmstrainLoadingResult.arrivalStationId == null ||
         tmstrainLoadingResult.resultLoadingDate == null
       )
-        this.$message.error("必填项存在空值!");
+        this.$message.error("必填项存在空值!1");
       else
         this.axios
           .post(
@@ -197,6 +202,11 @@ export default {
                 type: "success",
                 message: "修改成功!",
               });
+            }else{
+               this.$message({
+                type: "error",
+                message: res.data.data,
+              });
             }
 
             this.$router.go(-1);