소스 검색

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

zx 2 년 전
부모
커밋
fb9ac88854

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

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

+ 131 - 60
src/views/TMS/components/bmsship/addThreeSectionFee.vue

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

+ 7 - 5
src/views/TMS/components/bmsship/threeSectionFee.vue

@@ -12,7 +12,7 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <mergeRowTable 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)">
@@ -30,7 +30,7 @@
             </el-button>
           </template>
         </el-table-column>
-      </dilTable>
+      </mergeRowTable>
     </div>
     <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
       <div class="demo-image__preview">
@@ -53,20 +53,22 @@ export default {
       isShow: false,
       options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3"
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3",
+        comparison:"resultForeignShipName",
+        columnIndexs:[0,1,2,3]
       }
     };
   },
   methods: {
     getRequestUrl() {
       this.options.requestUrl =
-        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3&i=" +
+        "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3&i=" +
         new Date();
     },
     //查询
     onclick() {
       this.options.requestUrl =
-        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3&con=" +
+        "/api/v1/bms/selectPortFeeSecondList?apiId=506&feeType=3&con=" +
         this.inputText;
     },
     //新增

+ 2 - 3
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -629,7 +629,7 @@ export default {
               number: row["序号"],
               makeDate: row["制票日期"],
               materialName: row["品名"],
-              wagonNo: row["车皮号"],
+              wagonNo: row["车皮号"]+"",
               mineral: row["矿种"],
               wagonWeight: row["标重"]
             };
@@ -787,8 +787,7 @@ export default {
     display: flex;
     .form_box {
       width: 340px;
-      margin-left: 20%;
-      margin-right: 200px;
+      margin-left:10px;
       .el-form {
         .preview-group {
           .el-form-item {