luobang 2 years ago
parent
commit
1be5d70e8c
32 changed files with 3475 additions and 323 deletions
  1. 4 3
      build/utils.js
  2. 2 2
      config/index.js
  3. 16 10
      src/views/RMS/components/addContractPrice.vue
  4. 2 2
      src/views/RMS/components/contractPrice.vue
  5. 1 1
      src/views/TMS/components/bmsship/addMoistureDetection.vue
  6. 132 61
      src/views/TMS/components/bmsship/addThreeSectionFee.vue
  7. 2 2
      src/views/TMS/components/bmsship/addThreeSectionHandleFee.vue
  8. 2 2
      src/views/TMS/components/bmsship/addTwoSectionFee.vue
  9. 2 2
      src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue
  10. 459 0
      src/views/TMS/components/bmsship/editThreeSectionFee.vue
  11. 1 1
      src/views/TMS/components/bmsship/editThreeSectionHandleFee.vue
  12. 1 1
      src/views/TMS/components/bmsship/editTwoSectionFee.vue
  13. 1 1
      src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue
  14. 8 6
      src/views/TMS/components/bmsship/threeSectionFee.vue
  15. 1 1
      src/views/TMS/components/bmstrain/addDomesticTrainFee.vue
  16. 1 1
      src/views/TMS/components/bmstrain/addImportedTrainFee.vue
  17. 5 3
      src/views/TMS/components/domesticMine/entrustMine.vue
  18. 187 20
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  19. 1 1
      src/views/TMS/components/domesticMine/wagonLoadMine.vue
  20. 31 35
      src/views/TMS/components/domesticMine/wagonLoadbu.vue
  21. 1 1
      src/views/TMS/components/importedMine/addWagonLoad.vue
  22. 4 14
      src/views/TMS/components/importedMine/addWagonloadCopy.vue
  23. 7 0
      src/views/TMS/router/index.js
  24. 112 89
      src/views/appoint/components/ship/addDeliveryNotice.vue
  25. 111 58
      src/views/appoint/components/ship/deliveryNotice.vue
  26. 2 2
      src/views/appoint/components/ship/modifyDeliveryNotice.vue
  27. 455 0
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue
  28. 467 0
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue
  29. 1431 0
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckOrder.vue
  30. 25 3
      src/views/inward/router/index.js
  31. 1 1
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  32. 0 0
      static/lib/XLSX/xlsx.core.min.js

+ 4 - 3
build/utils.js

@@ -19,16 +19,17 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // let devModules = ["index", "statisticalReport", "appoint", "TMS"];
 // let devModules = ["index", "statisticalReport", "appoint", "TMS"];
 // let devModules = ["index", "statisticalReport", "TMS", "appoint"];
 // let devModules = ["index", "statisticalReport", "TMS", "appoint"];
 
 
-// let devModules = ["index", "appoint", "statisticalReport"];
+// let devModules = ["all"];
+
+// let devModules = ["all"];
 
 
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
 // let devModules = ["index", "inward", "appoint", "queue"];
 // let devModules = ["index", "inward", "appoint", "queue"];
-
 // let devModules = ["index", "appoint", "statisticalReport", "WMS"];
 // let devModules = ["index", "appoint", "statisticalReport", "WMS"];
 // let devModules = ["index", "appoint", "inward", "statisticalReport", "RMS"];
 // let devModules = ["index", "appoint", "inward", "statisticalReport", "RMS"];
 // let devModules = ["index", "appoint", "inward", "TMS"];
 // let devModules = ["index", "appoint", "inward", "TMS"];
 // let devModules = ["all"];
 // let devModules = ["all"];
-let devModules = ["all"];
+let devModules = ["index", "appoint", "inward", "queue"];
 // let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
 // let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
 // let devModules = ["index", "ADMINISTRATORS", "RMS"];
 // let devModules = ["index", "ADMINISTRATORS", "RMS"];
 // let devModules = ["index", "inward", "statisticalReport"];
 // let devModules = ["index", "inward", "statisticalReport"];

+ 2 - 2
config/index.js

