Jelajahi Sumber

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

zengyf 2 tahun lalu
induk
melakukan
5fbbabd9e5
1 mengubah file dengan 22 tambahan dan 15 penghapusan
  1. 22 15
      src/views/TMS/components/bmsship/addTwoSectionFee.vue

+ 22 - 15
src/views/TMS/components/bmsship/addTwoSectionFee.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 添加二程船水运费1-->
-  <div class="addWagonLoad">
+  <div class="addTwoSectionFee">
     <PageTitle>返回</PageTitle>
     <div class="form-box">
       <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
@@ -134,11 +134,13 @@ export default {
       batchOption: {
         requestUrl: "/api/v1/uc/getBatchOfNotice?apiId=513",
         selectionType: "radio",
+        maxHeight:400,
         map: [],
       },
       contractPriceOption: {
         requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
         selectionType: "radio",
+        maxHeight:400,
         map: [],
       }
     };
@@ -189,7 +191,21 @@ export default {
     },
     makeSure() {
       this.isLoading=true;
-      let map={
+      if(!this.batchId ||
+       !this.purchaseOrderId ||
+       !this.form.unitPrice ||
+       !this.form.unitPriceId ||
+       !this.form.makeTime ||
+       !this.form.image
+       ){
+        this.$message.error("存在空值!");
+        this.isLoading=false;
+      }else if(!this.form.realTonnage ||this.form.realTonnage <= 0){
+         this.$message.error("实装吨位大于0!");
+        this.isLoading=false;
+      }
+      else{
+        let map={
         batchId:this.batchId,
         purchaseOrderId:this.purchaseOrderId,
         unitPrice:this.form.unitPrice,
@@ -202,18 +218,6 @@ export default {
         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({
@@ -271,6 +275,7 @@ export default {
         this.upBool = false;
         if (this.num == 1) {
           this.form.image = res.data;
+          this.$forceUpdate();
         }
         this.$message.success("上传成功");
       }
@@ -282,7 +287,8 @@ export default {
 };
 </script>
 <style lang="scss">
-.searchSelect {
+.addTwoSectionFee {
+  .searchSelect {
     display: flex;
     align-items: center;
     justify-content: center;
@@ -325,4 +331,5 @@ export default {
     }
   }
 }
+}
 </style>