liyg преди 3 години
родител
ревизия
27efbbe8da
променени са 2 файла, в които са добавени 44 реда и са изтрити 12 реда
  1. 26 10
      src/views/TMS/components/importedMine/addWagonloadCopy.vue
  2. 18 2
      src/views/TMS/components/importedMine/outBoundWagon.vue

+ 26 - 10
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -30,12 +30,6 @@
         >
           <i class="el-icon-search"></i>查询
         </el-button>
-        <!-- <el-button 
-      type="primary"
-      class="btn" 
-      @click="makeSure" 
-      style="margin: 10px;">确认配单
-      </el-button> -->
       </div>
       <!-- 采购订单号 -->
       <dilTable
@@ -107,7 +101,7 @@
           width="120px"
         >
         </el-table-column>
-        <el-table-column align="center" width="80px" prop="weight" label="标重">
+        <el-table-column align="center" width="80px" prop="wagonWeight" label="标重">
         </el-table-column>
         <!-- <el-table-column
         align="center"
@@ -198,6 +192,11 @@
                   </template>
                 </el-autocomplete>
               </el-form-item>
+              <el-form-item label="有拼装:">
+                <el-switch
+                  v-model="isAssembly">
+                </el-switch>
+              </el-form-item>
             </div>
           </el-form>
           <dil-form :formId="102" v-model="form1" ref="from1"></dil-form>
@@ -262,6 +261,7 @@ export default {
       form1: {},
       tableData: [],
       input: "",
+      isAssembly:false,
       value: undefined,
       //船名
       remark: null,
@@ -600,7 +600,7 @@ export default {
       if (state == 1) {
         let map = {
           portName: this.sendStation,
-          wagonList: this.list,
+          wagonList: this.tableData,
           // unloadingPointId:this.unloadPointId,
           purchaseOrderRailPlanId: this.purchaseOrderId,
           materialId: this.materialId,
@@ -613,8 +613,24 @@ export default {
           resultRemarks: this.form1.resultRemarks,
           userId: getCookie("userId"),
           resultType: 1,
-          purchaseNo: this.form1.purchaseOrderNo
+          purchaseNo: this.form1.purchaseOrderNo,
+          isAssembly:this.isAssembly
         };
+        console.log(map);
+        //校验拼装车的标重
+        if(this.isAssembly){
+          let flag=false;
+          map.wagonList.forEach((item)=>{
+            if(typeof item.wagonWeight !='undefined'){
+              flag=true;
+            }
+          });
+          if(!flag){
+            this.$message.warning("拼装车的标重不存在!");
+            this.disable = false;
+            return ;
+          }
+        }
         this.axios
           .post("/api/v1/tms/addWarehouseOutResult", map)
           .then(res => {
@@ -698,7 +714,7 @@ export default {
               materialName: row["品名"],
               wagonNo: row["车皮号"],
               mineral: row["矿种"],
-              weight: row["计费&#10;吨位"]
+              wagonWeight: row["标重"]
             };
             that.tableData.push(temp);
           } else {

+ 18 - 2
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -12,7 +12,20 @@
       </el-button>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
-      <mergeRowTable v-bind.sync="option1" ref="table"> </mergeRowTable>
+      <mergeRowTable v-bind.sync="option1" ref="table">
+        <!-- <el-table-column fixed="right" label="操作" width="50">
+        <template slot-scope="scope">
+          <el-button @click="click(scope.row.resultId)"
+          type="text" size="small"
+            >修改</el-button>
+          <el-button
+            type="text"
+            size="small"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button >
+        </template>
+      </el-table-column> -->
+      </mergeRowTable>
     </el-tabs>
   </div>
 </template>
@@ -48,7 +61,10 @@ export default {
     },
     handleClick(tab, event) {
       console.log(tab, event);
-    }
+    },
+   click(resultId) {
+      this.$router.push("/editOutBoundWagon/" + resultId);
+    },
   }
 };
 </script>