Browse Source

吉永分页

caojunjie 2 years ago
parent
commit
b1475598e5

+ 17 - 0
src/api/boxManagement/exportShipment/index.js

@@ -115,3 +115,20 @@ export function statusUpdate(data) {
         params:data
     })
 }
+
+// 出口装运,进口返程的箱信息接口
+export function transportItemListfun(data) {
+    return request({
+        url: '/api/blade-box-tube/transportItem/list',
+        method: 'get',
+        params:data
+    })
+}
+// 出口装运,进口返程的箱信息添加和编辑接口
+export function transportItemSubmitfun(data) {
+    return request({
+        url: '/api/blade-box-tube/transportItem/submit',
+        method: 'post',
+        data:data
+    })
+}

+ 27 - 1
src/api/boxManagement/index.js

@@ -35,7 +35,7 @@ export function revokeBill(data) {
         data: data
     })
 }
-// 买箱,卖箱,租入,租出的接口
+// 买箱,卖箱,租入,租出,堆存管理的接口
 export const tradingBoxFeesList = (data) => {
     return request({
         url: "/api/blade-box-tube/tradingBoxFees/list",
@@ -43,3 +43,29 @@ export const tradingBoxFeesList = (data) => {
         params: data
     })
 }
+// 出口装运,进口返程
+export const transportItemFeesListdata = (data) => {
+    return request({
+        url: "/api/blade-box-tube/transportItemFees/list",
+        method: 'get',
+        params: data
+    })
+}
+
+// 买箱,卖箱,租入,租出,堆存管理的添加和保存接口
+export const tradingBoxFeesSubmit = (data) => {
+    return request({
+        url: "/api/blade-box-tube/tradingBoxFees/submit",
+        method: 'post',
+        data: data
+    })
+}
+// 出口装运,进口返程
+export const transportItemFeesSubmitdata = (data) => {
+    return request({
+        url: "/api/blade-box-tube/transportItemFees/submit",
+        method: 'post',
+        data: data
+    })
+}
+

+ 11 - 2
src/api/boxManagement/leaseIn/index.js

@@ -129,11 +129,20 @@ export function revokeRentingOut(data) {
     data:data
   })
 }
-//查询列表
+//箱信息查询列表
 export const detList = (params) => {
   return request({
-    url: '/api/blade-box-tube/tradingBoxItem/listAll',
+    url: '/api/blade-box-tube/tradingBoxItem/list',
     method: 'get',
     params: params
   })
 }
+
+// 租出,租入,卖相,买箱,堆存管理 箱信息保存和添加接口
+export const tradingBoxItemSubmit = (data) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxItem/submit',
+    method: 'post',
+    data: data
+  })
+}

+ 185 - 36
src/components/boxCost/index.vue

@@ -13,8 +13,10 @@
         @row-save="rowSave"
         ref="crud"
         :key="key"
+        :search.sync="search"
         :page.sync="page"
         @on-load="onLoad"
+        @search-change="searchChange"
         @selection-change="selectionChange"
         @row-update="rowUpdate"
         @resetColumn="resetColumn('crud','option','optionBack',codeValue)"
@@ -71,7 +73,15 @@
 
 <script>
 
-import {tradingBoxFees,generateBill, revokeBill, tradingBoxFeesList} from "@/api/boxManagement";
+import {
+    tradingBoxFees,
+    generateBill,
+    revokeBill,
+    tradingBoxFeesList,
+    transportItemFeesListdata,
+    tradingBoxFeesSubmit,
+    transportItemFeesSubmitdata
+} from "@/api/boxManagement";
 import reportDialog from "@/components/report-dialog/main.vue";
 import {getParities} from "@/api/basicData/customerInquiry";
 import {dateFormat} from "@/util/date";
@@ -92,6 +102,7 @@ export default {
             total: 0,
             pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
         },
