Ver código fonte

提交箱管

caojunjie 2 anos atrás
pai
commit
1b2f86c4b3

+ 2 - 1
src/components/bill/billDetailList.vue

@@ -58,9 +58,10 @@
         data:[],
         selectList:[],
         page: {
-          pageSize: 300,
+          pageSize: 20,
           pagerCount: 1,
           total: 0,
+          pageSizes: [20, 200, 300, 500, 700, 1000]
         },
         breakConfiguration:{
           multipleChoices:false,

+ 1 - 0
src/components/boxCost/index.vue

@@ -475,6 +475,7 @@ export default {
       } else {
         this.dataList = this.data_two;
       }
+      this.key++
     },
     "option.menu":{
       handler(newVla,oldVal) {

+ 56 - 29
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -429,6 +429,18 @@ export default {
             message: " ",
             trigger: "blur"
           }]
+        },{
+          label: '堆存日期',
+          prop: 'rentDate',
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
         }]
       },
       optionState: {
@@ -828,10 +840,15 @@ export default {
     }
     this.key++
   },
+  activated() {
+    this.key++
+  },
   methods: {
     //堆存
     stockpiling() {
       this.title = "堆存"
+      const date = new Date();
+      this.formState.rentDate = dateFormat(date, "yyyy-MM-dd") + " 00:00:00"
       this.dialogVisible = true
     },
     //关闭审核
@@ -914,6 +931,16 @@ export default {
     //确认导入箱信息
     confirmImport() {
       this.importOpen = false
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      let list = []
+      this.getWorkDicts("currency").then(res => {
+        list = res.data.data
+      });
       for (let item of this.importList) {
         this.dataList.push({
           code: item.code,
@@ -924,27 +951,26 @@ export default {
           boxTypeId: item.typeId,
           currency: "CNY"
         })
-        this.getWorkDicts("currency").then(res => {
-          for (let li of res.data.data){
-            if (li.dictValue == item.currency){
-              item.exchangeRate = li.remark
-            }
+        for (let li of list) {
+          if (li.dictValue == item.currency) {
+            item.exchangeRate = li.remark
           }
-          this.dataListTwo.push({
-            corpId: this.form.corpId,
-            corpName: this.form.corpName,
-            code: item.code,
-            itemId: this.costData.id,
-            itemName: this.costData.cname,
-            currency: "CNY",
-            price: item.amount,
-            quantity: 1,
-            autoGenerate: 1,
-            feesType: 1,
-            exchangeRate:item.exchangeRate || 1,
-            amount: item.amount
-          })
-        });
+        }
+        this.dataListTwo.push({
+          corpId: this.form.corpId,
+          corpName: this.form.corpName,
+          code: item.code,
+          itemId: this.costData.id,
+          itemName: this.costData.cname,
+          currency: "CNY",
+          price: item.amount,
+          quantity: 1,
+          autoGenerate: 1,
+          feesType: 1,
+          exchangeRate: item.exchangeRate || 1,
+          amount: item.amount
+        })
+        loading.close();
       }
     },
     confirmChange() {
@@ -954,12 +980,13 @@ export default {
           if (valid) {
             let data = {
               ...this.form,
-              type:"DCF",
-              source:"CKZY",
+              type: "DCF",
+              source: "CKZY",
               ...this.formState,
-              purchaseCompanyId:this.form.corpId,
-              purchaseCompanyName:this.form.corpName,
-              tradingBoxItemsList: this.dataList,
+              purchaseCompanyId: this.form.corpId,
+              purchaseCompanyName: this.form.corpName,
+              // tradingBoxItemsList: this.dataList,
+              tradingBoxItemsList: this.selectionList,
             }
             // data.tradingBoxItemsList.forEach(item=> delete item.id)
             delete data.id
@@ -1377,14 +1404,14 @@ export default {
       })
     },
     rowUpdate(form, index, done, loading) {
-      if (!Number(item.price) || Number(item.price) < 0){
-        return  this.$message.error('超期单价/天,不能不能为0或不能为负')
+      if (!Number(form.price) || Number(form.price) < 0) {
+        return this.$message.error('超期单价/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId
       done(form)
       this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
+        for (let item of res.data.data) {
+          if (item.dictValue == form.currency) {
             form.exchangeRate = item.remark
           }
         }

+ 49 - 25
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -427,6 +427,18 @@ export default {
             message: " ",
             trigger: "blur"
           }]
+        },{
+          label: '堆存日期',
+          prop: 'rentDate',
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
         }]
       },
       optionState: {
@@ -840,6 +852,8 @@ export default {
     //堆存
     stockpiling() {
       this.title = "堆存"
+      const date = new Date();
+      this.formState.rentDate = dateFormat(date, "yyyy-MM-dd") + " 00:00:00"
       this.dialogVisible = true
     },
     //关闭审核
@@ -921,6 +935,16 @@ export default {
     },
     //确认导入箱信息
     confirmImport() {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      let list = []
+      this.getWorkDicts("currency").then(res => {
+        list = res.data.data
+      });
       this.importOpen = false
       for (let item of this.importList) {
         this.dataList.push({
@@ -932,27 +956,26 @@ export default {
           boxTypeId: item.typeId,
           currency: "CNY"
         })
-        this.getWorkDicts("currency").then(res => {
-          for (let li of res.data.data){
-            if (li.dictValue == item.currency){
-              item.exchangeRate = li.remark
-            }
+        for (let li of list) {
+          if (li.dictValue == item.currency) {
+            item.exchangeRate = li.remark
           }
-          this.dataListTwo.push({
-            corpId: this.form.corpId,
-            corpName: this.form.corpName,
-            code: item.code,
-            itemId: this.costData.id,
-            itemName: this.costData.cname,
-            currency: "CNY",
-            price: item.amount,
-            quantity: 1,
-            autoGenerate: 1,
-            feesType: 2,
-            exchangeRate:item.exchangeRate || 1,
-            amount: item.amount
-          })
-        });
+        }
+        this.dataListTwo.push({
+          corpId: this.form.corpId,
+          corpName: this.form.corpName,
+          code: item.code,
+          itemId: this.costData.id,
+          itemName: this.costData.cname,
+          currency: "CNY",
+          price: item.amount,
+          quantity: 1,
+          autoGenerate: 1,
+          feesType: 2,
+          exchangeRate: item.exchangeRate || 1,
+          amount: item.amount
+        })
+        loading.close();
       }
     },
     confirmChange() {
@@ -967,7 +990,8 @@ export default {
               ...this.formState,
               purchaseCompanyId: this.form.corpId,
               purchaseCompanyName: this.form.corpName,
-              tradingBoxItemsList: this.dataList,
+              // tradingBoxItemsList: this.dataList,
+              tradingBoxItemsList: this.selectionList,
             }
             // data.tradingBoxItemsList.forEach(item=> delete item.id)
             delete data.id
@@ -1386,14 +1410,14 @@ export default {
       })
     },
     rowUpdate(form, index, done, loading) {
-      if (!Number(item.price) || Number(item.price) < 0){
-        return  this.$message.error('超期单价/天,不能不能为0或不能为负')
+      if (!Number(form.price) || Number(form.price) < 0) {
+        return this.$message.error('超期单价/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId
       done(form)
       this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data){
-          if (item.dictValue == form.currency){
+        for (let item of res.data.data) {
+          if (item.dictValue == form.currency) {
             form.exchangeRate = item.remark
           }
         }

+ 17 - 2
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -276,6 +276,18 @@ export default {
             message: " ",
             trigger: "blur"
           }]
+        },{
+          label: '堆存日期',
+          prop: 'rentDate',
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
         }]
       },
       optionStateTwo: {
@@ -787,6 +799,8 @@ export default {
     //堆存
     stockpiling() {
       this.title = "堆存"
+      const date = new Date();
+      this.formState.rentDate = dateFormat(date, "yyyy-MM-dd") + " 00:00:00"
       this.dialogVisible = true
     },
     // 报表
@@ -836,7 +850,7 @@ export default {
               }
             }
           }
-          const date = new Date(this.selectionList[0].rentEndDate);
+          const date = new Date(this.selectionList[0].rentEndDate?this.selectionList[0].rentEndDate:new Date());
           const endDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);
           this.formState.rentStartDate = this.selectionList[0].rentEndDate
           this.formState.rentCalculationDate = dateFormat(endDate, "yyyy-MM-dd") + " 23:59:59"
@@ -906,7 +920,8 @@ export default {
               type: "DCF",
               source: "ZR",
               ...this.formState,
-              tradingBoxItemsList: this.dataList,
+              // tradingBoxItemsList: this.dataList,
+              tradingBoxItemsList: this.selectionList,
             }
             // data.tradingBoxItemsList.forEach(item=> delete item.id)
             delete data.id

+ 17 - 2
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -267,6 +267,18 @@ export default {
             message: " ",
             trigger: "blur"
           }]
+        },{
+          label: '堆存日期',
+          prop: 'rentDate',
+          width: 100,
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
         }]
       },
       optionState: {},
@@ -784,6 +796,8 @@ export default {
     //堆存
     stockpiling() {
       this.title = "堆存"
+      const date = new Date();
+      this.formState.rentDate = dateFormat(date, "yyyy-MM-dd") + " 00:00:00"
       this.dialogVisible = true
     },
     // 报表
@@ -842,7 +856,7 @@ export default {
               }
             }
           }
-          const date = new Date(this.selectionList[0].rentEndDate);
+          const date = new Date(this.selectionList[0].rentEndDate?this.selectionList[0].rentEndDate:new Date());
           const endDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);
           this.formState.rentStartDate = this.selectionList[0].rentEndDate
           this.formState.rentCalculationDate = dateFormat(endDate, "yyyy-MM-dd") + " 23:59:59"
@@ -911,7 +925,8 @@ export default {
               type: "DCF",
               source: "ZC",
               ...this.formState,
-              tradingBoxItemsList: this.dataList,
+              // tradingBoxItemsList: this.dataList,
+              tradingBoxItemsList: this.selectionList,
             }
             // data.tradingBoxItemsList.forEach(item=> delete item.id)
             delete data.id

+ 62 - 27
src/views/boxManagement/stockpilingManage/detailsPage.vue

@@ -102,7 +102,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" type="ZC" activeName="first" :codeValue="252.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" type="ZC" activeName="second" :codeValue="252.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
@@ -417,6 +417,7 @@ export default {
           filterable: true,
           remote: true,
           allowCreate: true,
+          disabled:true,
           type: "select",
           dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
           props: {
@@ -432,6 +433,7 @@ export default {
           label: '币别',
           prop: 'currency',
           width: 100,
+          disabled:true,
           overHidden: true,
           filterable: true,
           type: "select",
@@ -446,7 +448,7 @@ export default {
             trigger: "blur"
           }]
         }, {
-          label: '堆存/天',
+          label: '堆存/天',
           prop: 'price',
           type: 'number',
           controls: false,
@@ -462,6 +464,7 @@ export default {
           prop: 'leaseCommencementDate',
           overHidden: true,
           type: "date",
+          disabled:true,
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           width: 100,
@@ -471,6 +474,7 @@ export default {
           overHidden: true,
           type: "date",
           display: false,
+          disabled:true,
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           width: 100,
@@ -480,6 +484,7 @@ export default {
           overHidden: true,
           display: false,
           type: "date",
+          disabled:true,
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           width: 160
@@ -490,6 +495,7 @@ export default {
           overHidden: true,
           filterable: true,
           type: 'select',
+          disabled:true,
           props: {
             label: 'name',
             value: 'id'
@@ -499,6 +505,7 @@ export default {
           label: '最新地点',
           prop: 'address',
           overHidden: true,
+          disabled:true,
           formProp: 'addressId',
           width: 100,
           rules: [{
@@ -509,6 +516,7 @@ export default {
         }, {
           label: '最新日期',
           prop: 'newDate',
+          disabled:true,
           overHidden: true,
           width: 100,
           type: "date",
@@ -524,6 +532,7 @@ export default {
           prop: 'boxSource',
           width: 100,
           overHidden: true,
+          disabled:true,
           filterable: true,
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_source",
@@ -540,6 +549,7 @@ export default {
           label: '箱状态',
           prop: 'boxStatus',
           width: 100,
+          disabled:true,
           overHidden: true,
           filterable: true,
           type: 'select',
@@ -559,6 +569,7 @@ export default {
           type: 'number',
           overHidden: true,
           controls: false,
+          disabled:true,
           width: 100,
           rules: [{
             required: true,
@@ -569,6 +580,7 @@ export default {
           label: '毛重(kg)',
           prop: 'grossWeight',
           type: 'number',
+          disabled:true,
           overHidden: true,
           controls: false,
           width: 100,
@@ -581,6 +593,7 @@ export default {
           label: '皮重(kg)',
           prop: 'tare',
           overHidden: true,
+          disabled:true,
           type: 'number',
           controls: false,
           width: 100
@@ -590,12 +603,14 @@ export default {
           type: 'number',
           overHidden: true,
           controls: false,
+          disabled:true,
           width: 100
         }, {
           label: '容积(m³)',
           prop: 'volume',
           type: 'number',
           overHidden: true,
+          disabled:true,
           controls: false,
           width: 100
         }, {
@@ -616,6 +631,7 @@ export default {
           prop: 'boxMakingCompany',
           overHidden: true,
           width: 100,
+          disabled:true,
           rules: [{
             required: true,
             message: " ",
@@ -627,6 +643,7 @@ export default {
           width: 100,
           overHidden: true,
           type: "date",
+          disabled:true,
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           rules: [{
@@ -640,12 +657,14 @@ export default {
           width: 100,
           overHidden: true,
           type: "date",
+          disabled:true,
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
           label: '箱龄',
           prop: 'boxAge',
           type: 'number',
+          disabled:true,
           controls: false,
           overHidden: true,
           width: 100,
@@ -693,28 +712,27 @@ export default {
       this.costData = res.data.data
     })
     //下拉箱号带出对应信息
-    this.findObject(this.option.column, "code").change = ({value, column}) => {
-      selectArchivesList({code: value}).then(res => {
-        console.log(res)
-        for (let item of res.data.data) {
-          if (value == item.code) {
-            this.formTwo = {
-              boxSource: item.boxSource,
-              boxStatus: item.boxStatus,
-              emptyWeight: item.emptyWeight,
-              grossWeight: item.gorssWeight,
-              boxMakingCompany: item.boxMakingCompany,
-              boxMakingDate: item.boxMakingDate,
-              leaseCommencementDate: item.leaseCommencementDate,
-              boxAge: item.boxAge,
-              tare: item.tare,
-              loadingWeight: item.loadingWeight,
-              volume: item.volume,
-            }
-          }
-        }
-      })
-    }
+    // this.findObject(this.option.column, "code").change = ({value, column}) => {
+    //   selectArchivesList({code: value}).then(res => {
+    //     for (let item of res.data.data) {
+    //       if (value == item.code) {
+    //         this.formTwo = {
+    //           boxSource: item.boxSource,
+    //           boxStatus: item.boxStatus,
+    //           emptyWeight: item.emptyWeight,
+    //           grossWeight: item.gorssWeight,
+    //           boxMakingCompany: item.boxMakingCompany,
+    //           boxMakingDate: item.boxMakingDate,
+    //           leaseCommencementDate: item.leaseCommencementDate,
+    //           boxAge: item.boxAge,
+    //           tare: item.tare,
+    //           loadingWeight: item.loadingWeight,
+    //           volume: item.volume,
+    //         }
+    //       }
+    //     }
+    //   })
+    // }
     this.key++
     if (this.onLoad.id && this.detailData.id) {
       this.refresh(this.onLoad.id,true)
@@ -776,7 +794,7 @@ export default {
               }
             }
           }
-          const date = new Date(this.selectionList[0].rentEndDate);
+          const date = new Date(this.selectionList[0].rentEndDate?this.selectionList[0].rentEndDate:new Date());
           const endDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);
           this.formState.rentStartDate = this.selectionList[0].rentEndDate
           this.formState.rentCalculationDate = dateFormat(endDate, "yyyy-MM-dd") + " 23:59:59"
@@ -793,6 +811,12 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
+            const loading = this.$loading({
+              lock: true,
+              text: '加载中',
+              spinner: 'el-icon-loading',
+              background: 'rgba(255,255,255,0.7)'
+            });
             revokeRent({
               ...this.form,
               tradingBoxItemsList:this.selectionList
@@ -800,7 +824,10 @@ export default {
               this.$message.success("操作成功")
               this.formState = {}
               this.selectionList = []
+              loading.close();
               this.refresh(this.form.id)
+            }).catch(()=>{
+              loading.close();
             })
           }).catch(() => {
             this.$message({
@@ -867,6 +894,12 @@ export default {
                 return this.$message.error("起始日期不能小于起租日期")
               }
               this.disabledVisible = true
+              const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+              });
               calculateRent({
                 ...this.form,
                 ...this.formState,
@@ -877,9 +910,11 @@ export default {
                 this.disabledVisible = false
                 this.formState = {}
                 this.selectionList = []
+                loading.close();
                 this.refresh(this.form.id)
               }).catch(() => {
                 this.disabledVisible = false
+                loading.close();
               })
             }
           }
@@ -1168,8 +1203,8 @@ export default {
       done(form)
     },
     rowUpdate(form, index, done, loading) {
-      if (!Number(item.price) || Number(item.price) < 0){
-        return this.$message.error('堆存/天,不能不能为0或不能为负')
+      if (!Number(form.price) || Number(form.price) < 0){
+        return this.$message.error('堆存/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId
       done(form)

+ 1 - 1
src/views/financialManagement/billDetails/billDetails.vue

@@ -42,7 +42,7 @@
         <span>{{ scope.row.itemName }}</span>
       </template>
       <template slot-scope="scope" slot="billType">
-        <span>{{ scope.row.billType == "申请"?"付费":"收费" }}</span>
+        <span>{{ scope.row.billType == "申请"?"付费":scope.row.billType == "付费"?"付费":"收费" }}</span>
       </template>
       <template slot-scope="{type,size,row,$index}" slot="menuLeft">
         <el-button class="el-icon-download" type="warning" size="small" @click="outExport">导出</el-button>