Browse Source

提交箱管

caojunjie 2 years ago
parent
commit
18f4fc9dd8

+ 26 - 0
src/router/views/index.js

@@ -2156,6 +2156,32 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/boxWashing/index')
   }]
 }, {
+  path: '/boxManagement/leaseIn/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/boxManagement/leaseIn/index',
+    name: '租入',
+    meta: {
+      i18n: '/boxManagement/leaseIn/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/leaseIn/index')
+  }]
+}, {
+  path: '/boxManagement/leaseOut/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/boxManagement/leaseOut/index',
+    name: '租出',
+    meta: {
+      i18n: '/boxManagement/leaseOut/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/leaseOut/index')
+  }]
+}, {
   path: '/purchase/importDeclaration/index',
   component: Layout,
   hidden: true,

+ 36 - 20
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -1266,27 +1266,43 @@ export default {
                 type: "error"
               });
             } else {
-              this.$message({
-                type: "success",
-                message: this.form.id ? "修改成功!" : "新增成功!"
+              detail(this.detailData.id).then(res => {
+                if (res.data.data.adminProfiles) {
+                  res.data.data.adminProfiles = res.data.data.adminProfiles.split(",");
+                }
+                if (res.data.data.line){
+                  res.data.data.line = res.data.data.line.split(",")
+                }
+                this.form = res.data.data;
+                this.contactsData = this.form.corpsAttnList;
+                this.bankOfDepositData = this.form.corpsBankList;
+                this.advantageProjectData = this.form.corpsItems;
+                this.addressLatLng = JSON.parse(this.form.addressLatLng);
+                this.addressData = this.form.corpsAddrList;
+                this.oldform = this.deepClone(res.data.data);
+                this.oldcontactsData = this.deepClone(this.form.corpsAttnList);
+                this.oldbankOfDepositData = this.deepClone(this.form.corpsBankList);
+                this.oldadvantageProjectData = this.deepClone(this.form.corpsItems);
+                this.oldaddressLatLng = this.deepClone(JSON.parse(this.form.addressLatLng));
+                this.oldaddressData = this.deepClone(this.form.corpsAddrList);
+                if (this.form.belongtoarea) {
+                  this.form.belongtoarea = this.form.belongtoarea
+                      .split(",")
+                      .map(item => item.split("/"));
+                }
+                delete this.form.corpsAttnList;
+                delete this.form.corpsBankList;
+                delete this.form.corpsItems;
+                delete this.form.corpsAddrList;
+                this.$message({
+                  type: "success",
+                  message: this.form.id ? "修改成功!" : "新增成功!"
+                });
+                this.disabled = false;
+                if (status) {
+                  this.$emit("goBack", true);
+                }
               });
-              if (res.data.data.adminProfiles) {
-                res.data.data.adminProfiles = res.data.data.adminProfiles.split(",");
-              }
-              if (res.data.data.line){
-                res.data.data.line = res.data.data.line.split(",")
-              }
-              this.form = res.data.data;
-              this.contactsData = res.data.data.corpsAttnList;
-              if (this.form.belongtoarea) {
-                this.form.belongtoarea = this.form.belongtoarea
-                  .split(",")
-                  .map(item => item.split("/"));
-              }
-              this.disabled = false;
-              if (status) {
-                this.$emit("goBack", true);
-              }
             }
           });
         } else {

+ 56 - 1
src/views/boxManagement/boxRepair/index.vue

@@ -123,6 +123,60 @@ export default {
             label: "dictValue",
             value: "dictKey"
           }
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       },
       key:0
@@ -227,7 +281,8 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/repair/exportRepairOut',      //跳转目标窗口的地址
         query: {
-          ...config.params    //括号内是要传递给新窗口的参数
+          ...config.params,    //括号内是要传递给新窗口的参数
+          billType: "REPAIR"
         }
       })
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);

+ 55 - 0
src/views/boxManagement/boxWashing/index.vue

@@ -123,6 +123,60 @@ export default {
             label: "dictValue",
             value: "dictKey"
           }
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       },
       key:0
@@ -227,6 +281,7 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/repair/exportRepairOut',      //跳转目标窗口的地址
         query: {
+          billType: "WASH",
           ...config.params    //括号内是要传递给新窗口的参数
         }
       })