@@ -65,8 +65,8 @@ let proxyTable = {
   },
   },
   // 所有数据的请求域名地址
   // 所有数据的请求域名地址
   "/api/v1": {
   "/api/v1": {
-    target: "http://172.16.33.166:80",
-    // target: "http://localhost:8080",
+    // target: "http://172.16.33.166:80",
+    target: "http://localhost:8080",
     // target: "http://192.168.1.109:8080",
     // target: "http://192.168.1.109:8080",
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {

+ 16 - 10
src/views/RMS/components/addContractPrice.vue

@@ -11,6 +11,17 @@
             </el-form-item>
             </el-form-item>
              <el-form-item label="单价">
              <el-form-item label="单价">
                 <el-input v-model="form.unitPrice" type="number"></el-input>
                 <el-input v-model="form.unitPrice" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="港口">
+              <el-select v-model="form.portId" filterable>
+                <el-option
+                  v-for="port in ports"
+                  :key="port.portId"
+                  :label="port.portName"
+                  :value="port.portId"
+                >
+                </el-option>
+              </el-select>
             </el-form-item>
             </el-form-item>
              <el-form-item label="起始日期">
              <el-form-item label="起始日期">
                  <el-date-picker
                  <el-date-picker
@@ -26,11 +37,6 @@
                     placeholder="选择日期">
                     placeholder="选择日期">
                 </el-date-picker>
                 </el-date-picker>
             </el-form-item>
             </el-form-item>
-            <!-- <el-form-item label="港口:">
-                <el-select filterable  v-model="portId">
-                    <el-option v-for="item in ports" :value="item.portId" :key="item.portId" :label="item.portName"></el-option>
-                </el-select>
-            </el-form-item> -->
           </div>
           </div>
      </el-form>
      </el-form>
     </div>
     </div>
@@ -50,24 +56,23 @@ export default {
   data() {
   data() {
     return {
     return {
       form: {
       form: {
+        portId:null,
         contractNo:null,
         contractNo:null,
         unitPrice:null,
         unitPrice:null,
         startTime:null,
         startTime:null,
         endTime:null,
         endTime:null,
         userId:getCookie("userId")
         userId:getCookie("userId")
       },
       },
-      portId:null,
       ports:[],
       ports:[],
       isLoading:false
       isLoading:false
     };
     };
   },
   },
   mounted() {
   mounted() {
-    //this.getPorts();
+    this.getPorts();
   },
   },
   methods: {
   methods: {
     makeSure() {
     makeSure() {
       this.isLoading=true;
       this.isLoading=true;
-      console.log(this.form);
       if (this.form.contractNo == null || 
       if (this.form.contractNo == null || 
       this.form.contractNo =='' ||
       this.form.contractNo =='' ||
       this.form.unitPrice =='' ||
       this.form.unitPrice =='' ||
@@ -82,6 +87,7 @@ export default {
       }
       }
       else{
       else{
          let map=this.form;
          let map=this.form;
+         console.log(map);
          map.startTime = sjTime(this.form.startTime);
          map.startTime = sjTime(this.form.startTime);
          map.endTime = sjTime(this.form.endTime);
          map.endTime = sjTime(this.form.endTime);
          this.axios.post("/api/v1/rms/insertBmsshipContractPrice",map).then(res => {
          this.axios.post("/api/v1/rms/insertBmsshipContractPrice",map).then(res => {
@@ -91,11 +97,11 @@ export default {
               message: "新增成功!"
               message: "新增成功!"
             });
             });
             this.cancel();
             this.cancel();
-            this.isLoading=false;
           } else {
           } else {
             this.$message.error(res.data.data);
             this.$message.error(res.data.data);
-            this.isLoading=false;
           }
           }
+        }).then(()=>{
+           this.isLoading=false;
         });
         });
       }
       }
        
        

+ 2 - 2
src/views/RMS/components/contractPrice.vue

@@ -2,7 +2,7 @@
     <!-- 合同单价 -->
     <!-- 合同单价 -->
   <div class="contract_price">
   <div class="contract_price">
     <div class="sache">
     <div class="sache">
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <el-input placeholder="请输入合同号,暂不支持单价查询" v-model="inputText" clearable>
       </el-input>
       </el-input>
       <el-button type="primary" class="btn" @click="onclick">
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
         <i class="el-icon-search"></i>查询
@@ -101,7 +101,7 @@ export default {
   .sache {
   .sache {
     padding: 1.25rem 0.375rem;
     padding: 1.25rem 0.375rem;
     .el-input {
     .el-input {
-      width: 20%;
+      width: 25%;
       margin-right: 1.25rem;
       margin-right: 1.25rem;
     }
     }
   }
   }

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

@@ -214,7 +214,7 @@ export default {
       }
       }
     },
     },
     makeSure() {
     makeSure() {
-      //this.isLoading=true;
+      this.isLoading=true;
       let map = {
       let map = {
         batchId: this.batchId,
         batchId: this.batchId,
 
 

+ 132 - 61
src/views/TMS/components/bmsship/addThreeSectionFee.vue

@@ -12,43 +12,75 @@
             >浏览</el-button
             >浏览</el-button
           >
           >
         </div>
         </div>
-        <div
-          class="material"
-          v-for="(item, index) in form.Array"
-          :key="index"
-          style="margin-left:30px"
-        >
-          <el-form :inline="true">
-            <el-form-item label="装船时间">
+         <div class="searchSelect">
+          <span class="text">发运港</span>
+          <el-input class="input" v-model="form.portName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(7)"
+            >浏览</el-button
+          >
+        </div>
+         <div class="searchSelect">
+            <span class="text">单价</span>
+            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
+            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+        </div>
+        <div class="preview-group">
+           <el-form-item label="装船时间">
               <el-input
               <el-input
-                v-model="item.resultLoadShipDate"
+                v-model="form.resultLoadShipDate"
                 placeholder="装船时间"
                 placeholder="装船时间"
                 disabled
                 disabled
               ></el-input>
               ></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item label="离港时间">
             <el-form-item label="离港时间">
               <el-input
               <el-input
-                v-model="item.resultOutPortTime"
+                v-model="form.resultOutPortTime"
                 placeholder="离港时间"
                 placeholder="离港时间"
                 disabled
                 disabled
               ></el-input>
               ></el-input>
             </el-form-item>
             </el-form-item>
-            <el-form-item label="实装吨位">
+            <el-form-item label="吨位">
               <el-input
               <el-input
-                v-model="item.resultActualInstallations"
-                placeholder="实装吨位"
+                v-model="form.realTonnage"
+                placeholder="吨位"
                 disabled
                 disabled
               ></el-input>
               ></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item label="水运费用">
             <el-form-item label="水运费用">
-              <el-input v-model="item.fee" type="number" disabled></el-input>
-              <el-button type="primary" @click="ondrawer(6, index)"
-                >浏览单价</el-button
-              >
+                <el-input v-model="form.fee" type="number" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="预开吨位">
+              <el-input
+                v-model="form.previewTonnage"
+                placeholder="预开吨位"
+                @change="calculate"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="预开金额">
+                <el-input v-model="form.previewFee" type="number" disabled></el-input>
+            </el-form-item>
+            <el-form-item label="装船含水吨位">
+              <el-input
+                v-model="form.loadWater"
+                placeholder="装船含水吨位"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="进厂含水吨位">
+              <el-input
+                v-model="form.enFacotoryWater"
+                placeholder="进厂含水吨位"
+              ></el-input>
+            </el-form-item>
+        <el-form-item label="开票吨位">
+              <el-input
+                v-model="form.makeTonnage"
+                placeholder="开票吨位"
+                @change="calculate"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="开票金额">
+                <el-input v-model="form.makeFee" type="number"></el-input>
             </el-form-item>
             </el-form-item>
-          </el-form>
-        </div>
-        <div class="preview-group">
           <el-form-item label="开票日期">
           <el-form-item label="开票日期">
             <el-date-picker
             <el-date-picker
               v-model="form.makeTime"
               v-model="form.makeTime"
@@ -132,6 +164,12 @@
           @radio-change="priceChange"
           @radio-change="priceChange"
         ></dilTable>
         ></dilTable>
       </div>
       </div>
+      <div v-show="a == 7">
+        <dilTable
+          v-bind.sync="loadShipOption"
+          @radio-change="loadShipChange"
+        ></dilTable>
+      </div>
     </el-drawer>
     </el-drawer>
     <!-- 底部按钮 -->
     <!-- 底部按钮 -->
     <div class="button-box">
     <div class="button-box">
@@ -157,6 +195,8 @@ export default {
       portId: null,
       portId: null,
       ports: [],
       ports: [],
       isLoading: false,
       isLoading: false,
+      loadShips:null,
+      totalResultId:null,
       drawer: false,
       drawer: false,
       direction: "rtl",
       direction: "rtl",
       a: 0,
       a: 0,
@@ -165,6 +205,9 @@ export default {
       purchaseOrderId: null,
       purchaseOrderId: null,
       batchName: null,
       batchName: null,
       cargoPictureUrl: "",
       cargoPictureUrl: "",
+      resultLoadShipDate:null,
+      resultOutDate:null,
+      resultActualInstallations:null,
       batchOption: {
       batchOption: {
         requestUrl: "/api/v1/uc/findBatchHavingLoad?apiId=502",
         requestUrl: "/api/v1/uc/findBatchHavingLoad?apiId=502",
         selectionType: "radio",
         selectionType: "radio",
@@ -174,6 +217,11 @@ export default {
         requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
         requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
         selectionType: "radio",
         selectionType: "radio",
         map: []
         map: []
+      },
+      loadShipOption: {
+        requestUrl: "/api/v1/bms/findLoadByBatch?apiId=505",
+        selectionType: "radio",
+        map: []
       }
       }
     };
     };
   },
   },
@@ -194,13 +242,8 @@ export default {
   methods: {
   methods: {
     findLoadByBatch() {
     findLoadByBatch() {
       if (this.batchId != null) {
       if (this.batchId != null) {
-        this.axios
-          .post("/api/v1/bms/findLoadByBatch/" + this.batchId)
-          .then(res => {
-            console.log(res.data.data);
-            this.$set(this.form, "Array", res.data.data);
-            // this.form.Array = res.data.data;
-          });
+        this.loadShipOption.requestUrl="/api/v1/bms/findLoadByBatch?apiId=505&batchId="+this.batchId+
+        "&i="+new Date();
       }
       }
     },
     },
     //右侧选中框
     //右侧选中框
@@ -238,7 +281,8 @@ export default {
     },
     },
     //修改选中
     //修改选中
     batchChange(selection) {
     batchChange(selection) {
-      console.log(JSON.stringify(selection).length);
+      console.log("SELECTION:",selection);
+      this.totalResultId=selection.totalResultId;
       if (JSON.stringify(selection).length > 2) {
       if (JSON.stringify(selection).length > 2) {
         this.batchId = selection.batchId;
         this.batchId = selection.batchId;
         this.purchaseOrderId = selection.purchaseOrderId;
         this.purchaseOrderId = selection.purchaseOrderId;
@@ -257,58 +301,85 @@ export default {
       //   this.form.unitPrice = selection.unitPrice;
       //   this.form.unitPrice = selection.unitPrice;
       this.calculate();
       this.calculate();
     },
     },
+    loadShipChange(selection){
+      console.log(selection);
+      this.form=selection;
+      this.calculate();
+    },
     //计算水运费
     //计算水运费
     calculate() {
     calculate() {
-      if (
-        this.form.Array[this.indexNum].resultActualInstallations &&
-        this.form.Array[this.indexNum].unitPrice
-      ) {
+      if (this.form.realTonnage &&this.form.unitPrice) {
         let fee = new BigNumber(
         let fee = new BigNumber(
-          this.form.Array[this.indexNum].resultActualInstallations
+          this.form.realTonnage
         );
         );
         this.$set(
         this.$set(
-          this.form.Array[this.indexNum],
+          this.form,
           "fee",
           "fee",
-          fee.multipliedBy(this.form.Array[this.indexNum].unitPrice).toNumber()
+          fee.multipliedBy(this.form.unitPrice).toNumber()
+        );
+      }
+      if (this.form.previewTonnage &&this.form.unitPrice) {
+        let previewFee = new BigNumber(
+          this.form.previewTonnage
+        );
+        this.$set(
+          this.form,
+          "previewFee",
+          previewFee.multipliedBy(this.form.unitPrice).toNumber()
         );
         );
       }
       }
+      if(this.form.makeTonnage &&this.form.unitPrice){
+         let makeFee = new BigNumber(
+            this.form.makeTonnage
+          );
+          this.$set(
+            this.form,
+            "makeFee",
+            makeFee.multipliedBy(this.form.unitPrice).toNumber()
+          );
+      }
     },
     },
     makeSure() {
     makeSure() {
-      let totalFee = this.form.Array.reduce(function(prev, item) {
-        return prev + item.fee;
-      }, 0);
-      let realTonnage = this.form.Array.reduce(function(prev, item) {
-        return prev + item.resultActualInstallations;
-      }, 0);
-      //this.isLoading=true;
+      this.isLoading=true;
       let map = {
       let map = {
-        batchId: this.batchId,
+        batchId: this.form.batchId,
         purchaseOrderId: this.purchaseOrderId,
         purchaseOrderId: this.purchaseOrderId,
         unitPrice: this.form.unitPrice,
         unitPrice: this.form.unitPrice,
         unitPriceId: this.form.unitPriceId,
         unitPriceId: this.form.unitPriceId,
-        realTonnage: realTonnage,
-        mapList: this.form.Array,
-        fee: totalFee,
+        realTonnage: this.form.realTonnage,
+        fee: this.form.fee,
+        previewTonnage:this.form.previewTonnage,
+        previewFee:this.form.previewFee,
         makeTime: sjTime(this.form.makeTime),
         makeTime: sjTime(this.form.makeTime),
         image: this.form.image,
         image: this.form.image,
+        loadWater:this.form.loadWater,
+        enFacotoryWater:this.form.enFacotoryWater,
+        makeTonnage:this.form.makeTonnage,
+        makeFee:this.form.makeFee,
+        totalResultId:this.form.totalResultId,
         feeType: 3,
         feeType: 3,
+        portId:this.form.portId,
         userId: getCookie("userId")
         userId: getCookie("userId")
       };
       };
       console.log(map);
       console.log(map);
-      //   if (
-      //     map.batchId == null ||
-      //     map.purchaseOrderId == null ||
-      //     map.unitPrice == null ||
-      //     map.unitPriceId == null ||
-      //     map.realTonnage == null ||
-      //     map.fee == null ||
-      //     map.makeTime == null ||
-      //     map.image == null ||
-      //     map.image == ""
-      //   ) {
-      //     this.$message.error("存在空值!");
-      //     this.isLoading = false;
-      //   } else {
+        if (
+          !map.batchId  ||
+          !map.purchaseOrderId  ||
+          !map.unitPrice ||
+          !map.unitPriceId  ||
+          !map.realTonnage ||
+          !map.fee  ||
+          !map.makeTime ||
+          !map.loadWater ||
+          !map.enFacotoryWater ||
+          !map.makeTonnage ||
+          !map.makeFee ||
+          !map.previewFee ||
+          !map.previewTonnage
+        ) {
+          this.$message.error("存在空值!");
+          this.isLoading = false;
+        } else {
       this.axios
       this.axios
         .post("/api/v1/bms/addPortHandlingFeeSecond", map)
         .post("/api/v1/bms/addPortHandlingFeeSecond", map)
         .then(res => {
         .then(res => {
@@ -325,7 +396,7 @@ export default {
         .then(() => {
         .then(() => {
           this.isLoading = false;
           this.isLoading = false;
         });
         });
-      //   }
+    }
     },
     },
     // 取消
     // 取消
     cancel() {
     cancel() {

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

@@ -160,7 +160,7 @@ export default {
     onclick(a) {
     onclick(a) {
         if(a==5){
         if(a==5){
             this.batchOption.requestUrl =
             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){
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             this.contractPriceOption.requestUrl =
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
@@ -188,7 +188,7 @@ export default {
         }
         }
     },
     },
     makeSure() {
     makeSure() {
-      //this.isLoading=true;
+      this.isLoading=true;
       let map={
       let map={
         batchId:this.batchId,
         batchId:this.batchId,
         purchaseOrderId:this.purchaseOrderId,
         purchaseOrderId:this.purchaseOrderId,

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

@@ -160,7 +160,7 @@ export default {
     onclick(a) {
     onclick(a) {
         if(a==5){
         if(a==5){
             this.batchOption.requestUrl =
             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){
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             this.contractPriceOption.requestUrl =
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
@@ -188,7 +188,7 @@ export default {
         }
         }
     },
     },
     makeSure() {
     makeSure() {
-      //this.isLoading=true;
+      this.isLoading=true;
       let map={
       let map={
         batchId:this.batchId,
         batchId:this.batchId,
         purchaseOrderId:this.purchaseOrderId,
         purchaseOrderId:this.purchaseOrderId,

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

@@ -160,7 +160,7 @@ export default {
     onclick(a) {
     onclick(a) {
         if(a==5){
         if(a==5){
             this.batchOption.requestUrl =
             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){
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             this.contractPriceOption.requestUrl =
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
             "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
@@ -188,7 +188,7 @@ export default {
         }
         }
     },
     },
     makeSure() {
     makeSure() {
-      //this.isLoading=true;
+      this.isLoading=true;
       let map={
       let map={
         batchId:this.batchId,
         batchId:this.batchId,
         purchaseOrderId:this.purchaseOrderId,
         purchaseOrderId:this.purchaseOrderId,

+ 459 - 0
src/views/TMS/components/bmsship/editThreeSectionFee.vue

@@ -0,0 +1,459 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+          <span class="text">批次</span>
+          <el-input class="input" v-model="batchName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(5)"
+            >浏览</el-button
+          >
+        </div>
+        <div
+          class="material"
+          v-for="(item, index) in form.Array"
+          :key="index"
+          style="margin-left:30px"
+        >
+          <el-form :inline="true">
+            <el-form-item label="装船时间">
+              <el-input
+                v-model="item.resultLoadShipDate"
+                placeholder="装船时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="离港时间">
+              <el-input
+                v-model="item.resultOutPortTime"
+                placeholder="离港时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="实装吨位">
+              <el-input
+                v-model="item.resultActualInstallations"
+                placeholder="实装吨位"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+              <el-input v-model="item.fee" type="number" disabled></el-input>
+              <el-button type="primary" @click="ondrawer(6, index)"
+                >浏览单价</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="preview-group">
+          <el-form-item label="开票日期">
+            <el-date-picker
+              v-model="form.makeTime"
+              type="datetime"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+            <el-upload
+              class="upload-demo"
+              style="width: 270px"
+              ref="upload1"
+              accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+              action="/api/v1/bms/uploadBmsshipOrder"
+              :before-upload="beforeUpload"
+              :multiple="false"
+              list-type="picture"
+              :show-file-list="false"
+              :on-success="handleAvatarSuccess"
+              :on-error="onError(1)"
+            >
+              <el-input
+                class="shippingCertificate"
+                style="width: 270px; display: flex"
+                placeholder="上传水运单图片(必填项)"
+                v-model="form.image"
+                disabled
+              >
+              </el-input>
+              <el-button
+                size="small"
+                type="primary"
+                style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                @click="upCLick(1)"
+              >
+                点击上传附件</el-button
+              >
+            </el-upload>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import { BigNumber } from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      indexNum: null,
+      form: {},
+      portId: null,
+      ports: [],
+      isLoading: false,
+      drawer: false,
+      direction: "rtl",
+      a: 0,
+      input: null,
+      batchId: null,
+      purchaseOrderId: null,
+      batchName: null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/findBatchHavingLoad?apiId=502",
+        selectionType: "radio",
+        map: []
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: []
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  computed: {
+    batch() {
+      return this.batchId;
+    }
+  },
+  watch: {
+    batch() {
+      console.log("无变化l");
+      this.findLoadByBatch();
+    }
+  },
+  methods: {
+    information() {
+      //编辑车皮装车作业
+      this.axios
+        .post(
+          "/api/v1/bms/getBmsshipFee/" + this.$route.params.resultId
+        )
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            console.log(e);
+            this.form = e;
+            this.batchName=e.batchName;
+            this.batchId=e.batchId;
+            this.purchaseOrderId=e.purchaseOrderId;
+          });
+        }).then(()=>{
+          this.findLoadByBatch();
+        });
+    },
+    findLoadByBatch() {
+      if (this.batchId != null) {
+        this.axios
+          .post("/api/v1/bms/findLoadByBatch/" + this.batchId)
+          .then(res => {
+            console.log(res.data.data);
+            this.$set(this.form, "Array", res.data.data);
+            // this.form.Array = res.data.data;
+          });
+      }else{
+        console.log("尚未选择批次");
+      }
+    },
+    //右侧选中框
+    ondrawer(num, index) {
+      if (num == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502" + "&i=" + new Date();
+      } else if (num == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500" +
+          "&i=" +
+          new Date();
+      }
+      this.drawer = true;
+      this.indexNum = index;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502&index=" +
+          this.input +
+          "&i=" +
+          new Date();
+      } else if (a == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" +
+          this.input;
+      }
+    },
+    //修改选中
+    batchChange(selection) {
+      console.log(JSON.stringify(selection).length);
+      if (JSON.stringify(selection).length > 2) {
+        this.batchId = selection.batchId;
+        this.purchaseOrderId = selection.purchaseOrderId;
+        this.batchName =
+          selection.materialName + selection.resultForeignShipName;
+      } else {
+        this.batchId = null;
+        this.purchaseOrderId = null;
+        this.batchName = "";
+      }
+    },
+    priceChange(selection) {
+      this.form.Array[this.indexNum].unitPriceId = selection.resultId;
+      this.form.Array[this.indexNum].unitPrice = selection.unitPrice;
+      //   this.form.unitPriceId = selection.resultId;
+      //   this.form.unitPrice = selection.unitPrice;
+      this.calculate();
+    },
+    //计算水运费
+    calculate() {
+      if (
+        this.form.Array[this.indexNum].resultActualInstallations &&
+        this.form.Array[this.indexNum].unitPrice
+      ) {
+        let fee = new BigNumber(
+          this.form.Array[this.indexNum].resultActualInstallations
+        );
+        this.$set(
+          this.form.Array[this.indexNum],
+          "fee",
+          fee.multipliedBy(this.form.Array[this.indexNum].unitPrice).toNumber()
+        );
+      }
+    },
+    makeSure() {
+      let totalFee = this.form.Array.reduce(function(prev, item) {
+        return prev + item.fee;
+      }, 0);
+      let realTonnage = this.form.Array.reduce(function(prev, item) {
+        return prev + item.resultActualInstallations;
+      }, 0);
+      //this.isLoading=true;
+      let map = {
+        resultId:this.$route.params.resultId,
+        batchId: this.batchId,
+        purchaseOrderId: this.purchaseOrderId,
+        realTonnage: realTonnage,
+        mapList: this.form.Array,
+        fee: totalFee,
+        makeTime: sjTime(this.form.makeTime),
+        image: this.form.image,
+        feeType: 3,
+        userId: getCookie("userId")
+      };
+      console.log(map);
+      //   if (
+      //     map.batchId == null ||
+      //     map.purchaseOrderId == null ||
+      //     map.unitPrice == null ||
+      //     map.unitPriceId == null ||
+      //     map.realTonnage == null ||
+      //     map.fee == null ||
+      //     map.makeTime == null ||
+      //     map.image == null ||
+      //     map.image == ""
+      //   ) {
+      //     this.$message.error("存在空值!");
+      //     this.isLoading = false;
+      //   } else {
+      this.axios
+        .post("/api/v1/bms/updatePortHandlingFee", map)
+        .then(res => {
+          if (res.data.code == 0) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        })
+        .then(() => {
+          this.isLoading = false;
+        });
+      //   }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts() {
+      this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+        if (res.data.code == 200) {
+          this.ports = res.data.data;
+          console.log(this.ports);
+        } else {
+          this.$message.error(res.data.data);
+        }
+      });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    }
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+  .text {
+    width: 40px;
+  }
+  .input {
+    width: 200px;
+  }
+  .button {
+    margin-left: 6px;
+  }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 100px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .el-input {
+    width: 250px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

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

@@ -178,7 +178,7 @@ export default {
     onclick(a) {
     onclick(a) {
         if(a==5){
         if(a==5){
             this.batchOption.requestUrl =
             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){
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             this.contractPriceOption.requestUrl =
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
             "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) {
     onclick(a) {
         if(a==5){
         if(a==5){
             this.batchOption.requestUrl =
             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){
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             this.contractPriceOption.requestUrl =
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
             "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) {
     onclick(a) {
         if(a==5){
         if(a==5){
             this.batchOption.requestUrl =
             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){
         }else if(a==6){
             this.contractPriceOption.requestUrl =
             this.contractPriceOption.requestUrl =
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
             "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;

+ 8 - 6
src/views/TMS/components/bmsship/threeSectionFee.vue

@@ -12,7 +12,7 @@
       </el-button>
       </el-button>
     </div>
     </div>
     <div class="table">
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <mergeRowTable v-bind.sync="options">
         <el-table-column fixed="right" label="操作" width="100">
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="update(scope)">
             <el-button type="text" size="small" @click="update(scope)">
@@ -30,7 +30,7 @@
             </el-button>
             </el-button>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-      </dilTable>
+      </mergeRowTable>
     </div>
     </div>
     <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
     <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
       <div class="demo-image__preview">
       <div class="demo-image__preview">
@@ -53,20 +53,22 @@ export default {
       isShow: false,
       isShow: false,
       options: {
       options: {
         // first请求数据的地址
         // first请求数据的地址
-        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3"
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3",
+        comparison:"resultForeignShipName",
+        columnIndexs:[0,1,2,3]
       }
       }
     };
     };
   },
   },
   methods: {
   methods: {
     getRequestUrl() {
     getRequestUrl() {
       this.options.requestUrl =
       this.options.requestUrl =
-        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3&i=" +
+        "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3&i=" +
         new Date();
         new Date();
     },
     },
     //查询
     //查询
     onclick() {
     onclick() {
       this.options.requestUrl =
       this.options.requestUrl =
-        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3&con=" +
+        "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3&con=" +
         this.inputText;
         this.inputText;
     },
     },
     //新增
     //新增
@@ -75,7 +77,7 @@ export default {
     },
     },
     update(scope) {
     update(scope) {
       console.log(scope.row.resultId);
       console.log(scope.row.resultId);
-      this.$router.push("/editTwoSectionFee/" + scope.row.resultId);
+      this.$router.push("/editThreeSectionFee/" + scope.row.resultId);
     },
     },
     showCarrier(scope) {
     showCarrier(scope) {
       console.log(scope.row.resultId);
       console.log(scope.row.resultId);

+ 1 - 1
src/views/TMS/components/bmstrain/addDomesticTrainFee.vue

@@ -191,7 +191,7 @@ export default {
         }
         }
     },
     },
     makeSure() {
     makeSure() {
-      //this.isLoading=true;
+      this.isLoading=true;
       let map={
       let map={
         // batchId:this.batchId,
         // batchId:this.batchId,
         // purchaseOrderId:this.purchaseOrderId,
         // purchaseOrderId:this.purchaseOrderId,

+ 1 - 1
src/views/TMS/components/bmstrain/addImportedTrainFee.vue

@@ -191,7 +191,7 @@ export default {
         }
         }
     },
     },
     makeSure() {
     makeSure() {
-      //this.isLoading=true;
+      this.isLoading=true;
       let map={
       let map={
         // batchId:this.batchId,
         // batchId:this.batchId,
         // purchaseOrderId:this.purchaseOrderId,
         // purchaseOrderId:this.purchaseOrderId,

+ 5 - 3
src/views/TMS/components/domesticMine/entrustMine.vue

@@ -55,11 +55,10 @@
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
-
-
 <script>
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import { sjTime } from "@/utils/sharedJsFile";
 import bignumber,{BigNumber} from 'bignumber.js';
 import bignumber,{BigNumber} from 'bignumber.js';
+import { XLSX$Utils } from 'xlsx';
 export default {
 export default {
   data() {
   data() {
     return {
     return {
@@ -170,13 +169,16 @@ export default {
       this.$router.go(0);
       this.$router.go(0);
     },
     },
     exportExcel(){
     exportExcel(){
+      let excel=this.$refs.excelDom;
+      console.log(XLSX);
+      console.log(XLSX.version);
       if(this.selectionListMap2.length<=0){
       if(this.selectionListMap2.length<=0){
          this.$message({
          this.$message({
           message: "请先勾选数据!",
           message: "请先勾选数据!",
           type: "warning"
           type: "warning"
         });
         });
         return;
         return;
-      }
+      };
       //创建工作簿对象
       //创建工作簿对象
       let wb = XLSX.utils.book_new();
       let wb = XLSX.utils.book_new();
       //数据
       //数据

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

@@ -20,13 +20,20 @@
     </div>
     </div>
     <div class="importedTable" style="height:300px;overflow:scroll;">
     <div class="importedTable" style="height:300px;overflow:scroll;">
       <el-table
       <el-table
+        ref="importExcel"
         highlight-current-row
         highlight-current-row
         :data="tableData"
         :data="tableData"
         :row-style="{height:'40px'}"
         :row-style="{height:'40px'}"
+         @row-click="rowClick"
+         style="width: 100%;font-size: 14px"
         id="domesticTable">
         id="domesticTable">
+        <el-table-column
+            type="selection"
+            width="55">
+        </el-table-column>
         <el-table-column
         <el-table-column
           type="index"
           type="index"
-          width="50"
+          width="50px"
           prop="number"
           prop="number"
           label="序号"
           label="序号"
           align="center"
           align="center"
@@ -34,6 +41,13 @@
           :resizable="false"
           :resizable="false"
         >
         >
         </el-table-column>
         </el-table-column>
+        <el-table-column
+          align="center"
+          prop="purchaseOrderNo"
+          label="采购订单号"
+          width="150px"
+        >
+        </el-table-column>
         <el-table-column
         <el-table-column
           align="center"
           align="center"
           prop="productName"
           prop="productName"
@@ -43,19 +57,19 @@
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           align="center"
           align="center"
-          prop="mineral"
-          label="矿种"
+          prop="supplierName"
+          label="发货单位"
           width="150px"
           width="150px"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           align="center"
           align="center"
-          prop="wagonNo"
-          label="车号"
+          prop="materialName"
+          label="物资名"
           width="150px"
           width="150px"
         >
         >
         </el-table-column>
         </el-table-column>
-        <el-table-column
+         <el-table-column
           align="center"
           align="center"
           prop="unloadPoint"
           prop="unloadPoint"
           label="卸货地点"
           label="卸货地点"
@@ -64,16 +78,16 @@
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           align="center"
           align="center"
-          prop="sendStation"
-          label="发站"
-          width="100px"
+          prop="wagonNo"
+          label="车号"
+          width="150px"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
           align="center"
           align="center"
+          prop="sendStation"
+          label="发站"
           width="100px"
           width="100px"
-          prop="arrivalStation"
-          label="到站"
         >
         >
         </el-table-column>
         </el-table-column>
          <el-table-column
          <el-table-column
@@ -97,6 +111,19 @@
           label="标重"
           label="标重"
         >
         >
         </el-table-column>
         </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>
       </el-table>
     </div>
     </div>
     <div class="form">
     <div class="form">
@@ -122,6 +149,49 @@
         <dil-form :formId="364" v-model="form1" ref="from1"></dil-form>
         <dil-form :formId="364" v-model="form1" ref="from1"></dil-form>
       </div>
       </div>
     </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">
     <div class="button_box_domestic">
       <el-button @click="cancel">取消</el-button>
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" :loading="isLoading" @click="makeSure"
       <el-button type="primary" :loading="isLoading" @click="makeSure"
@@ -154,9 +224,10 @@ export default {
       //采购订单号
       //采购订单号
       purchaseOrderNo: null,
       purchaseOrderNo: null,
       //物资名称
       //物资名称
-      materialName: null,
+      materialName: '',
       //发货单位名称
       //发货单位名称
-      supplierName: null,
+      supplierName: '',
+      resultForeignShipName:'',
       //发货单位id
       //发货单位id
       supplierId: null,
       supplierId: null,
       //物资id
       //物资id
@@ -172,6 +243,7 @@ export default {
       a: 1,
       a: 1,
       direction: "rtl",
       direction: "rtl",
       inputText: "",
       inputText: "",
+      index:null,
       frist: {
       frist: {
         requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
         requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
         selectionType: "radio",
         selectionType: "radio",
@@ -187,6 +259,13 @@ export default {
         requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
         requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
         selectionType: "radio"
         selectionType: "radio"
       },
       },
+      purchaseOption:{
+         // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/findPurchaseOrderList?apiId=81",
+        // 控制选择单列
+        selectionType: "radio",
+        pageSize:5,
+      },
       sendStationId: null,
       sendStationId: null,
       toTheStationId: 1,
       toTheStationId: 1,
       sendStation: null,
       sendStation: null,
@@ -276,10 +355,14 @@ export default {
     // 确定
     // 确定
     makeSure() {
     makeSure() {
       let that = this;
       let that = this;
+      let selection=this.$refs.importExcel.selection;
       this.isLoading = true;
       this.isLoading = true;
+      //校验
       if (
       if (
         this.tableData.length <= 0 ||
         this.tableData.length <= 0 ||
         !this.toTheStationId ||
         !this.toTheStationId ||
+        !selection ||
+        selection.length<=0 ||
         !this.form1.resultLoadingDate
         !this.form1.resultLoadingDate
       ) {
       ) {
         if (this.tableData.length <= 0) {
         if (this.tableData.length <= 0) {
@@ -287,7 +370,12 @@ export default {
             type: "warning",
             type: "warning",
             message: "请导入数据!"
             message: "请导入数据!"
           });
           });
-        } else if (!this.toTheStationId) {
+        }else if(!selection ||selection.length<=0){
+           this.$message({
+            type: "warning",
+            message: "请选择车皮!"
+          });
+        }else if (!this.toTheStationId) {
           this.$message({
           this.$message({
             type: "warning",
             type: "warning",
             message: "请选择到站!"
             message: "请选择到站!"
@@ -301,15 +389,28 @@ export default {
         this.isLoading = false;
         this.isLoading = false;
         return;
         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.resultType = 3; //装车类型为国产矿
         row.arrivalStationId = that.form1.arrivalStationId; //到站id,默认老区轨道衡
         row.arrivalStationId = that.form1.arrivalStationId; //到站id,默认老区轨道衡
         row.resultLoadingDate = sjTime(that.form1.resultLoadingDate); //装车日期
         row.resultLoadingDate = sjTime(that.form1.resultLoadingDate); //装车日期
         row.resultRemarks = that.form1.resultRemarks; //备注
         row.resultRemarks = that.form1.resultRemarks; //备注
       });
       });
       let data = {
       let data = {
-        list: this.tableData,
+        list: selection,
         userId: getCookie("userId")
         userId: getCookie("userId")
       };
       };
       console.log(data);
       console.log(data);
@@ -328,6 +429,7 @@ export default {
             message: res.data.data
             message: res.data.data
           });
           });
         }
         }
+      }).then(()=>{
         this.isLoading = false;
         this.isLoading = false;
       });
       });
     },
     },
@@ -344,7 +446,7 @@ export default {
         });
         });
         return;
         return;
       }
       }
-      this.tableData = [];
+      let excelData = [];
       var reader = new FileReader();
       var reader = new FileReader();
       var data = null;
       var data = null;
       var workbook = null;
       var workbook = null;
@@ -545,10 +647,27 @@ export default {
               });
               });
               continue;
               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); //以二进制方式读取
       reader.readAsBinaryString(file.raw); //以二进制方式读取
     },
     },
@@ -562,8 +681,56 @@ export default {
         return year + format + month + format + date
         return year + format + month + format + date
       }
       }
       return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : 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>
 </script>

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

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

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

@@ -3,24 +3,27 @@
     <page-title>返回</page-title>
     <page-title>返回</page-title>
      <div class="purchaseOrder_table">
      <div class="purchaseOrder_table">
       <div class="search" style="display:flex">
       <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
         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
       <el-button
         type="primary"
         type="primary"
         class="btn"
         class="btn"
@@ -28,12 +31,12 @@
         style="margin: 10px;">
         style="margin: 10px;">
         <i class="el-icon-search"></i>查询
         <i class="el-icon-search"></i>查询
       </el-button>
       </el-button>
-      <el-button 
+      <!-- <el-button 
       type="primary"
       type="primary"
       class="btn" 
       class="btn" 
       @click="makeSure" 
       @click="makeSure" 
       style="margin: 10px;">确认配单
       style="margin: 10px;">确认配单
-      </el-button>
+      </el-button> -->
       </div>
       </div>
       <!-- 采购订单号 -->
       <!-- 采购订单号 -->
       <dilTable
       <dilTable
@@ -68,13 +71,13 @@
       </div>
       </div>
     </div> -->
     </div> -->
     <!--待补录表格-->
     <!--待补录表格-->
-    <div class="wagonLoadbu_table">
+    <!-- <div class="wagonLoadbu_table">
       <dilTable
       <dilTable
         v-bind.sync="option"
         v-bind.sync="option"
         @selection-change="selectionChange"
         @selection-change="selectionChange"
         @row-click="selectionChange"
         @row-click="selectionChange"
       ></dilTable>
       ></dilTable>
-    </div>
+    </div> -->
     
     
     <!-- 模态窗口 -->
     <!-- 模态窗口 -->
     <!-- <el-drawer :visible.sync="drawer" :direction="direction" size="30%">
     <!-- <el-drawer :visible.sync="drawer" :direction="direction" size="30%">
@@ -147,9 +150,10 @@ export default {
       //采购订单id
       //采购订单id
       purchaseOrderId: null,
       purchaseOrderId: null,
       //物资名称
       //物资名称
-      materialName: null,
+      materialName: '',
       //发货单位名称
       //发货单位名称
-      supplierName: null,
+      supplierName: '',
+      resultForeignShipName:'',
       //发货单位id
       //发货单位id
       supplierId: null,
       supplierId: null,
       //物资id
       //物资id
@@ -304,19 +308,11 @@ export default {
     },
     },
     searchOrder(){
     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=
         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) {
     onClick(a) {
       if (a == 1) {
       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)=>{
       this.axios.post('/api/v1/tms/getResultType?apiId=58&resultType=1&con='+this.input).then((res)=>{
         console.log(res);
         console.log(res);
         if(res.data.code == "200"){
         if(res.data.code == "200"){
-          this.tableData=res.data.data.list;
+          this.tableData=res.data.data;
         }else {
         }else {
           this.$message({
           this.$message({
               type: "error", 
               type: "error", 

+ 4 - 14
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -67,7 +67,7 @@
           @row-click="rowClick"
           @row-click="rowClick"
           :data="tableData"
           :data="tableData"
           :row-style="{height:'40px'}"
           :row-style="{height:'40px'}"
-          style="width: 1000px;font-size: 18px">
+          style="width: 100%;font-size: 18px">
         <el-table-column
         <el-table-column
           type="selection"
           type="selection"
           width="40px">
           width="40px">
@@ -117,6 +117,7 @@
     <div
     <div
       class="right"
       class="right"
       style="margin-top:10px;
       style="margin-top:10px;
+            margin-left:10px;
            float:right;"
            float:right;"
     >
     >
       <div class="form">
       <div class="form">
@@ -623,26 +624,16 @@ export default {
         }
         }
         //绑定数据
         //绑定数据
         rows.forEach((row, index) => {
         rows.forEach((row, index) => {
-          let carNumber = row["车皮号"];
-          if (typeof carNumber != "undefined" && carNumber.length == 7) {
-            //车皮号表
-            let map = {};
-            map.wagonNo = carNumber;
             //表格数据
             //表格数据
             let temp = {
             let temp = {
               number: row["序号"],
               number: row["序号"],
               makeDate: row["制票日期"],
               makeDate: row["制票日期"],
               materialName: row["品名"],
               materialName: row["品名"],
-              wagonNo: row["车皮号"],
+              wagonNo: row["车皮号"]+"",
               mineral: row["矿种"],
               mineral: row["矿种"],
               wagonWeight: row["标重"]
               wagonWeight: row["标重"]
             };
             };
             that.tableData.push(temp);
             that.tableData.push(temp);
-          } else {
-            let errorNumb = index + 1;
-            console.log("第" + errorNumb + "行车皮号异常!");
-            return;
-          }
         });
         });
       };
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取
       reader.readAsBinaryString(file.raw); //以二进制方式读取
@@ -796,8 +787,7 @@ export default {
     display: flex;
     display: flex;
     .form_box {
     .form_box {
       width: 340px;
       width: 340px;
-      margin-left: 20%;
-      margin-right: 200px;
+      margin-left:10px;
       .el-form {
       .el-form {
         .preview-group {
         .preview-group {
           .el-form-item {
           .el-form-item {

+ 7 - 0
src/views/TMS/router/index.js

@@ -230,6 +230,7 @@ import addThreeSectionHandleFee from "../components/bmsship/addThreeSectionHandl
 import editThreeSectionHandleFee from "../components/bmsship/editThreeSectionHandleFee.vue";
 import editThreeSectionHandleFee from "../components/bmsship/editThreeSectionHandleFee.vue";
 import threeSectionFee from "../components/bmsship/threeSectionFee.vue";
 import threeSectionFee from "../components/bmsship/threeSectionFee.vue";
 import addThreeSectionFee from "../components/bmsship/addThreeSectionFee.vue";
 import addThreeSectionFee from "../components/bmsship/addThreeSectionFee.vue";
+import editThreeSectionFee from "../components/bmsship/editThreeSectionFee.vue";
 import moistureDetection from "../components/bmsship/moistureDetection.vue";
 import moistureDetection from "../components/bmsship/moistureDetection.vue";
 import addMoistureDetection from "../components/bmsship/addMoistureDetection.vue";
 import addMoistureDetection from "../components/bmsship/addMoistureDetection.vue";
 Vue.use(Router);
 Vue.use(Router);
@@ -1446,6 +1447,12 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-jggl" },
         meta: { code: "xtpzgl-jggl" },
         component: addThreeSectionFee
         component: addThreeSectionFee
       },
       },
+      {
+        path: "editThreeSectionFee/:resultId",
+        name: "editThreeSectionFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: editThreeSectionFee
+      },
       {
       {
         path: "addMoistureDetection",
         path: "addMoistureDetection",
         name: "addMoistureDetection",
         name: "addMoistureDetection",

+ 112 - 89
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -47,18 +47,17 @@
       <div class="form_box">
       <div class="form_box">
         <el-form>
         <el-form>
           <div class="preview-group">
           <div class="preview-group">
-              <el-form-item label="发货港口:">
-                 <el-select
-                 v-model="portId"
-                 filterable >
-                  <el-option
-                    v-for="port in ports"
-                    :key="port.portId"
-                    :label="port.portName"
-                    :value="port.portId">
-                  </el-option>
-                </el-select>
-              </el-form-item>
+            <el-form-item label="发货港口:">
+              <el-select v-model="portId" filterable>
+                <el-option
+                  v-for="port in ports"
+                  :key="port.portId"
+                  :label="port.portName"
+                  :value="port.portId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
           </div>
           </div>
         </el-form>
         </el-form>
         <dil-form
         <dil-form
@@ -178,7 +177,9 @@
     <!-- 确定和取消 -->
     <!-- 确定和取消 -->
     <div class="button_box">
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
@@ -191,12 +192,12 @@ export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
     return {
     return {
-      isLoading:false,
+      isLoading: false,
       a: 1,
       a: 1,
       cargoPictureUrl: "",
       cargoPictureUrl: "",
       shippingCertificate: "",
       shippingCertificate: "",
-      portId:null,
-      ports:[],
+      portId: null,
+      ports: [],
       materialType: "",
       materialType: "",
       receiver: "",
       receiver: "",
       input: "",
       input: "",
@@ -232,9 +233,20 @@ export default {
       value6: undefined,
       value6: undefined,
       value7: undefined,
       value7: undefined,
       value8: undefined,
       value8: undefined,
-      batchIds:null,
+      batchIds: null,
+      portName: null,
     };
     };
   },
   },
+  computed: {
+    contactPerson() {
+      return this.form1.resultContactPerson;
+    },
+  },
+  watch: {
+    contactPerson() {
+      this.getPersonInfo();
+    },
+  },
   mounted() {
   mounted() {
     // this.$set(this.form1, "requesterGroupId", 1); //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
     // this.$set(this.form1, "requesterGroupId", 1); //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
     // this.$set(this.form1, "carrierId", 11);
     // this.$set(this.form1, "carrierId", 11);
@@ -242,27 +254,46 @@ export default {
   },
   },
   methods: {
   methods: {
     //查询所有港口
     //查询所有港口
-    getPorts(){
+    getPorts() {
       this.axios.post("/api/v1/rms/getPortName?index=").then((res) => {
       this.axios.post("/api/v1/rms/getPortName?index=").then((res) => {
-          if (res.data.code == 200) {
-            //赋值
-            this.ports=res.data.data;
-          } else {
-            this.$message({
-              type: "warning",
-              message: res.data.data,
-            });
-          }
+        if (res.data.code == 200) {
+          //赋值
+          this.ports = res.data.data;
+        } else {
+          this.$message({
+            type: "warning",
+            message: res.data.data,
+          });
+        }
+      });
+    },
+
+    getPersonInfo() {
+      this.axios
+        .post(
+          "/api/v1/tms/getNoticeContactNumberByPerson?personName=" +
+            this.form1.resultContactPerson
+        )
+        .then((res) => {
+          // this.$set(this.form1, "resultContactPerson", res.data.data.personName);
+          this.$set(
+            this.form1,
+            "resultTelephoneFax",
+            res.data.data.personPhone
+          );
+          console.log(this.form1);
         });
         });
     },
     },
+
     upCLick(val) {
     upCLick(val) {
       this.num = val;
       this.num = val;
     },
     },
+
     beforeUpload(file) {
     beforeUpload(file) {
       this.upBool = true;
       this.upBool = true;
-      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      const isLt2M = file.size < 1024 * 1024 * 3;
       if (!isLt2M) {
       if (!isLt2M) {
-        this.$message.error("上传文件大小不能超过500kb!");
+        this.$message.error("上传文件大小不能超过3MB!");
       } else {
       } else {
         let size = file.size / 1024;
         let size = file.size / 1024;
         let _URL = window.URL || window.webkitURL;
         let _URL = window.URL || window.webkitURL;
@@ -271,6 +302,7 @@ export default {
       }
       }
       return isLt2M;
       return isLt2M;
     },
     },
+
     onError(err) {
     onError(err) {
       if (this.upBool) {
       if (this.upBool) {
         if (this.num == 1) {
         if (this.num == 1) {
@@ -280,6 +312,7 @@ export default {
         }
         }
       }
       }
     },
     },
+
     handleAvatarSuccess(res, file) {
     handleAvatarSuccess(res, file) {
       if (res.code) {
       if (res.code) {
         this.upBool = false;
         this.upBool = false;
@@ -301,10 +334,7 @@ export default {
       // 清空当前输入框中的数据
       // 清空当前输入框中的数据
       this.input = "";
       this.input = "";
     },
     },
-    // currentRadioChange1(selection) {
-    //   (this.second.mapList1 = selection),
-    //     (this.materialName = selection.materialName);
-    // },
+
     currentRadioChange2(selection) {
     currentRadioChange2(selection) {
       (this.second1.mapList2 = selection), (this.cargo = selection.cargoName);
       (this.second1.mapList2 = selection), (this.cargo = selection.cargoName);
     },
     },
@@ -317,11 +347,14 @@ export default {
     },
     },
     currentRadioChange5(selection) {
     currentRadioChange5(selection) {
       (this.second5.mapList5 = selection),
       (this.second5.mapList5 = selection),
-        (this.batchIds = selection.foreignShipName+""+selection.materialName);
+        (this.batchIds =
+          selection.foreignShipName + "" + selection.materialName);
     },
     },
+
     onchange(val) {},
     onchange(val) {},
+
     onclick(a) {
     onclick(a) {
-    if (a == 2) {
+      if (a == 2) {
         this.second1.requestUrl =
         this.second1.requestUrl =
           "/api/v1/tms/selectShippeByName?apiId=215&con=" + this.input;
           "/api/v1/tms/selectShippeByName?apiId=215&con=" + this.input;
       } else if (a == 3) {
       } else if (a == 3) {
@@ -331,8 +364,8 @@ export default {
         // console.log("aaaa");
         // console.log("aaaa");
         this.second3.requestUrl =
         this.second3.requestUrl =
           "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.input;
           "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.input;
-      }else if(a==5){
-         this.second5.requestUrl =
+      } else if (a == 5) {
+        this.second5.requestUrl =
           "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.input;
           "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.input;
       }
       }
     },
     },
@@ -340,58 +373,49 @@ export default {
     handleClose(done) {
     handleClose(done) {
       done();
       done();
     },
     },
+
     makeSure() {
     makeSure() {
-      // if (this.second.mapList1.length == 0) {
-      //   this.$message.warning("请选择物资");
-      //   return;
-      // }
-      // if (this.second1.mapList2.length == 0) {
-      //   this.$message.warning("请选择送达单位");
-      //   return;
-      // }
-      this.isLoading=true;
+      this.isLoading = true;
       if (this.second2.mapList3.length == 0) {
       if (this.second2.mapList3.length == 0) {
         this.$message.warning("请选择收货人");
         this.$message.warning("请选择收货人");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (this.second3.mapList4.length == 0) {
       if (this.second3.mapList4.length == 0) {
         this.$message.warning("请选择物资品类");
         this.$message.warning("请选择物资品类");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (this.second5.mapList5.length == 0) {
       if (this.second5.mapList5.length == 0) {
         this.$message.warning("请选择批次");
         this.$message.warning("请选择批次");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
-
       //判断是否为电话号码
       //判断是否为电话号码
       function isTelePhone() {
       function isTelePhone() {
         var value2 = map.resultTelephoneFax;
         var value2 = map.resultTelephoneFax;
         //验证是否为数字
         //验证是否为数字
         var patrn = /^1[3-9]\d{9}$/;
         var patrn = /^1[3-9]\d{9}$/;
-        // var patrn2 = /^(\d{3,4}-)?\d{7,8}$/;
         if (patrn.exec(value2) == null || value2 == "") {
         if (patrn.exec(value2) == null || value2 == "") {
           return false;
           return false;
         } else {
         } else {
           return true;
           return true;
         }
         }
       }
       }
+
       //电话号码赋值
       //电话号码赋值
       var val2 = this.value2;
       var val2 = this.value2;
       let map = {
       let map = {
-        // carrierId: this.form1.carrierId, //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
-        // requesterGroupId: this.form1.requesterGroupId,
         noticeCommerceMethod: this.form1.noticeCommerceMethod,
         noticeCommerceMethod: this.form1.noticeCommerceMethod,
         noticeHandoverMethod: this.form1.noticeHandoverMethod,
         noticeHandoverMethod: this.form1.noticeHandoverMethod,
         portId: this.portId,
         portId: this.portId,
         noticePortConstructionFee: this.form1.noticePortConstructionFee,
         noticePortConstructionFee: this.form1.noticePortConstructionFee,
         noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
         noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
         noticePileFreeDays: this.form1.noticePileFreeDays,
         noticePileFreeDays: this.form1.noticePileFreeDays,
-        batchIds:this.second5.mapList5.batchId,
+        batchIds: this.second5.mapList5.batchId,
         purchaseContractUnitPrice: this.form1.purchaseContractUnitPrice,
         purchaseContractUnitPrice: this.form1.purchaseContractUnitPrice,
         purchaseContractMoisture: this.form1.purchaseContractMoisture,
         purchaseContractMoisture: this.form1.purchaseContractMoisture,
+        portName: this.portName,
         //微元素含量
         //微元素含量
         tfeContent: this.form1.tfeContent,
         tfeContent: this.form1.tfeContent,
         silicaContent: this.form1.silicaContent,
         silicaContent: this.form1.silicaContent,
@@ -405,17 +429,17 @@ export default {
         resultNumberOfLoans: this.form1.resultNumberOfLoans,
         resultNumberOfLoans: this.form1.resultNumberOfLoans,
         cargoId: this.second1.mapList2.cargoId,
         cargoId: this.second1.mapList2.cargoId,
         groupId: this.second2.mapList3.id,
         groupId: this.second2.mapList3.id,
-        inFactoryShipName: this.form1.inFactoryShipName,
-        foreignShipName:  this.second5.mapList5.foreignShipName,
+        foreignShipName: this.second5.mapList5.foreignShipName,
         materialId: this.second5.mapList5.materialId,
         materialId: this.second5.mapList5.materialId,
         materialTypeId: this.second3.mapList4.materialTypeId,
         materialTypeId: this.second3.mapList4.materialTypeId,
         isNeedPortDisCharge: this.form1.isNeedPortDisCharge,
         isNeedPortDisCharge: this.form1.isNeedPortDisCharge,
         isNeedPortFee: this.form1.isNeedPortFee,
         isNeedPortFee: this.form1.isNeedPortFee,
         isNeedBonded: this.form1.isNeedBonded,
         isNeedBonded: this.form1.isNeedBonded,
         cargoPictureUrl: this.cargoPictureUrl,
         cargoPictureUrl: this.cargoPictureUrl,
+        sulfurcontent: this.form1.sulfurcontent,
         userId: getCookie("userId"),
         userId: getCookie("userId"),
       };
       };
-      console.log(map);
+
       //判断放货数量是否为数字
       //判断放货数量是否为数字
       if (
       if (
         map.noticeCommerceMethod == null ||
         map.noticeCommerceMethod == null ||
@@ -429,26 +453,22 @@ export default {
         map.silicaContent == null ||
         map.silicaContent == null ||
         map.aluminaContent == null ||
         map.aluminaContent == null ||
         map.phosphorusContent == null ||
         map.phosphorusContent == null ||
-        map.manganeseContent == null ||
         map.resultContactPerson == null ||
         map.resultContactPerson == null ||
         map.resultTelephoneFax == null ||
         map.resultTelephoneFax == null ||
         map.resultNumberOfLoans == null ||
         map.resultNumberOfLoans == null ||
         map.portId == null ||
         map.portId == null ||
         map.groupId == null ||
         map.groupId == null ||
-        map.inFactoryShipName == null ||
         map.isNeedPortDisCharge == null ||
         map.isNeedPortDisCharge == null ||
         map.isNeedPortFee == null ||
         map.isNeedPortFee == null ||
         map.isNeedBonded == null
         map.isNeedBonded == null
-        // map.foreignShipName==null||
-        // map.materialId==null
       ) {
       ) {
         this.$message.error("存在空值!");
         this.$message.error("存在空值!");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (!isTelePhone(val2)) {
       if (!isTelePhone(val2)) {
         this.$message.warning("电话号码或传真格式不正确");
         this.$message.warning("电话号码或传真格式不正确");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -456,7 +476,7 @@ export default {
         !isNumber(map.noticePortConstructionFee)
         !isNumber(map.noticePortConstructionFee)
       ) {
       ) {
         this.$message.error("港建费金额得为数字");
         this.$message.error("港建费金额得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -464,7 +484,7 @@ export default {
         !isNumber(map.purchaseContractMoisture)
         !isNumber(map.purchaseContractMoisture)
       ) {
       ) {
         this.$message.error("合同水分得为数字");
         this.$message.error("合同水分得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -472,7 +492,7 @@ export default {
         !isNumber(map.noticePortConstructionFee)
         !isNumber(map.noticePortConstructionFee)
       ) {
       ) {
         this.$message.error("港建费金额得为数字");
         this.$message.error("港建费金额得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -480,7 +500,7 @@ export default {
         !isNumber(map.noticePileFreeDays)
         !isNumber(map.noticePileFreeDays)
       ) {
       ) {
         this.$message.error("免堆天数得为数字");
         this.$message.error("免堆天数得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
 
 
@@ -489,12 +509,12 @@ export default {
         !isNumber(map.purchaseContractUnitPrice)
         !isNumber(map.purchaseContractUnitPrice)
       ) {
       ) {
         this.$message.error("单价得为数字");
         this.$message.error("单价得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (typeof map.tfeContent != "undefined" && !isNumber(map.tfeContent)) {
       if (typeof map.tfeContent != "undefined" && !isNumber(map.tfeContent)) {
         this.$message.error("tfe含量得为数字");
         this.$message.error("tfe含量得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -502,7 +522,7 @@ export default {
         !isNumber(map.silicaContent)
         !isNumber(map.silicaContent)
       ) {
       ) {
         this.$message.error("二氧化硅含量得为数字");
         this.$message.error("二氧化硅含量得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -510,7 +530,7 @@ export default {
         !isNumber(map.aluminaContent)
         !isNumber(map.aluminaContent)
       ) {
       ) {
         this.$message.error("氧化铝含量得为数字");
         this.$message.error("氧化铝含量得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -518,7 +538,7 @@ export default {
         !isNumber(map.phosphorusContent)
         !isNumber(map.phosphorusContent)
       ) {
       ) {
         this.$message.error("含磷量得为数字");
         this.$message.error("含磷量得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       }
       }
       if (
       if (
@@ -526,25 +546,28 @@ export default {
         !isNumber(map.resultNumberOfLoans)
         !isNumber(map.resultNumberOfLoans)
       ) {
       ) {
         this.$message.error("放货数量得为数字");
         this.$message.error("放货数量得为数字");
-        this.isLoading=false;
+        this.isLoading = false;
         return;
         return;
       } else
       } else
-        this.axios.post("/api/v1/tms/insertDeliveryNotice", map).then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功",
-            });
-            this.cancel();
-          } else {
-            this.$message({
-              type: "warning",
-              message: res.data.data,
-            });
-          }
-        }).then(()=>{
-          this.isLoading=false;
-        });
+        this.axios
+          .post("/api/v1/tms/insertDeliveryNotice", map)
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功",
+              });
+              this.cancel();
+            } else {
+              this.$message({
+                type: "warning",
+                message: res.data.data,
+              });
+            }
+          })
+          .then(() => {
+            this.isLoading = false;
+          });
     },
     },
     // 取消
     // 取消
     cancel() {
     cancel() {

+ 111 - 58
src/views/appoint/components/ship/deliveryNotice.vue

@@ -26,32 +26,88 @@
       <!-- 未下发 -->
       <!-- 未下发 -->
       <el-tab-pane label="未下发" name="first">
       <el-tab-pane label="未下发" name="first">
         <dilTable v-bind.sync="option1" ref="table">
         <dilTable v-bind.sync="option1" ref="table">
-          <el-table-column fixed="right" align="center" label="操作" width="120">
+          <el-table-column
+            fixed="right"
+            align="center"
+            label="操作"
+            width="120"
+          >
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-button @click="sendClick(scope.row.noticeId)" type="text" size="small">
+              <el-button
+                @click="sendClick(scope.row.noticeId)"
+                type="text"
+                size="small"
+              >
                 下发
                 下发
               </el-button>
               </el-button>
-              <el-button @click="modifyclick(scope.row.noticeId)" type="text" size="small">
+              <el-button
+                @click="modifyclick(scope.row.noticeId)"
+                type="text"
+                size="small"
+              >
                 修改
                 修改
               </el-button>
               </el-button>
-              <el-button @click="deleteclick(scope.row.noticeId)" type="text" size="small">
+              <el-button
+                @click="deleteclick(scope.row.noticeId)"
+                type="text"
+                size="small"
+              >
                 删除
                 删除
               </el-button>
               </el-button>
-              <el-button @click="toPhotoClick(scope.row.noticeId)" type="text" size="small">
-                货权转移图片</el-button>
+              <el-button
+                @click="toPhotoClick(scope.row.noticeId)"
+                type="text"
+                size="small"
+              >
+                货权转移图片</el-button
+              >
             </template>
             </template>
           </el-table-column>
           </el-table-column>
         </dilTable>
         </dilTable>
       </el-tab-pane>
       </el-tab-pane>
       <!-- 已下发 -->
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
       <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2"> </dilTable>
+        <dilTable v-bind.sync="option2">
+          <el-table-column
+            fixed="right"
+            align="center"
+            label="操作"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="toPhotoClick(scope.row.noticeId)"
+                type="text"
+                size="small"
+              >
+                货权转移图片</el-button
+              >
+            </template>
+          </el-table-column>
+        </dilTable>
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
-     <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
       <div class="demo-image__preview">
       <div class="demo-image__preview">
+        <div
+          class="href"
+          style="
+            margin-left: 80px;
+            text-align: center;
+            font-family: fangsong;
+            font-weight: 300;
+            font-size:18px;
+          "
+        >
+          如果加载失败,请尝试<a
+            style="color: red"
+            :href="src"
+            download="货权转移.pdf"
+            >点此下载pdf</a
+          >
+        </div>
         <el-image
         <el-image
-          style=" height:731px;text-align:center"
+          style="height: 731px; text-align: center"
           :src="src"
           :src="src"
           :preview-src-list="srcList"
           :preview-src-list="srcList"
         >
         >
@@ -67,9 +123,9 @@ export default {
   name: "homeworkPath",
   name: "homeworkPath",
   data() {
   data() {
     return {
     return {
-      srcList:[],
-      isShow:false,
-      src:"",
+      srcList: [],
+      isShow: false,
+      src: "",
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
       // restaurants: [],
       // restaurants: [],
@@ -77,12 +133,12 @@ export default {
       activeName: "first",
       activeName: "first",
       option1: {
       option1: {
         // 表格请求数据的地址
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0"
+        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0",
       },
       },
       option2: {
       option2: {
         // 表格请求数据的地址
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1"
-      }
+        requestUrl: "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1",
+      },
     };
     };
   },
   },
   methods: {
   methods: {
@@ -95,45 +151,44 @@ export default {
       if (this.endTime) {
       if (this.endTime) {
         endTime = sjTime(this.endTime);
         endTime = sjTime(this.endTime);
       }
       }
-      if(startTime && endTime && startTime < endTime){
-          if (this.activeName == "first") {
+      if (startTime && endTime && startTime < endTime) {
+        if (this.activeName == "first") {
           this.option1.requestUrl =
           this.option1.requestUrl =
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
             getCookie("userId") +
             getCookie("userId") +
             "&con=" +
             "&con=" +
             this.input +
             this.input +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime;  
-          } else{
-              this.option2.requestUrl =
-                "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
-                getCookie("userId") +
-                "&con=" +
-                this.input+
-                "&startTime=" +
-                startTime +
-                "&endTime=" +
-                endTime;  
-          }
-      }else{
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime;
+        } else {
+          this.option2.requestUrl =
+            "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime;
+        }
+      } else {
         if (this.activeName == "first") {
         if (this.activeName == "first") {
-            this.option1.requestUrl =
-              "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
-              getCookie("userId") +
-              "&con=" +
-              this.input;  
-        } else{
-            this.option2.requestUrl =
-              "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
-              getCookie("userId") +
-              "&con=" +
-              this.input;
+          this.option1.requestUrl =
+            "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
+        } else {
+          this.option2.requestUrl =
+            "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
         }
         }
       }
       }
-      
-     },
+    },
     addClick() {
     addClick() {
       this.$router.push("/addDeliveryNotice/");
       this.$router.push("/addDeliveryNotice/");
     },
     },
@@ -146,7 +201,7 @@ export default {
         confirmButtonText: "确定",
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         cancelButtonText: "取消",
         type: "warning",
         type: "warning",
-        center: true
+        center: true,
       })
       })
         .then(() => {
         .then(() => {
           this.axios
           this.axios
@@ -154,7 +209,7 @@ export default {
             .then(() => {
             .then(() => {
               this.$message({
               this.$message({
                 type: "success",
                 type: "success",
-                message: "删除成功!"
+                message: "删除成功!",
               });
               });
               this.option1.requestUrl =
               this.option1.requestUrl =
                 "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&i=" +
                 "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&i=" +
@@ -164,17 +219,15 @@ export default {
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
             type: "info",
             type: "info",
-            message: "取消删除!"
+            message: "取消删除!",
           });
           });
         });
         });
     },
     },
 
 
-
     toPhotoClick(noticeId) {
     toPhotoClick(noticeId) {
       this.axios
       this.axios
         .post("/api/v1/tms/downLoadDeilveryNotice?noticeId=" + noticeId)
         .post("/api/v1/tms/downLoadDeilveryNotice?noticeId=" + noticeId)
-        .then(res => {
-          console.log("res",res.data.data);
+        .then((res) => {
           this.srcList = [];
           this.srcList = [];
           this.src = res.data.data;
           this.src = res.data.data;
           this.isShow = true;
           this.isShow = true;
@@ -191,7 +244,7 @@ export default {
         confirmButtonText: "确定",
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         cancelButtonText: "取消",
         type: "warning",
         type: "warning",
-        center: true
+        center: true,
       })
       })
         .then(() => {
         .then(() => {
           this.axios
           this.axios
@@ -199,7 +252,7 @@ export default {
             .then(() => {
             .then(() => {
               this.$message({
               this.$message({
                 type: "success",
                 type: "success",
-                message: "下发成功!"
+                message: "下发成功!",
               });
               });
               this.option1.requestUrl =
               this.option1.requestUrl =
                 "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&i=" +
                 "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&i=" +
@@ -212,14 +265,14 @@ export default {
         .catch(() => {
         .catch(() => {
           this.$message({
           this.$message({
             type: "info",
             type: "info",
-            message: "取消下发!"
+            message: "取消下发!",
           });
           });
         });
         });
     },
     },
-    refresh(){
+    refresh() {
       this.$router.go(0);
       this.$router.go(0);
-    }
-  }
+    },
+  },
 };
 };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 2 - 2
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -265,9 +265,9 @@ export default {
     },
     },
     beforeUpload(file) {
     beforeUpload(file) {
       this.upBool = true;
       this.upBool = true;
-      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      const isLt2M = file.size < 1024 * 1024 * 3;
       if (!isLt2M) {
       if (!isLt2M) {
-        this.$message.error("上传文件大小不能超过500kb!");
+        this.$message.error("上传文件大小不能超过3M!");
       } else {
       } else {
         let size = file.size / 1024;
         let size = file.size / 1024;
         let _URL = window.URL || window.webkitURL;
         let _URL = window.URL || window.webkitURL;

+ 455 - 0
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -0,0 +1,455 @@
+//站台库存信息一览表
+<template>
+  <div id="platformStockInfo">
+    <div class="head">
+      <!-- //需要一个日期查询框 -->
+      <el-form :inline="true">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >入库时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:150px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:200px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="main">
+      <el-table
+        :data="tableData"
+        ref="tableRef"
+        border
+        stripe
+        style="width: 100%; margin-top: 20px"
+        max-height="800px"
+        :row-style="{ height: '30px' }"
+        :cell-style="{ fontWeight: '700' }"
+        class="table"
+        :span-method="objectSpanMethod"
+      >
+        <el-table-column
+          prop="index"
+          width="50"
+          label="序号"
+          align="center"
+          fixed="left"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="saleNo"
+          label="单据编号"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleRemark"
+          label="摘要"
+          width="120px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="sendStation"
+          label="发站"
+          width="120px"
+          align="center"
+          column-key="sendStation"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+          <template slot-scope="scope">
+            <el-select size="mini" v-model="scope.row.sendStationId">
+              <el-option
+                v-for="item in sendStationList"
+                :key="item.sendStationId"
+                :label="item.sendStation"
+                :value="item.sendStationId"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="toTheStation"
+          label="到站"
+          width="120px"
+          align="center"
+          column-key="toTheStation"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="receiveName"
+          label="收货单位"
+          width="300px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              class="inline-input"
+              v-model="scope.row.receiveName"
+              :fetch-suggestions="querySearchConsignee"
+              placeholder="请输入收货单位名称"
+              :trigger-on-focus="false"
+              @select="handleSelectConsignee(scope.row, scope.$index)"
+            >
+              <template slot-scope="{ item }">
+                <div class="name">{{ item.consigneeCompanyName }}</div>
+              </template>
+            </el-autocomplete>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="transInDep"
+          label="调入部门"
+          width="120px"
+          align="center"
+          column-key="transInDep"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transOutDep"
+          label="调出部门"
+          width="120px"
+          align="center"
+          column-key="transOutDep"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="transInWarehouse"
+          label="调入仓库"
+          width="120px"
+          align="center"
+          column-key="transInWarehouse"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          label="物资名称"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpa"
+          label="规格"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="件数"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialWeight"
+          label="重量"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="operate"
+          label="操作"
+          align="center"
+          width="150px"
+          fixed="right"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" @click="operate(scope.row)">保存</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+//需要设计-发站、移库/直发的表格筛选传递给后端
+//需要设计-件数,重量,理重,标重,计费吨位的合计
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      options: [
+        {
+          value: "发站",
+          lable: "发站"
+        },
+        {
+          value: "收货单位",
+          lable: "收货单位"
+        }
+      ],
+      input: null,
+      tableData: [],
+      screen: null,
+      //需要合并的列集合
+      mergeList: [
+        "saleNo",
+        "saleRemark",
+        "sendStation",
+        "toTheStation",
+        "receiveName",
+        "index",
+        "operate"
+      ],
+      spanArr: [],
+      pos: null,
+      sendStationList: [],
+      //收货客户列表
+      consigneeList: []
+    };
+  },
+  created() {
+    this.getRequestUrl();
+  },
+  mounted() {
+    this.information();
+  },
+  methods: {
+    handleSelectConsignee(row, index, item) {
+      this.consigneeList.forEach(e => {
+        if (e.consigneeCompanyName == row.receiveName) {
+          row.consigneeId = e.consigneeId;
+        }
+      });
+    },
+    //以下是收货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      if (queryString.length > 3) {
+        this.axios
+          .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
+          .then(res => {
+            if (res.data.code == "200") {
+              console.log(res);
+              var restaurantsConsignee = res.data.data;
+              this.consigneeList = res.data.data;
+              var results = queryString
+                ? restaurantsConsignee.filter(
+                    this.createFilterConsignee(queryString)
+                  )
+                : restaurantsConsignee;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilterConsignee(queryString) {
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    //获取发站信息
+    information() {
+      this.axios.get("/api/v1/uc/getInwardSendStation").then(res => {
+        console.log(res.data.data);
+        this.sendStationList = res.data.data;
+      });
+    },
+    //合并行
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderId === data[i - 1].saleOrderId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    operate(row) {
+      this.axios
+        .post("/api/v1/ams/updateInwardConsignee", row)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("保存成功");
+            this.getRequestUrl();
+          } else {
+            this.$message.error(res.data.data);
+            this.getRequestUrl();
+          }
+        })
+        .catch(e => {
+          this.$message.error(e);
+          this.getRequestUrl();
+        });
+    },
+    //查询事件
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.axios
+        .post(
+          "/api/v1/oms/getKucunList?startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.getSpanArr(this.tableData);
+        });
+    },
+    //获取后台数据
+    getRequestUrl() {
+      this.axios
+        .post(
+          "/api/v1/ams/getKucunList?startTime=null&endTime=null&i=" + new Date()
+        )
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+          this.getSpanArr(this.tableData);
+        });
+    },
+    //刷新
+    refresh() {
+      this.getRequestUrl();
+    },
+    //筛选发站
+    filterSend(value, row, column) {
+      return row.sendStation === value;
+    },
+    //导出Excel
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      console.log(this.$refs.tableRef);
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
+    }
+  }
+};
+</script>
+<style lang="scss">
+#platformStockInfo {
+  .head {
+    margin-top: 20px;
+    margin-left: 20px;
+  }
+  .main {
+    margin-top: 20px;
+    margin-left: 20px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
+}
+</style>

+ 467 - 0
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -0,0 +1,467 @@
+//站台库存信息一览表
+<template>
+  <div id="platformStockInfo">
+    <div class="head">
+      <!-- //需要一个日期查询框 -->
+      <el-form :inline="true">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >入库时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width:200px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:150px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:200px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="main">
+      <el-table
+        :data="tableData"
+        ref="tableRef"
+        border
+        stripe
+        style="width: 100%; margin-top: 20px"
+        max-height="800px"
+        :row-style="{ height: '30px' }"
+        :cell-style="{ fontWeight: '700' }"
+        :summary-method="getSummaries"
+        show-summary
+        class="table"
+      >
+        <el-table-column width="50" label="序号" align="center" type="index">
+        </el-table-column>
+        <el-table-column
+          prop="sendStation"
+          label="发站"
+          width="120px"
+          align="center"
+          column-key="sendStation"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="收货客户"
+          width="300px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderType"
+          label="直发/移库"
+          width="120px"
+          align="center"
+          :filters="[
+            { text: '移库', value: '移库' },
+            { text: '直发', value: '直发' }
+          ]"
+          :filter-method="filterType"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="arrivalStation"
+          label="到站"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityNum"
+          label="车牌号"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          label="物资名称"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpa"
+          label="规格"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="件数"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialWeight"
+          label="重量"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="theoryWeight"
+          label="理重"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderNum"
+          label="运输订单号"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="EnStation"
+          label="进站日期"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope" v-if="scope.row.gridId != null">
+            <el-date-picker
+              v-model="scope.row.EnStation"
+              type="date"
+              placeholder="选择进站日期"
+            >
+            </el-date-picker>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="wagonNo"
+          label="发出车号"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope" v-if="scope.row.gridId != null">
+            <el-input v-model.number="scope.row.wagonNo" placeholder="发出车号">
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="wagonWeight"
+          label="标重"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope" v-if="scope.row.gridId != null">
+            <el-input v-model.number="scope.row.wagonWeight" placeholder="标重">
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="wagonBillWeight"
+          label="计费吨位"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope" v-if="scope.row.gridId != null">
+            <el-input
+              v-model.number="scope.row.wagonBillWeight"
+              placeholder="计费吨位"
+            >
+            </el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="OutStation"
+          label="发出日期"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope" v-if="scope.row.gridId != null">
+            <el-date-picker
+              v-model="scope.row.OutStation"
+              type="date"
+              placeholder="选择发出日期"
+            >
+            </el-date-picker>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="number"
+          label="票号"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="wgmDelete"
+          label="状态"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="150px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="operate(scope.row)">保存</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+//需要设计-发站、移库/直发的表格筛选传递给后端
+//需要设计-件数,重量,理重,标重,计费吨位的合计
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      options: [
+        {
+          value: "发站",
+          lable: "发站"
+        },
+        {
+          value: "收货单位",
+          lable: "收货单位"
+        }
+      ],
+      input: null,
+      tableData: [],
+      screen: null,
+      sumList: [
+        "wagonBillWeight",
+        "wagonWeight",
+        "theoryWeight",
+        "materialWeight",
+        "materialNum"
+      ],
+      operateName: "编辑"
+    };
+  },
+  created() {
+    this.getRequestUrl();
+  },
+  mounted() {
+    this.showSummariesPosition();
+  },
+  methods: {
+    operate(row) {
+      row.personnelSsoId = getCookie("userId");
+      if (
+        (typeof row.EnStation == "object" ||
+          typeof row.EnStation == "string") &&
+        row.EnStation != null
+      ) {
+        row.EnStation = sjTime(new Date(row.EnStation));
+      }
+      if (
+        (typeof row.OutStation == "object" ||
+          typeof row.OutStation == "string") &&
+        row.OutStation != null
+      ) {
+        row.OutStation = sjTime(new Date(row.OutStation));
+      }
+      console.log(typeof row.EnStation);
+      console.log(typeof row.OutStation);
+      this.axios
+        .post("/api/v1/wms/afterInwardOutbound", row)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("保存成功");
+            this.getRequestUrl();
+          } else {
+            this.$message.error(res.data.data);
+            this.getRequestUrl();
+          }
+        })
+        .catch(e => {
+          this.$message.error(e);
+          this.getRequestUrl();
+        });
+    },
+    //查询事件
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.axios
+        .post(
+          "/api/v1/oms/getWagonShippingDetails?startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.showSummariesPosition();
+        });
+    },
+    //获取后台数据
+    getRequestUrl() {
+      this.axios
+        .post(
+          "/api/v1/oms/getWagonShippingDetails?startTime=null&endTime=null&i=" +
+            new Date()
+        )
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+          this.showSummariesPosition();
+        });
+    },
+    //刷新
+    refresh() {
+      this.getRequestUrl();
+    },
+    //筛选发站
+    filterSend(value, row, column) {
+      return row.sendStation === value;
+    },
+    //筛选类型
+    filterType(value, row, column) {
+      return row.orderType === value;
+    },
+    //将合计行置顶
+    showSummariesPosition() {
+      const table = document.querySelector(".table");
+      const footer = document.querySelector(".table .el-table__footer-wrapper");
+      const body = document.querySelector(".table .el-table__body-wrapper");
+      table.removeChild(footer); // 移除表格最下方的合计行
+      table.insertBefore(footer, body); // 把合计行插入到表格body的上面
+    },
+    //表尾合计行
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        if (this.sumList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+            sums[index];
+          } else {
+            sums[index] = "N/A";
+          }
+        }
+        //遍历数组,找到符合条件的列
+      });
+
+      return sums;
+    },
+    //导出Excel
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      console.log(this.$refs.tableRef);
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
+    }
+  }
+};
+</script>
+<style lang="scss">
+#platformStockInfo {
+  .head {
+    margin-top: 20px;
+    margin-left: 20px;
+  }
+  .main {
+    margin-top: 20px;
+    margin-left: 20px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
+}
+</style>

+ 1431 - 0
src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckOrder.vue

@@ -0,0 +1,1431 @@
+<!-- 内转钢材到异地库派单界面 -->
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="tableTop">
+      <el-form :inline="true" style="margin-top: 5px">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            @change="changeScreen"
+            style="width: 150px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width: 200px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto"
+            >订单时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width: 200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            style="width: 200px"
+          >
+          </el-date-picker>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <span style="margin-left: 1rem">合计车数:</span>
+          <el-input
+            v-model="totalCapacity"
+            :disabled="true"
+            style="width: 100px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span style="margin-left: 1rem">合计件数:</span>
+          <el-input
+            v-model="totalNumber"
+            :disabled="true"
+            style="width: 100px"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        ref="tableRef"
+        border
+        stripe
+        style="width: 100%; margin-top: 20px"
+        max-height="800px"
+        @cell-click="cellClik"
+        :row-style="{ height: '30px' }"
+        :cell-style="{ fontWeight: '700' }"
+      >
+        <el-table-column
+          width="50"
+          label="序号"
+          align="center"
+          fixed="left"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="下单客户"
+          :width="flexColumnWidth('consigneeName', tableData, 'max')"
+          align="center"
+          fixed
+        >
+        </el-table-column>
+        <el-table-column
+          prop="carrierName"
+          label="承运商"
+          align="center"
+          width="250px"
+          fixed
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              style="width: 120px"
+              v-model="scope.row.carrierName"
+              :fetch-suggestions="querySearchCarrier"
+              placeholder="请输入承运商"
+              @select="handleSelectCarrier(scope.row, scope.$index)"
+              :disabled="scope.row.isCarrierShow != 1"
+            >
+            </el-autocomplete>
+            <el-button
+              @click="updateTruckCarrier(scope.row)"
+              type="primary"
+              v-if="scope.row.isCarrierShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="capacityNo"
+          column-key="capacityNo"
+          label="车牌号"
+          align="center"
+          width="250px"
+          fixed
+        >
+          <template slot-scope="scope">
+            <el-autocomplete
+              style="width: 120px"
+              v-model="scope.row.capacityNo"
+              :fetch-suggestions="querySearch"
+              placeholder="请输入车牌号"
+              @select="handleSelect(scope.row, scope.$index)"
+              :disabled="scope.row.isCapacityShow != 1"
+            ></el-autocomplete>
+            <el-button
+              @click="updateCapacity(scope.row)"
+              type="primary"
+              v-if="scope.row.isCapacityShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="lineName"
+          column-key="lineName"
+          label="路线"
+          align="center"
+          width="250px"
+          fixed
+        >
+          <!-- 选择路线 -->
+          <template slot-scope="scope">
+            <el-autocomplete
+              style="width: 120px"
+              v-model="scope.row.lineName"
+              :fetch-suggestions="querySearchLineName"
+              placeholder="请选择路线"
+              @select="handleSelectLine(scope.row, scope.$index)"
+              :disabled="scope.row.isLineName != 1"
+            >
+            
+            </el-autocomplete>
+            <el-button
+              @click="updateLine(scope.row)"
+              type="primary"
+              v-if="scope.row.isLineName == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          label="物资名称"
+          align="center"
+          width="150px"
+        >
+        </el-table-column>
+        <el-table-column prop="materialSpe" label="物资规格" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="物资件数"
+          align="center"
+          width="150px"
+        >
+          <template slot-scope="scope">
+            <button
+              type="primary"
+              @click="scope.row.materialNum--"
+              v-if="scope.row.isNumShow == 1"
+              style="height: 40px"
+            >
+              -
+            </button>
+            <input
+              v-model="scope.row.materialNum"
+              disabled
+              style="
+                width: 40px;
+                height: 40px;
+                font-size: 16px;
+                line-height: 40px;
+                text-align: center;
+              "
+            />
+            <el-button
+              type="primary"
+              @click="updateBillOrder(scope.row)"
+              v-if="scope.row.isNumShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="addressPlace"
+          label="收货地址"
+          :width="flexColumnWidth('addressPlace', tableData, 'max')"
+        >
+          <template slot-scope="scope">
+            <el-input
+              style="width: 280px"
+              v-model="scope.row.addressPlace"
+              placeholder="请输入收货地址"
+              :disabled="scope.row.isAddressShow != 1"
+            ></el-input>
+            <el-button
+              @click="updateAddress(scope.row)"
+              type="primary"
+              v-if="scope.row.isAddressShow == 1"
+              >选择</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderStatus" label="运单状态" align="center">
+        </el-table-column>
+        <el-table-column prop="grossWeight" label="毛重"> </el-table-column>
+        <el-table-column prop="grossWeightTime" label="毛重时间" width="130px">
+        </el-table-column>
+        <el-table-column prop="tareWeight" label="皮重"> </el-table-column>
+        <el-table-column prop="tareWeightTime" label="皮重时间" width="130px">
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重"> </el-table-column>
+        <el-table-column prop="entryGateTime" label="进厂时间" width="130px">
+        </el-table-column>
+        <el-table-column prop="loadTime" label="装货时间" width="130px">
+        </el-table-column>
+        <el-table-column prop="outGateTime" label="出厂时间" width="130px">
+        </el-table-column>
+        <el-table-column
+          prop="arrivalAddress"
+          label="抵达地址"
+          :width="flexColumnWidth('arrivalAddress', tableData, 'max')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="receiptAddress"
+          label="签收地址"
+          :width="flexColumnWidth('receiptAddress', tableData, 'max')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderNo"
+          label="运输订单号"
+          width="180px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityTel"
+          label="司机电话"
+          width="250px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-input
+              style="width: 120px"
+              v-model="scope.row.capacityTel"
+              placeholder="请输入电话号码"
+              :disabled="scope.row.isTelShow != 1"
+            ></el-input>
+            <el-button
+              @click="updateDriverTel(scope.row)"
+              type="primary"
+              v-if="scope.row.isTelShow == 1"
+              >提交</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column prop="saler" label="业务员" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="shipperName"
+          label="发货单位"
+          width="170px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column prop="truckNo" label="车序号"> </el-table-column>
+        <el-table-column prop="consigneeTel" label="收货客户电话" width="120px">
+        </el-table-column>
+        <el-table-column prop="isSelfMention" label="是否自提" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderNo"
+          label="销售订单号"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderStatus"
+          label="销售订单状态"
+          width="100px"
+        >
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          fixed="right"
+          width="120px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="closeEasEntryId(scope.row)"
+              v-if="scope.row.deletedStatus == null"
+              >关闭分录</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          fixed="right"
+          width="120px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="deleteEasEntryId(scope.row)"
+              v-if="
+                scope.row.carStatus == 4 ||
+                scope.row.carStatus == 5 ||
+                scope.row.carStatus == null
+              "
+              >关闭车辆</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          fixed="right"
+          width="120px"
+          align="center"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="adverseCloseSaleMaterial(scope.row)"
+              v-if="scope.row.deletedStatus != null"
+              >反关闭分录</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="address">
+      <!-- 收货地址弹出框 -->
+      <el-dialog title="收货地址" :visible.sync="drawer" width="90%">
+        <el-form :inline="true">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto">省</label>
+            <el-select
+              v-model="province"
+              filterable
+              placeholder="请选择"
+              @change="onchangeProvince"
+            >
+              <el-option
+                v-for="item in provinceList"
+                :key="item.id"
+                :label="item.addressProvince"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto">市</label>
+            <el-select
+              v-model="city"
+              filterable
+              placeholder="请选择"
+              @change="onchangeCity"
+            >
+              <el-option
+                v-for="item in cityList"
+                :key="item.id"
+                :label="item.addressDistrict"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto"
+              >县(区)</label
+            >
+            <el-select
+              v-model="county"
+              filterable
+              placeholder="请选择"
+              @change="onchangeCounty"
+            >
+              <el-option
+                v-for="item in countyList"
+                :key="item.id"
+                :label="item.addressTown"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto"
+              >具体收货地址</label
+            >
+            <el-autocomplete
+              class="inline-input"
+              v-model="place"
+              :fetch-suggestions="querySearch1"
+              placeholder="请输入具体收货地址"
+              :trigger-on-focus="false"
+              @select="handleSelect1"
+            >
+            </el-autocomplete>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="button-box">
+          <el-button @click="drawer = false">取消</el-button>
+          <el-button type="primary" @click="addAddressClick">确定</el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime, isVehicleNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      // 线路名称
+      lineName: "",
+      //线路id
+      lineId: null,
+      drawer: false,
+      clickIndex: null,
+      input: null,
+      screen: "",
+      options: [
+        {
+          value: "下单客户",
+          lable: "下单客户",
+        },
+        {
+          value: "承运商",
+          lable: "承运商",
+        },
+        {
+          value: "车牌号",
+          lable: "车牌号",
+        },
+         {
+          value: "路线",
+          lable: "路线",
+        },
+      ],
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle: "销售统计报表",
+      capacityList: [],
+      carrierList: [],
+      // 线路
+      LineList:[],
+      tableData: [],
+      spanArr: [],
+      pos: 0,
+      a: 1,
+      isCellClick: 0,
+      columnIndexs: [
+        0, 1, 2, 3, 7, 8, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+        29, 31,
+      ],
+      //钢材多拼车辆线路ID
+      //索引从1-10为1-10拼路线ID
+      // lineSpelling: [
+      //   0,
+      //   110001,
+      //   110002,
+      //   110003,
+      //   110004,
+      //   110005,
+      //   110006,
+      //   110007,
+      //   110008,
+      //   110009,
+      //   110010
+      // ],
+      tableTitle: "销售钢材统计报表",
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: "",
+      //所有市
+      cityList: [],
+      //选中的市
+      city: "",
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: "",
+      //地址输入框的值
+      addresText: "",
+      //已选中省市县
+      address: null,
+      //具体地址
+      place: null,
+      //暂存具体地址
+      place1: null,
+      //省市县Id
+      addressId: null,
+      direction: "rtl",
+      addressRow: {},
+    };
+  },
+  created() {},
+  mounted() {
+    this.getSteelReport();
+  },
+  methods: {
+    //反关闭整条分录
+    adverseCloseSaleMaterial(row) {
+      console.log(row.saleMaterialId);
+      this.$confirm("确定反关闭该条分录?", "提示", {
+        cancelButtonText: "确定",
+        confirmButtonText: "取消",
+        center: true,
+      }).then(() => {
+        this.axios
+          .post(
+            "/api/v1/ams/adverseCloseSaleMaterial?saleMaterialId=" +
+              row.saleMaterialId
+          )
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("反关闭成功");
+              this.getSteelReport();
+            } else {
+              this.$message.error("反关闭失败");
+              this.getSteelReport();
+            }
+          })
+          .catch(() => {
+            this.$message.error("反关闭失败");
+            this.getSteelReport();
+          });
+      });
+    },
+
+    //销售钢材报表导出excel
+    exportAllReportToExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      console.log(this.$refs.tableRef);
+      this.$refs.tableRef.$children.forEach((item) => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel,
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map((v) => filterVal.map((j) => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
+    },
+    changeScreen() {
+      console.log(this.screen);
+    },
+    cellClik(row, column, cell, event) {
+      if (row.group != this.clickIndex) {
+        // this.getSteelReport();
+        this.tableData.forEach((item) => {
+          if (item.group == this.clickIndex) {
+            this.$set(item, "isCapacityShow", 0);
+            this.$set(item, "isCarrierShow", 0);
+            this.$set(item, "isTelShow", 0);
+            this.$set(item, "isAddressShow", 0);
+            this.$set(item, "isNumShow", 0);
+            this.$set(item, "isLineName", 0);
+          }
+        });
+      }
+      if (column.property == "capacityNo") {
+        this.$set(row, "isCapacityShow", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "LineName") {
+        this.$set(row, "isLineName", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "carrierName") {
+        this.$set(row, "isCarrierShow", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "capacityTel") {
+        this.$set(row, "isTelShow", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "addressPlace") {
+        this.$set(row, "isAddressShow", 1);
+        this.clickIndex = row.group;
+      }
+      if (column.property == "materialNum") {
+        this.$set(row, "isNumShow", 1);
+        this.clickIndex = row.group;
+      }
+    },
+    //承运商弹出层
+    handleSelectCarrier(row, index, item) {
+      this.carrierList.forEach((item) => {
+        if (item.carrierName == row.carrierName) {
+          row.newCarrierId = item.carrierId;
+          row.carrierId = item.carrierId;
+        }
+      });
+    },
+    //承运商边输边查
+    querySearchCarrier(queryString, cb) {
+      if (queryString.length > 1) {
+        this.axios
+          .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.carrierList = [];
+              if (res.data.data.length == 0) {
+                this.$message.info("承运商不存在,请前往注册");
+                return;
+              }
+              var restaurants = res.data.data;
+              this.carrierList = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilterCarrier(queryString))
+                : restaurants;
+              cb(results);
+            }
+          });
+      }
+    },
+
+    querySearchLineName(queryString, cb) {
+      if (queryString.length > 1) {
+        this.axios
+          .post(
+            "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + queryString
+          )
+          .then((res) => {
+            console.log(res.data.data.list.length);
+            console.log(res.data.data);
+            if (res.data.code == "200") {
+              this.LineList = [];
+              if (res.data.data.list.length == 0) {
+                this.$message.info("线路不存在,请前往注册");
+                return;
+              }
+              var restaurants = res.data.data.list;
+              this.LineList = res.data.data.list;
+              console.log(this.LineList);
+              var results = queryString
+                ? restaurants.filter(this.createFilterLine(queryString))
+                : restaurants;
+              cb(results);
+            }
+          });
+      }
+    },
+    // 过滤器
+    createFilterLine(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.lineName.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+
+    createFilterCarrier(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb) {
+      if (queryString.length > 3) {
+        this.axios
+          .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+          .then((res) => {
+            this.capacityList = [];
+            if (res.data.code == "200") {
+              if (res.data.data.length == 0) {
+                this.$message.info("车牌号不存在,请前往注册");
+                return;
+              }
+              var restaurants = res.data.data;
+              this.capacityList = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter(queryString))
+                : restaurants;
+                console.log("res",+results);
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //车牌号弹出层
+    handleSelect(row, index) {
+      this.capacityList.forEach((item) => {
+        if (item.capacityNumber === row.capacityNo) {
+          row.newsCapacityId = item.capacityId;
+        }
+      });
+    },
+
+  // 线路弹出层
+  handleSelectLine(row, index) {
+      this.capacityList.forEach((item) => {
+        if (item.lineName === row.lineName) {
+          console("item",item);
+          row.newLineId = item.lineId;
+        }
+      });
+    },
+
+    updateCapacity(row) {
+      if (row.newsCapacityId == null) {
+        this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
+        return;
+      }
+      if (!isVehicleNumber(row.capacityNo)) {
+        this.$message.error("请输入正确格式的车牌号!");
+        return;
+      }
+      if (row.capacityIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: "正在变更车牌号",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)",
+        });
+        this.axios
+          .post("/api/v1/ams/updateCapacityNumberInFactory", row)
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message.success("变更车牌号成功!");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.success("变更失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.success("变更失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      } else {
+        if (row.carrierIds == 0) {
+          this.$message.error("请先选择承运商!");
+          return;
+        }
+        let i = 0;
+        this.tableData.forEach((e) => {
+          if (row.group == e.group) {
+            i++;
+          }
+        });
+        // row.lineId = this.lineSpelling[i];
+        row.driverTel = row.capacityTel;
+        row.capacityNumber = row.capacityNo;
+        let arr = [];
+        arr.push(row);
+        const loading = this.$loading({
+          lock: true,
+          text: "正在变更车牌号",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)",
+        });
+        this.axios
+          .post("/api/v1/ams/dispatchSteelOrder", arr)
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("派车成功!");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("派车失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("派车失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      }
+    },
+    //修改司机电话号码
+    updateDriverTel(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: "修改电话号码中",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+      if (row.capacityTel == null || row.capacityTel == "") {
+        this.$message.error("电话号码不能为空");
+        return;
+      }
+      this.axios
+        .post("/api/v1/uc/updateDriverTel", {
+          orderId: parseInt(row.orderId),
+          driverTel: row.capacityTel,
+        })
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.$message.success("修改成功");
+            this.getSteelReport();
+            loading.close();
+          } else {
+            this.$message.error("修改失败");
+            this.getSteelReport();
+            loading.close();
+          }
+        })
+        .catch(() => {
+          this.$message.error("修改失败");
+          this.getSteelReport();
+          loading.close();
+        });
+    },
+    //关闭车辆金蝶分录
+    deleteEasEntryId(row) {
+      this.$confirm("确定关闭该车金蝶分录吗?", "提示", {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        center: true,
+        type: "warning",
+      })
+        .then(() => {
+          let map = row;
+          map.isCloseEas = Number(0);
+          const loading = this.$loading({
+            lock: true,
+            text: "正在关闭车辆",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)",
+          });
+          this.axios
+            .post("/api/v1/ams/updateCarAddress", map)
+            .then((res) => {
+              if (res.data.code == "200") {
+                this.$message.success("关闭车辆成功");
+                this.getSteelReport();
+                loading.close();
+              } else {
+                this.$message.error("关闭车辆失败");
+                this.getSteelReport();
+                loading.close();
+              }
+            })
+            .catch(() => {
+              this.$message.error("关闭车辆失败");
+              this.getSteelReport();
+              loading.close();
+            });
+        })
+        .catch(() => {
+          this.$message.info("取消关闭");
+        });
+    },
+    //修改承运商授权
+    updateTruckCarrier(row) {
+      if (row.newCarrierId == null) {
+        this.$message.warning("请注册承运商或者选中弹出层之后再提交!");
+        this.getSteelReport();
+        return;
+      }
+      if (row.carrierIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: "正在修改承运商授权",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)",
+        });
+        this.axios
+          .post("/api/v1/ams/updateTruckNoCarrier", row)
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("修改承运商授权成功");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("修改失败,请联系管理员!");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("修改失败,请联系管理员!");
+            this.getSteelReport();
+            loading.close();
+          });
+      } else {
+        //授权承运商
+        let arr = [];
+        arr.push(row);
+        const loading = this.$loading({
+          lock: true,
+          text: "正在授权承运商",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)",
+        });
+        this.axios
+          .post("/api/v1/ams/dispatchToCarrier", arr)
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("授权承运商成功");
+              this.getSteelReport();
+              loading.close();
+            } else {
+              this.$message.error("授权失败,请联系管理员");
+              this.getSteelReport();
+              loading.close();
+            }
+          })
+          .catch(() => {
+            this.$message.error("授权失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          });
+      }
+    },
+    updateAddress(row) {
+      this.drawer = true;
+      this.addressRow = row;
+      this.province = row.addressProvince;
+      this.city = row.addressDistrict;
+      this.county = row.addressTown;
+      this.addressId = row.shipperAddressId;
+      this.getAllProvince();
+      this.onchangeProvince();
+      this.onchangeCity();
+    },
+    //获取所有省数据
+    getAllProvince() {
+      this.axios.post("/api/v1/uc/getAllProvince").then((res) => {
+        this.provinceList = res.data.data;
+      });
+    },
+    //省改变
+    onchangeProvince() {
+      this.axios
+        .post(
+          "/api/v1/uc/getDistrictByProvince?addressProvince=" +
+            this.province +
+            "&i=" +
+            new Date()
+        )
+        .then((res) => {
+          this.cityList = res.data.data;
+          // this.city = "";
+          // this.county = "";
+        });
+    },
+    //市改变
+    onchangeCity() {
+      this.axios
+        .post(
+          "/api/v1/uc/getTownByDistrict?addressDistrict=" +
+            this.city +
+            "&i=" +
+            new Date()
+        )
+        .then((res) => {
+          this.countyList = res.data.data;
+        });
+    },
+    //县(区)改变
+    onchangeCounty() {
+      let mapValue = {
+        addressProvince: this.province,
+        addressDistrict: this.city,
+        addressTown: this.county,
+      };
+      this.axios
+        .post("/api/v1/uc/getPlaceByAllAddress", mapValue)
+        .then((res) => {
+          this.addressId = res.data.data[0].addressId;
+        });
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log("获取所有下拉值!");
+    },
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post(
+          "/api/v1/ams/getRealAddressByLike?addressId=" +
+            this.addressId +
+            "&index=" +
+            queryString
+        )
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter1(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //修改收货地址
+    addAddressClick() {
+      const loading = this.$loading({
+        lock: true,
+        text: "正在修改收货地址",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+      let map = this.addressRow;
+      map.isCloseEas = Number(1);
+      map.isNewCar = Number(1);
+      map.place = this.place;
+      map.shipperAddressId = this.addressId;
+      this.axios
+        .post("/api/v1/ams/updateCarAddress", map)
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.$message.success("修改收货地址成功!");
+            this.getSteelReport();
+            this.drawer = false;
+            loading.close();
+          } else {
+            this.$message.error("修改失败,请联系管理员!");
+            this.getSteelReport();
+            this.drawer = false;
+            loading.close();
+          }
+        })
+        .catch(() => {
+          this.$message.error("修改失败,请联系管理员!");
+          this.getSteelReport();
+          this.drawer = false;
+          loading.close();
+        });
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+        this.totalCapacity = data[data.length - 1].group + 1;
+        this.totalNumber = data.reduce(function (prev, item) {
+          return prev + item.materialNum;
+        }, 0);
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.columnIndexs.indexOf(columnIndex) != -1) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col,
+        };
+      }
+    },
+    //减少物资件数
+    updateBillOrder(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: "修改物资件数中",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+      let map = {
+        materialId: row.materialId,
+        materialNum: row.materialNum,
+      };
+      let arr = [];
+      arr.push(map);
+      let updateMap = {
+        orderId: row.orderId,
+        saleOrderId: row.saleOrderId,
+        saleOrderMaterialId: row.saleOrderMaterialId,
+        mapList: arr,
+      };
+      this.axios
+        .post("/api/v1/oms/updateMaterialMes", updateMap)
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.$message.success("修改物资数量成功");
+            this.getSteelReport();
+            loading.close();
+          } else {
+            this.$message.error("修改物资数量失败,请联系管理员");
+            this.getSteelReport();
+            loading.close();
+          }
+        })
+        .catch(() => {
+          this.$message.error("修改物资数量失败,请联系管理员");
+          this.getSteelReport();
+          loading.close();
+        });
+    },
+    //关闭单条分录
+    closeEasEntryId(row) {
+      console.log(row);
+      this.$prompt("确定关闭该条分录吗?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        center: true,
+        inputPlaceholder: "请输入关闭理由",
+      })
+        .then(({ value }) => {
+          if (value != null || value != "") {
+            const loading = this.$loading({
+              lock: true,
+              text: "正在关闭该条分录",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)",
+            });
+            let map = {
+              orderId: row.orderId,
+              saleOrderMaterialId: row.saleOrderMaterialId,
+              saleMaterialId: row.saleMaterialId,
+              reason: value,
+              number: row.saleOrderNo,
+              closeEntryId: row.closeEntryId,
+            };
+            this.axios
+              .post("/api/v1/ams/closeSteelMaterialId", map)
+              .then((res) => {
+                if (res.data.code == "200") {
+                  this.$message.success("关闭成功");
+                  this.getSteelReport();
+                  loading.close();
+                } else {
+                  this.$message.error("关闭失败,请联系管理员");
+                  this.getSteelReport();
+                  loading.close();
+                }
+              })
+              .catch(() => {
+                this.$message.error("关闭失败,请联系管理员");
+                this.getSteelReport();
+                loading.close();
+              });
+          }
+        })
+        .catch(() => {
+          this.$message.info("取消输入");
+        });
+    },
+    //查询,输入查询条件
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      let carrierSsoId = null;
+      let carrierName = null;
+      let consigneeName = null;
+      let capacityNo = null;
+      let remark = null;
+      let saler = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        saler = getCookie("loginName");
+      }
+      if (this.screen == "下单客户") {
+        consigneeName = this.input;
+      } else if (this.screen == "承运商") {
+        carrierName = this.input;
+      } else if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      } else {
+        remark = this.input;
+      }
+      this.axios
+        .post(
+          "/api/v1/tms/getSaleSteelReport?startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&carrierSsoId=" +
+            carrierSsoId +
+            "&i=" +
+            new Date() +
+            "&remark=" +
+            remark +
+            "&consigneeName=" +
+            consigneeName +
+            "&carrierName=" +
+            carrierName +
+            "&capacityNo=" +
+            capacityNo +
+            "&saler=" +
+            saler
+        )
+        .then((res) => {
+          this.tableData = res.data.data;
+          this.getSpanArr(res.data.data);
+        });
+    },
+    //重新获取表格数据
+    refresh() {
+      this.getSteelReport();
+    },
+    //获取钢材统计报表
+    getSteelReport() {
+      let carrierSsoId = null;
+      let saler = null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        saler = getCookie("loginName");
+      }
+      this.axios
+        .post(
+          "/api/v1/tms/getSaleSteelReport?startTime=" +
+            null +
+            "&endTime=" +
+            null +
+            "&carrierSsoId=" +
+            carrierSsoId +
+            "&saler=" +
+            saler +
+            "&i=" +
+            new Date()
+        )
+        .then((res) => {
+          this.tableData = res.data.data;
+          this.getSpanArr(res.data.data);
+        });
+    },
+    //控制列自动撑开
+    flexColumnWidth(str, tableData, flag) {
+      // str为该列的字段名(传字符串);tableData为该表格的数据源(传变量);
+      // flag为可选值,可不传该参数,传参时可选'max'或'equal',默认为'max'
+      // flag为'max'则设置列宽适配该列中最长的内容,flag为'equal'则设置列宽适配该列中第一行内容的长度。
+      str = str + "";
+      let columnContent = "";
+      if (
+        !tableData ||
+        !tableData.length ||
+        tableData.length === 0 ||
+        tableData === undefined
+      ) {
+        return;
+      }
+      if (!str || !str.length || str.length === 0 || str === undefined) {
+        return;
+      }
+      if (flag === "equal") {
+        // 获取该列中第一个不为空的数据(内容)
+        for (let i = 0; i < tableData.length; i++) {
+          if (tableData[i][str].length > 0) {
+            columnContent = tableData[i][str] + "";
+            break;
+          }
+        }
+      } else {
+        // 获取该列中最长的数据(内容)
+        let index = 0;
+        for (let i = 0; i < tableData.length; i++) {
+          if (tableData[i][str] === null) {
+            // 当数据为空时跳过本次循环获取下一条数据长度
+            continue;
+          }
+          const now_temp = tableData[i][str] + "";
+          const max_temp = tableData[index][str] + "";
+          if (now_temp.length > max_temp.length) {
+            index = i;
+          }
+        }
+        columnContent = tableData[index][str] + "";
+      } // 以下分配的单位长度可根据实际需求进行调整
+      let flexWidth = 0;
+      if (columnContent != undefined) {
+        for (const char of columnContent) {
+          if ((char >= "A" && char <= "Z") || (char >= "a" && char <= "z")) {
+            // 如果是英文字符,为字符分配10个单位宽度
+            flexWidth += 10;
+          } else if (char >= "\u4e00" && char <= "\u9fa5") {
+            // 如果是中文字符,为字符分配16个单位宽度
+            flexWidth += 14;
+          } else {
+            // 其他种类字符,为字符分配10个单位宽度
+            flexWidth += 10;
+          }
+        }
+      }
+      if (flexWidth < 80) {
+        // 设置最小宽度
+        flexWidth = 80;
+      }
+      if (flexWidth > 500) {
+        // 设置最大宽度
+        flexWidth = 500;
+      }
+      return flexWidth + "px";
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.purchasFuelNewMonitor {
+  .tableTop {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .address {
+    .button-box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+}
+</style>

+ 25 - 3
src/views/inward/router/index.js

@@ -43,6 +43,10 @@ import outFactory from "@/views/inward/components/offsetSteel/truckTransport/out
 import truckReceiptResult from "@/views/inward/components/offsetSteel/truckTransport/truckReceiptResult.vue";
 import truckReceiptResult from "@/views/inward/components/offsetSteel/truckTransport/truckReceiptResult.vue";
 //内转钢材到异地库--火车运输--请车作业
 //内转钢材到异地库--火车运输--请车作业
 import wagonPlease from "@/views/inward/components/offsetSteel/truckTrain/wagonPlease.vue";
 import wagonPlease from "@/views/inward/components/offsetSteel/truckTrain/wagonPlease.vue";
+
+//内转钢材到异地库--分派订单
+import saleTruckOrder from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckOrder.vue";
+
 //内转钢材到异地库--火车运输--批车作业
 //内转钢材到异地库--火车运输--批车作业
 import wagonApprove from "@/views/inward/components/offsetSteel/truckTrain/wagonApprove.vue";
 import wagonApprove from "@/views/inward/components/offsetSteel/truckTrain/wagonApprove.vue";
 //内转钢材到异地库--火车运输--装车作业
 //内转钢材到异地库--火车运输--装车作业
@@ -164,6 +168,11 @@ import inwardWeightTimeDetailsOrder from "../components/inwardSettlement/inwardA
 //继续分解采购内转需求订单
 //继续分解采购内转需求订单
 import addPurInwardOrderCon from "@/views/inward/components/truckOrder/addPurInwardOrderCon";
 import addPurInwardOrderCon from "@/views/inward/components/truckOrder/addPurInwardOrderCon";
 
 
+//内转火车发运明细
+import platformStockInfo from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue";
+
+//库存调拨单浏览
+import kucunList from "@/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue";
 Vue.use(Router);
 Vue.use(Router);
 
 
 const constantRouterMap = [
 const constantRouterMap = [
@@ -317,11 +326,12 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-yhgl" },
         meta: { code: "xtpzgl-yhgl" },
         component: trainUnload
         component: trainUnload
       },
       },
+
       {
       {
-        path: "truckLoad",
-        name: "truckLoad",
+        path: "saleTruckOrder",
+        name: "saleTruckOrder",
         meta: { code: "xtpzgl-yhgl" },
         meta: { code: "xtpzgl-yhgl" },
-        component: truckLoad
+        component: saleTruckOrder
       },
       },
       {
       {
         path: "daZhouEnFactoryResult",
         path: "daZhouEnFactoryResult",
@@ -635,6 +645,18 @@ const constantRouterMap = [
         name: "addPurInwardOrderCon",
         name: "addPurInwardOrderCon",
         meta: { code: "xtpzgl-yhgl" },
         meta: { code: "xtpzgl-yhgl" },
         component: addPurInwardOrderCon
         component: addPurInwardOrderCon
+      },
+      {
+        path: "platformStockInfo",
+        name: "platformStockInfo",
+        meta: { code: "xtpzgl-yhgl" },
+        component: platformStockInfo
+      },
+      {
+        path: "kucunList",
+        name: "kucunList",
+        meta: { code: "xtpzgl-yhgl" },
+        component: kucunList
       }
       }
     ]
     ]
   }
   }

+ 1 - 1
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -5,7 +5,7 @@
       <el-form :inline="true" style="margin-top: 1rem;">
       <el-form :inline="true" style="margin-top: 1rem;">
         <el-form-item>
         <el-form-item>
           <el-input
           <el-input
-            v-model="capacityNo"
+            v-model.trim="capacityNo"
             style="width:250px"
             style="width:250px"
             placeholder="输入车牌号查询"
             placeholder="输入车牌号查询"
             clearable
             clearable

File diff suppressed because it is too large
+ 0 - 0
static/lib/XLSX/xlsx.core.min.js


Some files were not shown because too many files changed in this diff