zx 2 vuotta sitten
vanhempi
commit
955f2c2929
61 muutettua tiedostoa jossa 6456 lisäystä ja 870 poistoa
  1. 5 2
      build/utils.js
  2. 2 3
      config/index.js
  3. 1 1
      src/components/DilCommonUI/packages/table/src/table.vue
  4. 39 0
      src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue
  5. 150 0
      src/views/RMS/components/addContractPrice.vue
  6. 109 0
      src/views/RMS/components/contractPrice.vue
  7. 172 0
      src/views/RMS/components/editContractPrice.vue
  8. 7 1
      src/views/RMS/router/index.js
  9. 159 127
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue
  10. 5 0
      src/views/TMS/app.js
  11. 328 0
      src/views/TMS/components/bmsship/addThreeSectionHandleFee.vue
  12. 328 0
      src/views/TMS/components/bmsship/addTwoSectionFee.vue
  13. 328 0
      src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue
  14. 350 0
      src/views/TMS/components/bmsship/editThreeSectionHandleFee.vue
  15. 350 0
      src/views/TMS/components/bmsship/editTwoSectionFee.vue
  16. 350 0
      src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue
  17. 133 0
      src/views/TMS/components/bmsship/threeSectionHandleFee.vue
  18. 133 0
      src/views/TMS/components/bmsship/twoSectionFee.vue
  19. 133 0
      src/views/TMS/components/bmsship/twoSectionHandleFee.vue
  20. 333 0
      src/views/TMS/components/bmstrain/addDomesticTrainFee.vue
  21. 333 0
      src/views/TMS/components/bmstrain/addImportedTrainFee.vue
  22. 133 0
      src/views/TMS/components/bmstrain/domesticTrainFee.vue
  23. 354 0
      src/views/TMS/components/bmstrain/editDomesticTrainFee.vue
  24. 354 0
      src/views/TMS/components/bmstrain/editImportedTrainFee.vue
  25. 133 0
      src/views/TMS/components/bmstrain/importedTrainFee.vue
  26. 59 2
      src/views/TMS/components/domesticMine/entrustMine.vue
  27. 66 18
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  28. 150 21
      src/views/TMS/components/importedMine/addWagonLoad.vue
  29. 6 13
      src/views/TMS/components/importedMine/addWagonUnLoad.vue
  30. 47 115
      src/views/TMS/components/importedMine/addWagonloadCopy.vue
  31. 1 0
      src/views/TMS/components/importedMine/outBoundWagon.vue
  32. 5 1
      src/views/TMS/components/importedShip/addUnloadShip.vue
  33. 17 25
      src/views/TMS/components/importedShip/loadShip.vue
  34. 33 6
      src/views/TMS/components/importedShip/shipLocation.vue
  35. 27 1
      src/views/TMS/components/importedShip/shipResult.vue
  36. 51 12
      src/views/TMS/components/importedShip/shipmentInstructions.vue
  37. 27 1
      src/views/TMS/components/importedShip/unloadShip.vue
  38. 103 1
      src/views/TMS/router/index.js
  39. 10 37
      src/views/WMS/components/port_deposit/loadPortStock.vue
  40. 5 3
      src/views/WMS/components/port_deposit/unloadPortStock.vue
  41. 7 7
      src/views/appoint/components/inward/addTransPrice.vue
  42. 52 0
      src/views/appoint/components/inward/rangePoint.vue
  43. 86 8
      src/views/appoint/components/saleContract/addSaleOrder.vue
  44. 149 52
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  45. 4 3
      src/views/appoint/components/saleContract/updateSaleOrderSteel.vue
  46. 4 1
      src/views/appoint/components/ship/addDeliveryNotice.vue
  47. 56 10
      src/views/appoint/components/ship/deliveryAttorney.vue
  48. 53 8
      src/views/appoint/components/ship/deliveryNotice.vue
  49. 1 13
      src/views/appoint/components/ship/modifyDeliveryNotice.vue
  50. 7 0
      src/views/appoint/router/index.js
  51. 209 129
      src/views/inward/components/inwardSettlement/detailOrder.vue
  52. 6 3
      src/views/inward/components/truckAppoint/addRequirement.vue
  53. 71 16
      src/views/inward/components/truckAppoint/addRequirement2.vue
  54. 19 9
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  55. 17 8
      src/views/inward/components/truckOrder/addPurInwardOrderCon.vue
  56. 167 105
      src/views/inward/components/truckOrder/plan.vue
  57. 51 35
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  58. 1 1
      src/views/queue/components/qmsEnFacotory/updateBill.vue
  59. 117 38
      src/views/statisticalReport/components/Ship_dynamic_table.vue
  60. 50 33
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue
  61. 0 1
      static/lib/XLSX/xlsx.core.min.js

+ 5 - 2
build/utils.js

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

+ 2 - 3
config/index.js

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

+ 1 - 1
src/components/DilCommonUI/packages/table/src/table.vue

@@ -225,7 +225,7 @@ export default {
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [5,10, 20, 50, 100, 200, 1000, 50000];
+        return [5, 10, 20, 50, 100, 200, 1000, 50000];
       }
     },
     // 每页显示条目个数,支持 .sync 修饰符

+ 39 - 0
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -236,6 +236,44 @@
               </div>
             </div>
           </el-tab-pane>
+          <el-tab-pane label="钢材车辆手动放行" name="fifth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="allowEnfactoryClick"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
+            </div>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -281,6 +319,7 @@ export default {
     this.information();
   },
   methods: {
+    allowEnfactoryClick() {},
     queueClick() {
       this.axios
         .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName)

+ 150 - 0
src/views/RMS/components/addContractPrice.vue

@@ -0,0 +1,150 @@
+<template>
+  <!-- 添加合同单价信息 -->
+  <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="preview-group">
+            <el-form-item label="合同号">
+                <el-input v-model="form.contractNo"></el-input>
+            </el-form-item>
+             <el-form-item label="单价">
+                <el-input v-model="form.unitPrice" type="number"></el-input>
+            </el-form-item>
+             <el-form-item label="起始日期">
+                 <el-date-picker
+                    v-model="form.startTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+             <el-form-item label="截止日期">
+                 <el-date-picker
+                    v-model="form.endTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </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>
+     </el-form>
+    </div>
+    <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";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {
+        contractNo:null,
+        unitPrice:null,
+        startTime:null,
+        endTime:null,
+        userId:getCookie("userId")
+      },
+      portId:null,
+      ports:[],
+      isLoading:false
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    makeSure() {
+      this.isLoading=true;
+      console.log(this.form);
+      if (this.form.contractNo == null || 
+      this.form.contractNo =='' ||
+      this.form.unitPrice =='' ||
+      this.form.unitPrice == null ||
+      this.form.startTime == null || 
+      this.form.endTime == null){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else if(this.form.startTime>=this.form.endTime){
+        this.$message.error("起始日期必须小于截止日期!");
+        this.isLoading=false;
+      }
+      else{
+         let map=this.form;
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         this.axios.post("/api/v1/rms/insertBmsshipContractPrice",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+            this.isLoading=false;
+          } else {
+            this.$message.error(res.data.data);
+            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);
+          }
+        });
+    }
+  }
+};
+</script>
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.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>

+ 109 - 0
src/views/RMS/components/contractPrice.vue

@@ -0,0 +1,109 @@
+<template>
+    <!-- 合同单价 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addContractPrice");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editContractPrice/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showContractPrice/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/rms/deleteBmsshipContractPrice",map)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 172 - 0
src/views/RMS/components/editContractPrice.vue

@@ -0,0 +1,172 @@
+<template>
+  <!-- 修改合同单价信息 -->
+  <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="preview-group">
+            <el-form-item label="合同号">
+                <el-input v-model="form.contractNo"></el-input>
+            </el-form-item>
+             <el-form-item label="单价">
+                <el-input v-model="form.unitPrice" type="number"></el-input>
+            </el-form-item>
+             <el-form-item label="起始日期">
+                 <el-date-picker
+                    v-model="form.startTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </el-form-item>
+             <el-form-item label="截止日期">
+                 <el-date-picker
+                    v-model="form.endTime"
+                    type="datetime"
+                    placeholder="选择日期">
+                </el-date-picker>
+            </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>
+     </el-form>
+    </div>
+    <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";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form: {
+        contractNo:null,
+        unitPrice:null,
+        startTime:null,
+        endTime:null,
+        userId:getCookie("userId")
+      },
+      portId:null,
+      ports:[],
+      isLoading:false
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  methods: {
+    //渲染界面
+    information() {
+      console.log("resultId",this.$route.params.resultId);
+      this.axios
+        .post(
+          "/api/v1/rms/selectBmsshipPriceList/" +
+            this.$route.params.resultId
+        )
+        .then((res) => {
+            console.log(res)
+          res.data.data.forEach((e) => {
+            this.form = e;
+            console.log(e);
+          });
+        });
+    },
+    makeSure() {
+      this.isLoading=true;
+      console.log(this.form);
+      let map=this.form;
+      map={
+        resultId:this.form.resultId,
+        contractNo:this.form.contractNo,
+        unitPrice:this.form.unitPrice,
+        startTime: sjTime(this.form.startTime),
+        endTime:sjTime(this.form.endTime),
+        userId:getCookie("userId")
+      }
+      if (map.contractNo == null || 
+      map.contractNo =='' ||
+      map.unitPrice =='' ||
+      map.unitPrice == null ||
+      map.startTime == null || 
+      map.endTime == null){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else if(map.startTime>=map.endTime){
+        this.$message.error("起始日期必须小于截止日期!");
+        this.isLoading=false;
+      }else{
+         this.axios.post("/api/v1/rms/updateBmsshipContractPrice",map).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "修改成功!"
+            });
+            this.cancel();
+            this.isLoading=false;
+          } else {
+            this.$message.error(res.data.data);
+            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);
+          }
+        });
+    }
+  }
+};
+</script>
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.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>

+ 7 - 1
src/views/RMS/router/index.js

@@ -64,6 +64,9 @@ import editInwardMaterial from '../components/editInwardMaterial.vue'
 import cargoDep from '../components/cargoDep.vue'
 import addCargoDep from '../components/addCargoDep.vue'
 import updateCargoDep from '../components/updateCargoDep.vue'
+import contractPrice from '../components/contractPrice.vue'
+import addContractPrice from '../components/addContractPrice.vue'
+import editContractPrice from '../components/editContractPrice.vue'
 
 Vue.use(Router)
 const constantRouterMap = [
@@ -132,7 +135,10 @@ const constantRouterMap = [
 		{path: 'cargoDep', name: 'cargoDep', meta: {code: 'xtpzgl-yhgl'}, component: cargoDep},	
 		{path: 'addCargoDep', name: 'addCargoDep', meta: {code: 'xtpzgl-yhgl'}, component: addCargoDep},	
 		{path: 'updateCargoDep/:cargoCarrierId', name: 'updateCargoDep', meta: {code: 'xtpzgl-yhgl'}, component: updateCargoDep},	
-	  ]
+		{path: 'contractPrice', name: 'contractPrice', meta: {code: 'xtpzgl-yhgl'}, component: contractPrice},
+		{path: 'addContractPrice', name: 'addContractPrice', meta: {code: 'xtpzgl-yhgl'}, component: addContractPrice},
+		{path: 'editContractPrice/:resultId', name: 'editContractPrice', meta: {code: 'xtpzgl-yhgl'}, component: editContractPrice},
+	]
 	}
   ];
   

+ 159 - 127
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue

@@ -1,5 +1,4 @@
-//新增运输派单
-//新增运输订单
+//新增运输派单 //新增运输订单
 <template>
   <div class="addSaleOrderSend">
     <page-title>新增运输订单派车</page-title>
@@ -10,24 +9,24 @@
         @radio-change="currentRadioChange"
         ref="table"
       >
-        <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          //物资详情抽屉
-          <el-table-column type="expand" width="1">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="getMatrialDetails1(scope.row)"
+              type="text"
+              size="small"
+            >
+              物资详情
+            </el-button>
+          </template>
+        </el-table-column>
+        //物资详情抽屉
+        <el-table-column type="expand" width="1">
           <template slot-scope="props">
             <el-form label-position="center" inline class="demo-table-expand">
               <div v-if="false">{{ props }}</div>
               <div>
-                <el-table :data="tableData" border >
+                <el-table :data="tableData" border>
                   <el-table-column
                     v-for="(item, i) in tableHead"
                     :key="i"
@@ -84,8 +83,8 @@
       </el-table>
     </div>
     <!-- 车辆模态框 -->
-    <el-drawer 
-      :visible.sync="truckDrawer" 
+    <el-drawer
+      :visible.sync="truckDrawer"
       :with-header="false"
       :destroy-on-close="false"
       direction="rtl"
@@ -128,56 +127,57 @@
     </el-drawer>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled" >确定</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确定</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
-      disabled:false,
+      disabled: false,
       //零星订单ID
-      sporadicOrderId:null,
+      sporadicOrderId: null,
       //运输订单ID
-      orderId:null,
+      orderId: null,
       //线路名称
-      lineName:null,
+      lineName: null,
       //已经选择车辆物资信息
-      selectionList:[],
+      selectionList: [],
       //销售订单物资信息
       option: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
         // 控制显示当选列
         selectionType: "radio",
-        isPagination: false,
+        isPagination: false
       },
       //当前选中的物资id
       materialId: null,
       //当前选中的物资名称
-      materialName: null,   
+      materialName: null,
       //是否打开选择车辆的模态框
-      truckDrawer:false,
+      truckDrawer: false,
       //车辆的表格
       truck: {
         requestUrl: "",
-        selectionType: "select",
+        selectionType: "select"
       },
       tableTop: [
         {
           prop: "capacityNumber",
-          label: "车牌号",
+          label: "车牌号"
         }
       ],
-      truckText:null,
+      truckText: null,
       //当前多选选中的车辆
-      selectTruck:[],
-       //记录旧的row对象
+      selectTruck: [],
+      //记录旧的row对象
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
       oldRowCount: 1,