+ 10 - 9
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -274,15 +274,15 @@ export default {
           prop: 'code',
           width: 100,
           overHidden: true,
-          filterable: true,
-          remote: true,
-          allowCreate: true,
-          type: "select",
-          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
-          props: {
-            label: "code",
-            value: "code"
-          },
+          // filterable: true,
+          // remote: true,
+          // allowCreate: true,
+          // type: "select",
+          // dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          // props: {
+          //   label: "code",
+          //   value: "code"
+          // },
           rules: [{
             required: true,
             message: " ",
@@ -569,6 +569,7 @@ export default {
     },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
+      if (typeof res.message === "string") return
       for (let item of this.dataList) {
         for (let li of res.tradingBoxItemList) {
           if (item.code === li.code) {

+ 56 - 1
src/views/boxManagement/buyContainer/index.vue

@@ -126,6 +126,60 @@ export default {
           prop: 'remarks',
           width: 500,
           search: true,
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       }
     }
@@ -229,7 +283,8 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/tradingBox/exportTradingBoxOut',      //跳转目标窗口的地址
         query: {
-          ...config.params    //括号内是要传递给新窗口的参数
+          ...config.params,    //括号内是要传递给新窗口的参数
+          type:"BUY"
         }
       })
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);

+ 1 - 0
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -814,6 +814,7 @@ export default {
     },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
+      if (typeof res.message === "string") return
       for (let item of this.dataList) {
         for (let li of res.transportItemList) {
           if (item.code === li.code) {

+ 55 - 0
src/views/boxManagement/exportShipment/index.vue

@@ -221,6 +221,60 @@ export default {
             label: "dictValue",
             value: "dictKey"
           }
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       },
       key:0
@@ -325,6 +379,7 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/transport/exportTransportOut',      //跳转目标窗口的地址
         query: {
+          billType: "CKZY",
           ...config.params    //括号内是要传递给新窗口的参数
         }
       })

+ 1 - 0
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -818,6 +818,7 @@ export default {
     },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
+      if (typeof res.message === "string") return
       for (let item of this.dataList) {
         for (let li of res.transportItemList) {
           if (item.code === li.code) {

+ 55 - 0
src/views/boxManagement/importReturnTrip/index.vue

@@ -221,6 +221,60 @@ export default {
             label: "dictValue",
             value: "dictKey"
           }
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       },
       key:0
@@ -325,6 +379,7 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/transport/exportTransportOut',      //跳转目标窗口的地址
         query: {
+          billType: "JKFC",
           ...config.params    //括号内是要传递给新窗口的参数
         }
       })

+ 101 - 65
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -68,19 +68,29 @@
         <!--                       @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
         <!--        </template>-->
         <template slot="menuLeft" slot-scope="scope">
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用'}) == -1?false:true)" type="primary" size="small"
-                     @click="statusUpdate('0','起租')">起租
+          <el-button
+              :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '录入'}) == -1?true:false)"
+              type="primary" size="small"
+              @click="statusUpdate('0','起租')">起租
           </el-button>
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '退租'}) == -1?false:true)" type="primary" size="small"
-                     @click="statusUpdate('1','退租')">退租
+          <el-button
+              :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' || item.status == '使用'}) == -1?true:false)"
+              type="primary" size="small"
+              @click="statusUpdate('1','退租')">退租
           </el-button>
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '退租'}) == -1?false:true)" type="primary" size="small"
-                     @click="statusUpdate('2','计算租金')">计算租金
+          <el-button
+              :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用'}) == -1?true:false)"
+              type="primary" size="small"
+              @click="statusUpdate('2','计算租金')">计算租金
           </el-button>
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '退租'}) == -1?false:true)" type="primary" size="small"
-                     @click="statusUpdate('3','撤销租金')">撤销租金
+          <el-button
+              :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' && item.count > 0}) == -1?true:false)"
+              type="primary" size="small"
+              @click="statusUpdate('3','撤销租金')">撤销租金
+          </el-button>
+          <el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom"
+                     @click="excelBox = true">导入
           </el-button>
-          <el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="excelBox = true">导入</el-button>
         </template>
       </avue-crud>
     </trade-card>
