瀏覽代碼

提交箱管

caojunjie 2 年之前
父節點
當前提交
f13a646842

+ 16 - 6
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -82,7 +82,7 @@
           <el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="importBoxTwo">导入</el-button>
           <el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">报表打印</el-button>
           <el-dropdown>
-            <el-button type="primary" size="small" :disabled="selectionList.length === 0 || option.disabled">
+            <el-button type="primary" size="small" :disabled="selectionList.length === 0">
               起运港<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
@@ -92,7 +92,7 @@
             </el-dropdown-menu>
           </el-dropdown>
           <el-dropdown>
-            <el-button type="primary" size="small" :disabled="selectionList.length === 0 || option.disabled">
+            <el-button type="primary" size="small" :disabled="selectionList.length === 0">
               目的港<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
@@ -930,7 +930,6 @@ export default {
     },
     //确认导入箱信息
     confirmImport() {
-      this.importOpen = false
       const loading = this.$loading({
         lock: true,
         text: '加载中',
@@ -941,6 +940,15 @@ export default {
       this.getWorkDicts("currency").then(res => {
         list = res.data.data
       });
+      for (let item in this.importList) {
+        for (let li in this.dataList) {
+          if (this.importList[item].code === this.dataList[li].code) {
+            loading.close();
+            return this.$message.error(`第${Number(Number(item) + 1)}行箱号和明细第${Number(Number(li) + 1)}行重复`);
+          }
+        }
+      }
+      this.importOpen = false
       for (let item of this.importList) {
         this.dataList.push({
           code: item.code,
@@ -972,6 +980,7 @@ export default {
         })
         loading.close();
       }
+      this.key++
     },
     confirmChange() {
       if (this.title == "堆存") {
@@ -1203,9 +1212,9 @@ export default {
     },
     // 请核
     pleaseCheck() {
-      for (let item of this.dataList) {
-        if (item.status !== "空箱入场") return this.$message.error("有未空箱入场的明细,禁止请核!")
-      }
+      // for (let item of this.dataList) {
+      //   if (item.status !== "空箱入场") return this.$message.error("有未空箱入场的明细,禁止请核!")
+      // }
       if (this.dataList.length === 0) {
         return this.$message.error("箱信息不能为空")
       }
@@ -1405,6 +1414,7 @@ export default {
     },
     rowUpdate(form, index, done, loading) {
       if (!Number(form.price) || Number(form.price) < 0) {
+        loading()
         return this.$message.error('超期单价/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId

+ 19 - 9
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -81,7 +81,7 @@
           <el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="importBoxTwo">导入</el-button>
           <el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">报表打印</el-button>
           <el-dropdown>
-            <el-button type="primary" size="small" :disabled="selectionList.length === 0 || option.disabled">
+            <el-button type="primary" size="small" :disabled="selectionList.length === 0">
               起运港<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
@@ -91,7 +91,7 @@
             </el-dropdown-menu>
           </el-dropdown>
           <el-dropdown>
-            <el-button type="primary" size="small" :disabled="selectionList.length === 0 || option.disabled">
+            <el-button type="primary" size="small" :disabled="selectionList.length === 0">
               目的港<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
@@ -945,6 +945,14 @@ export default {
       this.getWorkDicts("currency").then(res => {
         list = res.data.data
       });
+      for (let item in this.importList) {
+        for (let li in this.dataList) {
+          if (this.importList[item].code === this.dataList[li].code) {
+            loading.close();
+            return this.$message.error(`第${Number(Number(item) + 1)}行箱号和明细第${Number(Number(li) + 1)}行重复`);
+          }
+        }
+      }
       this.importOpen = false
       for (let item of this.importList) {
         this.dataList.push({
@@ -977,6 +985,7 @@ export default {
         })
         loading.close();
       }
+      this.key++
     },
     confirmChange() {
       if (this.title == "堆存") {
@@ -986,7 +995,7 @@ export default {
             let data = {
               ...this.form,
               type: "DCF",
-              source: "JKFZ",
+              source: "JKFC",
               ...this.formState,
               purchaseCompanyId: this.form.corpId,
               purchaseCompanyName: this.form.corpName,
@@ -1208,17 +1217,17 @@ export default {
     },
     // 请核
     pleaseCheck() {
-      for (let item of this.dataList) {
-        if (item.status !== "空箱入场") return this.$message.error("有未空箱入场的明细,禁止请核!")
-      }
+      // for (let item of this.dataList) {
+      //   if (item.status !== "空箱入场") return this.$message.error("有未空箱入场的明细,禁止请核!")
+      // }
       if (this.dataList.length === 0) {
         return this.$message.error("箱信息不能为空")
       }
       if (this.$refs.boxCost.dataList.length === 0) {
         return this.$message.error("费用信息不能为空")
-      }else {
-        for (let item of this.$refs.boxCost.dataList){
-          if (!item.id){
+      } else {
+        for (let item of this.$refs.boxCost.dataList) {
+          if (!item.id) {
             return this.$message.error("费用信息未保存")
           }
         }
@@ -1411,6 +1420,7 @@ export default {
     },
     rowUpdate(form, index, done, loading) {
       if (!Number(form.price) || Number(form.price) < 0) {
+        loading()
         return this.$message.error('超期单价/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId

+ 11 - 10
src/views/boxManagement/stockpilingManage/detailsPage.vue

@@ -509,7 +509,7 @@ export default {
           formProp: 'addressId',
           width: 100,
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -523,7 +523,7 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -541,7 +541,7 @@ export default {
             value: "dictKey"
           },
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -559,7 +559,7 @@ export default {
             value: "dictKey"
           },
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -572,7 +572,7 @@ export default {
           disabled:true,
           width: 100,
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -585,7 +585,7 @@ export default {
           controls: false,
           width: 100,
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -633,7 +633,7 @@ export default {
           width: 100,
           disabled:true,
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -647,7 +647,7 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -669,7 +669,7 @@ export default {
           overHidden: true,
           width: 100,
           rules: [{
-            required: true,
+            required: false,
             message: " ",
             trigger: "blur"
           }]
@@ -890,7 +890,7 @@ export default {
             })
           }else {
             if (this.title === "计算堆存费"){
-              if (Number(new Date(this.selectionList[0].leaseCommencementDate)) > Number(new Date(this.formState.rentStartDate))) {
+              if (Number(new Date(this.selectionList[0].leaseCommencementDate)) >= Number(new Date(this.formState.rentStartDate))) {
                 return this.$message.error("起始日期不能小于起租日期")
               }
               this.disabledVisible = true
@@ -1204,6 +1204,7 @@ export default {
     },
     rowUpdate(form, index, done, loading) {
       if (!Number(form.price) || Number(form.price) < 0){
+        loading()
         return this.$message.error('堆存费/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId

+ 1 - 1
src/views/boxManagement/stockpilingManage/index.vue

@@ -116,7 +116,7 @@ export default {
           search: true,
         }, {
           label: '堆存地点',
-          prop: 'purchaseCompanyId',
+          prop: 'address',
           width: 200
         }, {
           label: '状态',

+ 77 - 77
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -553,83 +553,83 @@ export default {
             this.$refs.crud.rowAdd()
         },
         cnameChange(row) {
-            this.upDataOption()
-            this.goodsoptions.forEach(e => {
-                if (e.itemId == row.itemId) {
-                    row.itemId = e.itemId;
-                    row.code = e.code;
-                    row.cname = e.cname;
-                    row.ename = e.ename;
-                    row.priceCategory = e.goodsTypeName;
-                    row.purchaseCost = costCal(e.price, e.taxRate);
-                    row.purchaseAmount = e.purchaseAmount;
-                    row.itemProp = null;
-                    row.remarksOne = null;
-                    row.customTwo = null;
-                    row.customThree = null;
-                    row.customFour = null;
-                    row.customFive = null;
-                    row.customSix = null;
-                    row.customSeven = null;
-                    row.customEight = null;
-                    row.customNine = null;
-                    row.customTen = null;
-                    row.partsValveName = null;
-                    row.partsValveValue = null;
-                    row.partsValveCostPrice = 0;
-                    row.partsValveSalePrice = 0;
-                    row.partsCapName = null;
-                    row.partsCapValue = null;
-                    row.partsCapCostPrice = 0;
-                    row.partsCapSalePrice = 0;
-                    row.partsHandleName = null;
-                    row.partsHandleValue = null;
-                    row.partsHandleCostPrice = 0;
-                    row.partsHandleSalePrice = 0;
-                    row.partsColourName = null;
-                    row.partsColourValue = null;
-                    row.partsColourCostPrice = 0;
-                    row.partsColourSalePrice = 0;
-                    row.partsModeName = null;
-                    row.partsModeValue = null;
-                    row.partsModeCostPrice = 0;
-                    row.partsModeSalePrice = 0;
-                    row.partsAuthenticationName = null;
-                    row.partsAuthenticationValue = null;
-                    row.partsAuthenticationCostPrice = 0;
-                    row.partsAuthenticationSalePrice = 0;
-                    row.partsOtherName = null;
-                    row.partsOtherValue = null;
-                    row.partsOtherCostPrice = 0;
-                    row.partsOtherSalePrice = 0;
-                    row.partsCost = 0;
-                    row.corpId = e.corpId;
-                    row.corpName = e.corpCode;
-                    row.itemDescription = e.cnameDescription;
-                    row.partsPrice = 0;
-                    row.itemType = e.specs;
-                    row.tradeTerms = null;
-                    row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
-                    row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
-                    row.shareAmount = 0;
-                    row.internationalAmount = 0;
-                    row.orderQuantity = 1;
-                    row.insurance = 0;
-                    row.freight = 0;
-                    row.discount = null;
-                    row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
-                    row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
-                    row.taxRate = 0;
-                    row.unit = e.unit;
-                    row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
-                    row.partsDescribe = null;
-                    row.remarks = null;
-                    row.exchangeRate = this.form.exchangeRate;
-                    row.productRemark = e.ename;
-                    row.attributeList = this.getAttribute(e.goodsSpecificationList);
-                    row.referrerReason = e.referrerReason
-                }
-            })
+          this.upDataOption()
+          for (let e of this.goodsoptions) {
+             if (e.itemId == row.itemId) {
+              row.itemId = e.itemId;
+              row.code = e.code;
+              row.cname = e.cname;
+              row.ename = e.ename;
+              row.priceCategory = e.goodsTypeName;
+              row.purchaseCost = costCal(e.price, e.taxRate);
+              row.purchaseAmount = e.purchaseAmount;
+              row.itemProp = null;
+              row.remarksOne = null;
+              row.customTwo = null;
+              row.customThree = null;
+              row.customFour = null;
+              row.customFive = null;
+              row.customSix = null;
+              row.customSeven = null;
+              row.customEight = null;
+              row.customNine = null;
+              row.customTen = null;
+              row.partsValveName = null;
+              row.partsValveValue = null;
+              row.partsValveCostPrice = 0;
+              row.partsValveSalePrice = 0;
+              row.partsCapName = null;
+              row.partsCapValue = null;
+              row.partsCapCostPrice = 0;
+              row.partsCapSalePrice = 0;
+              row.partsHandleName = null;
+              row.partsHandleValue = null;
+              row.partsHandleCostPrice = 0;
+              row.partsHandleSalePrice = 0;
+              row.partsColourName = null;
+              row.partsColourValue = null;
+              row.partsColourCostPrice = 0;
+              row.partsColourSalePrice = 0;
+              row.partsModeName = null;
+              row.partsModeValue = null;
+              row.partsModeCostPrice = 0;
+              row.partsModeSalePrice = 0;
+              row.partsAuthenticationName = null;
+              row.partsAuthenticationValue = null;
+              row.partsAuthenticationCostPrice = 0;
+              row.partsAuthenticationSalePrice = 0;
+              row.partsOtherName = null;
+              row.partsOtherValue = null;
+              row.partsOtherCostPrice = 0;
+              row.partsOtherSalePrice = 0;
+              row.partsCost = 0;
+              row.corpId = e.corpId;
+              row.corpName = e.corpCode;
+              row.itemDescription = e.cnameDescription;
+              row.partsPrice = 0;
+              row.itemType = e.specs;
+              row.tradeTerms = null;
+              row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
+              row.outFactoryPrice = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+              row.shareAmount = 0;
+              row.internationalAmount = 0;
+              row.orderQuantity = 1;
+              row.insurance = 0;
+              row.freight = 0;
+              row.discount = null;
+              row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+              row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+              row.taxRate = 0;
+              row.unit = e.unit;
+              row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
+              row.partsDescribe = null;
+              row.remarks = null;
+              row.exchangeRate = this.form.exchangeRate;
+              row.productRemark = e.ename;
+              row.attributeList = this.getAttribute(e.goodsSpecificationList);
+              row.referrerReason = e.referrerReason
+            }
+          }
         },
         importLibray(rows) {
             this.upDataOption()