فهرست منبع

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

luobang 2 سال پیش
والد
کامیت
bcf9ff99b4
24فایلهای تغییر یافته به همراه4167 افزوده شده و 198 حذف شده
  1. 150 0
      src/views/RMS/components/addContractPrice.vue
  2. 109 0
      src/views/RMS/components/contractPrice.vue
  3. 172 0
      src/views/RMS/components/editContractPrice.vue
  4. 7 1
      src/views/RMS/router/index.js
  5. 5 0
      src/views/TMS/app.js
  6. 328 0
      src/views/TMS/components/bmsship/addTwoSectionFee.vue
  7. 328 0
      src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue
  8. 350 0
      src/views/TMS/components/bmsship/editTwoSectionFee.vue
  9. 350 0
      src/views/TMS/components/bmsship/editTwoSectionHandleFee.vue
  10. 133 0
      src/views/TMS/components/bmsship/twoSectionFee.vue
  11. 133 0
      src/views/TMS/components/bmsship/twoSectionHandleFee.vue
  12. 333 0
      src/views/TMS/components/bmstrain/addDomesticTrainFee.vue
  13. 333 0
      src/views/TMS/components/bmstrain/addImportedTrainFee.vue
  14. 133 0
      src/views/TMS/components/bmstrain/domesticTrainFee.vue
  15. 354 0
      src/views/TMS/components/bmstrain/editDomesticTrainFee.vue
  16. 354 0
      src/views/TMS/components/bmstrain/editImportedTrainFee.vue
  17. 133 0
      src/views/TMS/components/bmstrain/importedTrainFee.vue
  18. 66 18
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  19. 150 21
      src/views/TMS/components/importedMine/addWagonLoad.vue
  20. 6 13
      src/views/TMS/components/importedMine/addWagonUnLoad.vue
  21. 39 106
      src/views/TMS/components/importedMine/addWagonloadCopy.vue
  22. 1 0
      src/views/TMS/components/importedMine/outBoundWagon.vue
  23. 83 1
      src/views/TMS/router/index.js
  24. 117 38
      src/views/statisticalReport/components/Ship_dynamic_table.vue

+ 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},
+	]
 	}
   ];
   

+ 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/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/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/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>

+ 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("请填写完整信息!");

+ 39 - 106
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">
@@ -209,42 +169,6 @@
         >
       </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>
 
@@ -263,6 +187,7 @@ export default {
       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);
@@ -526,7 +450,7 @@ export default {
       this.isLoading = true;
       let state = 0;
       if (
-        this.list.length > 0 &&
+        this.$refs.tempTable.selection.length > 0 &&
         this.materialId &&
         this.supplierId &&
         this.purchaseOrderId &&
@@ -543,7 +467,7 @@ export default {
         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,
@@ -687,7 +611,6 @@ export default {
         console.log(rows);
         //清空
         if (rows.length > 0) {
-          that.list = [];
           that.tableData = [];
           that.isLoading = false;
           if (typeof rows[0]["车皮号"] == "undefined") {
@@ -705,7 +628,6 @@ export default {
             //车皮号表
             let map = {};
             map.wagonNo = carNumber;
-            that.list.push(map);
             //表格数据
             let temp = {
               number: row["序号"],
@@ -737,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>
@@ -863,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 {
@@ -894,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

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

@@ -213,6 +213,19 @@ 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"
+
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -1324,7 +1337,76 @@ 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
+      },
+
     ]
   }
 ];

+ 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>