@@ -168,6 +178,7 @@ import {
 import checkSchedule from "@/components/check/checkSchedule";
 import {selectByName} from "@/api/boxManagement";
 import {getToken} from "@/util/auth";
+import {dateFormat, defaultDate} from "@/util/date";
 export default {
   name: "detailsPage",
   props: {
@@ -231,17 +242,26 @@ export default {
       },
       optionStateFour: {
         menuBtn: false,
-        span: 24,
+        span: 12,
         column: [{
-          label: '日期',
-          prop: 'rentCalculationDateList',
+          label: '起始日期',
+          prop: 'rentStartDate',
           width: 100,
-          search: true,
-          overHidden: true,
-          type: "daterange",
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        },{
+          label: '结束日期',
+          prop: 'rentCalculationDate',
+          width: 100,
+          type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          defaultTime: ["00:00:00", "23:59:59"],
           rules: [{
             required: true,
             message: " ",
@@ -403,15 +423,15 @@ export default {
           prop: 'code',
           width: 100,
           overHidden: true,
-          // filterable: true,
-          // remote: true,
-          // allowCreate: true,
-          // type: "select",
-          // dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
-          // props: {
-          //   label: "code",
-          //   value: "code"
-          // },
+          filterable: true,
+          remote: true,
+          allowCreate: true,
+          type: "select",
+          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code"
+          },
           rules: [{
             required: true,
             message: " ",
@@ -435,18 +455,6 @@ export default {
             trigger: "blur"
           }]
         }, {
-          label: '金额',
-          prop: 'amount',
-          type: 'number',
-          controls: false,
-          overHidden: true,
-          width: 100,
-          rules: [{
-            required: true,
-            message: " ",
-            trigger: "blur"
-          }]
-        }, {
           label: '租金/天',
           prop: 'price',
           type: 'number',
@@ -462,20 +470,28 @@ export default {
           label: '起租日期',
           prop: 'leaseCommencementDate',
           overHidden: true,
-          display: false,
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           width: 100,
         }, {
-          label: '租金计算截止日期',
+          label: '退租日期',
+          prop: 'rentingOutDate',
+          overHidden: true,
+          type: "date",
+          display: false,
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          width: 100,
+        }, {
+          label: '当前租金期间',
           prop: 'rentEndDate',
           overHidden: true,
           display: false,
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          width: 160,
+          width: 160
         }, {
           label: '箱类型',
           prop: 'boxTypeId',
@@ -518,7 +534,6 @@ export default {
           width: 100,
           overHidden: true,
           filterable: true,
-          disabled: true,
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_source",
           props: {
@@ -692,28 +707,28 @@ export default {
       this.costData = res.data.data
     })
     //下拉箱号带出对应信息
-    // 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,
-    //           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,
+              tare: item.tare,
+              loadingWeight: item.loadingWeight,
+              volume: item.volume,
+            }
+          }
+        }
+      })
+    }
     this.key++
     if (this.onLoad.id && this.detailData.id) {
-      this.refresh(this.onLoad.id,true)
-    }else if (this.onLoad.id){
-      this.refresh(this.onLoad.id,true)
+      this.refresh(this.onLoad.id, true)
+    } else if (this.onLoad.id) {
+      this.refresh(this.onLoad.id, true)
     }
   },
   methods: {
@@ -726,6 +741,7 @@ export default {
     },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
+      if (typeof res.message === "string") return
       for (let item of this.dataList){
         for (let li of res){
          if (item.code === li.code){
@@ -743,8 +759,19 @@ export default {
         this.title = type
         if (type === '起租') {
           this.optionState = this.optionStateTwo
-        } else if (type === '计算租金'){
+        } else if (type === '计算租金') {
           this.optionState = this.optionStateFour
+          for (let item of this.selectionList) {
+            for (let li of this.selectionList) {
+              if (item.rentEndDate !== li.rentEndDate) {
+                return this.$message.error("当前租金期间不一样,请重新选择")
+              }
+            }
+          }
+          const date = new Date(this.selectionList[0].rentEndDate);
+          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"
         }else if(type === '撤销租金'){
           return this.$confirm('此操作将撤销租金并删除费用, 是否继续?', '提示', {
             confirmButtonText: '确定',
@@ -767,6 +794,7 @@ export default {
           });
         }else {
           this.optionState = this.optionStateThree
+          this.formState.rentDate = dateFormat(new Date(), "yyyy-MM-dd") + " 23:59:59"
         }
         this.dialogVisible = true
       } else {
@@ -777,13 +805,18 @@ export default {
       this.$refs["formState"].validate((valid, done) => {
         done()
         if (valid) {
-          if (this.title === "起租" || this.title === "退租"){
+          if (this.title === "起租" || this.title === "退租") {
+            if (this.title === "退租") {
+              if (Number(new Date(this.selectionList[0].rentEndDate)) > Number(new Date(this.formState.rentDate))) {
+                return this.$message.error("退租日期不能小于当前租金期间")
+              }
+            }
             this.disabledVisible = true
             statusUpdate({
               ...this.formState,
               ...this.form,
-              tradingBoxItemsList:this.selectionList,
-              rentType:this.title === "起租"?1:2
+              tradingBoxItemsList: this.selectionList,
+              rentType: this.title === "起租" ? 1 : 2
             }).then(res => {
               this.$message.success("操作成功")
               this.dialogVisible = false
@@ -795,6 +828,9 @@ export default {
             })
           }else {
             if (this.title === "计算租金"){
+              if (Number(new Date(this.selectionList[0].leaseCommencementDate)) > Number(new Date(this.formState.rentStartDate))) {
+                return this.$message.error("起始日期不能小于起租日期")
+              }
               this.disabledVisible = true
               calculateRent({
                 ...this.form,

+ 56 - 1
src/views/boxManagement/leaseIn/index.vue

@@ -150,6 +150,60 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       }
     }
@@ -253,7 +307,8 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/tradingBox/exportTradingBoxOut',      //跳转目标窗口的地址
         query: {
-          ...config.params    //括号内是要传递给新窗口的参数
+          ...config.params,    //括号内是要传递给新窗口的参数
+          type:"ZR"
         }
       })
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);

+ 82 - 54
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -68,16 +68,16 @@
         <!--                       @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
         <!--        </template>-->
         <template slot="menuLeft" slot-scope="scope">
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用'}) == -1?false:true)" type="primary" size="small"
+          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '录入'}) == -1?true:false)" type="primary" size="small"
                      @click="statusUpdate('0','起租')">起租
           </el-button>
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '退租'}) == -1?false:true)" type="primary" size="small"
+          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' || item.status == '使用'}) == -1?true:false)" type="primary" size="small"
                      @click="statusUpdate('1','退租')">退租
           </el-button>
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '退租'}) == -1?false:true)" type="primary" size="small"
+          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用'}) == -1?true:false)" type="primary" size="small"
                      @click="statusUpdate('2','计算租金')">计算租金
           </el-button>
-          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '退租'}) == -1?false:true)" type="primary" size="small"
+          <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' && item.count > 0}) == -1?true:false)" type="primary" size="small"
                      @click="statusUpdate('3','撤销租金')">撤销租金
           </el-button>
           <el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="importBox">导入</el-button>
@@ -85,7 +85,7 @@
       </avue-crud>
     </trade-card>
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" activeName="second" :codeValue="247.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" activeName="first" :codeValue="247.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
@@ -168,6 +168,7 @@ import {
 import checkSchedule from "@/components/check/checkSchedule";
 import {selectByName} from "@/api/boxManagement";
 import {getToken} from "@/util/auth";
+import {dateFormat} from "@/util/date";
 export default {
   name: "detailsPage",
   props: {
@@ -231,17 +232,26 @@ export default {
       },
       optionStateFour: {
         menuBtn: false,
-        span: 24,
+        span: 12,
         column: [{
-          label: '日期',
-          prop: 'rentCalculationDateList',
+          label: '起始日期',
+          prop: 'rentStartDate',
           width: 100,
-          search: true,
-          overHidden: true,
-          type: "daterange",
+          type: "date",
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        },{
+          label: '结束日期',
+          prop: 'rentCalculationDate',
+          width: 100,
+          type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          defaultTime: ["00:00:00", "23:59:59"],
           rules: [{
             required: true,
             message: " ",
@@ -403,15 +413,15 @@ export default {
           prop: 'code',
           width: 100,
           overHidden: true,
-          // filterable: true,
-          // remote: true,
-          // allowCreate: true,
-          // type: "select",
-          // dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
-          // props: {
-          //   label: "code",
-          //   value: "code"
-          // },
+          filterable: true,
+          remote: true,
+          allowCreate: true,
+          type: "select",
+          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code"
+          },
           rules: [{
             required: true,
             message: " ",
@@ -435,18 +445,6 @@ export default {
             trigger: "blur"
           }]
         }, {
-          label: '金额',
-          prop: 'amount',
-          type: 'number',
-          controls: false,
-          overHidden: true,
-          width: 100,
-          rules: [{
-            required: true,
-            message: " ",
-            trigger: "blur"
-          }]
-        }, {
           label: '租金/天',
           prop: 'price',
           type: 'number',
@@ -462,20 +460,28 @@ export default {
           label: '起租日期',
           prop: 'leaseCommencementDate',
           overHidden: true,
-          display: false,
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           width: 100,
         }, {
-          label: '租金计算截止日期',
+          label: '退租日期',
+          prop: 'rentingOutDate',
+          overHidden: true,
+          type: "date",
+          display: false,
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          width: 100,
+        }, {
+          label: '当前租金期间',
           prop: 'rentEndDate',
           overHidden: true,
           display: false,
           type: "date",
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          width: 160,
+          width: 160
         }, {
           label: '箱类型',
           prop: 'boxTypeId',
@@ -518,7 +524,6 @@ export default {
           width: 100,
           overHidden: true,
           filterable: true,
-          disabled: true,
           type: 'select',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_source",
           props: {
@@ -692,23 +697,23 @@ export default {
       this.costData = res.data.data
     })
     //下拉箱号带出对应信息
-    // 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,
-    //           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,
+              tare: item.tare,
+              loadingWeight: item.loadingWeight,
+              volume: item.volume,
+            }
+          }
+        }
+      })
+    }
     this.key++
     if (this.onLoad.id && this.detailData.id) {
       this.refresh(this.onLoad.id,true)
@@ -732,6 +737,7 @@ export default {
     },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
+      if (typeof res.message === "string") return
       for (let item of this.dataList){
         for (let li of res){
          if (item.code === li.code){
@@ -749,8 +755,22 @@ export default {
         this.title = type
         if (type === '起租') {
           this.optionState = this.optionStateTwo
+        }else if (type === '退租') {
+          this.optionState = this.optionStateTwo
+          this.formState.rentDate = dateFormat(new Date(), "yyyy-MM-dd") + " 23:59:59"
         } else if (type === '计算租金'){
           this.optionState = this.optionStateFour
+          for (let item of this.selectionList) {
+            for (let li of this.selectionList) {
+              if (item.rentEndDate !== li.rentEndDate) {
+                return this.$message.error("当前租金期间不一样,请重新选择")
+              }
+            }
+          }
+          const date = new Date(this.selectionList[0].rentEndDate);
+          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"
         }else if(type === '撤销租金'){
           return this.$confirm('此操作将撤销租金并删除费用, 是否继续?', '提示', {
             confirmButtonText: '确定',
@@ -785,6 +805,11 @@ export default {
         if (valid) {
           if (this.title === "起租" || this.title === "退租"){
             this.disabledVisible = true
+            if (this.title === "退租") {
+              if (Number(new Date(this.selectionList[0].rentEndDate)) > Number(new Date(this.formState.rentDate))) {
+                return this.$message.error("退租日期不能小于当前租金期间")
+              }
+            }
             statusUpdate({
               ...this.formState,
               ...this.form,
@@ -802,6 +827,9 @@ export default {
           }else {
             if (this.title === "计算租金"){
               this.disabledVisible = true
+              if (Number(new Date(this.selectionList[0].leaseCommencementDate)) > Number(new Date(this.formState.rentStartDate))) {
+                return this.$message.error("起始日期不能小于起租日期")
+              }
               calculateRent({
                 ...this.form,
                 ...this.formState,

+ 56 - 1
src/views/boxManagement/leaseOut/index.vue

@@ -150,6 +150,60 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          width: 100,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 200,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }]
       }
     }
@@ -253,7 +307,8 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/tradingBox/exportTradingBoxOut',      //跳转目标窗口的地址
         query: {
-          ...config.params    //括号内是要传递给新窗口的参数
+          ...config.params,    //括号内是要传递给新窗口的参数
+          type:"ZC"
         }
       })
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);

+ 1 - 0
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -567,6 +567,7 @@ export default {
     },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
+      if (typeof res.message === "string") return
       for (let item of this.dataList) {
         for (let li of res.tradingBoxItemList) {
           if (item.code === li.code) {

+ 2 - 1
src/views/boxManagement/sellingContainers/index.vue

@@ -229,7 +229,8 @@ export default {
       const routeData = this.$router.resolve({
         path: '/api/blade-box-tube/tradingBox/exportTradingBoxOut',      //跳转目标窗口的地址
         query: {
-          ...config.params    //括号内是要传递给新窗口的参数
+          ...config.params,    //括号内是要传递给新窗口的参数
+          type:"SELL"
         }
       })
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);

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

@@ -15,6 +15,8 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                :row-style="rowStyle"
+               :key="key"
+               v-if="key>0"
                @on-load="onLoad"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
@@ -41,6 +43,9 @@
       <template slot-scope="scope" slot="billType">
         <span>{{ 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>
+      </template>
       <template slot-scope="scope" slot="menu">
         <el-button
           type="text"
@@ -59,6 +64,7 @@
   import option from "./configuration/mainList.json";
   import { getBillList, removeDetail } from "@/api/financialManagement/paymentRequest";
   import _ from "lodash";
+  import {getToken} from "@/util/auth";
 
   export default {
     data() {
@@ -75,6 +81,7 @@
           pagerCount: 5,
           total: 0,
         },
+        key:0,
         query:{},
         configuration:{
           multipleChoices:false,
@@ -100,6 +107,7 @@
     },
     async created() {
       this.option = await this.getColumnData(this.getColumnName(60), option);
+      this.key++
     },
     mounted() {
       // option.height = window.innerHeight - 200 ;
@@ -152,7 +160,21 @@
         }
         return params
       },
-
+      outExport() {
+        let params = {...this.search}
+        if (params.createTime &&  params.createTime.length !==0 ) {  //合同
+          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+          params.createEndDate = params.createTime[1] + " " + "23:59:59";
+          this.$delete(params,'createTime')
+        }
+        const routeData = this.$router.resolve({
+          path: '/api/trade-finance/acc/exportAccOut',      //跳转目标窗口的地址
+          query: {
+            ...params    //括号内是要传递给新窗口的参数
+          }
+        })
+        window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+      },
       onLoad(page, params = {}) {
         this.loading = true;
         params = this.paramsAdjustment(params)

+ 29 - 13
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -51,6 +51,22 @@
       "overHidden": true,
       "width": 120,
       "index": 3
+    },{
+      "label": "箱号",
+      "prop": "srcSysno",
+      "width": 100,
+      "search": true,
+      "index": 4,
+      "overHidden": true,
+      "filterable": true,
+      "remote": true,
+      "allowCreate": true,
+      "type": "select",
+      "dicUrl": "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+      "props": {
+        "label": "code",
+        "value": "code"
+      }
     },
     {
       "label": "往来单位",
@@ -58,14 +74,14 @@
       "search": true,
       "overHidden": true,
       "width": 200,
-      "index": 4
+      "index": 5
     },
     {
       "label": "所属公司",
       "prop": "belongToCorpId",
       "overHidden": true,
       "width": 200,
-      "index": 4
+      "index": 6
     },
     {
       "label": "单据来源",
@@ -92,62 +108,62 @@
       "search": true,
       "overHidden": true,
       "width": 150,
-      "index": 5
+      "index": 7
     },
     {
       "label": "数量",
       "prop": "quantity",
       "width": 120,
       "overHidden": true,
-      "index": 6
+      "index": 8
     },
     {
       "label": "单价",
       "prop": "price",
       "width": 120,
       "overHidden": true,
-      "index": 7
+      "index": 9
     },
     {
       "label": "账单金额",
       "prop": "amount",
       "overHidden": true,
       "width": 120,
-      "index": 8
+      "index": 10
     },
     {
       "label": "结算金额",
       "prop": "settlementAmount",
       "width": 120,
       "overHidden": true,
-      "index": 9
+      "index": 11
     },
     {
       "label": "开票金额",
       "prop": "invoiceAmount",
       "width": 120,
       "overHidden": true,
-      "index": 10
+      "index": 12
     },
     {
       "label": "币别",
       "prop": "currency",
       "width": 120,
       "overHidden": true,
-      "index": 11
+      "index": 13
     },
     {
       "label": "汇率",
       "prop": "exchangeRate",
       "width": 120,
       "overHidden": true,
-      "index": 12
+      "index": 14
     },
     {
       "label": "录入人",
       "prop": "createUserName",
       "overHidden": true,
-      "index": 13,
+      "index": 15,
       "width": 120
     },
     {
@@ -161,13 +177,13 @@
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
       "width": 200,
-      "index": 14
+      "index": 16
     },
     {
       "label": "备注",
       "prop": "remarks",
       "overHidden": true,
-      "index": 15,
+      "index": 17,
       "width": 200
     },
     {