@@ -185,25 +185,25 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
-      tableData: [],
+      tableData: []
     };
   },
   created() {
@@ -211,100 +211,121 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" + getCookie("userId");
-    } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" +
+        getCookie("userId");
+    } else if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "wuliuchuyunzhongxin"
+    ) {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
-    }else{
-        this.truck.requestUrl =
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
+    } else {
+      this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" +
+        getCookie("orgCode");
     }
   },
   methods: {
     //点击确定按钮的事件
-    makeSure(){
-       console.log(this.selectionList)
-        this.disabled = true
-        console.log(this.orderId)
-        if(this.orderId == null){
-          this.$message.error("未勾选零星订单")
-          this.disabled = false
-          return 
-        }else if(this.selectionList.length == 0){
-          this.$message.error("未选择车辆")
-          this.disabled = false
-          return
-        }
-        this.axios.post('/api/v1/ams/addSporadicOrderTimes',{
-          orderId:this.orderId,
-          sporadicOrderId:this.sporadicOrderId,
-          mapList:this.selectionList,
-        }).then((res)=>{
-          if(res.data.code == '200'){
-            this.$message.success('派车成功')
-            this.disabled = false
+    makeSure() {
+      console.log(this.selectionList);
+      this.disabled = true;
+      console.log(this.orderId);
+      if (this.orderId == null) {
+        this.$message.error("未勾选零星订单");
+        this.disabled = false;
+        return;
+      } else if (this.selectionList.length == 0) {
+        this.$message.error("未选择车辆");
+        this.disabled = false;
+        return;
+      }
+      this.axios
+        .post("/api/v1/ams/addSporadicOrderTimes", {
+          orderId: this.orderId,
+          sporadicOrderId: this.sporadicOrderId,
+          mapList: this.selectionList,
+          orgCode: getCookie("orgCode")
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("派车成功");
+            this.disabled = false;
             this.cancel();
           }
-        })
+        });
     },
     //点击取消按钮的事件
-    cancel(){
-      this.$router.push('/oldSporadicOrder')
+    cancel() {
+      this.$router.push("/oldSporadicOrder");
     },
     //点击删除按钮删除当前点击的对象
-    deleteRow(index){
-      this.selectionList.splice(index,1)
+    deleteRow(index) {
+      this.selectionList.splice(index, 1);
     },
     //车辆模态框的确定事件
-    AddTruckClick(){
+    AddTruckClick() {
       this.selectTruck.forEach(e => {
         this.selectionList.push({
-          capacityId:e.capacityId,
-          capacityNumber:e.capacityNumber,
-        })
+          capacityId: e.capacityId,
+          capacityNumber: e.capacityNumber
+        });
       });
       this.truckDrawer = false;
     },
     //车辆模态框框计算
-    selectTruckClick(){
-      if(this.truckText != null){
+    selectTruckClick() {
+      if (this.truckText != null) {
         if (getCookie("orgCode") == "chengyunshang") {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.truckText;
-      }else {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index="+this.truckText;
-      }
-        this.truckText = null
-      }else{
-         if (getCookie("orgCode") == "chengyunshang") {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") + "&i=" + new Date()
-      }else {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date()
-      }
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&index=" +
+            this.truckText;
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&index=" +
+            this.truckText;
+        }
+        this.truckText = null;
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
       }
-    
     },
     //车辆表格
-    currentRadioChange1(select){
+    currentRadioChange1(select) {
       this.selectTruck = [];
       this.selectTruck = select;
     },
     //主界面表格单选
     currentRadioChange(row) {
-      console.log(row)
-      this.sporadicOrderId = row.sporadicOrderId
-      this.orderId = row.orderId
+      console.log(row);
+      this.sporadicOrderId = row.sporadicOrderId;
+      this.orderId = row.orderId;
     },
     //获取物资详情--未下发
-    getMatrialDetails1(row){
-      console.log("wuzixq")
+    getMatrialDetails1(row) {
+      console.log("wuzixq");
       // 记录重复点击次数
       if (this.oldRow === row) {
         this.oldRowCount += 1;
@@ -326,35 +347,46 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-      this.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
-        console.log(res.data.data)
-        this.tableData = res.data.data
-      })
+      this.axios
+        .post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId)
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+        });
     },
     onClick() {
-      if(getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&t=" + new Date();
-    }else if(getCookie("orgCode") == "biemeierchejian") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + "&t=" + new Date();
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&t=" +
+          new Date();
+      } else if (getCookie("orgCode") == "biemeierchejian") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&con=" +
+          "铁专线精煤" +
+          "&t=" +
+          new Date();
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&t=" +
+          new Date();
+      }
+      this.truckDrawer = true;
     }
-     else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null  + "&t=" + new Date();
-    } 
-      this.truckDrawer = true
-    },
-  },
+  }
 };
 </script>
-<style lang='scss'>
+<style lang="scss">
 .addSaleOrderSend {
   .el-drawer__body {
-   overflow: auto;
+    overflow: auto;
   }
-  .el-drawer__container ::-webkit-scrollbar{
+  .el-drawer__container ::-webkit-scrollbar {
     display: none;
   }
   .from {
@@ -384,17 +416,17 @@ export default {
       }
     }
   }
-  .tablecls{
+  .tablecls {
     margin-top: 20px;
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
     margin: 20px;
-    .el-button{
+    .el-button {
       width: 100px;
       margin-left: 20px;
     }
   }
 }
-</style>
+</style>

+ 5 - 0
src/views/TMS/app.js

@@ -16,6 +16,11 @@ import VueApollo from 'vue-apollo'
 import apollo from '@/config/apolloConfig.js'
 
 
+
+import VXETable from "vxe-table";
+import "vxe-table/lib/style.css";
+Vue.use(VXETable);
+Vue.prototype.$XModal = VXETable.modal;
 // 关闭生产模式下给出的提示
 Vue.config.productionTip = false;
 

+ 328 - 0
src/views/TMS/components/bmsship/addThreeSectionHandleFee.vue

@@ -0,0 +1,328 @@
+<template>
+  <!-- 添加三程船装卸费4-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="水运费用">
+              <el-input v-model="form.fee" type="number" disabled></el-input>
+          </el-form-item>
+            <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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      //this.isLoading=true;
+      let map={
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:4,
+        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/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            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;
+  }
+}
+.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>

+ 328 - 0
src/views/TMS/components/bmsship/addTwoSectionFee.vue

@@ -0,0 +1,328 @@
+<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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="水运费用">
+              <el-input v-model="form.fee" type="number" disabled></el-input>
+          </el-form-item>
+            <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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      //this.isLoading=true;
+      let map={
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:1,
+        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/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            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;
+  }
+}
+.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>

+ 328 - 0
src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue

@@ -0,0 +1,328 @@
+<template>
+  <!-- 添加二程船装卸费2-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="水运费用">
+              <el-input v-model="form.fee" type="number" disabled></el-input>
+          </el-form-item>
+            <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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      //this.isLoading=true;
+      let map={
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:2,
+        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/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            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;
+  }
+}
+.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>

+ 350 - 0
src/views/TMS/components/bmsship/editThreeSectionHandleFee.vue

@@ -0,0 +1,350 @@
+<template>
+  <!-- 修改三程船装卸费4-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number"  disabled></el-input>
+            </el-form-item>
+             <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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  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;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:4,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+       map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         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;
+  }
+}
+.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>

+ 350 - 0
src/views/TMS/components/bmsship/editTwoSectionFee.vue

@@ -0,0 +1,350 @@
+<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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number"  disabled></el-input>
+            </el-form-item>
+             <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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  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;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:1,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+       map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         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;
+  }
+}
+.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>

+ 350 - 0
src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue

@@ -0,0 +1,350 @@
+<template>
+  <!-- 修改二程船装卸费2-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number"  disabled></el-input>
+            </el-form-item>
+             <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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  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;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        batchId:this.batchId,
+        purchaseOrderId:this.purchaseOrderId,
+        unitPrice:this.form.unitPrice,
+        unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:2,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+       map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         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;
+  }
+}
+.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>

+ 133 - 0
src/views/TMS/components/bmsship/threeSectionHandleFee.vue

@@ -0,0 +1,133 @@
+<template>
+    <!-- 三程船装卸费3 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button @click="toPhotoClick(scope.row.resultId)" type="text" size="small">
+              水运单图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList">
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow:false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=4",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=4&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addThreeSectionHandleFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editThreeSectionHandleFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showThreeSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/bms/deletePortHandlingFeeSecond/"+scope.row.resultId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res",res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 133 - 0
src/views/TMS/components/bmsship/twoSectionFee.vue

@@ -0,0 +1,133 @@
+<template>
+    <!-- 二程船水运费 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button @click="toPhotoClick(scope.row.resultId)" type="text" size="small">
+              水运单图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList">
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow:false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=1",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=1&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addTwoSectionFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editTwoSectionFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/bms/deletePortHandlingFeeSecond/"+scope.row.resultId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res",res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 133 - 0
src/views/TMS/components/bmsship/twoSectionHandleFee.vue

@@ -0,0 +1,133 @@
+<template>
+    <!-- 二程船装卸费2 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button @click="toPhotoClick(scope.row.resultId)" type="text" size="small">
+              水运单图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList">
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow:false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=2",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=2&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addTwoSectionHandleFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editTwoSectionHandleFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/bms/deletePortHandlingFeeSecond/"+scope.row.resultId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res",res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 333 - 0
src/views/TMS/components/bmstrain/addDomesticTrainFee.vue

@@ -0,0 +1,333 @@
+<template>
+  <!-- 添加国产矿运费7-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="火运费用">
+              <el-input v-model="form.fee" type="number"></el-input>
+          </el-form-item>
+            <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>
+          <!-- <el-form-item label="备注">
+              <el-input v-model="form.resultRemarks" type="textarea"></el-input>
+          </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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      //this.isLoading=true;
+      let map={
+        // batchId:this.batchId,
+        // purchaseOrderId:this.purchaseOrderId,
+        // unitPrice:this.form.unitPrice,
+        // unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        resultRemarks:this.form.resultRemarks,
+        feeType:7,
+        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/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            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;
+  }
+}
+.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>

+ 333 - 0
src/views/TMS/components/bmstrain/addImportedTrainFee.vue

@@ -0,0 +1,333 @@
+<template>
+  <!-- 添加进口矿火运费用6-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+          </el-form-item>
+          <el-form-item label="火运费用">
+              <el-input v-model="form.fee" type="number"></el-input>
+          </el-form-item>
+            <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>
+          <!-- <el-form-item label="备注">
+              <el-input v-model="form.resultRemarks" type="textarea"></el-input>
+          </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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        console.log(selection);
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      //this.isLoading=true;
+      let map={
+        // batchId:this.batchId,
+        // purchaseOrderId:this.purchaseOrderId,
+        // unitPrice:this.form.unitPrice,
+        // unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime: sjTime(this.form.makeTime),
+        image:this.form.image,
+        resultRemarks:this.form.resultRemarks,
+        feeType:6,
+        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/addPortHandlingFeeSecond",map).then(res => {
+          if (res.data.code == 200) {
+            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;
+  }
+}
+.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>

+ 133 - 0
src/views/TMS/components/bmstrain/domesticTrainFee.vue

@@ -0,0 +1,133 @@
+<template>
+    <!-- 国产矿火运7-->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button @click="toPhotoClick(scope.row.resultId)" type="text" size="small">
+              票据图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList">
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow:false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=503&feeType=7",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=503&feeType=7&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addDomesticTrainFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editDomesticTrainFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/bms/deletePortHandlingFeeSecond/"+scope.row.resultId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res",res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 354 - 0
src/views/TMS/components/bmstrain/editDomesticTrainFee.vue

@@ -0,0 +1,354 @@
+<template>
+  <!-- 国产矿火运7-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number" ></el-input>
+            </el-form-item>
+             <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>
+            <!-- <el-form-item label="备注">
+              <el-input v-model="form.resultRemarks" type="textarea"></el-input>
+            </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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  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;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        // batchId:this.batchId,
+        // purchaseOrderId:this.purchaseOrderId,
+        // unitPrice:this.form.unitPrice,
+        // unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:7,
+        resultRemarks:this.form.resultRemarks,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+    //    map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         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;
+  }
+}
+.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>

+ 354 - 0
src/views/TMS/components/bmstrain/editImportedTrainFee.vue

