caojunjie il y a 2 ans
Parent
commit
3a36c25a7a

+ 8 - 0
src/api/boxManagement/leaseIn/index.js

@@ -121,3 +121,11 @@ export function revokeRent(data) {
     data:data
   })
 }
+// 撤销退租
+export function revokeRentingOut(data) {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxRent/revokeRentingOut',
+    method: 'post',
+    data:data
+  })
+}

+ 49 - 21
src/components/boxCost/index.vue

@@ -41,11 +41,13 @@ export default {
   name: "index",
   data() {
     return {
+      code:'',
       option: {},
       optionBack: {},
       leaseIn:{
         align: 'center',
         index: true,
+        height:500,
         addBtnText: "录入明细",
         refreshBtn: false,
         addBtn: true,
@@ -85,7 +87,7 @@ export default {
         overHidden: true,
         filterable: true,
         type: "select",
-        dicUrl: "/api/blade-box-tube/archives/selectArchivesList",
+        dicUrl: `/api/blade-box-tube/archives/selectArchivesByCodeList?code=${this.code}`,
         props: {
           label: "code",
           value: "code"
@@ -179,6 +181,11 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
+          label: '业务类型',
+          prop: 'billType',
+          display:false,
+          width: 100
+        }, {
           label: '备注',
           prop: 'remarks',
           type: 'textarea',
@@ -191,6 +198,7 @@ export default {
       boxTube:{
         align: 'center',
         index: true,
+        height:500,
         addBtnText: "录入明细",
         refreshBtn: false,
         addBtn: true,
@@ -229,7 +237,7 @@ export default {
         overHidden: true,
         filterable: true,
         type: "select",
-        dicUrl: "/api/blade-box-tube/archives/selectArchivesList",
+        dicUrl: `/api/blade-box-tube/archives/selectArchivesByCodeList?code=${this.code}`,
         props: {
           label: "code",
           value: "code"
@@ -305,6 +313,11 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
+          label: '业务类型',
+          prop: 'billType',
+          display:false,
+          width: 100
+        }, {
         label: '备注',
         prop: 'remarks',
         type: 'textarea',
@@ -317,6 +330,7 @@ export default {
       customsList: {
         align: 'center',
         index: true,
+        height:500,
         addBtnText: "录入明细",
         refreshBtn: false,
         addBtn: true,
@@ -400,25 +414,32 @@ export default {
           controls: false,
           overHidden: true,
           width: 140
-        },{
-          label: '结算金额',
-          prop: 'settlementAmount',
-          type: 'number',
-          precision: 2,
-          disabled: true,
-          controls: false,
-          overHidden: true,
-          width: 140
-        }, {
-          label: '结算时间',
-          prop: 'settlementDate',
-          width: 100,
-          disabled: true,
-          overHidden: true,
-          type: "date",
-          format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd HH:mm:ss"
-        }, {
+        },
+          // {
+          //   label: '结算金额',
+          //   prop: 'settlementAmount',
+          //   type: 'number',
+          //   precision: 2,
+          //   disabled: true,
+          //   controls: false,
+          //   overHidden: true,
+          //   width: 140
+          // }, {
+          //   label: '结算时间',
+          //   prop: 'settlementDate',
+          //   width: 100,
+          //   disabled: true,
+          //   overHidden: true,
+          //   type: "date",
+          //   format: "yyyy-MM-dd",
+          //   valueFormat: "yyyy-MM-dd HH:mm:ss"
+          // }, {
+          //   label: '业务类型',
+          //   prop: 'billType',
+          //   display:false,
+          //   width: 100
+          // },
+          {
           label: '备注',
           prop: 'remark',
           type: 'textarea',
@@ -455,6 +476,13 @@ export default {
         this.dataList = this.data_two;
       }
     },
+    code(newVla, oldVal) {
+      if (this.code){
+        this.findObject(this.option.column, "code").dicUrl = `/api/blade-box-tube/archives/selectArchivesByCodeList?code=${this.code}`
+      }
+      console.log(this.code)
+      this.key++
+    },
     activeName(newVla, oldVal) {
       if (newVla !== oldVal) {
         if (newVla === "first") {

+ 15 - 0
src/enums/column-name.js

@@ -1004,6 +1004,21 @@ const columnName = [{
   code: 237.4,
   name: '箱管理-出库装运-箱轨迹'
 },{
+  code: 237.9,
+  name: '箱管理-进库返程'
+},{
+  code: 237.91,
+  name: '箱管理-进库返程-明细列表'
+},{
+  code: 237.92,
+  name: '箱管理-进库返程-费用'
+},{
+  code: 237.93,
+  name: '箱管理-进库返程-附件'
+},{
+  code: 237.94,
+  name: '箱管理-进库返程-箱轨迹'
+},{
   code: 238,
   name: '箱管理-箱导入'
 },{

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

@@ -511,6 +511,7 @@ export default {
         delete this.form.repairItemList
         delete this.form.repairFeesList
         delete this.form.filesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

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

@@ -664,6 +664,7 @@ export default {
         delete this.form.tradingBoxItemsList
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (this.form.status > 0) {
           //基础资料

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

@@ -511,6 +511,7 @@ export default {
         delete this.form.repairItemList
         delete this.form.repairFeesList
         delete this.form.filesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

+ 3 - 0
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -804,6 +804,9 @@ export default {
         delete this.form.tradingBoxItemsList
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
+
+        this.$refs.boxCost.code = this.form.code
+
         loading.close();
         if (type) {
           //基础资料

+ 15 - 11
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -217,6 +217,8 @@
             @on-load="onLoadTrack"
             @search-change="searchChange"
             @row-update="rowUpdateTrack"
+            @resetColumn="resetColumnTwo('crudTrack','optionTrack','optionTrackBack',237.4)"
+            @saveColumn="saveColumnTwo('crudTrack','optionTrack','optionTrackBack',237.4)"
             v-model="formTrack">
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
             <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
@@ -338,6 +340,11 @@ export default {
         dialogTop: 25,
         dialogWidth: "80%",
         column: [{
+          label: '客户名称',
+          prop: 'corpName',
+          width: 170,
+          search: true,
+        },{
           label: '箱号',
           prop: 'code',
           width: 100,
@@ -370,18 +377,9 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
-          label: '状态',
+          label: '业务类型',
           prop: 'status',
-          overHidden: true,
-          filterable: true,
-          type: 'select',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_access_status",
-          props: {
-            label: "dictValue",
-            value: "dictKey"
-          },
-          search: true,
-          disabled: true
+          width: 140
         }]
       },
       dataTrackList: [],
@@ -592,6 +590,7 @@ export default {
         delBtn: false,
         menuWidth: 200,
         dialogTop: 25,
+        height:500,
         dialogWidth: "80%",
         showSummary: true,
         sumColumnList: [{
@@ -611,6 +610,10 @@ export default {
           type: 'sum',
           decimals: 2
         },{
+          name: 'overdueAmount',
+          type: 'sum',
+          decimals: 2
+        },{
           name: 'loadingWeight',
           type: 'sum',
           decimals: 2
@@ -1161,6 +1164,7 @@ export default {
         delete this.form.transportItemList
         delete this.form.transportItemFeesList
         delete this.form.transportFilesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

+ 21 - 17
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -62,8 +62,8 @@
           @row-save="rowSave"
           @row-update="rowUpdate"
           @selection-change="selectionChange"
-          @resetColumn="resetColumnTwo('crud','option','optionBack',237.1)"
-          @saveColumn="saveColumnTwo('crud','option','optionBack',237.1)">
+          @resetColumn="resetColumnTwo('crud','option','optionBack',237.91)"
+          @saveColumn="saveColumnTwo('crud','option','optionBack',237.91)">
         <template slot-scope="{type,size,row,index,disabled}" slot="menu">
           <el-button icon="el-icon-share" :size="size" :disabled="disabled" :type="type"
                      @click="track(row)">箱轨迹
@@ -118,7 +118,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :codeValue="237.2" activeName="second" ref="boxCost"
+    <box-cost v-model="dataListTwo" :codeValue="237.92" activeName="second" ref="boxCost"
               url="/api/blade-box-tube/transportItemFees/remove" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
@@ -126,7 +126,7 @@
           :data="tradingBoxFilesList"
           :disabled="disabled"
           deleteUrl="/api/blade-box-tube/transportFiles/remove"
-          :enumerationValue="237.3"
+          :enumerationValue="237.93"
           display
       />
     </trade-card>
@@ -216,6 +216,8 @@
             @on-load="onLoadTrack"
             @search-change="searchChange"
             @row-update="rowUpdateTrack"
+            @resetColumn="resetColumnTwo('crudTrack','optionTrack','optionTrackBack',237.94)"
+            @saveColumn="saveColumnTwo('crudTrack','optionTrack','optionTrackBack',237.94)"
             v-model="formTrack">
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
             <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
@@ -337,6 +339,11 @@ export default {
         dialogTop: 25,
         dialogWidth: "80%",
         column: [{
+          label: '客户名称',
+          prop: 'corpName',
+          width: 170,
+          search: true,
+        },{
           label: '箱号',
           prop: 'code',
           width: 100,
@@ -369,18 +376,9 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
-          label: '状态',
+          label: '业务类型',
           prop: 'status',
-          overHidden: true,
-          filterable: true,
-          type: 'select',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_access_status",
-          props: {
-            label: "dictValue",
-            value: "dictKey"
-          },
-          search: true,
-          disabled: true
+          width: 140
         }]
       },
       dataTrackList: [],
@@ -595,6 +593,7 @@ export default {
         editBtn: false,
         delBtn: false,
         menuWidth: 200,
+        height:500,
         dialogTop: 25,
         dialogWidth: "80%",
         showSummary: true,
@@ -622,6 +621,10 @@ export default {
           name: 'volume',
           type: 'sum',
           decimals: 2
+        },{
+          name: 'overdueAmount',
+          type: 'sum',
+          decimals: 2
         }],
         column: [{
           label: '箱号',
@@ -751,8 +754,8 @@ export default {
     }
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(237.1), this.optionBack);
-    this.optionTrack = await this.getColumnData(this.getColumnName(237.4), this.optionTrackBack);
+    this.option = await this.getColumnData(this.getColumnName(237.91), this.optionBack);
+    this.optionTrack = await this.getColumnData(this.getColumnName(237.94), this.optionTrackBack);
     this.option.selectable = (row, index) => {
       return row.id;
     }
@@ -1164,6 +1167,7 @@ export default {
         delete this.form.transportItemList
         delete this.form.transportItemFeesList
         delete this.form.transportFilesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

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

@@ -332,7 +332,7 @@ export default {
     }
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(237), this.optionList);
+    this.option = await this.getColumnData(this.getColumnName(237.9), this.optionList);
     this.key++
     let i = 0;
     this.option.column.forEach(item => {

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

@@ -79,6 +79,11 @@
               @click="statusUpdate('1','退租')">退租
           </el-button>
           <el-button
+              :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return 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?true:false)"
               type="primary" size="small"
               @click="statusUpdate('2','计算租金')">计算租金
@@ -180,7 +185,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent, itemDetails
+  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -397,6 +402,7 @@ export default {
         dialogDrag: true,
         addBtn: true,
         span: 8,
+        height:600,
         selection: true,
         addRowBtn: false,
         cellBtn: false,
@@ -813,7 +819,27 @@ export default {
               message: '已取消删除'
             });
           });
-        }else {
+        } else if (type === '撤销退租'){
+          return this.$confirm('此操作将撤销退租并删除费用, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            revokeRentingOut({
+              ...this.form,
+              tradingBoxItemsList:this.selectionList
+            }).then(res => {
+              this.$message.success("操作成功")
+              this.formState = {}
+              this.refresh(this.form.id)
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
+        } else {
           this.optionState = this.optionStateThree
           this.formState.rentDate = dateFormat(new Date(), "yyyy-MM-dd") + " 23:59:59"
         }
@@ -1057,6 +1083,7 @@ export default {
         delete this.form.tradingBoxItemsList
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

+ 28 - 1
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -74,6 +74,11 @@
           <el-button :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return 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?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?true:false)" type="primary" size="small"
                      @click="statusUpdate('2','计算租金')">计算租金
           </el-button>
@@ -170,7 +175,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent, itemDetails
+  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -392,6 +397,7 @@ export default {
         delBtn: false,
         menuWidth: 140,
         dialogTop: 25,
+        height:600,
         dialogWidth: "80%",
         showSummary: true,
         sumColumnList: [{
@@ -813,6 +819,26 @@ export default {
               message: '已取消删除'
             });
           });
+        } else if (type === '撤销退租'){
+          return this.$confirm('此操作将撤销退租并删除费用, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            revokeRentingOut({
+              ...this.form,
+              tradingBoxItemsList:this.selectionList
+            }).then(res => {
+              this.$message.success("操作成功")
+              this.formState = {}
+              this.refresh(this.form.id)
+            })
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消删除'
+            });
+          });
         }else {
           this.optionState = this.optionStateThree
         }
@@ -1059,6 +1085,7 @@ export default {
         delete this.form.tradingBoxItemsList
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

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

@@ -802,6 +802,7 @@ export default {
         delete this.form.tradingBoxItemsList
         delete this.form.tradingBoxFeesList
         delete this.form.tradingBoxFilesList
+        this.$refs.boxCost.code = this.form.code
         loading.close();
         if (type) {
           //基础资料

+ 8 - 1
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -181,10 +181,17 @@
       "index": 16
     },
     {
+      "label": "业务类型",
+      "prop": "srcBoxBillType",
+      "overHidden": true,
+      "index": 17,
+      "width": 200
+    },
+    {
       "label": "备注",
       "prop": "remarks",
       "overHidden": true,
-      "index": 17,
+      "index": 18,
       "width": 200
     },
     {

+ 0 - 11
src/views/purchase/importDeclaration/index.vue

@@ -26,14 +26,6 @@
           <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">创建单据</el-button>
           <el-button class="el-icon-document-copy" type="success" size="small" :disabled="!(selectionList.length === 1)" @click="copyData">复制单据</el-button>
           <el-button class="el-icon-download" type="warning" size="small" @click="outExport">导出</el-button>
-          <div style="display: inline-block;">
-            <el-upload class="upload-demo"
-                       :action="action"
-                       :headers="headers"
-                       :show-file-list="false" :limit="1" :on-success="onSuccess">
-              <el-button class="el-icon-upload2" size="small" type="primary" :size="size">点击上传</el-button>
-            </el-upload>
-          </div>
         </template>
       </avue-crud>
     </basic-container>
@@ -219,9 +211,6 @@ export default {
       this.form = row
       this.detailsOpen = true
     },
-    onSuccess(response, file, fileList){
-      console.log(response, file, fileList)
-    },
     backToList(type) {
       this.form = {}
       this.detailsOpen = false