+        search:{},
       leaseIn: {
         align: 'center',
         index: true,
@@ -101,6 +112,7 @@ export default {
         addBtn: true,
         selection: true,
         span: 6,
+          searchMenuSpan: 18,
         dialogTop: "25%",
         addRowBtn: false,
         cellBtn: false,
@@ -151,6 +163,7 @@ export default {
           label: '箱号',
           prop: 'code',
           width: 140,
+            search:true,
           overHidden: true,
           filterable: true,
         type: "select",
@@ -280,6 +293,7 @@ export default {
         refreshBtn: false,
         addBtn: true,
         span: 6,
+          searchMenuSpan: 18,
         dialogTop: "25%",
         addRowBtn: false,
         cellBtn: false,
@@ -330,6 +344,7 @@ export default {
           label: '箱号',
         prop: 'code',
         width: 140,
+            search:true,
         overHidden: true,
         filterable: true,
         type: "select",
@@ -459,6 +474,7 @@ export default {
         refreshBtn: false,
         addBtn: true,
         span: 6,
+          searchMenuSpan: 18,
         dialogTop: "25%",
         addRowBtn: false,
         cellBtn: false,
@@ -617,32 +633,58 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
+        onetotal:0,
+        twototal:0,
       activeNameTwo: "first"
     }
   },
   watch: {
     listData(newVla, oldVal) {
         console.log(this.listData,625)
-      // this.data_one = newVla.filter(item => item.feesType === 1); //应收
-      // this.data_two = newVla.filter(item => item.feesType === 2); //应付
-        this.tradingBoxFeesListfun(1)
-        this.tradingBoxFeesListfun(2)
-        // console.log(this.data_one,'one')
-        // console.log(this.data_two,'two')
-      // if (this.activeNameTwo === "first") {
-      //   this.dataList = this.data_one;
-      // } else {
-      //   this.dataList = this.data_two;
-      // }
-      // this.key++
+        if(this.type == 'CK' || this.type == 'JK') {
+            console.log('出口')
+            this.transportItemFeesListdatafun(1)
+            this.transportItemFeesListdatafun(2)
+        }else if (this.type == 'ZR' || this.type == 'ZC' || this.type == 'SELL' || this.type == 'BUY' || this.type == 'DCF') {
+            console.log('4ge')
+            this.tradingBoxFeesListfun(1)
+            this.tradingBoxFeesListfun(2)
+        }else {
+            this.data_one = newVla.filter(item => item.feesType === 1); //应收
+            this.data_two = newVla.filter(item => item.feesType === 2); //应付
+            if (this.activeNameTwo === "first") {
+              this.dataList = this.data_one;
+            } else {
+              this.dataList = this.data_two;
+            }
+            this.key++
+        }
     },
+      // 分页
       "page.currentPage":{
           handler(newVla,oldVal) {
-              console.log(newVla,640)
-              this.tradingBoxFeesListfun(1)
-              this.tradingBoxFeesListfun(2)
+              if(this.type == 'CK' || this.type == 'JK') {
+                  this.transportItemFeesListdatafun(1)
+                  this.transportItemFeesListdatafun(2)
+              }else if (this.type == 'ZR' || this.type == 'ZC' || this.type == 'SELL' || this.type == 'BUY' || this.type == 'DCF') {
+                  this.tradingBoxFeesListfun(1)
+                  this.tradingBoxFeesListfun(2)
+              }
+
+          },
+      },
+      "page.pageSize":{
+          handler(newVla,oldVal) {
+              if(this.type == 'CK' || this.type == 'JK') {
+                  this.transportItemFeesListdatafun(1)
+                  this.transportItemFeesListdatafun(2)
+              }else if (this.type == 'ZR' || this.type == 'ZC' || this.type == 'SELL' || this.type == 'BUY' || this.type == 'DCF') {
+                  this.tradingBoxFeesListfun(1)
+                  this.tradingBoxFeesListfun(2)
+              }
           },
       },
+
     "option.menu":{
       handler(newVla,oldVal) {
         if (newVla !== oldVal) {
@@ -762,37 +804,86 @@ export default {
   },
   methods: {
       onLoad(page, params = {}){
-          console.log(page,757)
           this.page.currentPage = page.currentPage
           this.page.pageSize = page.pageSize
       },
+      // 搜索
+      searchChange(form,dome){
+          console.log(form,809)
+          this.page.currentPage = 1
+          this.page.pageSize = 20
+          let feesType = null
+          if (this.activeNameTwo === "first"){
+              feesType = 1
+          }else {
+              feesType = 2
+          }
+          if(this.type == 'CK' || this.type == 'JK') {
+              this.transportItemFeesListdatafun(feesType,form)
+          }else if (this.type == 'ZR' || this.type == 'ZC' || this.type == 'SELL' || this.type == 'BUY' || this.type == 'DCF') {
+              this.tradingBoxFeesListfun(feesType,form)
+          }
+          dome()
+
+      },
       // 租出,租入,卖箱,买箱的接口
-      tradingBoxFeesListfun(feesType){
+      tradingBoxFeesListfun(feesType,params = {}){
           tradingBoxFeesList({
+              ...params,
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+              pid:this.id,
+              feesType:feesType
+          }).then(res=>{
+              if (feesType == 1) {
+                  // this.page.total = res.data.data.total
+                  this.onetotal = res.data.data.total
+                  this.data_one = res.data.data.records
+              }else {
+                  // this.page.total = res.data.data.total
+                  this.twototal = res.data.data.total
+                  this.data_two = res.data.data.records
+              }
+              if (this.activeNameTwo === "first") {
+                  this.page.total = this.onetotal
+                  this.dataList = this.data_one;
+              } else {
+                  this.page.total = this.twototal
+                  this.dataList = this.data_two;
+              }
+              this.key++
+          })
+      },
+
+      // 出口进口的费用接口
+      transportItemFeesListdatafun(feesType,params = {}){
+          transportItemFeesListdata({
+              ...params,
               current: this.page.currentPage,
               size: this.page.pageSize,
               pid:this.id,
               feesType:feesType
           }).then(res=>{
               if (feesType == 1) {
+                  // this.page.total = res.data.data.total
+                  this.onetotal = res.data.data.total
                   this.data_one = res.data.data.records
-                  this.page.total = res.data.data.total
               }else {
-                  console.log(res.data.data,755)
+                  // this.page.total = res.data.data.total
+                  this.twototal = res.data.data.total
                   this.data_two = res.data.data.records
-                  this.page.total = res.data.data.total
               }
-              console.log(this.data_one,'one')
-              console.log(this.data_two,'two')
               if (this.activeNameTwo === "first") {
+                  this.page.total = this.onetotal
                   this.dataList = this.data_one;
               } else {
+                  this.page.total = this.twototal
                   this.dataList = this.data_two;
               }
               this.key++
           })
       },
-    //生成账单
+      //生成账单
     generateBill(){
       this.$confirm("您确定要生成账单吗?", {
         confirmButtonText: "确定",
@@ -852,9 +943,11 @@ export default {
         })
       })
     },
+      // 选中表格的时候触发 反的是选中的数组
     selectionChange(list) {
       this.selectionList = list
     },
+      // 打印
     openReport() {
       for (let item of this.listData) {
         if (!item.id) {
@@ -903,31 +996,87 @@ export default {
       this.activeNameTwo = tab.name
       if (tab.name === "first") {
         this.findObject(this.option.column, "corpName").label = "收款对象"
+          this.page.total = this.onetotal
       } else {
         this.findObject(this.option.column, "corpName").label = "付款对象"
+          this.page.total = this.twototal
       }
     },
+      // 新增按钮事件
     rowSave(form, done, loading) {
       done({
         ...form,
         feesType: this.activeNameTwo === "first" ? 1 : 2,
         sort: this.dataList.length
       })
-      if (this.activeNameTwo === "first") {
-        this.dataList = this.dataList.concat(this.data_two)
-        this.$emit("callBack", this.dataList);
-      } else {
-        this.dataList = this.dataList.concat(this.data_one)
-        this.$emit("callBack", this.dataList);
-      }
+        console.log(form,976)
+
+        if(this.type == 'CK' || this.type == 'JK') {
+            this.transportItemFeesSubmitdatafun(form)
+        }else if (this.type == 'ZR' || this.type == 'ZC' || this.type == 'SELL' || this.type == 'BUY' || this.type == 'DCF') {
+            this.tradingBoxFeesSubmitfun(form)
+        }
+
+      // if (this.activeNameTwo === "first") {
+      //   this.dataList = this.dataList.concat(this.data_two)
+      //   this.$emit("callBack", this.dataList);
+      // } else {
+      //   this.dataList = this.dataList.concat(this.data_one)
+      //   this.$emit("callBack", this.dataList);
+      // }
     },
+      // 买箱,卖箱,租入,租出,堆存管理 添加和保存
+      tradingBoxFeesSubmitfun(form){
+          let feesType = null
+          if (this.activeNameTwo === "first") {
+              feesType = 1
+          } else {
+              feesType = 2
+          }
+          tradingBoxFeesSubmit({
+              ...form,
+              pid:this.id,
+              feesType:feesType
+          }).then(res=>{
+              if (res.data.code == 200) {
+                  this.$message.success("操作成功!");
+                  this.tradingBoxFeesListfun(feesType)
+              }
+
+          })
+      },
+      // 出口装运,进口装运的接口
+      transportItemFeesSubmitdatafun(form){
+          let feesType = null
+          if (this.activeNameTwo === "first") {
+              feesType = 1
+          } else {
+              feesType = 2
+          }
+          transportItemFeesSubmitdata({
+              ...form,
+              pid:this.id,
+              feesType:feesType
+          }).then(res=>{
+              if (res.data.code == 200) {
+                  this.$message.success("操作成功!");
+                  this.transportItemFeesListdatafun(feesType)
+              }
+          })
+      },
+      // 费用信息编辑
     rowUpdate(form, index, done, loading) {
       done(form)
-      if (this.activeNameTwo === "first") {
-        this.$emit("callBack", this.dataList.concat(this.data_two));
-      } else {
-        this.$emit("callBack", this.data_one.concat(this.dataList));
-      }
+        if(this.type == 'CK' || this.type == 'JK') {
+            this.transportItemFeesSubmitdatafun(form)
+        }else if (this.type == 'ZR' || this.type == 'ZC' || this.type == 'SELL' || this.type == 'BUY' || this.type == 'DCF') {
+            this.tradingBoxFeesSubmitfun(form)
+        }
+      // if (this.activeNameTwo === "first") {
+      //   this.$emit("callBack", this.dataList.concat(this.data_two));
+      // } else {
+      //   this.$emit("callBack", this.data_one.concat(this.dataList));
+      // }
     },
     // 明细删除
     rowDel(row, index) {

+ 76 - 14
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -46,6 +46,10 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          :page.sync="page"
+          :search.sync="search"
+          @on-load="xiangpage"
+          @search-change="searchChange"
           @selection-change="selectionChange"
           :before-open="beforeOpen"
           :upload-delete="uploadDelete"
@@ -186,7 +190,7 @@ import reportDialog from "@/components/report-dialog/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import {selectByName} from "@/api/boxManagement";
 import {getToken} from "@/util/auth";
-import {itemDetails} from "@/api/boxManagement/leaseIn";
+import {detList, itemDetails, tradingBoxItemSubmit} from "@/api/boxManagement/leaseIn";
 import check from "@/components/check/check";
 import {getParities} from "@/api/basicData/customerInquiry";
 import {dateFormat} from "@/util/date";
@@ -201,6 +205,14 @@ export default {
   components: {checkSchedule, reportDialog, check},
   data() {
     return {
+        // 分页
+        page: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        search:{},
       disabledVisible: false,
       dialogVisible: false,
       optionStateTwo: {
@@ -337,6 +349,7 @@ export default {
         selection: true,
         addBtn: true,
         span: 8,
+          searchMenuSpan: 18,
         addRowBtn: false,
         cellBtn: false,
         editBtn: false,
@@ -375,16 +388,17 @@ export default {
           label: '箱号',
           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"
-          // },
+            overHidden: true,
+            filterable: true,
+            remote: true,
+            allowCreate: true,
+            search: 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: " ",
@@ -919,7 +933,7 @@ export default {
       });
       detail({id: id}).then(res => {
         this.form = res.data.data
-        this.dataList = res.data.data.tradingBoxItemsList
+        // this.dataList = res.data.data.tradingBoxItemsList
         this.dataListTwo = res.data.data.tradingBoxFeesList
         this.tradingBoxFilesList = res.data.data.tradingBoxFilesList
         delete this.form.tradingBoxItemsList
@@ -973,6 +987,37 @@ export default {
         }
       })
     },
+      // 搜索
+      searchChange(form,dome){
+        this.page.currentPage = 1
+          this.page.pageSize = 20
+          this.xiangpage(this.page,form)
+          dome()
+      },
+      // 获取箱信息数据
+      xiangpage(page,params = {}){
+          // params = {
+          //     ...params,
+          //     ...Object.assign(params, this.search)
+          // }
+          this.loading = true
+          detList({
+              ...params,
+              current: page.currentPage,
+              size: page.pageSize,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              console.log(res,997)
+              this.page.total = res.data.data.total
+              this.dataList = res.data.data.records
+              this.loading = false
+          }).finally(() => {
+              this.loading = false
+          }).catch(()=>{
+              this.loading = false
+          })
+      },
+
     //新增修改
     editCustomer() {
       this.$refs["form"].validate((valid,done) => {
@@ -980,8 +1025,8 @@ export default {
         if (valid) {
           let data = {
             ...this.form,
-            tradingBoxItemsList: this.dataList,
-            tradingBoxFeesList: this.dataListTwo,
+            // tradingBoxItemsList: this.dataList,
+            // tradingBoxFeesList: this.dataListTwo,
             tradingBoxFilesList: this.tradingBoxFilesList,
             type: "BUY"
           }
@@ -1005,6 +1050,7 @@ export default {
         }
       });
     },
+      // 箱信息的添加
     rowSave(form,done,loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1037,7 +1083,10 @@ export default {
           amount: form.amount,
         })
       })
+
+        this.tradingBoxItemSubmitfun(form)
     },
+      // 箱信息的编辑
     rowUpdate(form, index, done, loading) {
       form.boxType = form.$boxTypeId
       done(form)
@@ -1066,7 +1115,20 @@ export default {
           }
         }
       })
+
+        this.tradingBoxItemSubmitfun(form)
     },
+      // 箱信息的添加和编辑接口
+      tradingBoxItemSubmitfun(form){
+          tradingBoxItemSubmit({
+              ...form,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              this.xiangpage(this.page)
+          })
+      },
+
     selectionChange(list) {
       this.selectionList = list
     },

+ 70 - 10
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -61,6 +61,10 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          :search.sync="xiangsearch"
+          :page.sync="xiangpage"
+          @search-change="xiangsearchChange"
+          @on-load="xiangpagefun"
           @row-save="rowSave"
           @row-update="rowUpdate"
           @selection-change="selectionChange"
@@ -261,13 +265,13 @@
 
 <script>
 import {
-  detail,
-  submit,
-  generateStack,
-  tradingBoxItem,
-  tradingBoxFees,
-  pleaseCheck,
-  repealCancel, statusUpdate, archivestrajectory, update, tradingBoxGJ
+    detail,
+    submit,
+    generateStack,
+    tradingBoxItem,
+    tradingBoxFees,
+    pleaseCheck,
+    repealCancel, statusUpdate, archivestrajectory, update, tradingBoxGJ, transportItemListfun, transportItemSubmitfun
 } from "@/api/boxManagement/exportShipment/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -279,6 +283,7 @@ import reportDialog from "@/components/report-dialog/main.vue";
 
 import check from "@/components/check/check";
 import {getParities} from "@/api/basicData/customerInquiry";
+import {detList} from "@/api/boxManagement/leaseIn";
 export default {
   name: "detailsPage",
   props: {
@@ -288,6 +293,14 @@ export default {
   components: {checkSchedule,reportDialog,check},
   data() {
     return {
+        // 分页
+        xiangpage: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        xiangsearch:{},
       checkData: {},
       checkDialog: false,
       switchDialog: false,
@@ -648,6 +661,7 @@ export default {
         refreshBtn: false,
         addBtn: true,
         span: 8,
+          searchMenuSpan: 18,
         addRowBtn: false,
         cellBtn: false,
         editBtn: false,
@@ -693,6 +707,7 @@ export default {
           overHidden: true,
           remote: true,
           filterable: true,
+            search: true,
           type: "select",
           dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
           props: {
@@ -1301,6 +1316,7 @@ export default {
     choceScheduleFun() {
       this.checkScheduleDialog = false
     },
+      // 明细详情
     refresh(id, type) {
       const loading = this.$loading({
         lock: true,
@@ -1310,7 +1326,7 @@ export default {
       });
       detail({id: id}).then(res => {
         this.form = res.data.data
-        this.dataList = res.data.data.transportItemList
+        // this.dataList = res.data.data.transportItemList
         this.dataListTwo = res.data.data.transportItemFeesList
         this.tradingBoxFilesList = res.data.data.transportFilesList
         delete this.form.transportItemList
@@ -1363,6 +1379,33 @@ export default {
         this.key++
       })
     },
+      xiangsearchChange(form,dome){
+        this.page.currentPage = 1
+          this.page.pageSize = 20
+
+        this.xiangpagefun(this.page,form)
+        dome()
+      },
+      // 获取箱信息数据
+      xiangpagefun(page,params = {}){
+          this.loading = true
+          transportItemListfun({
+              ...params,
+              current: page.currentPage,
+              size: page.pageSize,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              console.log(res,997)
+              this.xiangpage.total = res.data.data.total
+              this.dataList = res.data.data.records
+              this.loading = false
+          }).finally(() => {
+              this.loading = false
+          }).catch(()=>{
+              this.loading = false
+          })
+      },
+
     //新增修改
     editCustomer() {
       this.$refs["form"].validate((valid, done) => {
@@ -1370,8 +1413,8 @@ export default {
         if (valid) {
           let data = {
             ...this.form,
-            transportItemList: this.dataList,
-            transportItemFeesList: this.dataListTwo,
+            // transportItemList: this.dataList,
+            // transportItemFeesList: this.dataListTwo,
             transportFilesList: this.tradingBoxFilesList,
             billType: "CKZY"
           }
@@ -1395,6 +1438,7 @@ export default {
         }
       });
     },
+      // 箱信息的添加
     rowSave(form, done, loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1427,7 +1471,10 @@ export default {
           amount: form.amount,
         })
       })
+
+        this.transportItemSubmitfunfun(form)
     },
+      // 箱轨迹的编辑
     rowUpdateTrack(form, index, done, loading) {
       update(form).then(res => {
         done()
@@ -1435,6 +1482,17 @@ export default {
         this.onLoadTrack(this.page, this.search)
       })
     },
+      // 出口 进口箱信息的添加和编辑接口
+      transportItemSubmitfunfun(form){
+          transportItemSubmitfun({
+              ...form,
+              pid:this.form.id,
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              this.xiangpagefun(this.page)
+          })
+      },
+      // 箱信息的编辑
     rowUpdate(form, index, done, loading) {
       if (!Number(form.price) || Number(form.price) < 0) {
         loading()
@@ -1468,6 +1526,8 @@ export default {
           }
         }
       })
+
+        this.transportItemSubmitfunfun(form)
     },
     getGSData(row, type) {
       this[type[0]][type[1]] = row.cname

+ 74 - 10
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -60,6 +60,10 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          :search.sync="xiangsearch"
+          :page.sync="xiangpage"
+          @search-change="xiangsearchChange"
+          @on-load="xiangpagefun"
           @row-save="rowSave"
           @row-update="rowUpdate"
           @selection-change="selectionChange"
@@ -260,12 +264,19 @@
 
 <script>
 import {
-  detail,
-  submit,
-  tradingBoxItem,
-  tradingBoxFees,
-  pleaseCheck,
-  repealCancel, statusUpdate, archivestrajectory, update, tradingBoxGJ, generateStack
+    detail,
+    submit,
+    tradingBoxItem,
+    tradingBoxFees,
+    pleaseCheck,
+    repealCancel,
+    statusUpdate,
+    archivestrajectory,
+    update,
+    tradingBoxGJ,
+    generateStack,
+    transportItemListfun,
+    transportItemSubmitfun
 } from "@/api/boxManagement/exportShipment/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -286,6 +297,14 @@ export default {
   components: {checkSchedule,reportDialog,check},
   data() {
     return {
+        // 分页
+        xiangpage: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        xiangsearch:{},
       checkData: {},
       checkDialog: false,
       excelBox: false,
@@ -651,6 +670,7 @@ export default {
         refreshBtn: false,
         addBtn: true,
         span: 8,
+          searchMenuSpan: 18,
         addRowBtn: false,
         cellBtn: false,
         editBtn: false,
@@ -696,6 +716,7 @@ export default {
           overHidden: true,
           remote: true,
           filterable: true,
+            search: true,
           type: "select",
           dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
           props: {
@@ -1306,6 +1327,7 @@ export default {
     choceScheduleFun() {
       this.checkScheduleDialog = false
     },
+      // 明细
     refresh(id,type) {
       const loading = this.$loading({
         lock: true,
@@ -1315,7 +1337,7 @@ export default {
       });
       detail({id: id}).then(res => {
         this.form = res.data.data
-        this.dataList = res.data.data.transportItemList
+        // this.dataList = res.data.data.transportItemList
         this.dataListTwo = res.data.data.transportItemFeesList
         this.tradingBoxFilesList = res.data.data.transportFilesList
         delete this.form.transportItemList
@@ -1370,6 +1392,30 @@ export default {
         loading.close();
       })
     },
+      xiangsearchChange(form,dome){
+        this.page.currentPage = 1
+          this.page.pageSize = 20
+        this.xiangpagefun(this.page,form)
+          dome()
+      },
+      // 获取箱信息数据
+      xiangpagefun(page,params = {}){
+          this.loading = true
+          transportItemListfun({
+              ...params,
+              current: page.currentPage,
+              size: page.pageSize,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              this.xiangpage.total = res.data.data.total
+              this.dataList = res.data.data.records
+              this.loading = false
+          }).finally(() => {
+              this.loading = false
+          }).catch(()=>{
+              this.loading = false
+          })
+      },
     //新增修改
     editCustomer() {
       this.$refs["form"].validate((valid, done) => {
@@ -1377,8 +1423,8 @@ export default {
         if (valid) {
           let data = {
             ...this.form,
-            transportItemList: this.dataList,
-            transportItemFeesList: this.dataListTwo,
+            // transportItemList: this.dataList,
+            // transportItemFeesList: this.dataListTwo,
             transportFilesList: this.tradingBoxFilesList,
             billType: "JKFC"
           }
@@ -1402,6 +1448,7 @@ export default {
         }
       });
     },
+      // 箱信息数据
     rowSave(form, done, loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1434,6 +1481,8 @@ export default {
           amount: form.amount,
         })
       })
+
+        this.transportItemSubmitfunfun(form)
     },
     rowUpdateTrack(form, index, done, loading) {
       update(form).then(res => {
@@ -1442,6 +1491,7 @@ export default {
         this.onLoadTrack(this.page, this.search)
       })
     },
+      // 箱信息的编辑
     rowUpdate(form, index, done, loading) {
       if (!Number(form.price) || Number(form.price) < 0) {
         loading()
@@ -1475,8 +1525,22 @@ export default {
           }
         }
       })
+
+        this.transportItemSubmitfunfun(form)
     },
-    getGSData(row, type) {
+
+      // 出口 进口箱信息的添加和编辑接口
+      transportItemSubmitfunfun(form){
+          transportItemSubmitfun({
+              ...form,
+              pid:this.form.id,
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              this.xiangpagefun(this.page)
+          })
+      },
+
+      getGSData(row, type) {
       this[type[0]][type[1]] = row.cname
     },
     backToList(type) {

+ 45 - 12
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -46,6 +46,8 @@
           v-model="formTwo"
           :table-loading="loading"
           :search.sync="search"
+          :page.sync="page"
+          @on-load="xiangpage"
           @search-change="searchChange"
           @search-reset="resetChange"
           ref="crud"
@@ -208,15 +210,15 @@
 
 <script>
 import {
-  detail,
-  submit,
-  tradingBoxFiles,
-  selectArchivesList,
-  tradingBoxItem,
-  tradingBoxFees,
-  pleaseCheck,
-  repealCancel,
-  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut, detList, getList
+    detail,
+    submit,
+    tradingBoxFiles,
+    selectArchivesList,
+    tradingBoxItem,
+    tradingBoxFees,
+    pleaseCheck,
+    repealCancel,
+    statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut, detList, getList, tradingBoxItemSubmit
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -237,6 +239,13 @@ export default {
   },
   data() {
     return {
+        // 分页
+        page: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
       checkData: {},
       checkDialog: false,
       switchDialog:false,
@@ -1287,6 +1296,11 @@ export default {
       done();
       this.queryDetails(params)
     },
+      // 箱信息的分页
+      xiangpage(page,params = {}){
+          this.queryDetails()
+      },
+      // 获取箱信息数据
     queryDetails(params = {}) {
       params = {
         ...params,
@@ -1296,9 +1310,12 @@ export default {
       this.loading = true
       detList({
         ...params,
+          current: this.page.currentPage,
+          size: this.page.pageSize,
         pid:this.form.id?this.form.id:this.onLoad.id
       }).then(res=>{
-        this.dataList = res.data.data
+          this.page.total = res.data.data.total
+        this.dataList = res.data.data.records
         this.loading = false
       }).finally(() => {
         this.loading = false
@@ -1376,8 +1393,8 @@ export default {
         if (valid) {
           let data = {
             ...this.form,
-            tradingBoxItemsList: this.dataList,
-            tradingBoxFeesList: this.dataListTwo,
+            // tradingBoxItemsList: this.dataList,
+            // tradingBoxFeesList: this.dataListTwo,
             tradingBoxFilesList: this.tradingBoxFilesList,
             type: "ZR"
           }
@@ -1401,6 +1418,7 @@ export default {
         }
       });
     },
+      // 箱信息的添加
     rowSave(form,done,loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1412,12 +1430,27 @@ export default {
         return loading();
       }
       form.boxType = form.$boxTypeId
+        this.tradingBoxItemSubmitfun(form)
       done(form)
     },
+      // 箱信息的编辑
     rowUpdate(form, index, done, loading) {
       form.boxType = form.$boxTypeId
+        this.tradingBoxItemSubmitfun(form)
       done(form)
     },
+      // 箱信息的添加和保存
+      // 箱信息的保存和添加
+      tradingBoxItemSubmitfun(form){
+          tradingBoxItemSubmit({
+              ...form,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              this.queryDetails()
+          })
+      },
+
     //打开表单前
     beforeOpen(done,type){
       if (this.formTwo.count > 0){

+ 35 - 4
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -46,6 +46,8 @@
           v-model="formTwo"
           :table-loading="loading"
           :search.sync="search"
+          :page.sync="page"
+          @on-load="xiangpage"
           @search-change="searchChange"
           @search-reset="resetChange"
           ref="crud"
@@ -212,7 +214,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut, detList
+  statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut, detList, tradingBoxItemSubmit
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -231,6 +233,13 @@ export default {
   components:{checkSchedule,reportDialog,check},
   data() {
     return {
+        // 分页
+        page: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
       checkData: {},
       checkDialog: false,
       switchDialog:false,
@@ -1263,9 +1272,16 @@ export default {
       done();
       this.queryDetails(params)
     },
+      // 箱信息的分页
+      xiangpage(page,params = {}){
+        this.queryDetails()
+      },
+      // 获取箱信息数据
     queryDetails(params = {}) {
       params = {
         ...params,
+          current: this.page.currentPage,
+          size: this.page.pageSize,
         type: "ZC",
         ...Object.assign(params, this.search)
       }
@@ -1274,7 +1290,8 @@ export default {
         ...params,
         pid:this.form.id?this.form.id:this.onLoad.id
       }).then(res=>{
-        this.dataList = res.data.data
+          this.page.total = res.data.data.total
+        this.dataList = res.data.data.records
         this.loading = false
       }).finally(() => {
         this.loading = false
@@ -1351,8 +1368,8 @@ export default {
         if (valid) {
           let data = {
             ...this.form,
-            tradingBoxItemsList: this.dataList,
-            tradingBoxFeesList: this.dataListTwo,
+            // tradingBoxItemsList: this.dataList,
+            // tradingBoxFeesList: this.dataListTwo,
             tradingBoxFilesList: this.tradingBoxFilesList,
             type: "ZC"
           }
@@ -1376,6 +1393,7 @@ export default {
         }
       });
     },
+      // 箱信息添加
     rowSave(form,done,loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1387,12 +1405,25 @@ export default {
         return loading();
       }
       form.boxType = form.$boxTypeId
+        this.tradingBoxItemSubmitfun(form)
       done(form)
     },
+      // 箱信息编辑弹窗确认按钮
     rowUpdate(form, index, done, loading) {
       form.boxType = form.$boxTypeId
+        this.tradingBoxItemSubmitfun(form)
       done(form)
     },
+      // 箱信息的保存和添加
+      tradingBoxItemSubmitfun(form){
+          tradingBoxItemSubmit({
+              ...form,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              this.queryDetails()
+          })
+      },
     //打开表单前
     beforeOpen(done,type){
       if (this.formTwo.count > 0){

+ 67 - 5
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -48,6 +48,10 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          :page.sync="page"
+          :search.sync="search"
+          @search-change="searchChange"
+          @on-load="xiangpage"
           @selection-change="selectionChange"
           :before-open="beforeOpen"
           :upload-delete="uploadDelete"
@@ -186,7 +190,7 @@ import checkSchedule from "@/components/check/checkSchedule";
 import {selectByName} from "@/api/boxManagement";
 import reportDialog from "@/components/report-dialog/main.vue";
 import {getToken} from "@/util/auth";
-import {itemDetails} from "@/api/boxManagement/leaseIn";
+import {detList, itemDetails, tradingBoxItemSubmit} from "@/api/boxManagement/leaseIn";
 import check from "@/components/check/check";
 import {getParities} from "@/api/basicData/customerInquiry";
 import {dateFormat} from "@/util/date";
@@ -200,6 +204,14 @@ export default {
   components:{checkSchedule,reportDialog,check},
   data() {
     return {
+        // 分页
+        page: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
+        search:{},
       title: '',
       disabledVisible: false,
       dialogVisible: false,
@@ -339,6 +351,7 @@ export default {
         selection: true,
         addBtn: true,
         span: 8,
+          searchMenuSpan: 18,
         addRowBtn: false,
         cellBtn: false,
         editBtn: false,
@@ -380,6 +393,7 @@ export default {
           overHidden: true,
           filterable: true,
           remote: true,
+            search: true,
           type: "select",
           dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
           props: {
@@ -920,7 +934,7 @@ export default {
       });
       detail({id: id}).then(res => {
         this.form = res.data.data
-        this.dataList = res.data.data.tradingBoxItemsList
+        // this.dataList = res.data.data.tradingBoxItemsList
         this.dataListTwo = res.data.data.tradingBoxFeesList
         this.tradingBoxFilesList = res.data.data.tradingBoxFilesList
         delete this.form.tradingBoxItemsList
@@ -972,6 +986,36 @@ export default {
         }
       })
     },
+      // 搜索
+      searchChange(form,dome){
+          this.page.currentPage = 1
+          this.page.pageSize = 20
+        this.xiangpage(this.page,form)
+          dome()
+      },
+      // 获取箱信息数据
+      xiangpage(page,params = {}){
+          // params = {
+          //     ...params,
+          //     ...Object.assign(params, this.search)
+          // }
+          this.loading = true
+          detList({
+              ...params,
+              current: page.currentPage,
+              size: page.pageSize,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              console.log(res,997)
+              this.page.total = res.data.data.total
+              this.dataList = res.data.data.records
+              this.loading = false
+          }).finally(() => {
+              this.loading = false
+          }).catch(()=>{
+              this.loading = false
+          })
+      },
     //新增修改
     editCustomer() {
       this.$refs["form"].validate((valid,done) => {
@@ -979,8 +1023,8 @@ export default {
         if (valid) {
           let data = {
             ...this.form,
-            tradingBoxItemsList: this.dataList,
-            tradingBoxFeesList: this.dataListTwo,
+            // tradingBoxItemsList: this.dataList,
+            // tradingBoxFeesList: this.dataListTwo,
             tradingBoxFilesList: this.tradingBoxFilesList,
             type: "SELL"
           }
@@ -1023,6 +1067,7 @@ export default {
       }
       done();
     },
+      // 箱信息的添加
     rowSave(form,done,loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1055,7 +1100,11 @@ export default {
           amount: form.amount,
         })
       })
+
+        this.tradingBoxItemSubmitfun(form)
+
     },
+      // 箱信息的编辑
     rowUpdate(form, index, done, loading) {
       form.boxType = form.$boxTypeId
       done(form)
@@ -1084,8 +1133,21 @@ export default {
           }
         }
       })
+
+        this.tradingBoxItemSubmitfun(form)
     },
-    //删除图片
+      // 箱信息的保存和添加
+      tradingBoxItemSubmitfun(form){
+          tradingBoxItemSubmit({
+              ...form,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              this.xiangpage(this.page)
+          })
+      },
+
+      //删除图片
     uploadDelete(file, column) {
       return new Promise((resolve, reject) => {
         this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {

+ 60 - 9
src/views/boxManagement/stockpilingManage/detailsPage.vue

@@ -49,6 +49,8 @@
           v-model="formTwo"
           ref="crud"
           :key="key"
+          :page.sync="page"
+          @on-load="xiangpage"
           :before-open="beforeOpen"
           :upload-delete="uploadDelete"
           @row-save="rowSave"
@@ -184,7 +186,7 @@ import {
   repealCancel,
   statusUpdate, calculateRent, revokeRent, itemDetails, revokeRentingOut
 } from "@/api/boxManagement/stockpilingManage/index.js";
-
+import {detList, tradingBoxItemSubmit} from "@/api/boxManagement/leaseIn";
 import checkSchedule from "@/components/check/checkSchedule";
 import {selectByName} from "@/api/boxManagement";
 import {getToken} from "@/util/auth";
@@ -200,6 +202,13 @@ export default {
   components:{checkSchedule,reportDialog},
   data() {
     return {
+        // 分页
+        page: {
+            pageSize: 20,
+            currentPage: 1,
+            total: 0,
+            pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+        },
         // 获取的汇率数据
         huiludate:{},
       switchDialog:false,
@@ -752,13 +761,19 @@ export default {
       // 箱信息里的遍布按钮
       rowEditfun(row,index) {
           console.log(this.$refs.boxCost.dataList,751)
+          if(this.$refs.boxCost.dataList.length == 0) {
+              this.findObject(this.option.column, "currency").disabled = false
+          }
           this.$refs.boxCost.dataList.map(item=>{
-              if (item.code == row.code && item.itemName == '堆存费' && item.submitPay == 0) {
-                  // 0 未生成 1已生成
+              if (item.code != row.code) {
                   this.findObject(this.option.column, "currency").disabled = false
-              }else {
-                  this.findObject(this.option.column, "currency").disabled = true
               }
+              // if (item.code == row.code && item.itemName == '堆存费' && item.submitPay == 0) {
+              //     // 0 未生成 1已生成
+              //     this.findObject(this.option.column, "currency").disabled = false
+              // }else {
+              //     this.findObject(this.option.column, "currency").disabled = true
+              // }
           })
           this.$refs.crud.rowEdit(row,index)
       },
@@ -1126,9 +1141,10 @@ export default {
         background: 'rgba(255,255,255,0.7)'
       });
       detail({id: id}).then(res => {
+          console.log(res.data.data.tradingBoxFeesList,1130)
         this.form = res.data.data
           // 箱信息数据
-        this.dataList = res.data.data.tradingBoxItemsList
+        // this.dataList = res.data.data.tradingBoxItemsList
           // 费用信息数据
         this.dataListTwo = res.data.data.tradingBoxFeesList
         this.tradingBoxFilesList = res.data.data.tradingBoxFilesList
@@ -1182,15 +1198,37 @@ export default {
         this.key++
       })
     },
-    //新增修改
+
+      // 获取箱信息数据
+      xiangpage(page,params = {}){
+          this.loading = true
+          detList({
+              ...params,
+              current: page.currentPage,
+              size: page.pageSize,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              console.log(res,997)
+              this.page.total = res.data.data.total
+              this.dataList = res.data.data.records
+              this.loading = false
+          }).finally(() => {
+              this.loading = false
+          }).catch(()=>{
+              this.loading = false
+          })
+      },
+
+
+      //新增修改
     editCustomer() {
       this.$refs["form"].validate((valid,done) => {
         done()
         if (valid) {
           let data = {
             ...this.form,
-            tradingBoxItemsList: this.dataList,
-            tradingBoxFeesList: this.dataListTwo,
+            // tradingBoxItemsList: this.dataList,
+            // tradingBoxFeesList: this.dataListTwo,
             tradingBoxFilesList: this.tradingBoxFilesList,
             type: "DCF"
           }
@@ -1214,6 +1252,7 @@ export default {
         }
       });
     },
+      // 箱信息新增
     rowSave(form,done,loading) {
       let result = this.dataList.some((item) => {
         if (item.code == form.code) {
@@ -1226,6 +1265,17 @@ export default {
       }
       done(form)
     },
+      // 箱信息的新增和保存
+      tradingBoxItemSubmitfun(form){
+          tradingBoxItemSubmit({
+              ...form,
+              pid:this.form.id?this.form.id:this.onLoad.id
+          }).then(res=>{
+              this.$message.success("操作成功!");
+              // this.queryDetails()
+              this.xiangpage(this.page)
+          })
+      },
       // 根据币别获取 汇率
       // getParitiesfun(value){
       //      getParities({
@@ -1251,6 +1301,7 @@ export default {
         return this.$message.error('堆存费/天,不能不能为0或不能为负')
       }
       form.boxType = form.$boxTypeId
+        this.tradingBoxItemSubmitfun(form)
       done(form)
     },
     //打开表单前