Bladeren bron

提交箱管

caojunjie 2 jaren geleden
bovenliggende
commit
5b7fbc949d

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

@@ -23,6 +23,14 @@ export const detail = (params) => {
     params: params
   })
 }
+//查询明细表单
+export const itemDetails = (params) => {
+  return request({
+    url: '/api/blade-box-tube/tradingBoxRent/itemDetails',
+    method: 'get',
+    params: params
+  })
+}
 //删除
 export const remove = (ids) => {
   return request({

+ 69 - 3
src/components/boxCost/index.vue

@@ -17,9 +17,9 @@
         @resetColumn="resetColumn('crud','option','optionBack',codeValue)"
         @saveColumn="saveColumn('crud','option','optionBack',codeValue)">
       <template slot-scope="{type,size,row,index}" slot="menu">
-        <el-button icon="el-icon-edit" :size="size" :type="type" @click="$refs.crud.rowEdit(row,index)">编辑
+        <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0" @click="$refs.crud.rowEdit(row,index)">编辑
         </el-button>
-        <el-button icon="el-icon-delete" :size="size" :type="type" @click="rowDel(row,index)">删除</el-button>
+        <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0" @click="rowDel(row,index)">删除</el-button>
       </template>
       <template slot="itemNameForm">
         <breakdown-select v-model="form.itemId" @selectValue="selectValue"
@@ -68,6 +68,10 @@ export default {
           name: 'amount',
           type: 'sum',
           decimals: 2
+        }, {
+          name: 'settlementAmount',
+          type: 'sum',
+          decimals: 2
         }],
         column: [{
           label: '收款对象',
@@ -157,6 +161,24 @@ export default {
           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: 'remarks',
           type: 'textarea',
@@ -190,6 +212,10 @@ export default {
           name: 'amount',
           type: 'sum',
           decimals: 2
+        }, {
+          name: 'settlementAmount',
+          type: 'sum',
+          decimals: 2
         }],
         column: [{
           label: '收款对象',
@@ -261,6 +287,24 @@ export default {
         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: 'remarks',
         type: 'textarea',
@@ -294,6 +338,10 @@ export default {
           name: 'amount',
           type: 'sum',
           decimals: 2
+        },{
+          name: 'settlementAmount',
+          type: 'sum',
+          decimals: 2
         }],
         column: [{
           label: '收款对象',
@@ -352,6 +400,24 @@ 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: 'remark',
@@ -515,7 +581,7 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          tradingBoxFees(row.id, this.url ? this.url : "/api/blade-box-tube/transportItemFees/remove").then(res => {
+          tradingBoxFees(row.id, this.url ? this.url : "/api/blade-box-tube/tradingBoxFees/remove").then(res => {
             if (res.data.success) {
               this.dataList.splice(index, 1);
               this.$message.success("操作成功!");

+ 1 - 0
src/components/check/checkSchedule.vue

@@ -101,6 +101,7 @@
     },
     methods:{
       init(){
+        this.times = this.times?this.times:''
         auditProcessList(this.checkId,this.batchNo,this.times).then(res =>{
           res.data.data.map((item,index) =>{
             if(item.auditStatus == "A"){

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

@@ -962,6 +962,9 @@ const columnName = [{
   code: 234,
   name: '基础资料-箱档案'
 },{
+  code: 234.1,
+  name: '基础资料-箱档案-轨迹'
+},{
   code: 235,
   name: '箱管理-买箱'
 },{

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

@@ -2207,5 +2207,18 @@ export default [{
     },
     component: () => import( /* webpackChunkName: "views" */ '@/views/purchase/exportDeclaration/index')
   }]
+}, {
+  path: '/boxManagement/boxTrack/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/boxManagement/boxTrack/index',
+    name: '箱轨迹',
+    meta: {
+      i18n: '/boxManagement/boxTrack/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/boxTrack/index')
+  }]
 }
 ]

+ 146 - 1
src/views/basicData/container/archives.vue

@@ -29,6 +29,9 @@
                    @click="outExport">导出
         </el-button>
       </template>
+      <template slot-scope="{type,size,row,index,disabled}" slot="code">
+        <span class="el-button--text" style="cursor: pointer" @click="track(row)">{{row.code}}</span>
+      </template>
       <template slot="leasingCompanyIdForm">
         <crop-select v-model="form.leasingCompanyId" disabled @getCorpData="getGSData" corpType="KH"/>
       </template>
@@ -62,6 +65,40 @@
         温馨提示 第一次导入时请先下载模板
       </p>
     </el-dialog>
+    <el-dialog
+        title="箱轨迹"
+        :visible.sync="boxTrack"
+        :append-to-body="true"
+        :destroy-on-close="true"
+        :close-on-click-modal="false"
+        v-if="boxTrack"
+        top="1vh"
+        width="80%">
+      <span>
+        <avue-crud
+            ref="crudTrack"
+            :option="optionTrack"
+            :data="dataTrackList"
+            :search.sync="searchTwo"
+            :page.sync="pageTwo"
+            :table-loading="loadingTwo"
+            @on-load="onLoadTrack"
+            @search-change="searchChangeTwo"
+            @row-update="rowUpdateTrack"
+            @resetColumn="resetColumnTwo('crudTrack','optionTrack','optionTrackBack',234.1)"
+            @saveColumn="saveColumnTwo('crudTrack','optionTrack','optionTrackBack',234.1)"
+            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"
+                       @click="$refs.crudTrack.rowEdit(row,index)">编辑
+            </el-button>
+            <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                       @click="rowDel(row,index,'GJ')">删除
+            </el-button>
+          </template>
+        </avue-crud>
+      </span>
+    </el-dialog>
   </basic-container>
 </template>
 
@@ -69,10 +106,67 @@
 import {addUpdate, boxRemove, getList, remove} from "@/api/box/archives";
 import {getToken} from "@/util/auth";
 import {getAllBoxs} from "@/api/basicData/portinformation";
+import {archivestrajectory, update} from "@/api/boxManagement/exportShipment";
 export default {
   name: "archives",
   data() {
     return {
+      boxTrack: false,
+      dataTrackList:[],
+      searchTwo:{},
+      formTrack: {},
+      optionTrack: {},
+      optionTrackBack: {
+        align: 'center',
+        index: true,
+        menu:false,
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        addBtn: false,
+        span: 8,
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        addRowBtn: false,
+        cellBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 200,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        column: [{
+          label: '箱号',
+          prop: 'code',
+          overHidden: true,
+          remote: true,
+          filterable: true,
+          type: "select",
+          dicUrl: "/api/blade-box-tube/archives/selectArchivesList?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code"
+          },
+          disabled: true
+        }, {
+          label: '地点',
+          prop: 'address',
+          overHidden: true,
+          formProp: 'address',
+          search: true
+        }, {
+          label: '日期',
+          prop: 'newDate',
+          search: true,
+          searchProp: 'newDateList',
+          overHidden: true,
+          type: "date",
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }]
+      },
       excelBox: false,
       loading: false,
       search: {},
@@ -85,6 +179,13 @@ export default {
         total: 0,
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
+      pageTwo:{
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      loadingTwo:false,
       excelOption: {
         submitBtn: false,
         emptyBtn: false,
@@ -114,6 +215,7 @@ export default {
       option: {},
       optionList: {
         index: true,
+        dialogDrag: true,
         span: 8,
         border: true,
         height:"auto",
@@ -131,12 +233,22 @@ export default {
           disabled:true,
           overHidden: true,
           search: true,
-        }, {
+        },{
           label: '箱号',
           prop: 'code',
           width: 100,
           overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
           search: true,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
         }, {
           label: '箱类型',
           prop: 'typeId',
@@ -336,6 +448,7 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(234), this.optionList);
+    this.optionTrack = await this.getColumnData(this.getColumnName(234.1), this.optionTrackBack);
     this.key++
     this.findObject(this.option.column, "typeId").change = ({value, column}) => {
       getAllBoxs().then(res => {
@@ -357,6 +470,38 @@ export default {
     }
   },
   methods: {
+    track(row) {
+      // this.dataTrackList = row
+      this.formSearch = row
+      this.boxTrack = true
+    },
+    rowUpdateTrack(form, index, done, loading) {
+      update(form).then(res => {
+        done()
+        this.$message.success("操作成功")
+        this.onLoadTrack(this.pageTwo, this.searchTwo)
+      })
+    },
+    searchChangeTwo(params, done) {
+      done();
+      this.onLoadTrack(this.pageTwo, params)
+    },
+    onLoadTrack(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        code: this.formSearch.code
+      }
+      this.loadingTwo = true
+      archivestrajectory(params).then(res => {
+        this.dataTrackList = res.data.data.records
+        this.pageTwo.total = res.data.data.total
+        this.loadingTwo = false
+      }).finally(() => {
+        this.loadingTwo = false
+      })
+    },
     //打开表单前
     beforeOpen(done,type){
       if (type === "add"){

+ 6 - 2
src/views/boxManagement/boxRepair/detailsPage.vue

@@ -182,6 +182,10 @@ export default {
           label: '系统号',
           prop: 'sysNo',
           disabled: true
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          disabled: true
         }, {
           label: '客户',
           prop: 'companyId',
@@ -208,8 +212,8 @@ export default {
           label: '备注',
           prop: 'remarks',
           type: 'textarea',
-          minRows: 3,
-          span: 24,
+          minRows: 1,
+          span: 18,
         }]
       },
       option: {},

+ 10 - 0
src/views/boxManagement/boxRepair/index.vue

@@ -81,10 +81,20 @@ export default {
         searchIndex: 2,
         highlightCurrentRow: true,
         dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals:0
+        }],
         column: [{
           label: '系统号',
           prop: 'sysNo',
           overHidden: true
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 80,
         }, {
           label: '客户',
           prop: 'company',

+ 14 - 22
src/views/boxManagement/boxTrack/index.vue

@@ -14,17 +14,14 @@
           @row-del="rowDel"
           @row-update="rowUpdate"
           @refresh-change="refreshChange"
-          @resetColumn="resetColumnTwo('crud','option','optionList',141)"
+          @resetColumn="resetColumnTwo('crud','option','optionList',241)"
           @saveColumn="saveColumnTwo('crud','option','optionList',241)"
           :page.sync="page">
-        <!-- <template slot="purchaseCompanyIdSearch">
-          <crop-select v-model="search.purchaseCompanyId" corpType="GS"/>
+        <template slot="corpNameSearch">
+          <crop-select v-model="search.corpId" corpType="KH"/>
         </template>
-        <template slot="purchaseCompanyId" slot-scope="{row}">
-          {{ row.purchaseCompanyName }}
-        </template> -->
         <template slot-scope="{type,size,row,$index}" slot="menu">
-          <!-- <el-button icon="el-icon-view" :size="size" :type="type" @click="$refs.crud.rowUpdate(row,$index)">编辑</el-button> -->
+<!--          <el-button icon="el-icon-view" :size="size" :type="type" @click="$refs.crud.rowUpdate(row,$index)">编辑</el-button>-->
           <el-button icon="el-icon-delete" :size="size" v-if="row.status == 0" :type="type" @click="$refs.crud.rowDel(row,$index)">删除
           </el-button>
         </template>
@@ -77,6 +74,11 @@ export default {
         highlightCurrentRow: true,
         dialogWidth: "70%",
         column: [{
+          label: '客户名称',
+          prop: 'corpName',
+          width: 170,
+          search: true,
+        },{
           label: '箱号',
           prop: 'code',
           width: 170,
@@ -99,25 +101,15 @@ export default {
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
-          label: '状态',
+          label: '业务类型',
           prop: 'status',
-          width: 140,
-          // overHidden: true,
-          // filterable: true,
-          // type: 'select',
-          // dataType: 'number',
-          search:true,
-          // dicUrl: "/api/blade-system/dict-biz/dictionary?code=approval_status",
-          // props: {
-          //   label: "dictValue",
-          //   value: "dictKey"
-          // }
+          width: 140
         },{
           label: '合同号',
           prop: 'contractNo',
           width: 300,
-          search: true,
-        },]
+          search: true
+        }]
       }
     }
   },
@@ -136,7 +128,7 @@ export default {
     }
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(237.4), this.optionList);
+    this.option = await this.getColumnData(this.getColumnName(241), this.optionList);
     this.key++
     let i = 0;
     this.option.column.forEach(item => {

+ 6 - 2
src/views/boxManagement/boxWashing/detailsPage.vue

@@ -182,6 +182,10 @@ export default {
           label: '系统号',
           prop: 'sysNo',
           disabled: true
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          disabled: true
         }, {
           label: '客户',
           prop: 'companyId',
@@ -208,8 +212,8 @@ export default {
           label: '备注',
           prop: 'remarks',
           type: 'textarea',
-          minRows: 3,
-          span: 24,
+          minRows: 1,
+          span: 18,
         }]
       },
       option: {},

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

@@ -81,10 +81,20 @@ export default {
         searchIndex: 2,
         highlightCurrentRow: true,
         dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals:0
+        }],
         column: [{
           label: '系统号',
           prop: 'sysNo',
           overHidden: true
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 80,
         }, {
           label: '客户',
           prop: 'company',

+ 16 - 2
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -143,6 +143,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";
 export default {
   name: "detailsPage",
   props: {
@@ -203,6 +204,10 @@ export default {
           label: '系统号',
           prop: 'sysNo',
           disabled: true
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          disabled: true
         }, {
           label: '合同号',
           prop: 'contractNo',
@@ -234,8 +239,8 @@ export default {
           label: '备注',
           prop: 'remarks',
           type: 'textarea',
-          minRows: 3,
-          span: 24
+          minRows: 1,
+          span: 18
         }]
       },
       option: {},
@@ -244,6 +249,7 @@ export default {
         index: true,
         addBtnText: "录入明细",
         refreshBtn: false,
+        dialogDrag: true,
         addBtn: true,
         span: 8,
         addRowBtn: false,
@@ -945,6 +951,14 @@ export default {
         this.formTwo.boxSource = this.$refs.crud.DIC.boxSource.length === 0?"":this.$refs.crud.DIC.boxSource[0].dictKey
         this.formTwo.status = this.$refs.crud.DIC.status.length === 0?"":this.$refs.crud.DIC.status[0].dictKey
       }
+      if(['view','edit'].includes(type)){
+        itemDetails({id:this.formTwo.id,type: "BUY"}).then(res=>{
+          if (this.formTwo.tradingBoxFilesList.length === 0){
+            this.formTwo.tradingBoxFilesList = res.data.data.tradingBoxFilesList
+          }
+        })
+        // 查看和编辑逻辑
+      }
       done();
     },
     //删除图片

+ 33 - 0
src/views/boxManagement/buyContainer/index.vue

@@ -82,26 +82,57 @@ export default {
         searchIndex: 2,
         highlightCurrentRow: true,
         dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals:0
+        }],
         column: [{
           label: '系统号',
           prop: 'sysNo',
           width: 220,
           search: true,
+          searchOrder:2,
+        }, {
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          searchOrder:1,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 80,
         }, {
           label: '合同号',
           prop: 'contractNo',
           width: 170,
           search: true,
+          searchOrder:1,
         }, {
           label: '买入公司',
           prop: 'purchaseCompanyId',
           width: 300,
           search: true,
+          searchOrder:1,
         }, {
           label: '买入日期',
           prop: 'purchaseDate',
           width: 100,
           search: true,
+          searchOrder:1,
           searchProp: 'purchaseDateList',
           overHidden: true,
           type: "date",
@@ -127,6 +158,7 @@ export default {
           prop: 'remarks',
           width: 500,
           search: true,
+          searchOrder:1,
         }, {
           label: "制单人",
           prop: "createUserName",
@@ -134,6 +166,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",

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

@@ -421,6 +421,10 @@ export default {
           prop: 'sysNo',
           disabled: true
         },{
+          label: '箱数',
+          prop: 'boxNumber',
+          disabled: true
+        },{
           label: '合同号',
           prop: 'contractNo'
         }, {
@@ -569,13 +573,14 @@ export default {
           prop: 'remarks',
           type: 'textarea',
           minRows: 1,
-          span: 18
+          span: 12
         }]
       },
       option: {},
       optionBack: {
         align: 'center',
         index: true,
+        dialogDrag: true,
         selection: true,
         addBtnText: "录入明细",
         refreshBtn: false,

+ 41 - 4
src/views/boxManagement/exportShipment/index.vue

@@ -83,37 +83,68 @@ export default {
         index: true,
         span: 8,
         border: true,
-        height:"auto",
+        height: "auto",
         searchMenuPosition: "right",
         align: "center",
-        menuWidth:140,
+        menuWidth: 140,
         searchSpan: 8,
         searchIcon: true,
         searchIndex: 2,
         highlightCurrentRow: true,
         dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals: 0
+        }],
         column: [{
           label: '系统号',
           prop: 'sysNo',
           width: 100,
           search: true,
-          overHidden: true
-        },{
+          overHidden: true,
+          searchOrder:2
+        }, {
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          searchOrder:1,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
+        }, {
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 80,
+        }, {
           label: '合同号',
           prop: 'contractNo',
           width: 100,
+          searchOrder:1,
           search: true,
           overHidden: true
         }, {
           label: '客户',
           prop: 'corpName',
           width: 100,
+          searchOrder:1,
           search: true,
           overHidden: true
         }, {
           label: '船公司',
           prop: 'shippingCompany',
           width: 100,
+          searchOrder:1,
           search: true,
           overHidden: true
         }, {
@@ -140,12 +171,14 @@ export default {
           label: '起运港',
           prop: 'departureHarbor',
           width: 100,
+          searchOrder:1,
           search: true,
           overHidden: true
         }, {
           label: '目的港',
           prop: 'objectiveHarbor',
           width: 100,
+          searchOrder:1,
           search: true,
           overHidden: true
         }, {
@@ -157,6 +190,7 @@ export default {
           label: '合同日期',
           prop: 'effectiveDateList',
           width: 100,
+          searchOrder:1,
           search: true,
           showColumn:false,
           hide:true,
@@ -176,6 +210,7 @@ export default {
           prop: 'startingRentDate',
           width: 100,
           search: true,
+          searchOrder:1,
           searchProp: 'startingRentDateList',
           overHidden: true,
           type: "date",
@@ -228,6 +263,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",
@@ -255,6 +291,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",

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

@@ -420,6 +420,10 @@ export default {
           prop: 'sysNo',
           disabled: true
         },{
+          label: '箱数',
+          prop: 'boxNumber',
+          disabled: true
+        },{
           label: '合同号',
           prop: 'contractNo'
         }, {
@@ -573,13 +577,14 @@ export default {
           prop: 'remarks',
           type: 'textarea',
           minRows: 1,
-          span: 18
+          span: 12
         }]
       },
       option: {},
       optionBack: {
         align: 'center',
         index: true,
+        dialogDrag: true,
         selection: true,
         addBtnText: "录入明细",
         refreshBtn: false,

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

@@ -92,29 +92,60 @@ export default {
         searchIndex: 2,
         highlightCurrentRow: true,
         dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals:0
+        }],
         column: [{
           label: '系统号',
           prop: 'sysNo',
           width: 100,
           search: true,
+          searchOrder:2,
           overHidden: true
+        }, {
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          searchOrder:1,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 80,
         },{
           label: '合同号',
           prop: 'contractNo',
           width: 100,
           search: true,
+          searchOrder:1,
           overHidden: true
         }, {
           label: '客户',
           prop: 'corpName',
           width: 100,
           search: true,
+          searchOrder:1,
           overHidden: true
         }, {
           label: '船公司',
           prop: 'shippingCompany',
           width: 100,
           search: true,
+          searchOrder:1,
           overHidden: true
         }, {
           label: '提单号',
@@ -141,12 +172,14 @@ export default {
           prop: 'departureHarbor',
           width: 100,
           search: true,
+          searchOrder:1,
           overHidden: true
         }, {
           label: '目的港',
           prop: 'objectiveHarbor',
           width: 100,
           search: true,
+          searchOrder:1,
           overHidden: true
         }, {
           label: '合同生效日期',
@@ -158,6 +191,7 @@ export default {
           prop: 'effectiveDateList',
           width: 100,
           search: true,
+          searchOrder:1,
           showColumn:false,
           hide:true,
           overHidden: true,
@@ -176,6 +210,7 @@ export default {
           prop: 'startingRentDate',
           width: 100,
           search: true,
+          searchOrder:1,
           searchProp: 'startingRentDateList',
           overHidden: true,
           type: "date",
@@ -228,6 +263,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",
@@ -255,6 +291,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",

+ 20 - 18
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -61,7 +61,7 @@
           </el-button>
         </template>
         <template slot="addressForm" slot-scope="scope">
-          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="balabala"/>
+          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="(val)=>{balabala(val,['formTwo','address'])}"/>
         </template>
         <!--        <template slot="boxMakingCompanyForm" slot-scope="scope">-->
         <!--          <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
@@ -74,7 +74,7 @@
               @click="statusUpdate('0','起租')">起租
           </el-button>
           <el-button
-              :disabled="selectionList.length === 0 || option.disabled || (selectionList.findIndex(function(item){return item.status == '待使用' || item.status == '使用'}) == -1?true:false)"
+              :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>
@@ -180,7 +180,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent
+  statusUpdate, calculateRent, revokeRent, itemDetails
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -394,6 +394,7 @@ export default {
         index: true,
         addBtnText: "录入明细",
         refreshBtn: false,
+        dialogDrag: true,
         addBtn: true,
         span: 8,
         selection: true,
@@ -405,7 +406,7 @@ export default {
         dialogTop: 25,
         dialogWidth: "80%",
         showSummary: true,
-        sumColumnList: [,{
+        sumColumnList: [{
           name: 'emptyWeight',
           type: 'sum',
           decimals: 2
@@ -658,12 +659,7 @@ export default {
           overHidden: true,
           type: "date",
           format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd HH:mm:ss",
-          rules: [{
-            required: true,
-            message: " ",
-            trigger: "blur"
-          }]
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
           label: '箱龄',
           prop: 'boxAge',
@@ -683,6 +679,8 @@ export default {
           overHidden: true,
           type: 'upload',
           span: 24,
+          showColumn:false,
+          hide:true,
           listType: 'picture-card',
           tip: '只能上传jpg/png文件,且不超过500kb',
           propsHttp: {
@@ -791,7 +789,7 @@ export default {
           if (this.selectionList[0].rentEndDate){
             let curDate = new Date(this.selectionList[0].rentEndDate);
             let endDateTime = new Date((curDate/1000+86400)*1000)
-            this.formState.rentStartDate = new Date((curDate/1000+86400)*1000)
+            this.formState.rentStartDate = dateFormat(endDateTime, "yyyy-MM-dd") + " 00:00:00"
             const endDateTwo = new Date(endDateTime.getFullYear(), endDateTime.getMonth() + 1, 0);
             this.formState.rentCalculationDate = dateFormat(endDateTwo, "yyyy-MM-dd") + " 23:59:59"
           }
@@ -953,13 +951,6 @@ export default {
       )
       ;
     },
-    balabala(val) {
-      if (val === null) {
-        this.formTwo.address = ''
-      } else {
-        this.formTwo.address = val.name
-      }
-    },
     //撤销
     repealCancel(){
       this.$confirm("您确定撤回此次申请吗?", {
@@ -1168,6 +1159,14 @@ export default {
         this.findObject(this.option.column, "price").disabled = false
         // this.findObject(this.option.column, "amount").disabled = false
       }
+      if(['view','edit'].includes(type)){
+        itemDetails({id:this.formTwo.id,type: "ZR"}).then(res=>{
+          if (this.formTwo.tradingBoxFilesList.length === 0){
+            this.formTwo.tradingBoxFilesList = res.data.data.tradingBoxFilesList
+          }
+        })
+        // 查看和编辑逻辑
+      }
       done();
     },
     //删除图片
@@ -1201,6 +1200,9 @@ export default {
     getGSData(row,type) {
       this[type[0]][type[1]] = row.cname
     },
+    balabala(row,type) {
+      this[type[0]][type[1]] = row.name
+    },
     backToList(type) {
       if (type == 0){
         if (this.detailData.id){

+ 23 - 0
src/views/boxManagement/leaseIn/index.vue

@@ -92,9 +92,28 @@ export default {
           prop: 'sysNo',
           width: 220,
           search: true,
+          searchOrder:2,
+        }, {
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          searchOrder:1,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
         }, {
           label: '合同号',
           prop: 'contractNo',
+          searchOrder:1,
           width: 170,
           search: true,
         }, {
@@ -105,6 +124,7 @@ export default {
           label: '客户',
           prop: 'purchaseCompanyId',
           width: 200,
+          searchOrder:1,
           search: true,
         }, {
           label: '合同生效日期',
@@ -149,6 +169,7 @@ export default {
           width: 100,
           search: true,
           hide:true,
+          searchOrder:1,
           showColumn:false,
           overHidden: true,
           type: "date",
@@ -163,6 +184,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",
@@ -190,6 +212,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",

+ 25 - 20
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -61,7 +61,7 @@
           </el-button>
         </template>
         <template slot="addressForm" slot-scope="scope">
-          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="balabala"/>
+          <port-info v-model="formTwo.addressId" type="id" :disabled="scope.disabled" @balabalaTow="(val)=>{balabala(val,['formTwo','address'])}"/>
         </template>
         <!--        <template slot="boxMakingCompanyForm" slot-scope="scope">-->
         <!--          <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
@@ -71,13 +71,13 @@
           <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 == '待使用' || item.status == '使用'}) == -1?true:false)" 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('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"
+          <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 == '使用' && item.count > 0}) == -1?true:false)" 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>
@@ -170,7 +170,7 @@ import {
   tradingBoxFees,
   pleaseCheck,
   repealCancel,
-  statusUpdate, calculateRent, revokeRent
+  statusUpdate, calculateRent, revokeRent, itemDetails
 } from "@/api/boxManagement/leaseIn/index.js";
 
 import checkSchedule from "@/components/check/checkSchedule";
@@ -382,6 +382,7 @@ export default {
         index: true,
         addBtnText: "录入明细",
         refreshBtn: false,
+        dialogDrag: true,
         addBtn: true,
         span: 8,
         selection: true,
@@ -646,12 +647,7 @@ export default {
           overHidden: true,
           type: "date",
           format: "yyyy-MM-dd",
-          valueFormat: "yyyy-MM-dd HH:mm:ss",
-          rules: [{
-            required: true,
-            message: " ",
-            trigger: "blur"
-          }]
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
         }, {
           label: '箱龄',
           prop: 'boxAge',
@@ -705,6 +701,7 @@ export default {
     //下拉箱号带出对应信息
     this.findObject(this.option.column, "code").change = ({value, column}) => {
       selectArchivesList({code: value}).then(res => {
+        console.log(res)
         for (let item of res.data.data) {
           if (value == item.code) {
             this.formTwo = {
@@ -712,6 +709,10 @@ export default {
               boxStatus: item.boxStatus,
               emptyWeight: item.emptyWeight,
               grossWeight: item.gorssWeight,
+              boxMakingCompany: item.boxMakingCompany,
+              boxMakingDate: item.boxMakingDate,
+              leaseCommencementDate: item.leaseCommencementDate,
+              boxAge: item.boxAge,
               tare: item.tare,
               loadingWeight: item.loadingWeight,
               volume: item.volume,
@@ -788,7 +789,7 @@ export default {
           if (this.selectionList[0].rentEndDate){
             let curDate = new Date(this.selectionList[0].rentEndDate);
             let endDateTime = new Date((curDate/1000+86400)*1000)
-            this.formState.rentStartDate = new Date((curDate/1000+86400)*1000)
+            this.formState.rentStartDate = dateFormat(endDateTime, "yyyy-MM-dd") + " 00:00:00"
             const endDateTwo = new Date(endDateTime.getFullYear(), endDateTime.getMonth() + 1, 0);
             this.formState.rentCalculationDate = dateFormat(endDateTwo, "yyyy-MM-dd") + " 23:59:59"
           }
@@ -825,12 +826,12 @@ export default {
         done()
         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("退租日期不能小于当前租金期间")
               }
             }
+            this.disabledVisible = true
             statusUpdate({
               ...this.form,
               ...this.formState,
@@ -847,10 +848,10 @@ 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("起始日期不能小于起租日期")
               }
+              this.disabledVisible = true
               calculateRent({
                 ...this.form,
                 ...this.formState,
@@ -949,12 +950,8 @@ export default {
       )
       ;
     },
-    balabala(val) {
-      if (val === null) {
-        this.formTwo.address = ''
-      } else {
-        this.formTwo.address = val.name
-      }
+    balabala(row,type) {
+      this[type[0]][type[1]] = row.name
     },
     //撤销
     repealCancel(){
@@ -1164,6 +1161,14 @@ export default {
         this.findObject(this.option.column, "price").disabled = false
         // this.findObject(this.option.column, "amount").disabled = false
       }
+      if(['view','edit'].includes(type)){
+        itemDetails({id:this.formTwo.id,type: "ZC"}).then(res=>{
+          if (this.formTwo.tradingBoxFilesList.length === 0){
+            this.formTwo.tradingBoxFilesList = res.data.data.tradingBoxFilesList
+          }
+        })
+        // 查看和编辑逻辑
+      }
       done();
     },
     //删除图片

+ 23 - 0
src/views/boxManagement/leaseOut/index.vue

@@ -92,11 +92,30 @@ export default {
           prop: 'sysNo',
           width: 220,
           search: true,
+          searchOrder:2
+        }, {
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          allowCreate: true,
+          searchOrder:1,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
         }, {
           label: '合同号',
           prop: 'contractNo',
           width: 170,
           search: true,
+          searchOrder:1,
         }, {
           label: '箱数',
           prop: 'boxNumber',
@@ -105,6 +124,7 @@ export default {
           label: '客户',
           prop: 'purchaseCompanyId',
           width: 200,
+          searchOrder:1,
           search: true,
         }, {
           label: '合同生效日期',
@@ -152,6 +172,7 @@ export default {
           showColumn:false,
           overHidden: true,
           type: "date",
+          searchOrder:1,
           searchRange: true,
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
@@ -162,6 +183,7 @@ export default {
           searchProp:"createUser",
           overHidden: true,
           width: 100,
+          searchOrder:1,
           search: true,
           filterable: true,
           remote: true,
@@ -190,6 +212,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",

+ 16 - 2
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -142,6 +142,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";
 export default {
   name: "detailsPage",
   props: {
@@ -202,6 +203,10 @@ export default {
           label: '系统号',
           prop: 'sysNo',
           disabled: true
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          disabled: true
         }, {
           label: '合同号',
           prop: 'contractNo',
@@ -233,8 +238,8 @@ export default {
           label: '备注',
           prop: 'remarks',
           type: 'textarea',
-          minRows: 3,
-          span: 24
+          minRows: 1,
+          span: 18
         }]
       },
       option: {},
@@ -243,6 +248,7 @@ export default {
         index: true,
         addBtnText: "录入明细",
         refreshBtn: false,
+        dialogDrag: true,
         addBtn: true,
         span: 8,
         addRowBtn: false,
@@ -879,6 +885,14 @@ export default {
         this.formTwo.boxSource = this.$refs.crud.DIC.boxSource.length === 0?"":this.$refs.crud.DIC.boxSource[0].dictKey
         this.formTwo.status = this.$refs.crud.DIC.status.length === 0?"":this.$refs.crud.DIC.status.length>1?this.$refs.crud.DIC.status[2].dictKey:this.$refs.crud.DIC.status[0].dictKey
       }
+      if(['view','edit'].includes(type)){
+        itemDetails({id:this.formTwo.id,type: "SELL"}).then(res=>{
+          if (this.formTwo.tradingBoxFilesList.length === 0){
+            this.formTwo.tradingBoxFilesList = res.data.data.tradingBoxFilesList
+          }
+        })
+        // 查看和编辑逻辑
+      }
       done();
     },
     rowSave(form,done,loading) {

+ 34 - 0
src/views/boxManagement/sellingContainers/index.vue

@@ -81,26 +81,57 @@ export default {
         searchIndex: 2,
         highlightCurrentRow: true,
         dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals:0
+        }],
         column: [{
           label: '系统号',
           prop: 'sysNo',
           width: 220,
+          searchOrder:2,
           search: true,
+        },{
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          searchOrder:1,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
+        },{
+          label: '箱数',
+          prop: 'boxNumber',
+          width: 80,
         }, {
           label: '合同号',
           prop: 'contractNo',
           width: 170,
           search: true,
+          searchOrder:1,
         }, {
           label: '卖出公司',
           prop: 'purchaseCompanyId',
           width: 300,
           search: true,
+          searchOrder:1,
         }, {
           label: '卖出日期',
           prop: 'purchaseDate',
           width: 100,
           search: true,
+          searchOrder:1,
           searchProp: 'purchaseDateList',
           overHidden: true,
           type: "date",
@@ -126,6 +157,7 @@ export default {
           prop: 'remarks',
           width: 500,
           search: true,
+          searchOrder:1,
         }, {
           label: "制单人",
           prop: "createUserName",
@@ -133,6 +165,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",
@@ -160,6 +193,7 @@ export default {
           overHidden: true,
           width: 100,
           search: true,
+          searchOrder:1,
           filterable: true,
           remote: true,
           type: "select",

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

@@ -26,6 +26,14 @@
           <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>
@@ -45,6 +53,8 @@ export default {
   },
   data() {
     return {
+      action: "/api/blade-box-tube/declareCustoms/importPDF",
+      headers: { "Blade-Auth": "Bearer " + getToken() },
       detailsOpen: false,
       loading: false,
       search: {},
@@ -209,6 +219,9 @@ export default {
       this.form = row
       this.detailsOpen = true
     },
+    onSuccess(response, file, fileList){
+      console.log(response, file, fileList)
+    },
     backToList(type) {
       this.form = {}
       this.detailsOpen = false