@@ -0,0 +1,354 @@
+<template>
+  <!-- 进口矿火运6-->
+  <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="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 v-model="form.realTonnage" type="number"  @change="calculate"></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+                <el-input v-model="form.fee" type="number" ></el-input>
+            </el-form-item>
+             <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>
+            <!-- <el-form-item label="备注">
+              <el-input v-model="form.resultRemarks" type="textarea"></el-input>
+            </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 {
+      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/selectPurchaseOrderForShip?apiId=502",
+        selectionType: "radio",
+        map: [],
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: [],
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+    this.information();
+  },
+  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;
+          });
+        });
+    },
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+        if(a==5){
+            this.batchOption.requestUrl =
+            "/api/v1/uc/selectPurchaseOrderForShip?apiId=502&con=" + this.input;
+        }else if(a==6){
+            this.contractPriceOption.requestUrl =
+            "api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" + this.input;
+        }
+    },
+    //修改选中
+    batchChange(selection) {
+        this.batchId=selection.batchId;
+        this.purchaseOrderId=selection.purchaseOrderId;
+        console.log("before",this.batchName);
+        this.batchName =selection.materialName + selection.resultForeignShipName;
+        console.log("before",this.batchName);
+        console.log("batch",selection);
+    },
+    priceChange(selection){
+        this.form.unitPriceId = selection.resultId;
+        this.form.unitPrice = selection.unitPrice;
+        console.log("unitPrice:",selection);
+        this.calculate();
+    },
+    //计算水运费
+    calculate(){
+        console.log("能否计算水运费:",this.form.realTonnage && this.form.unitPrice);
+        if(this.form.realTonnage && this.form.unitPrice){
+           let fee = new BigNumber(this.form.realTonnage);
+           this.$set(this.form,'fee',fee.multipliedBy(this.form.unitPrice).toNumber())
+           console.log(this.form.fee);
+        }
+    },
+    makeSure() {
+      this.isLoading=true;
+      let map={
+        resultId:this.form.resultId,
+        // batchId:this.batchId,
+        // purchaseOrderId:this.purchaseOrderId,
+        // unitPrice:this.form.unitPrice,
+        // unitPriceId:this.form.unitPriceId,
+        realTonnage:this.form.realTonnage,
+        fee:this.form.fee,
+        makeTime:sjTime(this.form.makeTime),
+        image:this.form.image,
+        feeType:6,
+        resultRemarks:this.form.resultRemarks,
+        userId:getCookie("userId")
+      }
+      console.log(map);
+      if(
+    //    map.unitPrice==null ||
+       map.realTonnage==null ||
+       map.fee==null ||
+       map.makeTime==null ||
+       map.image==null || map.image==''
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else{
+         map.startTime = sjTime(this.form.startTime);
+         map.endTime = sjTime(this.form.endTime);
+         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;
+  }
+}
+.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>

+ 133 - 0
src/views/TMS/components/bmstrain/importedTrainFee.vue

@@ -0,0 +1,133 @@
+<template>
+    <!-- 进口矿火运6-->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button @click="toPhotoClick(scope.row.resultId)" type="text" size="small">
+              票据图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList">
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow:false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=503&feeType=6",
+      },
+    };
+  },
+  methods: {
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=503&feeType=6&con=" + this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addImportedTrainFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editImportedTrainFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          let map={
+            resultId:scope.row.resultId
+          }
+          this.axios
+            .post("/api/v1/bms/deletePortHandlingFeeSecond/"+scope.row.resultId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res",res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price{
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 59 - 2
src/views/TMS/components/domesticMine/entrustMine.vue

@@ -21,7 +21,10 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()">
+      <!-- <el-button type="primary" @click="exportData()">
+        <i class="el-icon-download"></i>导出(Excel)
+      </el-button> -->
+      <el-button type="primary" @click="exportExcel()">
         <i class="el-icon-download"></i>导出(Excel)
       </el-button>
        <el-button type="primary" @click="refresh()">
@@ -32,7 +35,6 @@
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="待计量" name="first">
         <dilTable
-          ref="excelDom"
           v-bind.sync="option"
           @selection-change="selectionChange"
         >
@@ -58,6 +60,7 @@
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import bignumber,{BigNumber} from 'bignumber.js';
+import { XLSX$Utils } from 'xlsx';
 export default {
   data() {
     return {
@@ -166,6 +169,60 @@ export default {
     },
     refresh(){
       this.$router.go(0);
+    },
+    exportExcel(){
+      let excel=this.$refs.excelDom;
+      console.log(XLSX);
+      console.log(XLSX.version);
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new();
+      //数据
+      let sheetData = [
+        ['卸车明细表'],
+        ['序号','发站','到站','发货日期','到货日期','卸货地点','品名','矿种','计费吨位','车号','计量吨位','计费吨位合计']
+      ];
+      let totalRealWeight=new bignumber(0);
+      let totalWeight=0;
+      this.selectionListMap2.forEach((selection)=>{
+          totalRealWeight=totalRealWeight.plus(selection.resultNetWeight);
+          totalWeight+=selection.resultBillableTonnage;
+          let arr=[
+            selection.ROW_ID,
+            selection.sendStationName,
+            selection.arrivalStationName,
+            selection.sendDate,
+            selection.arrivalDate,
+            selection.resultForeignShipName,
+            selection.supplierName+selection.materialName,
+            null,
+            selection.resultBillableTonnage,
+            selection.resultWagonNo,
+          ]
+          sheetData.push(arr);
+      });
+      sheetData[2].push(totalRealWeight.toNumber);
+      sheetData[2].push(totalWeight);
+      console.log("sheetData",sheetData);
+      //把数据转化成excel的页
+      let sheet = XLSX.utils.aoa_to_sheet(sheetData);
+      //合并单元格 
+      sheet['!merges'] = [
+          {
+              s: { c: 0, r: 0 },// 合并开始位置 c:列位置 r:表示行位置
+              e: { c: 11, r: 0 } // 合并结束位置 
+          },
+          {
+              s: { c: 11, r: 0 },// 合并开始位置 c:列位置 r:表示行位置
+              e: { c: 11, r: sheetData.length } // 合并结束位置 
+          },
+          {
+              s: { c: 11, r: 0 },// 合并开始位置 c:列位置 r:表示行位置
+              e: { c: 11, r: sheetData.length } // 合并结束位置 
+          }
+      ]
+      //把这一页加入excel
+      XLSX.utils.book_append_sheet(wb, sheet, "第一页");
+      XLSX.writeFile(wb, '计量作业.xlsx');
     }
   },
 };

+ 66 - 18
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -45,40 +45,54 @@
           align="center"
           prop="mineral"
           label="矿种"
-          width="100px"
+          width="150px"
         >
         </el-table-column>
         <el-table-column
           align="center"
           prop="wagonNo"
           label="车号"
-          width="180px"
+          width="150px"
         >
         </el-table-column>
         <el-table-column
           align="center"
           prop="unloadPoint"
           label="卸货地点"
-          width="180px"
+          width="100px"
         >
         </el-table-column>
         <el-table-column
           align="center"
           prop="sendStation"
           label="发站"
-          width="180px"
+          width="100px"
         >
         </el-table-column>
         <el-table-column
           align="center"
-          width="180px"
+          width="100px"
           prop="arrivalStation"
           label="到站"
         >
+        </el-table-column>
+         <el-table-column
+          align="center"
+          prop="sendDate"
+          label="发货日期"
+          width="150px"
+        >
         </el-table-column>
         <el-table-column
           align="center"
-          width="180px"
+          width="150px"
+          prop="arrivalDate"
+          label="到货日期"
+        >
+        </el-table-column>
+        <el-table-column
+          align="center"
+          width="100px"
           prop="weight"
           label="标重"
         >
@@ -358,6 +372,17 @@ export default {
         console.log("表头行数:" + index);
         //校验表头
         if (
+          typeof workbook.Sheets[workbook.SheetNames[0]]["A" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["B" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["C" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["D" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["E" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["F" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["G" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["I" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["J" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["K" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["L" + index] == 'undefined' ||
           workbook.Sheets[workbook.SheetNames[0]]["A" + index].v != "序号" ||
           workbook.Sheets[workbook.SheetNames[0]]["B" + index].v != "发站" ||
           workbook.Sheets[workbook.SheetNames[0]]["C" + index].v != "到站" ||
@@ -381,6 +406,7 @@ export default {
             "计费吨位合计"
         ) {
           if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["A" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["A" + index].v != "序号"
           ) {
             that.$message({
@@ -388,6 +414,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["B" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["B" + index].v != "发站"
           ) {
             that.$message({
@@ -395,6 +422,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["C" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["C" + index].v != "到站"
           ) {
             that.$message({
@@ -402,6 +430,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["D" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["D" + index].v != "发货日期"
           ) {
             that.$message({
@@ -409,6 +438,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["E" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["E" + index].v != "到货日期"
           ) {
             that.$message({
@@ -416,6 +446,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["F" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["F" + index].v != "卸货地点"
           ) {
             that.$message({
@@ -423,6 +454,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["G" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["G" + index].v != "品名"
           ) {
             that.$message({
@@ -430,18 +462,20 @@ export default {
               type: "warning"
             });
           } else if (
-            workbook.Sheets[workbook.SheetNames[0]]["I" + index].v !=
+            typeof workbook.Sheets[workbook.SheetNames[0]]["I" + index] == 'undefined' ||
+            (workbook.Sheets[workbook.SheetNames[0]]["I" + index].v !=
               "计费\n吨位" &&
             workbook.Sheets[workbook.SheetNames[0]]["I" + index].v !=
               "计费吨位" &&
             workbook.Sheets[workbook.SheetNames[0]]["I" + index].v !=
-              "计费&#10;吨位"
+              "计费&#10;吨位")
           ) {
             that.$message({
               message: "表格格式错误:计费吨位错误",
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["J" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["J" + index].v != "车号"
           ) {
             that.$message({
@@ -449,6 +483,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["K" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["K" + index].v != "计量吨位"
           ) {
             that.$message({
@@ -456,6 +491,7 @@ export default {
               type: "warning"
             });
           } else if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["L" + index] == 'undefined' ||
             workbook.Sheets[workbook.SheetNames[0]]["L" + index].v !=
             "计费吨位合计"
           ) {
@@ -463,16 +499,19 @@ export default {
               message: "表格格式错误:计费吨位合计错误",
               type: "warning"
             });
+          }else{
+            that.$message({
+              message: "表格格式错误!",
+              type: "warning"
+            });
           }
           return;
         }
         //读取表格
         for (let i = 1; i <= rows.length + 1; i++) {
-          let row = workbook.Sheets[workbook.SheetNames[0]]["A" + i];
+          let row = workbook.Sheets[workbook.SheetNames[0]]["A" + i];//先取A列,如果是数字则取该行数据
           if (
-            row != "undefined" &&
-            row != null &&
-            typeof row.v == "number" &&
+            row && typeof row.v == "number" &&
             workbook.Sheets[workbook.SheetNames[0]]["B" + i] != "undefined" &&
             workbook.Sheets[workbook.SheetNames[0]]["B" + i] != null &&
             workbook.Sheets[workbook.SheetNames[0]]["C" + i] != "undefined" &&
@@ -490,12 +529,9 @@ export default {
           ) {
             let tableRow = {
               sendStation: workbook.Sheets[workbook.SheetNames[0]]["B" + i].v,
-              arrivalStation:
-                workbook.Sheets[workbook.SheetNames[0]]["C" + i].v,
-              sendDate: sjTime(
-                workbook.Sheets[workbook.SheetNames[0]]["D" + i].v
-              ),
-              arrivalDate: workbook.Sheets[workbook.SheetNames[0]]["E" + i].v,
+              arrivalStation:workbook.Sheets[workbook.SheetNames[0]]["C" + i].v,
+              sendDate: that.formatDate(workbook.Sheets[workbook.SheetNames[0]]["D" + i].v),
+              arrivalDate: that.formatDate(workbook.Sheets[workbook.SheetNames[0]]["E" + i].v),
               unloadPoint: workbook.Sheets[workbook.SheetNames[0]]["F" + i].v,
               productName: workbook.Sheets[workbook.SheetNames[0]]["G" + i].v,
               wagonNo: workbook.Sheets[workbook.SheetNames[0]]["J" + i].v,
@@ -515,7 +551,19 @@ export default {
         console.log(that.tableData);
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取
+    },
+    formatDate(numb, format) {
+      const time = new Date((numb - 1) * 24 * 3600000 + 1)
+      time.setYear(time.getFullYear() - 70)
+      const year = time.getFullYear() + ''
+      const month = time.getMonth() + 1 + ''
+      const date = time.getDate() + ''
+      if (format && format.length === 1) {
+        return year + format + month + format + date
+      }
+      return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
     }
+
   }
 };
 </script>

+ 150 - 21
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -2,7 +2,7 @@
   <!-- 万州港-达州新增装车1 -->
   <div class="addWagonLoad">
     <page-title>返回</page-title>
-    <div class="cp">
+    <!-- <div class="cp">
       <span >车皮号:</span>
       <el-upload style="margin: 8px;"
           class="upload-excel"
@@ -14,8 +14,82 @@
           <el-button  type="primary">导入</el-button>
       </el-upload>
       <span >当前导入数量:{{tableData.length}}</span>
+    </div> -->
+    <div class="tempTable">
+      <div class="search" style="display:flex">
+        <el-input
+          placeholder="请输入"
+          v-model="input"
+          style="margin: 10px; width:20%"
+          clearable
+        ></el-input>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadTemp()"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <!-- 临时表已导入配单的车皮 -->
+      <div class="tempTable" style="height:300px;overflow:scroll;float:left;margin-left:5px">
+        <el-table
+          ref="tempTable"
+          highlight-current-row
+          @selection-change="handleSelectionChange"
+          @row-click="rowClick"
+          :data="tableData"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px"
+          id="domesticTable">
+          <el-table-column
+            type="selection"
+            width="55">
+          </el-table-column>
+          <el-table-column
+          type="index"
+          width="50"
+          prop="tempResultId"
+          label="编号"
+          align="center"
+          fixed="left"
+          :resizable="false">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="materialName"
+            label="物资名"
+            width="240px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="foreignShipName"
+            label="外轮船名"
+            width="100px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="wagonNo"
+            label="车号"
+            width="180px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+          width="100px"
+            prop="resultBillableTonnage"
+            label="标重">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="updateTime"
+            label="出库时间"
+            width="200px">
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
-    <div class="importedTable" style="height:300px;overflow:scroll;">
+    <!-- <div class="importedTable" style="height:300px;overflow:scroll;">
       <el-table
         highlight-current-row
         :data="tableData"
@@ -74,16 +148,17 @@
           label="标重">
         </el-table-column>
       </el-table>
-    </div>
+    </div> -->
     <div class="right" 
     style="margin-top:10px
            float:right;">
         <div class="form">
-          <div class="form_box" style="margin-right: 10rem">
+          <div class="form_box" style="">
             <el-form>
                <div class="preview-group">
                   <el-form-item label="发站:">
                     <el-autocomplete
+                      disabled
                       class="inline-input"
                       v-model="sendStation"
                       :fetch-suggestions="querySearchSendStation"
@@ -97,7 +172,10 @@
                     </el-autocomplete>
                   </el-form-item>
                   <el-form-item label="到站:">
-                    <el-autocomplete
+                    <el-select filterable  v-model="arrivalStationId">
+                        <el-option v-for="item in arrivalStations" :value="item.arrivalId" :key="item.arrivalId" :label="item.arrivalName"></el-option>
+                    </el-select>
+                    <!-- <el-autocomplete
                       class="inline-input"
                       v-model="toTheStation"
                       :fetch-suggestions="querySearchToTheStation"
@@ -108,7 +186,7 @@
                       <template slot-scope="{ item }">
                         <div class="name">{{ item.arrivalName }}</div>
                       </template>
-                    </el-autocomplete>
+                    </el-autocomplete> -->
                   </el-form-item>
                </div>
           </el-form>
@@ -135,6 +213,7 @@ export default {
       list: [],
       form1: {},
       tableData:[],
+      selectionRow:[],
       input: "",
       value: undefined,
       //船名
@@ -161,14 +240,16 @@ export default {
       a: 1,
       direction: "rtl",
       inputText: "",
-      sendStationId:4,
-      toTheStationId:1,
+      sendStationId: 4,//发站id和到站id都写死了,并且赋了港口名,如果数据库id变化,要注意
       sendStation:"万州港",
-      toTheStation:"老区轨道衡"
+      arrivalStationId:1,
+      arrivalStations:[]
     };
   },
   mounted(){
     this.form1.resultLoadingDate=new Date();
+    this.getArrivalStation();
+    this.searchLoadTemp();
   },
   methods: {
     //发站弹出层
@@ -240,15 +321,17 @@ export default {
     // 确定
     makeSure() {
       this.isLoading=true;
-      if (this.tableData.length <= 0  || 
+      if (this.selectionRow.length <= 0  || 
           !this.sendStationId ||
-          !this.toTheStationId ||
+          !this.arrivalStationId ||
           !this.form1.resultLoadingDate){
-        if (this.tableData.length <= 0) {
+        if (this.selectionRow.length <= 0) {
           this.$message({
             type: "warning",
-            message: "请导入数据!",
+            message: "请选择车皮号!",
           });
+          this.isLoading=false;
+           return;
         }else{
           this.$message({
             type: "warning",
@@ -259,31 +342,32 @@ export default {
         }
       }
       let map = {
-        list:this.tableData,
+        wagonList:this.selectionRow,
         sendStationId: this.sendStationId,
-        arrivalStationId: this.toTheStationId,
+        arrivalStationId: this.arrivalStationId,
         resultLoadingDate: sjTime(this.form1.resultLoadingDate),
-        resultRemarks: this.form1.resultRemarks,
+        remarks: this.form1.resultRemarks,
         userId:getCookie("userId"),
         resultType:1,
       }
       console.log(map);
-      this.axios.post('/api/v1/tms/insertTmstrainLoadingResult',map).then((res)=>{
+      this.axios.post('/api/v1/tms/addShipLoadResult',map).then((res)=>{
         console.log(res);
         if(res.data.code == "200"){
           this.$message({
             type: "success",
-            message: "新增成功",
+            message: "操作成功",
           });
-          this.cancel();
+          this.searchLoadTemp();
         }else {
           this.$message({
               type: "error", 
               message: res.data.data,
           });
         }
+      }).then(()=>{
         this.isLoading=false;
-      })
+      });
     },
     // 取消
     cancel() {
@@ -450,6 +534,51 @@ export default {
       this.supplierId=selection.supplierId;
       this.supplierName=selection.supplierName;
     },
+    //查询临时表
+    searchLoadTemp(){
+      this.axios.post('/api/v1/tms/getResultType?apiId=58&resultType=1&con='+this.input).then((res)=>{
+        console.log(res);
+        if(res.data.code == "200"){
+          this.tableData=res.data.data.list;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //查询到站
+    getArrivalStation(){
+      this.axios.get("/api/v1/uc/getArrivalByLike?index="+this.input).then((res)=>{
+        if(res.data.code == "200"){
+          this.arrivalStations=res.data.data;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+        console.log("到站列表:",this.arrivalStations);
+      })
+    },
+    //点击行勾选
+    rowClick(row, column, event) {
+       let tempTable = this.$refs.tempTable; // 获取表格对象
+       //判断是否已存在
+       let findRow = this.selectionRow.find(item => item.ROW_ID == row.ROW_ID);
+       if (findRow) {
+          tempTable.toggleRowSelection(row, false);
+       }else{
+          tempTable.toggleRowSelection(row);
+       }
+       //赋值
+       this.selectionRow=this.$refs.tempTable.selection;
+    },
+    handleSelectionChange(rows) {
+      this.selectionRow = rows //保存已选择行
+      console.log(this.selectionRow);
+    },
   },
 };
 </script>
@@ -575,7 +704,7 @@ export default {
    display: flex;
     .form_box {
       width: 340px;
-      margin-left: 37%;
+      margin-left: 30px;
       margin-right: 20px;
       .el-form {
         .preview-group {

+ 6 - 13
src/views/TMS/components/importedMine/addWagonUnLoad.vue

@@ -149,25 +149,18 @@ export default {
           "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.inputText;
     },
     currentRadioChange(selection){
+      console.log("warehouse:",selection);
       this.unloadPointId = selection.warehouseId;
       this.unloadPointName = selection.warehouseName;
-      console.log(this.unloadPointId);
     },
     selectionChange(selection) {
-      this.list = [];
-      selection.forEach((e) => {
-        this.list.push({
-          resultWagonNo: e.resultWagonNo,
-          resultId: e.resultId,
-          purchaseOrderId: e.purchaseOrderId,
-          unloadingPointId: e.unloadingPointId,
-        });
-      });
+      this.list = selection;
+      console.log("list:",selection);
     },
     // 确定
     onClickConfirm() {
       let tmstrainWagonUnloadResult = {
-        wagonNoList: this.list,
+        list: this.list,
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
         resultRemark: this.form1.resultRemark,
@@ -177,10 +170,10 @@ export default {
       };
       console.log(tmstrainWagonUnloadResult);
       if (
-        tmstrainWagonUnloadResult.wagonNoList == null ||
+        tmstrainWagonUnloadResult.list == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
         tmstrainWagonUnloadResult.resultUnloadTime == null ||
-        tmstrainWagonUnloadResult.wagonNoList.length <=0 ||
+        tmstrainWagonUnloadResult.list.length <=0 ||
          tmstrainWagonUnloadResult.unloadingPointId ==null
       )
         this.$message.error("请填写完整信息!");

+ 47 - 115
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 万州港-达州新增装车 -->
+  <!-- 万州港-达州港口出库 -->
   <div class="addWagonLoad">
     <page-title>返回</page-title>
     <div class="purchaseOrder_table">
@@ -53,19 +53,28 @@
       <span>当前导入数量:{{ tableData.length }}</span>
     </div>
     <div>
-      <span style="color:red">导入数据中的 车皮号 是必须的</span>
+      <span style="color:red">导入数据中的 序号、车皮号 是必须的</span>
     </div>
     <div
-      class="table item"
-      style="width:680px;
+      class="table item left"
+      style="width:750px;
         height:300px;
         float:left;
         overflow:auto"
     >
-      <el-table stripe :data="tableData" style="width: 100%">
+      <el-table  ref="tempTable"
+          highlight-current-row
+          @row-click="rowClick"
+          :data="tableData"
+          :row-style="{height:'40px'}"
+          style="width: 1000px;font-size: 18px">
+        <el-table-column
+          type="selection"
+          width="40px">
+        </el-table-column>
         <el-table-column
           type="index"
-          width="50"
+          width="50px"
           prop="number"
           label="序号"
           align="center"
@@ -103,65 +112,15 @@
         </el-table-column>
         <el-table-column align="center" width="80px" prop="wagonWeight" label="标重">
         </el-table-column>
-        <!-- <el-table-column
-        align="center"
-        width="100px"
-          fixed="right"
-          label="操作">
-          <template slot-scope="scope">
-            <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
-            <el-button type="text" size="small">编辑</el-button>
-          </template>
-        </el-table-column> -->
       </el-table>
     </div>
-    <!-- <div class="cp">
-      <span style="width:80px">车皮号:</span>
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        @change="onchang"
-        clearable
-      >
-      </el-input>
-    </div>
-    <div class="cpList">
-      <div class="list">
-        <span class="cpList1" v-for="(item, i) in list" :key="i">
-          {{ item }}
-          <i class="el-icon-close itu" @click="onclick(i)"></i>
-        </span>
-      </div>
-    </div>
-
-    <div class="material from">
-      <span class="text">物资:</span>
-      <el-input v-model="materialName" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
-    </div>
-
-    <div class="forwardingUnit from">
-      <span class="text">发货单位:</span>
-      <el-input v-model="supplierName" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
-    </div>
-    <div class="remark from">
-      <span class="text">船名:</span>
-      <el-input class="el-input" v-model="remark" @blur="onBlur"> </el-input>
-      <span class="span"></span>
-    </div>
-    <div class="forwardingUnit from">
-      <span class="text">卸货点:</span>
-      <el-input v-model="unloadPointName" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(4)">浏览</el-button>
-    </div> -->
     <div
       class="right"
-      style="margin-top:10px
+      style="margin-top:10px;
            float:right;"
     >
       <div class="form">
-        <div class="form_box" style="margin-right: 10rem">
+        <div class="form_box" style="">
           <el-form>
             <div class="preview-group">
               <el-form-item label="发站:">
@@ -170,6 +129,7 @@
                   v-model="sendStation"
                   :fetch-suggestions="querySearchSendStation"
                   placeholder="请输入发站名称"
+                  disabled
                   :trigger-on-focus="false"
                   @select="handleSelectSendStation"
                 >
@@ -178,7 +138,7 @@
                   </template>
                 </el-autocomplete>
               </el-form-item>
-              <el-form-item label="到站:">
+              <!-- <el-form-item label="到站:">
                 <el-autocomplete
                   class="inline-input"
                   v-model="toTheStation"
@@ -191,7 +151,7 @@
                     <div class="name">{{ item.arrivalName }}</div>
                   </template>
                 </el-autocomplete>
-              </el-form-item>
+              </el-form-item> -->
               <el-form-item label="有拼装:">
                 <el-switch
                   v-model="isAssembly">
@@ -204,47 +164,11 @@
       </div>
       <div class="button-box">
         <el-button @click="cancel">取消</el-button>
-        <el-button type="primary" :disabled="disable" @click="makeSure"
+        <el-button type="primary" :loading="isLoading" @click="makeSure"
           >确定</el-button
         >
       </div>
     </div>
-
-    <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="30%">
-      <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        style="margin-top: 0.625rem; margin-left: 1.25rem;width:250px"
-        clearable
-      ></el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onClick(a)"
-        style="margin-bottom: 0.9375rem"
-      >
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="frist"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
-      </div>
-      <div v-show="a == 2">
-        <dilTable
-          v-bind.sync="secend"
-          @radio-change="currentRadioChange2"
-        ></dilTable>
-      </div>
-      <div v-show="a == 4">
-        <dilTable
-          v-bind.sync="unloadPoint"
-          @radio-change="currentRadioChange4"
-        ></dilTable>
-      </div>
-    </el-drawer>
   </div>
 </template>
 
@@ -256,13 +180,14 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      disable: false,
+      isLoading: false,
       list: [],
       form1: {},
       tableData: [],
       input: "",
       isAssembly:false,
       value: undefined,
+      selection:[],
       //船名
       remark: null,
       //采购订单id
@@ -354,7 +279,6 @@ export default {
       if (this.remark) {
         map.remark = this.remark;
       }
-      console.log(this.map);
       if (this.materialId && this.supplierId) {
         this.axios.post("/api/v1/oms/selectNewOrderId", map).then(res => {
           console.log(res);
@@ -523,10 +447,10 @@ export default {
     },
     // 确定
     makeSure() {
-      this.disable = true;
+      this.isLoading = true;
       let state = 0;
       if (
-        this.list.length > 0 &&
+        this.$refs.tempTable.selection.length > 0 &&
         this.materialId &&
         this.supplierId &&
         this.purchaseOrderId &&
@@ -538,12 +462,12 @@ export default {
       ) {
         state = 1;
       } else {
-        this.disable = false;
+        this.isLoading = false;
         console.log(this.list.length);
         if (this.list.length == 0) {
           this.$message({
             type: "warning",
-            message: "请输入车皮号!"
+            message: "请选择车皮号!"
           });
         } else {
           if (this.materialId) {
@@ -600,7 +524,7 @@ export default {
       if (state == 1) {
         let map = {
           portName: this.sendStation,
-          wagonList: this.tableData,
+          wagonList: this.$refs.tempTable.selection,
           // unloadingPointId:this.unloadPointId,
           purchaseOrderRailPlanId: this.purchaseOrderId,
           materialId: this.materialId,
@@ -627,7 +551,7 @@ export default {
           });
           if(!flag){
             this.$message.warning("拼装车的标重不存在!");
-            this.disable = false;
+            this.isLoading = false;
             return ;
           }
         }
@@ -640,19 +564,18 @@ export default {
                 type: "success",
                 message: "新增成功"
               });
-              this.disable = false;
               this.cancel();
             } else {
-              this.disable = false;
               this.$message({
                 type: "error",
                 message: res.data.data
               });
             }
+            this.isLoading = false;
           })
           .catch(() => {
             this.$message.error("请联系管理员");
-            this.disable = false;
+            this.isLoading = false;
           });
       }
     },
@@ -688,9 +611,8 @@ export default {
         console.log(rows);
         //清空
         if (rows.length > 0) {
-          that.list = [];
           that.tableData = [];
-          that.disable = false;
+          that.isLoading = false;
           if (typeof rows[0]["车皮号"] == "undefined") {
             that.$message({
               message: "车皮号不存在!请参考下方格式!",
@@ -706,7 +628,6 @@ export default {
             //车皮号表
             let map = {};
             map.wagonNo = carNumber;
-            that.list.push(map);
             //表格数据
             let temp = {
               number: row["序号"],
@@ -738,7 +659,18 @@ export default {
       this.materialName = selection.materialName;
       this.supplierId = selection.supplierId;
       this.supplierName = selection.supplierName;
-    }
+    },
+    //点击行勾选
+    rowClick(row, column, event) {
+       let tempTable = this.$refs.tempTable; // 获取表格对象
+       //判断是否已存在
+       let findRow = this.$refs.tempTable.selection.find(item => item.number == row.number);
+       if (findRow) {
+          tempTable.toggleRowSelection(row, false);
+       }else{
+          tempTable.toggleRowSelection(row);
+       }
+    },
   }
 };
 </script>
@@ -864,8 +796,8 @@ export default {
     display: flex;
     .form_box {
       width: 340px;
-      margin-left: 37%;
-      margin-right: 20px;
+      margin-left: 20%;
+      margin-right: 200px;
       .el-form {
         .preview-group {
           .el-form-item {
@@ -895,7 +827,7 @@ export default {
   .button-box {
     display: flex;
     justify-content: center;
-    padding-top: 30px;
+    padding: 10px;
   }
   .formOther .el-input__inner {
     width: 250px;

+ 1 - 0
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -17,6 +17,7 @@
               @click="click(scope.row.resultId)"
               type="text"
               size="small"
+              :disabled="!isEdit"
               >修改</el-button
             >
             <!-- <el-button

+ 5 - 1
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -18,7 +18,7 @@
       </div>
     </div>
     <div class="button_box">
-      <el-button type="primary" @click="makeSure">新增卸船作业</el-button>
+      <el-button type="primary" :loading="isLoading" @click="makeSure">新增卸船作业</el-button>
     </div>
   </div>
 </template>
@@ -31,6 +31,7 @@ export default {
   data() {
     return {
       input: "",
+      isLoading:false,
       restaurants: [],
       state: "",
       form: {},
@@ -77,9 +78,11 @@ export default {
     },
     // 新增
     makeSure() {
+      this.isLoading=true;
       console.log(this.unloadMap);
       if (JSON.stringify(this.unloadMap).length == 2) {
         this.$message.error("请先选择卸船的船只!");
+        this.isLoading=false;
         return;
       }
       if (
@@ -133,6 +136,7 @@ export default {
           } else {
             this.$message.error("新增失败!");
           }
+          this.isLoading=false;
         });
     },
     loadAll() {

+ 17 - 25
src/views/TMS/components/importedShip/loadShip.vue

@@ -9,20 +9,12 @@
         clearable
       >
       </el-input>
+<!-- 
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
       <el-button type="primary" class="btn" @click="onclick">
-        <el-date-picker
-          v-model="startTime"
-          type="datetime"
-          placeholder="选择日期"
-        >
-        </el-date-picker>
-        <span>至</span>
-        <el-date-picker
-          v-model="endTime"
-          type="datetime"
-          placeholder="选择日期"
-        >
-        </el-date-picker>
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="addclick">
@@ -51,6 +43,8 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -58,6 +52,8 @@ export default {
       startTime: null,
       endTime: null,
       input: "",
+       startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
@@ -75,18 +71,14 @@ export default {
       if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if (startTime && endTime) {
-        if (startTime < endTime) {
-          this.option.requestUrl =
-            "/api/v1/tms/getLoadShipList?apiId=63&con=" +
-            this.input +
-            "&startTime=" +
-            startTime +
-            "&endTime=" +
-            endTime +
-            "&i=" +
-            new Date();
-        }
+      if(startTime && endTime && startTime < endTime){
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
       }
     },
     click(resultId) {

+ 33 - 6
src/views/TMS/components/importedShip/shipLocation.vue

@@ -3,6 +3,9 @@
   <div class="homeworkPath">
     <div class="top">
       <el-input  class="el-input" placeholder="请输入物资名称和外轮船名" v-model="input" clearable> </el-input>
+       <!-- <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -87,6 +90,7 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -173,7 +177,10 @@ export default {
         },
       ],
       selectionList: [],
+       startTime: null,
+      endTime: null,
       input:"",
+      
     };
   },
   created() {
@@ -201,12 +208,32 @@ export default {
       });
     },
     onclick() {
-    
-      this.axios.post("/api/v1/tms/getShipLocationList?con=" + this.input).then((res) => {
-        if (res.data.code == "200") {
-          this.selectionList = res.data.data;
-        }
-      });
+     let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+         this.axios.post("/api/v1/tms/getShipLocationList?con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime).then((res) => {
+            if (res.data.code == "200") {
+              this.selectionList = res.data.data;
+            }
+          });
+      }else{
+         this.axios.post("/api/v1/tms/getShipLocationList?con=" + this.input).then((res) => {
+            if (res.data.code == "200") {
+              this.selectionList = res.data.data;
+            }
+          });
+      }
+     
     },
     click(row) {
       this.axios.post("/api/v1/tms/updateShipLocation", row).then((res) => {

+ 27 - 1
src/views/TMS/components/importedShip/shipResult.vue

@@ -4,6 +4,11 @@
     <div class="top">
 
       <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+<!--       
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -17,12 +22,16 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
       input: "",
+        startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/listAllOrders?apiId=56",
@@ -33,7 +42,24 @@ export default {
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/listAllOrders?apiId=56&con=" + this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+        this.option.requestUrl = "/api/v1/tms/listAllOrders?apiId=56&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+        this.option.requestUrl = "/api/v1/tms/listAllOrders?apiId=56&con=" + this.input;
+      }
+      
     },
     btnclick(pathId) {
       this.$router.push("/path/addHomeworkPath/" + pathId);

+ 51 - 12
src/views/TMS/components/importedShip/shipmentInstructions.vue

@@ -9,6 +9,9 @@
         clearable
       >
       </el-input>
+      <!-- <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -86,6 +89,8 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -93,6 +98,8 @@ export default {
       restaurants: [],
       input: "",
       activeName: "first",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl:
@@ -143,18 +150,50 @@ export default {
       console.log(tab, event);
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&carrierSSOId=" +
-          getCookie("userId") +
-          "&con=" +
-          this.input;
-      } else {
-        this.option2.requestUrl =
-          "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&carrierSSOId=" +
-          getCookie("userId") +
-          "&con=" +
-          this.input;
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;  
+        }
+      }else{
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+                "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=未下发&carrierSSOId=" +
+                getCookie("userId") +
+                "&con=" +
+                this.input;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getShipMentInstructionsList?apiId=74&status=已下发&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        }
       }
     },
     btnclick() {

+ 27 - 1
src/views/TMS/components/importedShip/unloadShip.vue

@@ -9,6 +9,10 @@
         clearable
       >
       </el-input>
+        <!-- <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker>
+       -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -38,12 +42,16 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
       input: "",
+        startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getUnLoadShipList?apiId=68"
@@ -53,8 +61,26 @@ export default {
   mounted() {},
   methods: {
     onclick() {
-      this.option.requestUrl =
+       let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+         this.option.requestUrl =
+        "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+         this.option.requestUrl =
         "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input;
+      }
+     
     },
     click(resultId) {
       this.$router.push("/updateUnloadShip/" + resultId);

+ 103 - 1
src/views/TMS/router/index.js

@@ -213,6 +213,22 @@ import shipmentInstructionForPierText from "../components/importedShip/shipmentI
 
 import addWagonLoadCopy from "../components/importedMine/addWagonloadCopy.vue";
 import outBoundWagon from "../components/importedMine/outBoundWagon.vue";
+import twoSectionFee from "../components/bmsship/twoSectionFee.vue";
+import addTwoSectionFee from "../components/bmsship/addTwoSectionFee.vue";
+import editTwoSectionFee from "../components/bmsship/editTwoSectionFee.vue";
+import twoSectionHandleFee from "../components/bmsship/twoSectionHandleFee.vue";
+import addTwoSectionHandleFee from "../components/bmsship/addTwoSectionHandleFee.vue";
+import editTwoSectionHandleFee from "../components/bmsship/editTwoSectionHandleFee.vue";
+import importedTrainFee from "../components/bmstrain/importedTrainFee.vue"
+import addImportedTrainFee from "../components/bmstrain/addImportedTrainFee.vue"
+import editImportedTrainFee from "../components/bmstrain/editImportedTrainFee.vue"
+import domesticTrainFee from "../components/bmstrain/domesticTrainFee.vue"
+import addDomesticTrainFee from "../components/bmstrain/addDomesticTrainFee.vue"
+import editDomesticTrainFee from "../components/bmstrain/editDomesticTrainFee.vue"
+import threeSectionHandleFee from "../components/bmsship/threeSectionHandleFee.vue";
+import addThreeSectionHandleFee from "../components/bmsship/addThreeSectionHandleFee.vue";
+import editThreeSectionHandleFee from "../components/bmsship/editThreeSectionHandleFee.vue";
+
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -1324,7 +1340,93 @@ const constantRouterMap = [
         name: "outBoundWagon",
         meta: { code: "xtpzgl-jggl" },
         component: outBoundWagon
-      }
+      }, 
+      {
+        path: "twoSectionFee",
+        name: "twoSectionFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: twoSectionFee
+      }, 
+      {
+        path: "addTwoSectionFee",
+        name: "addTwoSectionFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: addTwoSectionFee
+      }, {
+        path: "editTwoSectionFee/:resultId",
+        name: "editTwoSectionFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: editTwoSectionFee
+      },
+      {
+        path: "twoSectionHandleFee",
+        name: "twoSectionHandleFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: twoSectionHandleFee
+      }, 
+      {
+        path: "addTwoSectionHandleFee",
+        name: "addTwoSectionHandleFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: addTwoSectionHandleFee
+      }, {
+        path: "editTwoSectionHandleFee/:resultId",
+        name: "editTwoSectionHandleFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: editTwoSectionHandleFee
+      },
+      {
+        path: "importedTrainFee",
+        name: "importedTrainFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: importedTrainFee
+      }, 
+      {
+        path: "addImportedTrainFee",
+        name: "addImportedTrainFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: addImportedTrainFee
+      }, {
+        path: "editImportedTrainFee/:resultId",
+        name: "editImportedTrainFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: editImportedTrainFee
+      },
+      {
+        path: "domesticTrainFee",
+        name: "domesticTrainFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: domesticTrainFee
+      }, 
+      {
+        path: "addDomesticTrainFee",
+        name: "addDomesticTrainFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: addDomesticTrainFee
+      }, {
+        path: "editDomesticTrainFee/:resultId",
+        name: "editDomesticTrainFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: editDomesticTrainFee
+      },
+      {
+        path: "threeSectionHandleFee",
+        name: "threeSectionHandleFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: threeSectionHandleFee
+      }, 
+      {
+        path: "addThreeSectionHandleFee",
+        name: "addThreeSectionHandleFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: addThreeSectionHandleFee
+      }, {
+        path: "editThreeSectionHandleFee/:resultId",
+        name: "editThreeSectionHandleFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: editThreeSectionHandleFee
+      },
+
     ]
   }
 ];

+ 10 - 37
src/views/WMS/components/port_deposit/loadPortStock.vue

@@ -11,8 +11,7 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-    </div>
-    <div class="totalNumber" style="margin-left: 1040px">
+      <div class="totalNumber" style="margin-left:10px">
       <span
         style="
           color: IndianRed;
@@ -33,8 +32,10 @@
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>
       </el-button>
+      </div>
     </div>
-    <span
+    
+    <!-- <span
       class="el-input"
       style="
         color: red;
@@ -44,9 +45,8 @@
         font-weight: bold;
       "
       >万州港实时库存详情</span
-    >
-    <!-- <div style="overflow:scroll;height:600px"> -->
-    <dilTable
+    > -->
+    <mergeRowTable
       ref="excelDom"
       v-bind.sync="option"
       :isHeigth="isHeigth"
@@ -54,37 +54,7 @@
       @func="func"
       :pageSize="pageSize"
     >
-    </dilTable>
-    <!-- </div> -->
-    <div>
-      <span
-        class="el-input"
-        style="
-          color: red;
-          margin-left: 45%;
-          font-family: FANGSONG;
-          font-size: 20px;
-          font-weight: bold;
-        "
-        >万州港当前物资总计库存</span
-      >
-      <el-input
-        v-model="text"
-        placeholder="请输入物资名称"
-        style="width: 260px; margin-bottom: 35px; margin-left: 20px"
-        clearable
-      ></el-input>
-      <el-button type="primary" class="btn" @click="onclick1">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <dilTable
-        v-bind.sync="option2"
-        :isHeigth="isHeigth"
-        :shiyHeigth="shiyHeigth"
-        :pageSize="pageSize"
-      >
-      </dilTable>
-    </div>
+    </mergeRowTable>
   </div>
 </template>
 
@@ -105,6 +75,8 @@ export default {
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/wmsh/getLoadPortStockList?apiId=158",
+        comparison:"materialName",
+        columnIndexs:[0,1,2,3]
       },
       option2: {
         requestUrl: "/api/v1/wmsh/getLoadPortStockByMaterialName?apiId=493",
@@ -149,6 +121,7 @@ export default {
 .homeworkPath {
   .top {
     padding: 1.25rem 0.375rem;
+    display: flex;
     .my-autocomplete {
       width: 20%;
       margin-right: 40rpx;

+ 5 - 3
src/views/WMS/components/port_deposit/unloadPortStock.vue

@@ -14,8 +14,8 @@
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
-    <dilTable v-bind.sync="option">
-    </dilTable>
+    <mergeRowTable v-bind.sync="option">
+    </mergeRowTable>
   </div>
 </template>
 
@@ -28,7 +28,9 @@ export default {
       state: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/wmsh/getUnloadPortStockList?apiId=158",
+        requestUrl: "/api/v1/wmsh/getUnloadPortStockList?apiId=497",
+        comparison:"portName",
+        columnIndexs:[0,1]
       },
     };
   },

+ 7 - 7
src/views/appoint/components/inward/addTransPrice.vue

@@ -239,8 +239,8 @@ export default {
       this.newsArr.forEach(e => {
         console.log(e.materialName);
         var addmap = {
-          materialName: e.materialName,
-          materialId: e.materialId
+          materialName: e.materialTypeName,
+          materialId: e.materialTypeId
         };
         this.selectionList.push(addmap);
       });
@@ -319,12 +319,12 @@ export default {
       };
       this.axios.post("/api/v1/ams/insertInwardPrice", mapValue).then(res => {
         if (res.data.code == "200") {
-          this.$router.go(-1);
+          // this.$router.go(-1);
+          this.$message({
+            type: "success",
+            message: "新增运输单价成功!"
+          });
         }
-        this.$message({
-          type: "success",
-          message: "新增运输单价成功!"
-        });
       });
     },
     // 取消

+ 52 - 0
src/views/appoint/components/inward/rangePoint.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="rangePoint">
+    <div class="item">
+      <el-form>
+        <el-form-item>
+          <el-input
+            v-model="input"
+            placeholder="请输入查询参数"
+            style="width:250px"
+          ></el-input>
+          <el-button type="primary" @click="onclick">查询</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="option"></dilTable>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      option: {
+        requestUrl: "/api/v1/ams/getRangePoint?apiId=499"
+      },
+      input: null
+    };
+  },
+  methods: {
+    onclick() {
+      this.option.requestUrl =
+        "/api/v1/ams/getRangePoint?apiId=499&con=" +
+        this.input +
+        "&i=" +
+        new Date();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.rangePoint {
+  .item {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 86 - 8
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -667,7 +667,33 @@
         <el-button type="primary" @click="sendRequest">提交订单</el-button>
       </div>
     </el-dialog>
-
+    <el-dialog
+      title="绑定销售片区(将该单位绑定片区才可以上传金蝶)"
+      :visible.sync="isHaveArea"
+      width="94%"
+    >
+      <div class="isHaveArea">
+        <el-form>
+          <el-form-item>
+            <el-label>
+              请选择销售片区
+            </el-label>
+            <el-autocomplete
+              class="inline-input"
+              v-model="saleArea"
+              :fetch-suggestions="querySearchSaleArea"
+              placeholder="请选择销售片区"
+              :trigger-on-focus="false"
+              @select="handleSelectSaleArea"
+            >
+            </el-autocomplete>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="button-box">
+        <el-button type="primary" @click="onclikSaleArea">确定</el-button>
+      </div>
+    </el-dialog>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -682,6 +708,8 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      saleArea: "",
+      isHaveArea: false,
       consigneeDisable: false,
       isCellClick: 0,
       truckRemark: "",
@@ -906,7 +934,8 @@ export default {
       saleOrderReceiveCustomer: null,
       //是否忽视收货客户电话字段
       ignoreSaleOrderConsigneeTel: 0,
-      restaurants: []
+      restaurants: [],
+      saleAreaId: null
     };
   },
   created() {
@@ -968,8 +997,60 @@ export default {
     }
   },
   methods: {
+    handleSelectSaleArea(item) {
+      this.saleAreaId = item.areaId;
+      this.remarks = item.value;
+    },
+    onclikSaleArea() {
+      this.axios
+        .post("/api/v1/uc/bandSaleArea", {
+          areaId: this.saleAreaId,
+          receiveId: this.consigneeId
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("绑定片区成功");
+            this.isHaveArea = false;
+          } else {
+            this.$message.error("绑定片区失败");
+            this.isHaveArea = false;
+          }
+        })
+        .catch(() => {
+          this.$message.error("绑定片区失败");
+          this.isHaveArea = false;
+        });
+    },
+    isReceiveHaveArea(receiveId) {
+      this.axios
+        .post("/api/v1/uc/isReceiveHaveArea?receiveId=" + receiveId)
+        .then(res => {
+          if (res.data.code == "201") {
+            this.isHaveArea = true;
+          }
+        });
+    },
+    querySearchSaleArea(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getSaleAreaByLike?index=" + queryString)
+        .then(res => {
+          var restaurants = res.data.data;
+          console.log(restaurants);
+          var results = queryString
+            ? restaurants.filter(this.createStateFilterSaleArea(queryString))
+            : restaurants;
+          cb(results);
+        });
+    },
+    createStateFilterSaleArea(queryString) {
+      return restaurants => {
+        return (
+          restaurants.label.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
     handleSelectAddress(item) {
-      console.log(item);
       this.saleShipperAddressName = item.addressPlace;
       this.province = item.addressProvince;
       this.city = item.addressDistrict;
@@ -1006,11 +1087,9 @@ export default {
     },
     onblur() {
       this.isCellClick = 0;
-      console.log("我这里值也变化了");
     },
     goclick() {
       this.isCellClick = 1;
-      console.log("我这里值变化了");
     },
     rowDbClick1(row) {
       this.selectedMaterialId = row.materialId;
@@ -1110,6 +1189,7 @@ export default {
     handleSelectConsignee(item) {
       this.consigneeName = item.consigneeCompanyName;
       this.consigneeId = item.consigneeId;
+      this.isReceiveHaveArea(this.consigneeId);
       //带出摘要
       this.axios
         .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
@@ -1948,9 +2028,7 @@ export default {
           done();
         })
         .catch(_ => {});
-    },
-
-    CloseClick() {}
+    }
   }
 };
 </script>

+ 149 - 52
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -2,56 +2,63 @@
   <!-- 销售订单页面 -->
   <div class="salePlan">
     <div class="top">
-      <span>订单时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="datetime"
-        placeholder="选择日期"
-        style="width:220px"
-      >
-      </el-date-picker>
-      <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-        style="width:220px"
-      >
-      </el-date-picker>
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        clearable
-        style="width:250px"
-      >
-      </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>
-      </el-button>
-      <el-button type="primary" @click="btnclick(0)">
-        <i class="el-icon-plus"></i>钢材订单新增
-      </el-button>
-      <el-button type="primary" @click="refresh">
-        <i class="el-icon-refresh"></i>
-      </el-button>
-      <el-button type="primary" @click="batchReport">
-        <i class="upload2"></i>批量上传
-      </el-button>
-      <el-button
-        type="primary"
-        @click="exportData()"
-        v-if="activeName == 'first'"
-        ><i class="el-icon-download"></i>Excel</el-button
-      >
-      <el-button disabled>物资总件数</el-button>
-      <el-input
-        placeholder=""
-        v-model="matSum"
-        clearable
-        style="width:100px"
-        disabled
-      >
-      </el-input>
+      <el-form :inline="true">
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width:220px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width:220px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input"
+            clearable
+            style="width:250px"
+          >
+          </el-input>
+          <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="btnclick(0)">
+            <i class="el-icon-plus"></i>新增
+          </el-button>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+          <el-button type="primary" @click="batchReport">
+            <i class="upload2"></i>批量上传
+          </el-button>
+          <el-button
+            type="primary"
+            @click="exportData()"
+            v-if="activeName == 'first'"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+          <el-button disabled>物资总件数</el-button>
+          <el-input
+            placeholder=""
+            v-model="matSum"
+            clearable
+            style="width:100px"
+            disabled
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -111,7 +118,7 @@
               fixed="right"
               label="操作"
               align="center"
-              width="200"
+              width="280"
             >
               <template slot-scope="scope">
                 <el-button
@@ -126,6 +133,12 @@
                   size="small"
                   >关闭订单</el-button
                 >
+                <el-button
+                  @click="adverseCloseSaleOrder(scope.row)"
+                  type="text"
+                  size="small"
+                  >反关闭订单</el-button
+                >
                 <el-button
                   @click="updateSaleOrder(scope.row)"
                   type="text"
@@ -204,6 +217,7 @@
 <script>
 import { getCookie } from "@/utils/util.js";
 import { sjTime } from "@/utils/sharedJsFile";
+import returnResultVue from "../../../inward/components/offsetSteel/truckTransport/returnResult.vue";
 export default {
   name: "saleOrder",
   data() {
@@ -283,7 +297,9 @@ export default {
       },
       mapList: [],
       mapItemList: [],
-      matSum: null
+      matSum: null,
+      tableData: [],
+      saleDateOfReceipt: null
     };
   },
   created() {
@@ -347,8 +363,89 @@ export default {
         "&i=" +
         new Date();
     }
+    let loadTime1 = new Date(
+      new Date(new Date().toLocaleDateString()).getTime() +
+        (3600 * 1000 * 8 - 1)
+    ); // 当天8点前
+    let loadTime2 = new Date(
+      new Date(new Date().toLocaleDateString()).getTime() +
+        (3600 * 1000 * 32 - 1)
+    ); // 次天8点前
+    if (new Date().getTime() - loadTime1 > 0) {
+      this.saleDateOfReceipt = loadTime2;
+    } else {
+      this.saleDateOfReceipt = loadTime1;
+    }
   },
   methods: {
+    //导入Excel格式
+    // 导入excel
+    importExcel(file) {
+      let that = this;
+      if (!file) {
+        that.$message({
+          message: "文件错误!",
+          type: "warning"
+        });
+        return;
+      }
+      this.tableData = [];
+      var reader = new FileReader();
+      var data = null;
+      var workbook = null;
+      //设置读取操作
+      reader.onload = function(e) {
+        console.log(e);
+        data = e.target.result;
+        workbook = XLSX.read(data, {
+          type: "binary"
+        });
+        console.log(workbook);
+        let rows = XLSX.utils.sheet_to_json(
+          workbook.Sheets[workbook.SheetNames[0]]
+        ); //只取第一页
+        console.log("rows", rows);
+        Array.from(rows).forEach(e => {
+          let map = {};
+          console.log(e, "e");
+          Object.keys(e).forEach(e1 => {
+            console.log("e1", e1);
+            if (e1.includes("物资名称")) {
+              map.materialName = e[e1];
+            }
+          });
+          that.tableData.push(map);
+          console.log(that.tableData);
+        });
+        return;
+      };
+      reader.readAsBinaryString(file.raw); //以二进制方式读取
+    },
+    adverseCloseSaleOrder(row) {
+      console.log(row);
+      this.$confirm("确定反关闭整条订单吗?", "继续?", {
+        cancelButtonText: "取消",
+        confirmButtonText: "确定",
+        center: true
+      }).then(() => {
+        this.axios
+          .post(
+            "/api/v1/ams/adverseCloseSaleOrder?saleOrderId=" + row.saleOrderId
+          )
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("反关闭成功");
+              this.getRequestUrl();
+            } else {
+              this.$message.error("反关闭失败");
+              this.getRequestUrl();
+            }
+          })
+          .catch(() => {
+            this.$message.error("反关闭失败");
+          });
+      });
+    },
     updateReportedSaleOrder(scope) {
       this.$router.push("/editSaleOrder/" + scope.row.saleOrderId);
     },

+ 4 - 3
src/views/appoint/components/saleContract/updateSaleOrderSteel.vue

@@ -153,6 +153,8 @@
         </el-table-column>
         <el-table-column property="materialSpecification" label="规格">
         </el-table-column>
+        <el-table-column property="orderPlanWeight" label="物资件数">
+        </el-table-column>
         <el-table-column property="materialModel" label="型号">
         </el-table-column>
         <el-table-column fixed="right" label="操作" width="200">
@@ -1190,7 +1192,7 @@ export default {
           this.pos1 = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].capacityNumber === data[i - 1].capacityNumber) {
+          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
             this.spanArr1[this.pos1] += 1;
             this.spanArr1.push(0);
           } else {
@@ -1239,8 +1241,7 @@ export default {
         columnIndex === 1 ||
         columnIndex === 2 ||
         columnIndex === 3 ||
-        columnIndex === 4 ||
-        columnIndex === 8
+        columnIndex === 4
       ) {
         const _row = this.spanArr[rowIndex];
         const _col = _row > 0 ? 1 : 0;

+ 4 - 1
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -411,6 +411,7 @@ export default {
         materialTypeId: this.second3.mapList4.materialTypeId,
         isNeedPortDisCharge: this.form1.isNeedPortDisCharge,
         isNeedPortFee: this.form1.isNeedPortFee,
+        isNeedBonded: this.form1.isNeedBonded,
         cargoPictureUrl: this.cargoPictureUrl,
         userId: getCookie("userId"),
       };
@@ -436,7 +437,8 @@ export default {
         map.groupId == null ||
         map.inFactoryShipName == null ||
         map.isNeedPortDisCharge == null ||
-        map.isNeedPortFee == null
+        map.isNeedPortFee == null ||
+        map.isNeedBonded == null
         // map.foreignShipName==null||
         // map.materialId==null
       ) {
@@ -540,6 +542,7 @@ export default {
               message: res.data.data,
             });
           }
+        }).then(()=>{
           this.isLoading=false;
         });
     },

+ 56 - 10
src/views/appoint/components/ship/deliveryAttorney.vue

@@ -9,7 +9,15 @@
         clearable
       >
       </el-input>
-
+      <!-- <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -74,6 +82,8 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -92,7 +102,9 @@ export default {
           "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1",
         selectionType: "select"
       },
-      amsShipDeliveryList: []
+      amsShipDeliveryList: [],
+      startTime: null,
+      endTime: null,
     };
   },
 
@@ -101,19 +113,53 @@ export default {
       this.amsShipDeliveryList = selection;
     },
     onclick() {
-      if (this.activeName == "first") {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+        if (this.activeName == "first") {
           this.option1.requestUrl =
             "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0&carrierSSOId=" +
             getCookie("userId") +
             "&con=" +
-            this.input;  
-      } else{
-          this.option2.requestUrl =
-            "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&carrierSSOId=" +
-            getCookie("userId") +
-            "&con=" +
-            this.input;  
+            this.input+
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input+
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime;  
+        }
+      }else{
+        if (this.activeName == "first") {
+            this.option1.requestUrl =
+              "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=0&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        } else{
+            this.option2.requestUrl =
+              "/api/v1/tms/getAmsshipDeliveryAttroneyList?apiId=73&status=1&carrierSSOId=" +
+              getCookie("userId") +
+              "&con=" +
+              this.input;  
+        }
       }
+
+      
     },
     click(pathId) {
       this.$router.push("/path/addDeliveryNotice/" + pathId);

+ 53 - 8
src/views/appoint/components/ship/deliveryNotice.vue

@@ -3,6 +3,15 @@
   <div class="shipTransport">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <!-- <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -52,6 +61,7 @@
   </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
@@ -60,6 +70,8 @@ export default {
       srcList:[],
       isShow:false,
       src:"",
+      startTime: null,
+      endTime: null,
       // restaurants: [],
       input: "",
       activeName: "first",
@@ -75,19 +87,52 @@ export default {
   },
   methods: {
     onclick() {
-        if (this.activeName == "first") {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+          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.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{
+        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;
+        }
       }
+      
      },
     addClick() {
       this.$router.push("/addDeliveryNotice/");

+ 1 - 13
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -382,22 +382,10 @@ export default {
         materialTypeId: this.second3.mapList4.materialTypeId,
         isNeedPortDisCharge: this.form1.isNeedPortDisCharge,
         isNeedPortFee: this.form1.isNeedPortFee,
+        isNeedBonded: this.form1.isNeedBonded,
         cargoPictureUrl: this.cargoPictureUrl,
         userId: getCookie("userId"),
       };
-
-      if (this.second2.mapList3.length == 0) {
-        this.$message.warning("请选择收货人");
-        return;
-      }
-      if (this.second3.mapList4.length == 0) {
-        this.$message.warning("请选择物资品类");
-        return;
-      }
-      if (this.second5.mapList5.length == 0) {
-        this.$message.warning("请选择批次");
-        return;
-      }
       //判断是否为电话号码
       function isTelePhone() {
         var value2 = map.resultTelephoneFax;

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

@@ -69,6 +69,7 @@ import inwardAddTransPrice from "../components/inward/addTransPrice.vue";
 import saleOrderOODetails from "../components/saleContract/saleOrderOODetails.vue";
 import updateSaleOrderSteel from "../components/saleContract/updateSaleOrderSteel.vue";
 import copySteelOrder from "../components/saleContract/copySteelOrder.vue";
+import rangeValuePoint from "../components/inward/rangePoint.vue";
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -468,6 +469,12 @@ const constantRouterMap = [
         name: "copySteelOrder",
         meta: { code: "xtpzgl-yhgl" },
         component: copySteelOrder
+      },
+      {
+        path: "rangeValuePoint",
+        name: "rangeValuePoint",
+        meta: { code: "xtpzgl-yhgl" },
+        component: rangeValuePoint
       }
     ]
   }

+ 209 - 129
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -2,34 +2,86 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <span>详单时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
-      </el-date-picker>
-      <span>至</span>
-      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="exportData()"
-        ><i class="el-icon-download"></i>导出(Excel)</el-button
-      >
-      <span style="margin-left: 1rem;">合计净重:</span>
-      <el-input
-        v-model="totalNetWeight"
-        :disabled="true"
-        style="width: 140px;"
-      ></el-input>
-      <span style="margin-left: 1rem;">合计金额:</span>
-      <el-input
-        v-model="totalMoney"
-        :disabled="true"
-        style="width: 100px;"
-      ></el-input>
+      <el-form :inline="true" style="margin-top :5px">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:120px"
+          >
+            <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-select
+            v-model="screen1"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:120px"
+          >
+            <el-option
+              v-for="item in optionsF"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:200px"
+            v-model="input1"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <span>详单时间:</span>
+        <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-button type="primary" @click="exportData()"
+          ><i class="el-icon-download"></i>Excel</el-button
+        >
+        <!-- <span style="margin-left: 1rem;">合计净重:</span>
+        <el-input
+          v-model="totalNetWeight"
+          :disabled="true"
+          style="width: 120px;"
+        ></el-input>
+        <span style="margin-left: 1rem;">合计金额:</span>
+        <el-input
+          v-model="totalMoney"
+          :disabled="true"
+          style="width: 100px;"
+        ></el-input> -->
+      </el-form>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" tab-click="handClick">
@@ -61,6 +113,44 @@ import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
+      options: [
+        {
+          value: "用车单位",
+          label: "用车单位"
+        },
+        {
+          value: "货物名称",
+          label: "货物名称"
+        },
+        {
+          value: "车牌号",
+          label: "车牌号"
+        },
+        {
+          value: "承运起止范围",
+          label: "承运起止范围"
+        }
+      ],
+      optionsF: [
+        {
+          value: "用车单位",
+          label: "用车单位"
+        },
+        {
+          value: "货物名称",
+          label: "货物名称"
+        },
+        {
+          value: "车牌号",
+          label: "车牌号"
+        },
+        {
+          value: "承运起止范围",
+          label: "承运起止范围"
+        }
+      ],
+      screen: null,
+      screen1: null,
       startTime: null,
       endTime: null,
       //合计净重
@@ -71,7 +161,8 @@ export default {
       Fee: null,
       //加载
       selectLineLoading: false,
-      input: "",
+      input: null,
+      input1: null,
       activeName: "first",
       ssoId: null,
       //详单Id
@@ -192,107 +283,100 @@ export default {
     onclick() {
       let startTime = null;
       let endTime = null;
-      if (this.startTime) {
+      let orgCode = null;
+      let materialTypeNames = null;
+      let transRangeValues = null;
+      let shipperNames = null;
+      let capacityNo = null;
+      let carrierSsoId = null;
+      if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
-      }
-      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if (startTime && endTime) {
-        if (startTime < endTime) {
-          if (
-            getCookie("orgCode") == "dagangadmin" ||
-            getCookie("orgCode") == "zidonghuabu" ||
-            getCookie("orgCode") == "wuliuchuyunzhongxin"
-          ) {
-            this.options1.requestUrl =
-              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-            this.options2.requestUrl =
-              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-            this.options3.requestUrl =
-              "/api/v1/bms/getNoInwardDetails?apiId=490" +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-          } else if (getCookie("orgCode") == "chengyunshang") {
-            this.options1.requestUrl =
-              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId=" +
-              getCookie("userId") +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-            this.options2.requestUrl =
-              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId=" +
-              getCookie("userId") +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-            this.options3.requestUrl =
-              "/api/v1/bms/getNoInwardDetails?apiId=490&carrierSsoId=" +
-              getCookie("userId") +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-          } else {
-            this.options1.requestUrl =
-              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" +
-              getCookie("orgCode") +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-            this.options2.requestUrl =
-              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" +
-              getCookie("orgCode") +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-            this.options3.requestUrl =
-              "/api/v1/bms/getNoInwardDetails?apiId=490&userId=" +
-              getCookie("orgCode") +
-              "&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i" +
-              new Date();
-          }
-        } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
-        }
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        orgCode = null;
       } else {
+        orgCode = getCookie("orgCode");
       }
+      if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      }
+      if (this.screen == "承运起止范围") {
+        transRangeValues = this.input;
+      }
+      if (this.screen == "货物名称") {
+        materialTypeNames = this.input;
+      }
+      if (this.screen == "用车单位") {
+        shipperNames = this.input;
+      }
+      if (this.screen1 == "车牌号") {
+        capacityNo = this.input1;
+      }
+      if (this.screen1 == "承运起止范围") {
+        transRangeValues = this.input1;
+      }
+      if (this.screen1 == "货物名称") {
+        materialTypeNames = this.input1;
+      }
+      if (this.screen1 == "用车单位") {
+        shipperNames = this.input1;
+      }
+      this.options1.requestUrl =
+        "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&shipperNames=" +
+        shipperNames +
+        "&materialTypeNames=" +
+        materialTypeNames +
+        "&transRangeValues=" +
+        transRangeValues +
+        "&capacityNo=" +
+        capacityNo +
+        "&i" +
+        new Date();
+      this.options2.requestUrl =
+        "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&shipperNames=" +
+        shipperNames +
+        "&materialTypeNames=" +
+        materialTypeNames +
+        "&transRangeValues=" +
+        transRangeValues +
+        "&capacityNo=" +
+        capacityNo +
+        "&i" +
+        new Date();
+      this.options3.requestUrl =
+        "/api/v1/bms/getNoInwardDetails?apiId=490" +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&shipperNames=" +
+        shipperNames +
+        "&materialTypeNames=" +
+        materialTypeNames +
+        "&transRangeValues=" +
+        transRangeValues +
+        "&capacityNo=" +
+        capacityNo +
+        "&i" +
+        new Date();
     },
     //运输订单点击浏览的事件
     select() {
@@ -313,10 +397,6 @@ export default {
   .sache {
     margin-left: 20px;
     margin-top: 20px;
-    .el-input {
-      width: 20%;
-      margin-right: 1.25rem;
-    }
   }
   .table {
     margin-left: 20px;

+ 6 - 3
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -664,9 +664,12 @@ export default {
       width: 170px;
       text-align: right;
     }
-    .input {
-      width: 250px;
-      margin-right: 90px;
+
+    .el-select ::v-deep {
+      .el-input__inner {
+        margin-right: -30px;
+        width: 250px;
+      }
     }
   }
   .carrier {

+ 71 - 16
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -321,6 +321,7 @@ import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 import { checkTel } from "@/utils/validator.js";
+import returnResultVue from "../offsetSteel/truckTransport/returnResult.vue";
 export default {
   components: { PageTitle },
   data() {
@@ -450,7 +451,28 @@ export default {
       form: {}
     };
   },
+  computed: {
+    requirementType() {
+      return this.form.requirementType;
+    }
+  },
   watch: {
+    requirementType() {
+      if (this.form.requirementType == "计重") {
+        this.materialTable.requestUrl =
+          "/api/v1/uc/getInwardWeightMaterial?apiId=498&i=" + new Date();
+      } else {
+        this.materialTable.requestUrl =
+          "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
+      }
+    },
+    // form: {
+    //   handler(oldVal, newVal) {
+    //     console.log(oldVal);
+    //     console.log(newVal);
+    //   },
+    //   deep: true
+    // },
     value() {
       if (this.value) {
         // console.log(this.value)
@@ -517,7 +539,6 @@ export default {
     selectionChange(selection) {
       this.selectionList1 = [];
       this.selectionList1 = selection;
-      console.log("selection", selection);
     },
     unloadPoint(index) {
       this.getUnloadRequestUrl();
@@ -535,8 +556,13 @@ export default {
     ondrawer(num) {
       if (num == 1) {
         this.table = true;
-        this.materialTable.requestUrl =
-          "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
+        if (this.form.requirementType == "计重") {
+          this.materialTable.requestUrl =
+            "/api/v1/uc/getInwardWeightMaterial?apiId=498&i=" + new Date();
+        } else {
+          this.materialTable.requestUrl =
+            "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
+        }
       } else if (num == 3) {
         this.drawer2 = true;
         this.options3.requestUrl = "/api/v1/uc/getCapacityType?apiId=460";
@@ -553,9 +579,19 @@ export default {
         this.materialTable.requestUrl =
           "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
       } else {
-        this.materialTable.requestUrl =
-          "/api/v1/uc/queryMaterialByLike?apiId=244&index=" +
-          this.inputMaterial;
+        if (this.form.requirementType == "计重") {
+          this.materialTable.requestUrl =
+            "/api/v1/uc/getInwardWeightMaterial?apiId=498&i=" +
+            new Date() +
+            "&index=" +
+            this.inputMaterial;
+        } else {
+          this.materialTable.requestUrl =
+            "/api/v1/uc/queryMaterialByLike?apiId=244&i=" +
+            new Date() +
+            "&index=" +
+            this.inputMaterial;
+        }
         this.inputMaterial = null;
       }
     },
@@ -616,7 +652,9 @@ export default {
           requirementPlatformId: e.requirementPlatformId,
           requirementUnloadUnitId: e.requirementUnloadUnitId,
           orderMaterialNumber: e.orderMaterialNumber,
-          orderMaterialWeight: e.orderMaterialWeight
+          orderMaterialWeight: e.orderMaterialWeight,
+          loadPointName: e.loadPointName,
+          unloadPointName: e.unloadPointName
         };
         this.tableData.push(addmap);
       });
@@ -624,8 +662,19 @@ export default {
     onclick(a) {
       if (this.input != null) {
         if (a == 1) {
-          this.materialTable.requestUrl =
-            "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
+          if (this.form.requirementType == "计重") {
+            this.materialTable.requestUrl =
+              "/api/v1/uc/getInwardWeightMaterial?apiId=498&i=" +
+              new Date() +
+              "&index=" +
+              this.input;
+          } else {
+            this.materialTable.requestUrl =
+              "/api/v1/uc/queryMaterialByLike?apiId=244&i=" +
+              new Date() +
+              "&index=" +
+              this.input;
+          }
           this.input = null;
         } else {
           this.second1.requestUrl =
@@ -633,8 +682,14 @@ export default {
           this.input = null;
         }
       } else {
-        this.materialTable.requestUrl =
-          "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
+        if (this.form.requirementType == "计重") {
+          this.materialTable.requestUrl =
+            "/api/v1/uc/getInwardWeightMaterial?apiId=498&i=" + new Date();
+        } else {
+          this.materialTable.requestUrl =
+            "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
+        }
+        this.inputMaterial = null;
       }
     },
     currentRadioChange1(selection) {
@@ -657,12 +712,11 @@ export default {
     },
     selectionChange1(radio) {
       console.log(radio);
-      (this.capacityTypeName = radio.capacityTypeName),
-        (this.capacityTypeId = radio.capacityTypeId),
-        (this.whether = radio.whether);
+      this.capacityTypeName = radio.capacityTypeName;
+      this.capacityTypeId = radio.capacityTypeId;
+      this.whether = radio.whether;
     },
     currentRadioChange2(selection) {
-      console.log(selection);
       if (this.a == 2) {
         this.truckPoint = selection.warehouseName;
         this.requiremntUnitId = selection.warehouseId;
@@ -670,12 +724,14 @@ export default {
         // console.log(this.tableData[this.index])
         this.tableData[this.index].requirementUnloadUnitId =
           selection.warehouseId;
+        this.tableData[this.index].unloadPointName = selection.warehouseName;
         this.tableData[this.index].truckPoint1 = selection.warehouseName;
         this.refreshTable();
       } else if (this.a == 4) {
         // console.log(this.tableData[this.index])
         this.tableData[this.index].requirementPlatformId =
           selection.warehouseId;
+        this.tableData[this.index].loadPointName = selection.warehouseName;
         this.tableData[this.index].requirementPlatformName =
           selection.warehouseName;
         this.refreshTable();
@@ -790,7 +846,6 @@ export default {
         orgCode: getCookie("orgCode"),
         remark: this.form.Tel + this.capacityTypeName + this.form.typeRemarks
       };
-      console.log("requirement", requiremnet);
       this.axios
         .post("/api/v1/ams/addTruckRequirement", requiremnet)
         .then(res => {

+ 19 - 9
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -250,7 +250,7 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1";
       this.option.requestUrl =
         "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&carrierSsoId=" +
         getCookie("userId");
@@ -260,7 +260,7 @@ export default {
         "&con=" +
         "铁专线精煤";
       this.line.requestUrl =
-        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1" +
         "&con=" +
         "采购内转";
       this.option.requestUrl =
@@ -268,7 +268,7 @@ export default {
     } else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1";
       this.option.requestUrl =
         "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
     }
@@ -276,23 +276,33 @@ export default {
   methods: {
     //点击确定按钮的事件
     makeSure() {
+      console.log(this.orderType);
       this.disabled = true;
       if (this.planId == null) {
         this.$message.error("未勾选计划");
         this.disabled = false;
         return;
-      } else if (this.lineId == null) {
-        if (this.orderType == 10 || this.orderType == 20) {
+      }
+      if (this.lineId == null) {
+        if (
+          this.orderType == 10 ||
+          this.orderType == 20 ||
+          this.orderType == 23 ||
+          this.orderType == 24
+        ) {
           this.$message.error("未选择路线");
           this.disabled = false;
           return;
         }
-      } else if (this.selectionList.length == 0) {
+      }
+      if (this.selectionList.length == 0) {
         this.$message.error("未选择车辆");
         this.disabled = false;
         return;
-      } else if (this.orderType == null) {
+      }
+      if (this.orderType == null) {
         this.$message.error("请选择订单类型");
+        this.disabled = false;
         return;
       }
       this.axios
@@ -402,13 +412,13 @@ export default {
       } else {
         this.lineDrawer = true;
         this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1&i=" + new Date();
       }
     },
     //线路表格的框计算
     selectClick() {
       this.line.requestUrl =
-        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.lineText;
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1&con=" + this.lineText;
     }
   }
 };

+ 17 - 8
src/views/inward/components/truckOrder/addPurInwardOrderCon.vue

@@ -247,20 +247,20 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1";
     } else if (getCookie("orgCode") == "biemeierchejian") {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096" +
         "&con=" +
         "铁专线精煤";
       this.line.requestUrl =
-        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1" +
         "&con=" +
         "采购内转";
     } else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1";
     }
   },
   methods: {
@@ -269,19 +269,28 @@ export default {
       this.materialId = res.list[0].materialId;
     },
     makeSure() {
+      console.log(typeof this.orderType);
       this.disabled = true;
       if (this.lineId == null) {
-        if (this.orderType == 10 || this.orderType == 20) {
+        if (
+          this.orderType == 10 ||
+          this.orderType == 20 ||
+          this.orderType == 23 ||
+          this.orderType == 24
+        ) {
           this.$message.error("未选择路线");
           this.disabled = false;
           return;
         }
-      } else if (this.selectionList.length == 0) {
+      }
+      if (this.selectionList.length == 0) {
         this.$message.error("未选择车辆");
         this.disabled = false;
         return;
-      } else if (this.orderType == null) {
+      }
+      if (this.orderType == null || this.orderType == "null") {
         this.$message.error("请选择订单类型");
+        this.disabled = false;
         return;
       }
       this.axios
@@ -385,13 +394,13 @@ export default {
       } else {
         this.lineDrawer = true;
         this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1&i=" + new Date();
       }
     },
     //线路表格的框计算
     selectClick() {
       this.line.requestUrl =
-        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.lineText;
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=1&con=" + this.lineText;
     }
   }
 };

+ 167 - 105
src/views/inward/components/truckOrder/plan.vue

@@ -11,7 +11,6 @@
     <template>
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
-          
           <el-tab-pane label="待分解" name="second">
             <dilTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="100">
@@ -25,64 +24,63 @@
                   </el-button>
                 </template>
               </el-table-column>
-          <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-          </el-table-column> 
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已分解" name="third">
             <dilTable v-bind.sync="third" ref="table2">
-             <el-table-column fixed="right" label="操作" width="150">
+              <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="desponsePlan(scope)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="desponsePlan(scope)"
+                  >
                     继续分解
                   </el-button>
-                  <el-button type="text" size="mini" @click="getPlanOrder(scope)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="getPlanOrder(scope)"
+                  >
                     运单
                   </el-button>
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="closePlanOrder(scope)"
+                  >
+                    关闭计划
+                  </el-button>
+                </template>
+              </el-table-column>
+              <!-- 物资详情抽屉 -->
+              <el-table-column type="expand" width="1">
+                <template slot-scope="props">
+                  <el-form
+                    label-position="center"
+                    inline
+                    class="demo-table-expand"
+                  >
+                    <div v-if="false">{{ props }}</div>
+                    <div>
+                      <el-table :data="tableData" border>
+                        <el-table-column
+                          v-for="(item, i) in tableHead"
+                          :key="i"
+                          :prop="item.prop"
+                          :label="item.label"
+                          :width="item.width"
+                        ></el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form>
                 </template>
               </el-table-column>
-          <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-          </el-table-column> 
             </dilTable>
           </el-tab-pane>
-          
+
           <el-tab-pane label="已完成" name="four">
-            <dilTable v-bind.sync="four" ref="table3">
-            </dilTable>
+            <dilTable v-bind.sync="four" ref="table3"> </dilTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -95,81 +93,145 @@ export default {
   data() {
     return {
       inputText: "",
-      carrierId:40,
+      carrierId: 40,
       first: {
         // first请求数据的地址
-        requestUrl:"",
+        requestUrl: ""
       },
       second: {
         // second请求数据的地址
-        requestUrl:
-          "" 
+        requestUrl: ""
       },
       third: {
         // second请求数据的地址
-        requestUrl:
-          "" 
+        requestUrl: ""
       },
-      four:{
-        requestUrl:""
+      four: {
+        requestUrl: ""
       },
       activeName: "second",
-      tableData: [],
+      tableData: []
     };
   },
-  created(){
-      if(getCookie("orgCode") == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + getCookie("userId")
-        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + getCookie("userId")
-        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + getCookie("userId")
-        this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" + getCookie("userId")
-      }else{
-        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1"
-        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2"
-        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3"
-        this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"
-      } 
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.first.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" +
+        getCookie("userId");
+      this.second.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" +
+        getCookie("userId");
+      this.third.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" +
+        getCookie("userId");
+      this.four.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" +
+        getCookie("userId");
+    } else {
+      this.first.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1";
+      this.second.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2";
+      this.third.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3";
+      this.four.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4";
+    }
   },
   methods: {
-     handleClick(tab, event) {
-      console.log("zhix")
-      this.getRequestUrl()
-      this.getRequirementMaterial()
+    handleClick(tab, event) {
+      console.log("zhix");
+      this.getRequestUrl();
+      this.getRequirementMaterial();
     },
-    getRequestUrl(){
-      if(getCookie("orgCode") == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + getCookie("userId") + "&i=" + new Date()
-        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + getCookie("userId") + "&i=" + new Date()
-        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + getCookie("userId") + "&i=" + new Date()
-        this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" + getCookie("userId") + "&i=" + new Date()
-      }else{
-        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" + "&i=" + new Date()
-        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2" + "&i=" + new Date()
-        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3" + "&i=" + new Date()
-        this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" + "&i=" + new Date()
-      } 
+    getRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.third.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.four.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" +
+          "&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2" +
+          "&i=" +
+          new Date();
+        this.third.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3" +
+          "&i=" +
+          new Date();
+        this.four.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" +
+          "&i=" +
+          new Date();
+      }
+    },
+    closePlanOrder(scope) {
+      console.log(scope.row.planId);
+      this.$confirm(
+        "确定关闭该计划吗?该操作会将计划下未接收订单全部关闭",
+        "是否继续?",
+        {
+          center: true,
+          confirmButtonText: "确定",
+          cancelButtonText: "取消"
+        }
+      ).then(() => {
+        this.axios
+          .post("/api/v1/oms/closeInwardOrderByPlan?planId=" + scope.row.planId)
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("关闭成功");
+              this.getRequestUrl();
+            } else {
+              this.$message.error("关闭失败");
+            }
+          })
+          .catch(() => {
+            this.$message.error("关闭失败");
+          });
+      });
     },
     receiver(scope) {
       this.$confirm("是否接收", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/receiveInwardPlan/" + scope.row.planId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "接收成功!",
+                  message: "接收成功!"
                 });
-                this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "接收失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -177,7 +239,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "接收操作已取消!",
+            message: "接收操作已取消!"
           });
         });
     },
@@ -195,24 +257,24 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post(
               "/api/v1/bms/deleteTrainSettlement/" + scope.row.requirementId
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
+                  message: "删除成功!"
                 });
-                this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -220,7 +282,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
     },
@@ -230,7 +292,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
@@ -238,17 +300,17 @@ export default {
               "/api/v1/ams/addFixedAmsDispatchSaleOrder",
               this.first.mapList
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "下发成功!",
+                  message: "下发成功!"
                 });
-                this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "下发失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -256,23 +318,23 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">
-.inwardDisPlan{
+.inwardDisPlan {
   margin-top: 20px;
   margin-left: 20px;
-  .sache{
+  .sache {
     padding: 1.25rem 0.375rem;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
-  }
+}
 </style>

+ 51 - 35
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -42,6 +42,13 @@
             <i class="el-icon-d-arrow-right"></i>放行
           </el-button></el-form-item
         >
+        <el-form-item
+          ><el-button type="primary" class="btn" disabled>
+            厂内钢材车辆总数
+          </el-button>
+          <el-input disabled style="width:100px" v-model="steelOrderNum">
+          </el-input>
+        </el-form-item>
       </el-form>
     </div>
     <!-- 物资选择模态框 -->
@@ -118,26 +125,14 @@
             <el-table-column type="index" width="50"> </el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
-            <el-table-column prop="resultStartTime" label="排队开始时间">
+            <el-table-column prop="consigneeName" label="客户" fit>
             </el-table-column>
-            <el-table-column
-              prop="listNodeOrder"
-              label="序号"
-            ></el-table-column>
             <el-table-column prop="materialName" label="物资名称">
             </el-table-column>
-            <el-table-column prop="materialSpecification" label="物资规格">
-            </el-table-column>
-            <el-table-column prop="materialModel" label="物资型号">
+            <el-table-column prop="materialSpecification" label="规格型号">
             </el-table-column>
             <el-table-column prop="materialNumber" label="物资件数">
             </el-table-column>
-            <el-table-column prop="driverTel" label="司机电话号码">
-            </el-table-column>
-            <el-table-column prop="sureTime" label="可进厂确认时间">
-            </el-table-column>
-            <el-table-column prop="gatepostName" label="进厂门岗">
-            </el-table-column>
             <el-table-column label="装货点" width="100">
               <template slot-scope="scope">
                 <el-select size="mini" v-model="scope.row.id">
@@ -151,13 +146,27 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column fixed="right" label="操作" width="100">
+            <el-table-column prop="resultStartTime" label="排队开始时间">
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+            ></el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间">
+            </el-table-column>
+
+            <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column>
+
+            <!-- <el-table-column fixed="right" label="操作" width="100">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
               </template>
-            </el-table-column>
+            </el-table-column> -->
           </el-table>
         </el-tab-pane>
         <el-tab-pane label="多拼车辆排队链表" name="second">
@@ -172,27 +181,14 @@
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
-            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
-            <el-table-column prop="resultStartTime" label="排队开始时间">
+            <el-table-column prop="consigneeName" label="客户" fit>
             </el-table-column>
-            <el-table-column
-              prop="listNodeOrder"
-              label="序号"
-            ></el-table-column>
             <el-table-column prop="materialName" label="物资名称">
             </el-table-column>
-            <el-table-column prop="materialSpecification" label="物资规格">
-            </el-table-column>
-            <el-table-column prop="materialModel" label="物资型号">
+            <el-table-column prop="materialSpecification" label="规格型号">
             </el-table-column>
             <el-table-column prop="materialNumber" label="物资件数">
             </el-table-column>
-            <el-table-column prop="driverTel" label="司机电话号码">
-            </el-table-column>
-            <el-table-column prop="gatepostName" label="进厂门岗">
-            </el-table-column>
-            <el-table-column prop="sureTime" label="可进厂确认时间">
-            </el-table-column>
             <el-table-column label="装货点" width="100">
               <template slot-scope="scope">
                 <el-select size="mini" v-model="scope.row.id">
@@ -206,6 +202,20 @@
                 </el-select>
               </template>
             </el-table-column>
+            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
+            <el-table-column prop="resultStartTime" label="排队开始时间">
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+            ></el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
+            <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间">
+            </el-table-column>
+
             <el-table-column fixed="right" label="操作" width="100">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="updateBill(scope)">
@@ -269,6 +279,7 @@ export default {
     this.infomation();
     this.getSpellingArray();
     this.getNoSpellingArray();
+    this.getSteelOrderNum();
     this.wantEnfactory();
     this.start();
   },
@@ -313,7 +324,7 @@ export default {
       this.start();
     },
     getSteelOrderNum() {
-      this.axios.post("/api/v1/uc/getSteelOrderNum").then(res => {
+      this.axios.get("/api/v1/uc/getSteelOrderNum").then(res => {
         this.steelOrderNum = res.data.data;
       });
     },
@@ -423,11 +434,14 @@ export default {
         columnIndex === 0 ||
         columnIndex === 1 ||
         columnIndex === 2 ||
-        columnIndex === 3 ||
-        columnIndex === 4 ||
+        columnIndex === 7 ||
+        columnIndex === 8 ||
         columnIndex === 9 ||
         columnIndex === 10 ||
-        columnIndex === 13
+        columnIndex === 11 ||
+        columnIndex === 12 ||
+        columnIndex === 13 ||
+        columnIndex === 14
       ) {
         const _row = this.spanArr[rowIndex];
         const _col = _row > 0 ? 1 : 0;
@@ -453,6 +467,7 @@ export default {
         .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=" + new Date())
         .then(res => {
           this.tableData1 = res.data.data;
+          console.log(this.tableData1);
         });
     },
     getSpellingArray() {
@@ -463,6 +478,7 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data;
+          console.log(this.tableData);
           this.getSpanArr(this.tableData);
         });
     },

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

@@ -78,7 +78,7 @@
                 type="primary"
                 @click="onClickConfirm"
                 :disabled="disabled"
-                >修改并放行</el-button
+                >修改</el-button
               >
               <el-button type="primary" @click="cancel" :disabled="disabled"
                 >返回</el-button

+ 117 - 38
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -18,6 +18,27 @@
         </el-button>
       </div>
       <table-item :tableData="tableData" :col="col" id="pdfDom"> </table-item>
+      <table
+        border="0"
+        cellpadding="10"
+        cellspacing="0"
+        style="
+          margin: auto;
+          font-size: 21px;
+          font-family: FangSong;
+          line-height: 50px;
+        "
+
+        width="100%"
+        class="tablePart0"
+      >
+        <tr>
+          <!-- <td>{{stockString}}</td> -->
+          <td>
+            <span v-for="item in stockStringArr" :class="item.class" :key="item.value">{{item.value}}</span>
+          </td>
+        </tr>
+      </table>
     </div>
   </div>
 </template>
@@ -26,7 +47,7 @@ import tableItem from "./tableItem";
 export default {
   name: "TableView",
   components: {
-    tableItem
+    tableItem,
   },
   data() {
     return {
@@ -35,129 +56,133 @@ export default {
       col: [
         {
           prop: "materialType",
-          label: "矿种"
+          label: "矿种",
         },
         {
           prop: "pm",
-          label: "品名"
+          label: "品名",
         },
         {
           prop: "portName",
-          label: "港口名称"
+          label: "港口名称",
         },
         {
           prop: "tonnage",
-          label: "下游港口吨位"
+          label: "下游港口吨位",
         },
-          {
+        {
           prop: "tonnage1",
-          label: "二层船吨位"
+          label: "二层船吨位",
         },
         {
           label: "未到闸船舶",
           children: [
             {
               prop: "capacity1",
-              label: "船名"
+              label: "船名",
             },
             {
               prop: "capacityNumber1",
-              label: "吨位"
+              label: "吨位",
             },
             {
               prop: "locationValue1",
-              label: "位置"
+              label: "位置",
             },
             {
               prop: "outPortTime1",
-              label: "离港时间"
-            }
-          ]
+              label: "离港时间",
+            },
+          ],
         },
         {
           label: "等闸船舶",
           children: [
             {
               prop: "capacity2",
-              label: "船名"
+              label: "船名",
             },
             {
               prop: "capacityNumber2",
-              label: "吨位"
+              label: "吨位",
             },
             {
               prop: "locationValue2",
-              label: "位置"
+              label: "位置",
             },
             {
               prop: "outPortTime2",
-              label: "离港时间"
-            }
-          ]
+              label: "离港时间",
+            },
+          ],
         },
         {
           label: "已过闸船舶",
           children: [
             {
               prop: "capacity3",
-              label: "船名"
+              label: "船名",
             },
             {
               prop: "capacityNumber3",
-              label: "吨位"
+              label: "吨位",
             },
             {
               prop: "locationValue3",
-              label: "位置"
+              label: "位置",
             },
             {
               prop: "outPortTime3",
-              label: "离港时间"
-            }
-          ]
+              label: "离港时间",
+            },
+          ],
         },
         {
           label: "到港待卸船舶",
           children: [
             {
               prop: "capacity4",
-              label: "船名"
+              label: "船名",
             },
             {
               prop: "capacityNumber4",
-              label: "吨位"
+              label: "吨位",
             },
             {
               prop: "locationValue4",
-              label: "位置"
+              label: "位置",
             },
             {
               prop: "outPortTime4",
-              label: "离港时间"
+              label: "离港时间",
             },
             {
               prop: "dgsj",
-              label: "到港时间"
-            }
-          ]
-        }
+              label: "到港时间",
+            },
+          ],
+        },
       ],
       // 表格数据
 
       tableData: [],
-      input: ""
+      input: "",
+      //万州港库存信息
+      stockString:null,
+      stockStringArr:[]
     };
   },
   created() {},
   mounted() {
     this.initialization();
+    this.getStockString();
     // console.log(this.$refs.excelDom);
   },
   methods: {
     onclick() {
       this.axios
         .post("/api/v1/tms/selectAllShipDynamaics?con=" + this.input)
-        .then(res => {
+        .then((res) => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
             console.log("aaad" + res.data.data);
@@ -167,19 +192,70 @@ export default {
         });
     },
     initialization() {
-      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
+      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then((res) => {
         if (res.data.code == "200") {
           this.tableData = res.data.data;
           console.log(this.tableData);
         } else {
           this.$message({
             type: "warning",
-            message: res.data.data
+            message: res.data.data,
           });
         }
       });
+    },
+    getStockString(){
+      let that=this;
+      this.axios.post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=").then((res)=>{
+        console.log(res);
+        if(res.status=="200"){
+          let resultActualInstallations = 0;
+          res.data.data.list.forEach((e) => {
+            resultActualInstallations = resultActualInstallations + e.gmTonnage;
+          }); 
+
+          this.stockString +='万港库存'+ resultActualInstallations.toFixed(2) + "吨:";
+          this.stockStringArr.push({
+            class:"normal",
+            value:'万港库存'+ resultActualInstallations.toFixed(2) + "吨:"
+          });
+
+          let materialName=res.data.data.list[0].materialName;
+          this.stockStringArr.push({
+            class:"black",
+            value:materialName+res.data.data.list[0].totalTonnage+"吨:"
+          })
+          this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
+
+          res.data.data.list.forEach((e) => {
+            if(e.materialName==materialName){
+              this.stockString+=(" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
+               this.stockStringArr.push({
+                  class:"normal",
+                  value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
+                });
+            }else{
+              materialName=e.materialName;
+              this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
+              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
+               this.stockStringArr.push({
+                class:"black",
+                value:";"+materialName+e.totalTonnage+ "吨:"
+              })
+              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
+               this.stockStringArr.push({
+                class:"normal",
+                value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
+              })
+            }
+          });
+          console.log("arr:",this.stockStringArr);
+        }else{
+
+        }
+      });
     }
-  }
+  },
 };
 </script>
 
@@ -200,5 +276,8 @@ export default {
     font-size: 20px;
     font-weight: 700;
   }
+  .black{
+      font-weight: 1000;
+  }
 }
 </style>

+ 50 - 33
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -307,6 +307,7 @@
               type="text"
               size="small"
               @click="closeEasEntryId(scope.row)"
+              v-if="scope.row.deletedStatus == null"
               >关闭分录</el-button
             >
           </template>
@@ -322,10 +323,31 @@
               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">
@@ -507,32 +529,39 @@ export default {
       addressRow: {}
     };
   },
-  computed: {
-    filterData() {
-      return function() {
-        let obj = [];
-        //找到对应的数据,并添加到obj
-        this.tableData.filter(item => {
-          let map = {};
-          if (
-            item.capacityNo != null &&
-            item.capacityNo != "" &&
-            item.capacityNo != "null"
-          ) {
-            map.text = item.capacityNo;
-            map.value = item.capacityNo;
-            obj.push(map);
-          }
-        });
-        return this.deWeight(obj);
-      };
-    }
-  },
   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({
@@ -568,18 +597,6 @@ export default {
     changeScreen() {
       console.log(this.screen);
     },
-    // 数组对象去重
-    deWeight(arr) {
-      for (var i = 0; i < arr.length - 1; i++) {
-        for (var j = i + 1; j < arr.length; j++) {
-          if (arr[i].text == arr[j].text) {
-            arr.splice(j, 1);
-            j--;
-          }
-        }
-      }
-      return arr;
-    },
     cellClik(row, column, cell, event) {
       if (row.group != this.clickIndex) {
         // this.getSteelReport();

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
static/lib/XLSX/xlsx.core.min.js


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä