瀏覽代碼

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zx 2 年之前
父節點
當前提交
cf8520c865

+ 1 - 1
src/views/TMS/components/bmsship/addThreeSectionHandleFee.vue

@@ -160,7 +160,7 @@ export default {
     onclick(a) {
         if(a==5){
             this.batchOption.requestUrl =
-            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 1 - 1
src/views/TMS/components/bmsship/addTwoSectionFee.vue

@@ -160,7 +160,7 @@ export default {
     onclick(a) {
         if(a==5){
             this.batchOption.requestUrl =
-            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 1 - 1
src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue

@@ -160,7 +160,7 @@ export default {
     onclick(a) {
         if(a==5){
             this.batchOption.requestUrl =
-            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 1 - 1
src/views/TMS/components/bmsship/editThreeSectionHandleFee.vue

@@ -178,7 +178,7 @@ export default {
     onclick(a) {
         if(a==5){
             this.batchOption.requestUrl =
-            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 1 - 1
src/views/TMS/components/bmsship/editTwoSectionFee.vue

@@ -178,7 +178,7 @@ export default {
     onclick(a) {
         if(a==5){
             this.batchOption.requestUrl =
-            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 1 - 1
src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue

@@ -178,7 +178,7 @@ export default {
     onclick(a) {
         if(a==5){
             this.batchOption.requestUrl =
-            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&index=" + this.input;
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 187 - 20
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -20,13 +20,20 @@
     </div>
     <div class="importedTable" style="height:300px;overflow:scroll;">
       <el-table
+        ref="importExcel"
         highlight-current-row
         :data="tableData"
         :row-style="{height:'40px'}"
+         @row-click="rowClick"
+         style="width: 100%;font-size: 14px"
         id="domesticTable">
+        <el-table-column
+            type="selection"
+            width="55">
+        </el-table-column>
         <el-table-column
           type="index"
-          width="50"
+          width="50px"
           prop="number"
           label="序号"
           align="center"
@@ -34,6 +41,13 @@
           :resizable="false"
         >
         </el-table-column>
+        <el-table-column
+          align="center"
+          prop="purchaseOrderNo"
+          label="采购订单号"
+          width="150px"
+        >
+        </el-table-column>
         <el-table-column
           align="center"
           prop="productName"
@@ -43,19 +57,19 @@
         </el-table-column>
         <el-table-column
           align="center"
-          prop="mineral"
-          label="矿种"
+          prop="supplierName"
+          label="发货单位"
           width="150px"
         >
         </el-table-column>
         <el-table-column
           align="center"
-          prop="wagonNo"
-          label="车号"
+          prop="materialName"
+          label="物资名"
           width="150px"
         >
         </el-table-column>
-        <el-table-column
+         <el-table-column
           align="center"
           prop="unloadPoint"
           label="卸货地点"
@@ -64,16 +78,16 @@
         </el-table-column>
         <el-table-column
           align="center"
-          prop="sendStation"
-          label="发站"
-          width="100px"
+          prop="wagonNo"
+          label="车号"
+          width="150px"
         >
         </el-table-column>
         <el-table-column
           align="center"
+          prop="sendStation"
+          label="发站"
           width="100px"
-          prop="arrivalStation"
-          label="到站"
         >
         </el-table-column>
          <el-table-column
@@ -97,6 +111,19 @@
           label="标重"
         >
         </el-table-column>
+        <el-table-column
+      fixed="right"
+      label="操作"
+      width="70">
+      <template slot-scope="scope">
+          <el-button
+            @click.native.prevent="ondrawer(scope)"
+            type="text"
+            size="small">
+            手动配单
+          </el-button>
+        </template>
+      </el-table-column>
       </el-table>
     </div>
     <div class="form">
@@ -122,6 +149,49 @@
         <dil-form :formId="364" v-model="form1" ref="from1"></dil-form>
       </div>
     </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+    <el-input
+        placeholder="发货单位"
+        v-model="supplierName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+      </el-input>
+      <el-input
+        placeholder="物资名"
+        v-model="materialName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+       <el-input
+        placeholder="卸货地点"
+        v-model="resultForeignShipName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="drawer">
+        <dilTable
+        ref="ordertable"
+          v-bind.sync="purchaseOption"
+          @radio-change="orderChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
     <div class="button_box_domestic">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" :loading="isLoading" @click="makeSure"
@@ -154,9 +224,10 @@ export default {
       //采购订单号
       purchaseOrderNo: null,
       //物资名称
-      materialName: null,
+      materialName: '',
       //发货单位名称
-      supplierName: null,
+      supplierName: '',
+      resultForeignShipName:'',
       //发货单位id
       supplierId: null,
       //物资id
@@ -172,6 +243,7 @@ export default {
       a: 1,
       direction: "rtl",
       inputText: "",
+      index:null,
       frist: {
         requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
         selectionType: "radio",
@@ -187,6 +259,13 @@ export default {
         requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
         selectionType: "radio"
       },
+      purchaseOption:{
+         // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/findPurchaseOrderList?apiId=81",
+        // 控制选择单列
+        selectionType: "radio",
+        pageSize:5,
+      },
       sendStationId: null,
       toTheStationId: 1,
       sendStation: null,
@@ -276,10 +355,14 @@ export default {
     // 确定
     makeSure() {
       let that = this;
+      let selection=this.$refs.importExcel.selection;
       this.isLoading = true;
+      //校验
       if (
         this.tableData.length <= 0 ||
         !this.toTheStationId ||
+        !selection ||
+        selection.length<=0 ||
         !this.form1.resultLoadingDate
       ) {
         if (this.tableData.length <= 0) {
@@ -287,7 +370,12 @@ export default {
             type: "warning",
             message: "请导入数据!"
           });
-        } else if (!this.toTheStationId) {
+        }else if(!selection ||selection.length<=0){
+           this.$message({
+            type: "warning",
+            message: "请选择车皮!"
+          });
+        }else if (!this.toTheStationId) {
           this.$message({
             type: "warning",
             message: "请选择到站!"
@@ -301,15 +389,28 @@ export default {
         this.isLoading = false;
         return;
       }
+      let error=selection.find(item=>!item.purchaseOrderId || 
+      !item.purchaseOrderNo || 
+      !item.batchId || 
+      !item.materialId || 
+      !item.supplierId);
+      if(error){
+        this.$message({
+            type: "warning",
+            message: "请先配单再勾选!"
+        });
+        this.isLoading = false;
+        return;
+      }
       //绑定通用字段
-      this.tableData.forEach(row => {
+      selection.forEach(row => {
         row.resultType = 3; //装车类型为国产矿
         row.arrivalStationId = that.form1.arrivalStationId; //到站id,默认老区轨道衡
         row.resultLoadingDate = sjTime(that.form1.resultLoadingDate); //装车日期
         row.resultRemarks = that.form1.resultRemarks; //备注
       });
       let data = {
-        list: this.tableData,
+        list: selection,
         userId: getCookie("userId")
       };
       console.log(data);
@@ -328,6 +429,7 @@ export default {
             message: res.data.data
           });
         }
+      }).then(()=>{
         this.isLoading = false;
       });
     },
@@ -344,7 +446,7 @@ export default {
         });
         return;
       }
-      this.tableData = [];
+      let excelData = [];
       var reader = new FileReader();
       var data = null;
       var workbook = null;
@@ -545,10 +647,27 @@ export default {
               });
               continue;
             }
-            that.tableData.push(tableRow);
+            excelData.push(tableRow);
           }
         }
-        console.log(that.tableData);
+        console.log(excelData);
+        let map={
+          list:excelData
+        }
+        //导入exceL
+        that.axios.post("/api/v1/tms/importDomesticLoadResult",map).then(res => {
+          console.log(res);
+          if (res.data.code == "200") {
+            that.tableData=res.data.data;
+          } else {
+            that.$message({
+              type: "error",
+              message: res.data.data
+            });
+          }
+        }).then(()=>{
+          // that.isLoading = false;
+        });
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取
     },
@@ -562,8 +681,56 @@ export default {
         return year + format + month + format + date
       }
       return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
+    },
+    //点击行勾选
+    rowClick(row, column, event) {
+      console.log("selected:",row);
+      //没有配单直接返回
+       if(!row.purchaseOrderId){
+          return;
+       }
+       let importExcel = this.$refs.importExcel; // 获取表格对象
+       //判断是否已存在
+       let findRow = importExcel.selection.find(item => item.wagonNo == row.wagonNo);
+       if (findRow) {
+          importExcel.toggleRowSelection(row, false);
+       }else{
+          importExcel.toggleRowSelection(row);
+       }
+       console.log(importExcel.selection);
+    },
+    onclick() {
+        this.purchaseOption.requestUrl=
+        "/api/v1/tms/findPurchaseOrderList?apiId=81&supplierName="+this.supplierName
+        +"&materialName="+this.materialName
+        +"&resultForeignShipName="+this.resultForeignShipName
+        +"&i="+new Date();
+    },
+    ondrawer(scope) {
+      this.drawer = true;
+      console.log("scope:",scope);
+      this.index=scope.$index;
+    },
+    //修改选中
+    orderChange(selection) {
+        console.log("order:",selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("temp",this.tableData[0]);
+        this.tableData[this.index].batchId=selection.batchId;
+        this.tableData[this.index].purchaseOrderId=selection.purchaseOrderId;
+        this.tableData[this.index].supplierId=selection.supplierId;
+        this.tableData[this.index].supplierName=selection.supplierName;
+        this.tableData[this.index].materialId=selection.materialId;
+        this.tableData[this.index].materialName=selection.materialName;
+        this.tableData[this.index].purchaseOrderNo=selection.purchaseOrderNo;
+        this.tableData[this.index].unloadPoint=selection.resultForeignShipName;
+        console.log("index:",this.tableData[this.index]);
+    },
+    handleClose(done) {
+      this.$refs.ordertable.$refs.mainTable.setCurrentRow();//清除选项
+      done();
     }
-
   }
 };
 </script>

+ 1 - 1
src/views/TMS/components/domesticMine/wagonLoadMine.vue

@@ -20,7 +20,7 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
       <el-button type="primary" @click="btnclick(1)">
-        <i class="el-icon-edit-outline"></i>
+        <i class="el-icon-edit-outline"></i>查询订
       </el-button>
     </div>
 

+ 31 - 35
src/views/TMS/components/domesticMine/wagonLoadbu.vue

@@ -3,24 +3,27 @@
     <page-title>返回</page-title>
      <div class="purchaseOrder_table">
       <div class="search" style="display:flex">
-        <div style="margin-top: 18px;margin-left:10px">
-          <el-label>物资名或订单号:</el-label>
-        </div>
-        <el-input
-        placeholder="请输入"
-        v-model="search1"
-        style="margin: 10px; width:10%"
+         <el-input
+        placeholder="发货单位"
+        v-model="supplierName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
         clearable
-        ></el-input>
-        <div style="margin-top: 18px;margin-left:10px">
-          <el-label>外轮船名:</el-label>
-        </div>
-        <el-input
-          placeholder="请输入"
-          v-model="search2"
-          style="margin: 10px;width:10%"
-          clearable
-        ></el-input>
+      >
+      </el-input>
+      <el-input
+        placeholder="物资名"
+        v-model="materialName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+       <el-input
+        placeholder="卸货地点"
+        v-model="resultForeignShipName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
       <el-button
         type="primary"
         class="btn"
@@ -28,12 +31,12 @@
         style="margin: 10px;">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button 
+      <!-- <el-button 
       type="primary"
       class="btn" 
       @click="makeSure" 
       style="margin: 10px;">确认配单
-      </el-button>
+      </el-button> -->
       </div>
       <!-- 采购订单号 -->
       <dilTable
@@ -68,13 +71,13 @@
       </div>
     </div> -->
     <!--待补录表格-->
-    <div class="wagonLoadbu_table">
+    <!-- <div class="wagonLoadbu_table">
       <dilTable
         v-bind.sync="option"
         @selection-change="selectionChange"
         @row-click="selectionChange"
       ></dilTable>
-    </div>
+    </div> -->
     
     <!-- 模态窗口 -->
     <!-- <el-drawer :visible.sync="drawer" :direction="direction" size="30%">
@@ -147,9 +150,10 @@ export default {
       //采购订单id
       purchaseOrderId: null,
       //物资名称
-      materialName: null,
+      materialName: '',
       //发货单位名称
-      supplierName: null,
+      supplierName: '',
+      resultForeignShipName:'',
       //发货单位id
       supplierId: null,
       //物资id
@@ -304,19 +308,11 @@ export default {
     },
     searchOrder(){
       //查询订单
-      if((typeof this.search1)!="undefined" && (typeof this.search2)!='undefined'){
-        let requestUrl="/api/v1/tms/findPurchaseOrderList?apiId=81";
-        if(this.search1!=null){
-            requestUrl+=("&materialName="+this.search1);
-        }
-        if(this.search2!=null){
-            requestUrl+=("&resultForeignShipName="+this.search2);
-        }
-        this.purchaseOption.requestUrl=requestUrl;
-      }else{
         this.purchaseOption.requestUrl=
-        "/api/v1/tms/findPurchaseOrderList?apiId=81"
-      }
+        "/api/v1/tms/findPurchaseOrderList?apiId=81&supplierName="+this.supplierName
+        +"&materialName="+this.materialName
+        +"&resultForeignShipName="+this.resultForeignShipName
+        +"&i="+new Date();
     },
     onClick(a) {
       if (a == 1) {

+ 1 - 1
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -539,7 +539,7 @@ export default {
       this.axios.post('/api/v1/tms/getResultType?apiId=58&resultType=1&con='+this.input).then((res)=>{
         console.log(res);
         if(res.data.code == "200"){
-          this.tableData=res.data.data.list;
+          this.tableData=res.data.data;
         }else {
           this.$message({
               type: "error",