Browse Source

Merge remote-tracking branch 'origin/dev' into dev

wfg 6 months ago
parent
commit
4723cf732f

+ 49 - 7
src/api/iosBasicData/bills.js

@@ -107,7 +107,7 @@ export const billsAdd = (row) => {
   })
 }
 // 添加到主单
-export const billsIncreaseReinsurancePolicy = (ids,id) => {
+export const billsIncreaseReinsurancePolicy = (ids, id) => {
   return request({
     url: '/api/blade-los/bills/increaseReinsurancePolicy',
     method: 'post',
@@ -118,7 +118,7 @@ export const billsIncreaseReinsurancePolicy = (ids,id) => {
   })
 }
 // 主单撤销
-export const billsRevokeReinsurancePolicy = (ids,id) => {
+export const billsRevokeReinsurancePolicy = (ids, id) => {
   return request({
     url: '/api/blade-los/bills/revokeReinsurancePolicy',
     method: 'post',
@@ -276,11 +276,11 @@ export const accountsReceivable = (data) => {
 }
 
 export const updateBatchField = (row) => {
-    return request({
-        url: '/api/blade-los/bills/updateBatchField',
-        method: 'post',
-        data: row
-    })
+  return request({
+    url: '/api/blade-los/bills/updateBatchField',
+    method: 'post',
+    data: row
+  })
 }
 export const updateBillType = (data) => {
   return request({
@@ -288,4 +288,46 @@ export const updateBillType = (data) => {
     method: 'get',
     params: data
   })
+}
+export const checkBillsBatch = (data) => {
+  return request({
+    url: '/api/blade-los/bills/checkBillsBatch',
+    method: 'get',
+    params: data
+  })
+}
+export const revokeCheckBillsBatch = (data) => {
+  return request({
+    url: '/api/blade-los/bills/revokeCheckBillsBatch',
+    method: 'get',
+    params: data
+  })
+}
+export const generateBillBatch = (data) => {
+  return request({
+    url: '/api/blade-los/finaccbills/generateBillBatch',
+    method: 'get',
+    params: data
+  })
+}
+export const revokeBillBatch = (data) => {
+  return request({
+    url: '/api/blade-los/finaccbills/revokeBillBatch',
+    method: 'get',
+    params: data
+  })
+}
+export const batchCopyBills = (data) => {
+  return request({
+    url: '/api/blade-los/bills/batchCopyBills',
+    method: 'get',
+    params: data
+  })
+}
+export const updateCorpBatch = (data) => {
+  return request({
+    url: '/api/blade-los/feecenter/updateCorpBatch',
+    method: 'post',
+    data: data
+  })
 }

+ 38 - 0
src/api/lock/businessUnlocking.js

@@ -0,0 +1,38 @@
+import request from '@/router/axios';
+
+// 上锁
+export function submitLock(data) {
+  return request({
+    url: '/api/blade-los/billlocks/submitLock',
+    method: 'post',
+    data: data
+  })
+}
+// 解锁
+export function unLock(data) {
+  return request({
+    url: '/api/blade-los/billlocks/unlock',
+    method: 'get',
+    params: data
+  })
+}
+// 锁定列表查询
+export const lockList = (current, size, params) => {
+  return request({
+    url: '/api/blade-los/billlocks/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+// 删除锁
+export function lockRemove(data) {
+  return request({
+    url: '/api/blade-los/billlocks/remove',
+    method: 'post',
+    params: data
+  })
+}

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

@@ -2024,6 +2024,9 @@ const columnName = [{
 },{
   code: 457,
   name: '货代-财务管理-发票申请(F)费用明细表'
+},{
+  code: 458,
+  name: '货代-系统管理-业务解锁(F)列表页'
 }
 ]
 export const getColumnName = (key) => {

+ 8 - 0
src/main.js

@@ -29,6 +29,7 @@ import {
   getWorkDicts
 } from '@/api/system/dictbiz'
 import { checkLock, onLock, unLock } from "@/api/lock/lock"
+import { submitLock } from "@/api/lock/businessUnlocking"
 import './util/directives.js'
 import Avue from '@smallwei/avue';
 import '@smallwei/avue/lib/index.css';
@@ -84,6 +85,10 @@ import {
 import {
   checkLocks
 } from "@/util/lock"
+//overdueJudgment
+import {
+  overdueJudgment
+} from "@/util/date"
 import {
   inDetailsKey,
   leaveDetailsKey
@@ -184,6 +189,9 @@ Vue.prototype.checkLock = checkLock;
 Vue.prototype.onLock = onLock;
 Vue.prototype.unLock = unLock;
 Vue.prototype.checkLocks = checkLocks;
+//业务上锁
+Vue.prototype.submitLock=submitLock;
+Vue.prototype.overdueJudgment=overdueJudgment;
 new Vue({
   router,
   store,

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

@@ -4074,4 +4074,18 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/revenueInvoicing/index')
   }]
 },
+{
+  path: '/system/businessUnlocking/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/system/businessUnlocking/index',
+    name: '业务解锁(F)',
+    meta: {
+      i18n: '/system/businessUnlocking/index', 
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/system/businessUnlocking/index')
+  }]
+},
 ]

+ 22 - 1
src/util/date.js

@@ -208,7 +208,7 @@ export function getYearDate() {
 }
 export function getMonthDate() {
   const date = new Date();
-  return date.getMonth()+1
+  return date.getMonth() + 1
 }
 
 /**
@@ -279,4 +279,25 @@ export function checkFullWidthSymbols(text) {
       positions: []                // 符号的详细位置和内容
     };
   }
+}
+//判断是否超过设置天数
+export function overdueJudgment(date) {
+  const overDay = localStorage.getItem('lockTermDays')
+  if (overDay) {
+    const nowDate = new Date(dateFormat(new Date(),'yyyy-MM-dd'))
+
+    const startDate = new Date(dateFormat(new Date(date),'yyyy-MM-dd'))
+      console.log(dateFormat(nowDate,'yyyy-MM-dd'),dateFormat(startDate,'yyyy-MM-dd'),1111111111)
+    startDate.setDate(startDate.getDate() + Number(overDay))
+         console.log(dateFormat(nowDate,'yyyy-MM-dd'),dateFormat(startDate,'yyyy-MM-dd'),22222222)
+    if (startDate < nowDate) {
+      return true
+    } else {
+      return false
+    }
+  } else {
+    return false
+  }
+
+
 }

+ 13 - 3
src/views/iosBasicData/OceanFreightImport/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -8,10 +8,14 @@
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.1)">
             <template slot="menuLeft">
                 <el-button type="primary" size="small" :disabled="seeDisabled" @click.stop="addfun">新 增</el-button>
-                <el-button type="danger" size="small" plain :disabled="seeDisabled||assemblyForm.preContainersList.length==0" @click.stop="handleDelete">一键删除
+                <el-button type="danger" size="small" plain
+                    :disabled="seeDisabled || assemblyForm.preContainersList.length == 0" @click.stop="handleDelete">一键删除
+                </el-button>
+                <el-button type="primary" size="small" :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
+                    @click="batchSavefun">一键保存</el-button>
+                <el-button type="info" plain size="small"
+                    :disabled="seeDisabled || assemblyForm.preContainersList.length == 0" @click="onclickEdit">一键编辑
                 </el-button>
-                <el-button type="primary" size="small" :disabled="seeDisabled||assemblyForm.preContainersList.length==0" @click="batchSavefun">一键保存</el-button>
-                <el-button type="info" plain size="small" :disabled="seeDisabled||assemblyForm.preContainersList.length==0" @click="onclickEdit">一键编辑 </el-button>
                 <!--<el-button type="success" size="small" plain :disabled="seeDisabled"-->
                 <!--           @click.stop="equalDistribution">均分箱量-->
                 <!--</el-button>-->
@@ -679,6 +683,12 @@ export default {
         addfun() {
             this.$refs.crud.rowCellAdd({})
             // this.$refs.crud.rowAdd()
+            this.$nextTick(() => {
+                const container = this.$refs.crud.$el.querySelector('.el-table__body-wrapper');
+                if (container) {
+                    container.scrollTop = container.scrollHeight;
+                }
+            });
         },
         // 编辑
         editfun(row, index) {

+ 59 - 1
src/views/iosBasicData/OceanFreightImport/bills/assembly/feecenter.vue

@@ -99,6 +99,9 @@
                     <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
                         plain size="small" :disabled="disabled || pleasereviewType"
                         @click="allClick('发票申请', 'D')">发票申请</el-button>
+                    <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary" plain size="small"
+                        :disabled="disabled || !selectionDList.length"
+                        @click="allClick('批量修改结算单位')">批量修改结算单位</el-button>
                 </template>
                 <template slot="indexHeader" slot-scope="scope">
                     <el-button v-if="roleName.indexOf('admin') != -1 || roleName.indexOf('应收修改') != -1" type="primary"
@@ -586,6 +589,18 @@
 
         <!--费用打印-->
         <reportContainer ref="reportContainer"></reportContainer>
+        <el-dialog title="修改结算单位" :visible.sync="dialogVisible" width="30%" :before-close="upClose" append-to-body>
+            <span>
+                <dic-select v-model="upForm.shortName" placeholder="结算单位" label="shortName" res="records"
+                    :slotRight="true" rightLabel="code" url="/blade-los/bcorps/selectList?status=0&current=1&size=10"
+                    :filterable="true" :remote="true" dataName="shortName"
+                    @selectChange="dicChange('shortName', $event)"></dic-select>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false" size="small">取 消</el-button>
+                <el-button type="primary" @click="upSibmit" size="small">确 定</el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
@@ -607,7 +622,8 @@ import {
     feecenterTemplateImport,
     listFeeCountByCorp,
     losbfeestemplateGetListTemplate,
-    accountsReceivable
+    accountsReceivable,
+    updateCorpBatch
 } from "@/api/iosBasicData/bills";
 import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import { popupReminder, requiredMessage } from "@/util/messageReminder";
@@ -649,6 +665,8 @@ export default {
     },
     data() {
         return {
+            upForm: {},
+            dialogVisible: false,
             amendsStatus: false,
             amendOption: {
                 border: true,
@@ -1814,6 +1832,46 @@ export default {
                     }
                 })
             }
+            if (name == '批量修改结算单位') {
+                if (this.selectionDList.length == 0) return this.$message.error("请选择费用");
+                if (this.selectionDList.length != this.selectionDList.filter(e => e.accStatus == 0).length) return this.$message.error("已生成账单费用明细不允许修改结算单位");
+                this.dialogVisible = true
+            }
+        },
+        upClose(done) {
+            this.upForm = {}
+            done();
+        },
+        upSibmit() {
+            const obj = {
+                corpId: this.upForm.corpId,
+                corpCnName: this.upForm.corpCnName,
+                corpEnName: this.upForm.corpEnName,
+                shortName: this.upForm.shortName,
+                feeCenterListD: this.selectionDList
+            }
+            updateCorpBatch(obj).then(res => {
+                this.$message({
+                    type: "success",
+                    message: "操作成功!"
+                });
+                this.dialogVisible = false
+                this.$emit('billsDetailfun')
+            })
+        },
+        dicChange(name, row) {
+            if (name == 'shortName') {
+                if (row) {
+                    this.upForm.corpId = row.id
+                    this.upForm.corpCnName = row.cnName
+                    this.upForm.corpEnName = row.enName
+                } else {
+                    this.upForm.corpId = null
+                    this.upForm.shortName = null
+                    this.upForm.corpCnName = null
+                    this.upForm.corpEnName = null
+                }
+            }
         },
         // 应收新增
         addDfun() {

+ 190 - 11
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -9,8 +9,8 @@
                 @refresh-change="refreshChange" @on-load="onLoad" @expand-change="expandChange" @resetColumn="
                     resetColumnTwo('crud', 'option', 'optionBack', 309.11)
                     " @saveColumn="
-                    saveColumnTwo('crud', 'option', 'optionBack', 309.11)
-                    ">
+                        saveColumnTwo('crud', 'option', 'optionBack', 309.11)
+                        ">
                 <template slot-scope="{ disabled, size }" slot="billSortSearch">
                     <el-radio-group v-model="query.billSort">
                         <el-radio label="1">ETD</el-radio>
@@ -333,6 +333,18 @@
                     </el-button>
                     <el-button type="warning" size="small" @click="outExport">导 出
                     </el-button>
+                    <el-dropdown style="line-height: 0" @command="batchClick">
+                        <el-button size="small" type="danger" :disabled="selectionList.length == 0">
+                            批量操作<i class="el-icon-arrow-down el-icon--right"></i>
+                        </el-button>
+                        <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item command="批量单据请核">批量单据请核</el-dropdown-item>
+                            <el-dropdown-item command="批量撤销单据请核">批量撤销单据请核</el-dropdown-item>
+                            <el-dropdown-item command="批量生成账单">批量生成账单</el-dropdown-item>
+                            <el-dropdown-item command="批量撤销账单">批量撤销账单</el-dropdown-item>
+                            <el-dropdown-item command="批量复制">批量复制</el-dropdown-item>
+                        </el-dropdown-menu>
+                    </el-dropdown>
                     <div style="margin-top: 10px">
                         <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
 
@@ -410,7 +422,7 @@
                 <template slot="eta" slot-scope="scope">
                     <span>{{
                         scope.row.eta ? scope.row.eta.slice(0, 10) : ""
-                        }}</span>
+                    }}</span>
                 </template>
                 <template slot="updateTime" slot-scope="scope">
                     <span>{{
@@ -437,13 +449,13 @@
                         309.7
                     )
                     " @saveColumn="
-                    saveColumnTwo(
-                        'mawbOptionCrud',
-                        'mawbOption',
-                        'mawbOptionBack',
-                        309.7
-                    )
-                    ">
+                        saveColumnTwo(
+                            'mawbOptionCrud',
+                            'mawbOption',
+                            'mawbOptionBack',
+                            309.7
+                        )
+                        ">
                 <template slot="radio" slot-scope="{ row }">
                     <el-radio v-model="dialogRadio" :label="row.id" @input="radioInput(row)"></el-radio>
                 </template>
@@ -469,7 +481,12 @@ import {
     billsListAll,
     billsDisembarking,
     editypesSendingEdi,
-    billsRevokeDisembarking
+    billsRevokeDisembarking,
+    checkBillsBatch,
+    revokeCheckBillsBatch,
+    generateBillBatch,
+    revokeBillBatch,
+    batchCopyBills
 } from "@/api/iosBasicData/bills";
 import { mapGetters } from "vuex";
 import billsDetails from "@/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue";
@@ -1560,6 +1577,168 @@ export default {
         }
     },
     methods: {
+        batchClick(name) {
+            if (name == '批量更改') {
+                this.updateField()
+            }
+            if (name == '批量单据请核') {
+                this.$confirm('是否批量单据请核?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                        url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
+                        pageStatus: "this.$store.getters.approvalDetails",
+                        pageLabel: "审批详情(F)",
+                    }
+                    checkBillsBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+            }
+            if (name == '批量撤销单据请核') {
+                for (let item of this.selectionList) {
+                    if (item.status == 0) {
+                        return this.$message.error("请选择已提交审核的单据");
+                    }
+                }
+                this.$confirm('是否批量撤销单据请核?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                    }
+                    revokeCheckBillsBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+            }
+            if (name == '批量生成账单') {
+                this.$confirm('是否批量生成账单?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                    }
+                    generateBillBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+            }
+            if (name == '批量撤销账单') {
+                this.$confirm('是否批量撤销账单?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                    }
+                    revokeBillBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+
+            }
+            if (name == '批量复制') {
+                this.$DialogForm.show({
+                    title: "复制单据",
+                    width: "300px",
+                    menuPosition: "right",
+                    data: { checkbox: "复制费用,复制箱型箱量" },
+                    option: {
+                        submitText: "确认",
+                        emptyText: "取消",
+                        span: 24,
+                        column: [
+                            {
+                                label: "单据类型",
+                                prop: "billType",
+                                type: "select",
+                                value: this.selectionList[0].billType,
+                                dicData: [
+                                    {
+                                        label: '直单',
+                                        value: 'DD'
+                                    },
+                                    {
+                                        label: '主单',
+                                        value: 'MM'
+                                    },
+                                    {
+                                        label: '分单',
+                                        value: 'MH'
+                                    }
+                                ],
+                                dataType: "string",
+                                span: 24
+                            },
+                            {
+                                label: "复制类型",
+                                prop: "checkbox",
+                                type: "checkbox",
+                                dicData: [
+                                    {
+                                        label: "复制费用",
+                                        value: "复制费用"
+                                    },
+                                    {
+                                        label: "复制箱型箱量",
+                                        value: "复制箱型箱量"
+                                    }
+                                ],
+                                dataType: "string",
+                                span: 24
+                            }
+                        ]
+                    },
+                    beforeClose: done => {
+                        done();
+                    },
+                    callback: res => {
+                        res.done();
+                        const types = res.data.checkbox ? res.data.checkbox.split(",") : []
+                        console.log(res.data.checkbox.includes('复制费用'))
+                        const obj = {
+                            ids: this.ids,
+                            billType: res.data.billType,
+                            copyCntr: res.data.checkbox.includes('复制箱型箱量') ? 1 : 0,
+                            copyFee: res.data.checkbox.includes('复制费用') ? 1 : 0
+                        }
+                        batchCopyBills(obj).then(res => {
+                            this.$message({
+                                type: "success",
+                                message: "操作成功!"
+                            });
+                            this.onLoad(this.page, this.query);
+                        })
+                        res.close();
+                    }
+                });
+            }
+        },
         rowStyle({ row, column, rowIndex, columnIndex }) {
             if (row.status == 2) {
                 return {

+ 13 - 6
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -1,10 +1,10 @@
 <template>
     <basic-container>
-        <avue-crud style="height: 230px;" :option="option" :table-loading="loading"
-            :data="assemblyForm.preContainersList" :page.sync="page" :permission="permissionList"
-            :before-open="beforeOpen" v-model="form" :cell-style="{ padding: '0px', textAlign: 'center' }" ref="crud"
-            @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @selection-change="selectionChange"
-            @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.1)"
+        <avue-crud :option="option" :table-loading="loading" :data="assemblyForm.preContainersList" :page.sync="page"
+            :permission="permissionList" :before-open="beforeOpen" v-model="form"
+            :cell-style="{ padding: '0px', textAlign: 'center' }" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
+            @row-del="rowDel" @selection-change="selectionChange" @refresh-change="refreshChange"
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.1)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.1)">
             <template slot="menuLeft">
                 <div style="display: flex;align-items: center;">
@@ -133,7 +133,7 @@ export default {
             option: {},
             optionBack: {
                 // height: '200',
-                // calcHeight: 30,
+                calcHeight: 30,
                 maxHeight: '180',
                 tip: false,
                 searchShow: true,
@@ -728,7 +728,14 @@ export default {
         // 新增
         addfun() {
             this.$refs.crud.rowCellAdd({})
+            // this.assemblyForm.preContainersList.push({ });
             // this.$refs.crud.rowAdd()
+            this.$nextTick(() => {
+                const container = this.$refs.crud.$el.querySelector('.el-table__body-wrapper');
+                if (container) {
+                    container.scrollTop = container.scrollHeight;
+                }
+            });
         },
         // 编辑
         editfun(row, index) {

+ 59 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -102,6 +102,9 @@
                         :disabled="disabled || pleasereviewType" @click="copyfun('D')">生成应付</el-button>
                     <el-button v-if="isFeeEditD" type="primary" plain size="small"
                         :disabled="disabled || pleasereviewType" @click="allClick('发票申请', 'D')">发票申请</el-button>
+                    <el-button v-if="isFeeEditD" type="primary" plain size="small"
+                        :disabled="disabled || !selectionDList.length"
+                        @click="allClick('批量修改结算单位')">批量修改结算单位</el-button>
                 </template>
                 <template slot="indexHeader" slot-scope="scope">
                     <el-button v-if="isFeeEditD" type="primary" size="small" icon="el-icon-plus" circle
@@ -593,6 +596,18 @@
 
         <!--费用打印-->
         <reportContainer ref="reportContainer"></reportContainer>
+        <el-dialog title="修改结算单位" :visible.sync="dialogVisible" width="30%" :before-close="upClose" append-to-body>
+            <span>
+                <dic-select v-model="upForm.shortName" placeholder="结算单位" label="shortName" res="records"
+                    :slotRight="true" rightLabel="code" url="/blade-los/bcorps/selectList?status=0&current=1&size=10"
+                    :filterable="true" :remote="true" dataName="shortName"
+                    @selectChange="dicChange('shortName', $event)"></dic-select>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false" size="small">取 消</el-button>
+                <el-button type="primary" @click="upSibmit" size="small">确 定</el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
@@ -614,7 +629,8 @@ import {
     feecenterTemplateImport,
     listFeeCountByCorp,
     losbfeestemplateGetListTemplate,
-    accountsReceivable
+    accountsReceivable,
+    updateCorpBatch
 } from "@/api/iosBasicData/bills";
 import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import { popupReminder, requiredMessage } from "@/util/messageReminder";
@@ -658,6 +674,8 @@ export default {
     },
     data() {
         return {
+            upForm: {},
+            dialogVisible: false,
             amendsStatus: false,
             amendOption: {
                 border: true,
@@ -3015,7 +3033,42 @@ export default {
                         }
                     })
                 }
-
+            }
+            if (name == '批量修改结算单位') {
+                if (this.selectionDList.length == 0) return this.$message.error("请选择费用");
+                if (this.selectionDList.length != this.selectionDList.filter(e => e.accStatus == 0).length) return this.$message.error("已生成账单费用明细不允许修改结算单位");
+                this.dialogVisible = true
+            }
+        },
+        upSibmit() {
+            const obj = {
+                corpId: this.upForm.corpId,
+                corpCnName: this.upForm.corpCnName,
+                corpEnName: this.upForm.corpEnName,
+                shortName: this.upForm.shortName,
+                feeCenterListD: this.selectionDList
+            }
+            updateCorpBatch(obj).then(res => {
+                this.$message({
+                    type: "success",
+                    message: "操作成功!"
+                });
+                this.dialogVisible = false
+                this.$emit('billsDetailfun')
+            })
+        },
+        dicChange(name, row) {
+            if (name == 'shortName') {
+                if (row) {
+                    this.upForm.corpId = row.id
+                    this.upForm.corpCnName = row.cnName
+                    this.upForm.corpEnName = row.enName
+                } else {
+                    this.upForm.corpId = null
+                    this.upForm.shortName = null
+                    this.upForm.corpCnName = null
+                    this.upForm.corpEnName = null
+                }
             }
         },
         // 预览报表
@@ -3258,6 +3311,10 @@ export default {
             }
             return back;
         },
+        upClose(done) {
+            this.upForm = {}
+            done();
+        },
         // 关闭弹窗
         handleClose(done) {
             this.feesselectionList = [] // 清空多选

+ 8 - 2
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -54,7 +54,7 @@
                 </el-dropdown>
 
                 <el-button size="small" style="margin-right: 8px" :loading="saveLoading" :disabled="!form.id"
-                    v-if="bigtabs!='dz'" @click="previewDialogfun">预 览
+                    v-if="bigtabs != 'dz'" @click="previewDialogfun">预 览
                 </el-button>
                 <el-button size="small" type="warning" :disabled="!form.id || detailData.seeDisabled || showLock"
                     v-if="form.status == 1" @click.stop="revokeDocumentApproval">撤销单据请核
@@ -2527,7 +2527,13 @@ export default {
             const res = await billsDetail(id)
             // this.form = res.data.data;
             this.$set(this, 'form', res.data.data)
-            this.inLock()
+            if (this.overdueJudgment(res.data.data.locked==0?res.data.data.etd:res.data.data.lockedDate)) {
+                this.detailData.seeDisabled = true
+                this.$message.error("已锁账,请联系部门经理解锁");
+                this.submitLock({ srcId: res.data.data.id, businessType: 'HYCK' })
+            } else {
+                this.inLock()
+            }
             //   console.log('form', this.form)
             // console.log(this.$refs)
 

+ 183 - 313
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -14,301 +14,6 @@
                         <el-radio label="2">提单号</el-radio>
                     </el-radio-group>
                 </template>
-                <!--#region-->
-                <!--<template slot="search" slot-scope="{row,size}">-->
-                <!--    <el-form ref="form" :model="row" label-width="80px" :style="fold?'width: 100%':'width: 70%'">-->
-                <!--        <el-row>-->
-                <!--            <el-col :span="fold?6:8" >-->
-                <!--                <el-form-item label="主单号">-->
-                <!--                    <el-input placeholder="请输入主单号" clearable-->
-                <!--                              size="small" style="width:100%" v-model="query.mblno">-->
-                <!--                    </el-input>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="fold?6:8">-->
-                <!--                <el-form-item label="委托人">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入委托人" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.corpCnName">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <search-query :datalist="corpData"-->
-                <!--                                  :selectValue="query.corpCnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                                  placeholder="请输入委托人"-->
-                <!--                                  @remoteMethod="corpBcorpslistByType"-->
-                <!--                                  @corpChange="corpChange($event,'corpCnName')"-->
-                <!--                                  @corpFocus="corpBcorpslistByType" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="fold?6:8" >-->
-                <!--                <el-form-item label="业务号">-->
-                <!--                    <el-input placeholder="请输入业务号" clearable-->
-                <!--                              size="small" style="width:100%" v-model="query.billNo">-->
-                <!--                    </el-input>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="单据类型">-->
-                <!--                    <search-query-->
-                <!--                        :datalist="billTypeData"-->
-                <!--                        :selectValue="query.billType"-->
-                <!--                        :filterable="true"-->
-                <!--                        :clearable="true"-->
-                <!--                        :remote="true"-->
-                <!--                        :buttonIf="false"-->
-                <!--                        @corpChange="corpChange($event,'billType')">-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="分单号">-->
-                <!--                    <el-input placeholder="请输入分单号" clearable-->
-                <!--                              size="small" style="width:100%" v-model="query.hblno">-->
-                <!--                    </el-input>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="船名">-->
-                <!--                    <search-query :datalist="vesselData"-->
-                <!--                                  :selectValue="query.vesselEnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'enName',value:'enName'}"-->
-                <!--                                  placeholder="请输入船名"-->
-                <!--                                  @remoteMethod="vesselBvesselsListfun"-->
-                <!--                                  @corpChange="corpChange($event,'vesselEnName')"-->
-                <!--                                  @corpFocus="vesselBvesselsListfun" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold" >-->
-                <!--                <el-form-item label="航次">-->
-                <!--                    <el-input placeholder="请输入航次" clearable-->
-                <!--                              size="small" style="width:100%" v-model="query.voyageNo">-->
-                <!--                    </el-input>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="船公司">-->
-                <!--                    <search-query :datalist="carrierData"-->
-                <!--                                  :selectValue="query.carrierCnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                                  placeholder="请输入船公司"-->
-                <!--                                  @remoteMethod="carrierBcorpslistByTypefun"-->
-                <!--                                  @corpChange="corpChange($event,'carrierCnName')"-->
-                <!--                                  @corpFocus="carrierBcorpslistByTypefun" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="目的港">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入目的港" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.podCnName">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <search-query :datalist="podData"-->
-                <!--                                  :selectValue="query.podEnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'enName',value:'enName'}"-->
-                <!--                                  placeholder="请输入目的港"-->
-                <!--                                  @remoteMethod="podBportsListfun"-->
-                <!--                                  @corpChange="corpChange($event,'podEnName')"-->
-                <!--                                  @corpFocus="podBportsListfun" >-->
-                <!--                    </search-query>-->
-
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="航线">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入航线" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.lineCnName">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <search-query :datalist="lineData"-->
-                <!--                                  :selectValue="query.lineCnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                                  placeholder="请输入航线"-->
-                <!--                                  @remoteMethod="lineBlinesListfun"-->
-                <!--                                  @corpChange="corpChange($event,'lineCnName')"-->
-                <!--                                  @corpFocus="lineBlinesListfun" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="场站">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入场站" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.cyCode">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <search-query :datalist="cyData"-->
-                <!--                                  :selectValue="query.cyCnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                                  placeholder="请输入场站"-->
-                <!--                                  @remoteMethod="cyBcorpslistByType"-->
-                <!--                                  @corpChange="corpChange($event,'cyCnName')"-->
-                <!--                                  @corpFocus="cyBcorpslistByType" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="业务来源">-->
-                <!--                    <search-query-->
-                <!--                        :datalist="srcTypeData"-->
-                <!--                        :selectValue="query.srcType"-->
-                <!--                        :filterable="true"-->
-                <!--                        :clearable="true"-->
-                <!--                        :remote="true"-->
-                <!--                        :buttonIf="false"-->
-                <!--                        @corpChange="corpChange($event,'srcType')">-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="来源详情">-->
-                <!--                    <el-input placeholder="请输入来源详情" clearable-->
-                <!--                              size="small" style="width:100%" v-model="query.srcCnName">-->
-                <!--                    </el-input>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="9" v-show="fold">-->
-                <!--                <el-form-item label="ETD">-->
-                <!--                    <el-checkbox v-model="etdDisabled">-->
-                <!--                        <el-date-picker-->
-                <!--                            v-model="etdList"-->
-                <!--                            style="width: 100%"-->
-                <!--                            :disabled="!etdDisabled"-->
-                <!--                            size="small"-->
-                <!--                            type="datetimerange"-->
-                <!--                            range-separator="至"-->
-                <!--                            start-placeholder="开始日期"-->
-                <!--                            end-placeholder="结束日期"-->
-                <!--                            format="yyyy-MM-dd HH:mm"-->
-                <!--                            value-format="yyyy-MM-dd HH:mm"-->
-                <!--                            clearable>-->
-                <!--                        </el-date-picker>-->
-                <!--                    </el-checkbox>-->
-
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="9" v-show="fold">-->
-                <!--                <el-form-item label="ETA">-->
-                <!--                    <el-checkbox v-model="etaDisabled">-->
-                <!--                        <el-date-picker-->
-                <!--                            v-model="etaList"-->
-                <!--                            style="width: 100%"-->
-                <!--                            :disabled="!etaDisabled"-->
-                <!--                            size="small"-->
-                <!--                            type="datetimerange"-->
-                <!--                            range-separator="至"-->
-                <!--                            start-placeholder="开始日期"-->
-                <!--                            end-placeholder="结束日期"-->
-                <!--                            format="yyyy-MM-dd HH:mm"-->
-                <!--                            value-format="yyyy-MM-dd HH:mm"-->
-                <!--                            clearable>-->
-                <!--                        </el-date-picker>-->
-                <!--                    </el-checkbox>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="创建部门">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入创建部门" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.createDeptName">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <tree-select v-model="query.createDeptName" filterable-->
-                <!--                                 :data="createDeptData"-->
-                <!--                                 :props="{label: 'title', children:'children' }"-->
-                <!--                                 nodeKey="title"-->
-                <!--                                 size="small"-->
-                <!--                                 :multiple="false"-->
-                <!--                                 placeholder="请选择创建部门"-->
-                <!--                                 @focus="createDeptLzylistfun"-->
-                <!--                                 @input="corpChange($event,'createDeptName')">-->
-                <!--                    </tree-select>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="订舱代理">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入订舱代理" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.bookingAgentCnName">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <search-query :datalist="bookingAgentData"-->
-                <!--                                  :selectValue="query.bookingAgentCnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                                  placeholder="请输入订舱代理"-->
-                <!--                                  @remoteMethod="bookingAgentBcorpsListfun"-->
-                <!--                                  @corpChange="corpChange($event,'bookingAgentCnName')"-->
-                <!--                                  @corpFocus="bookingAgentBcorpsListfun">-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="签单方式">-->
-                <!--                    <search-query-->
-                <!--                        :datalist="issueTypeData"-->
-                <!--                        :selectValue="query.issueType"-->
-                <!--                        :filterable="true"-->
-                <!--                        :clearable="true"-->
-                <!--                        :remote="true"-->
-                <!--                        :buttonIf="false"-->
-                <!--                        :forParameter="{ key:'dictKey', label:'dictValue', value:'dictValue'}"-->
-                <!--                        @corpChange="corpChange($event,'issueType')" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--            <el-col :span="6" v-show="fold">-->
-                <!--                <el-form-item label="收货人">-->
-                <!--                    &lt;!&ndash;<el-input placeholder="请输入收货人" clearable&ndash;&gt;-->
-                <!--                    &lt;!&ndash;          size="small" style="width:100%" v-model="query.hConsigneeCnName">&ndash;&gt;-->
-                <!--                    &lt;!&ndash;</el-input>&ndash;&gt;-->
-                <!--                    <search-query :datalist="hConsigneeData"-->
-                <!--                                  :selectValue="query.hConsigneeCnName"-->
-                <!--                                  :filterable="true"-->
-                <!--                                  :clearable="true"-->
-                <!--                                  :remote="true"-->
-                <!--                                  :buttonIf="false"-->
-                <!--                                  :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                                  placeholder="请选择收货人"-->
-                <!--                                  @remoteMethod="hConsigneeBcorpslistByType"-->
-                <!--                                  @corpChange="corpChange($event,'hConsigneeCnName')"-->
-                <!--                                  @corpFocus="hConsigneeBcorpslistByType" >-->
-                <!--                    </search-query>-->
-                <!--                </el-form-item>-->
-                <!--            </el-col>-->
-                <!--        </el-row>-->
-                <!--    </el-form>-->
-                <!--</template>-->
-                <!--<template slot="searchMenu"  slot-scope="{row,size}">-->
-                <!--    <el-button type="text" @click="shiftCollapsiable">-->
-                <!--        <span>-->
-                <!--            {{ fold ? '收起' : '展开' }}-->
-                <!--            <i :class="fold ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>-->
-                <!--        </span>-->
-                <!--    </el-button>-->
-                <!--</template>-->
-                <!--#endregion-->
-
                 <template slot="menuLeft">
                     <el-button type="primary" size="small" @click="addbtnfun('DD')">新建直单
                     </el-button>
@@ -333,8 +38,7 @@
                     <el-button type="warning" size="small" @click="outExport">导 出
                     </el-button>
                     <el-dropdown style="line-height: 0">
-                        <el-button size="small" type="success" style="margin-right: 8px"
-                            :disabled="selectionList.length == 0">
+                        <el-button size="small" type="success" :disabled="selectionList.length == 0">
                             发送 SO EDI<i class="el-icon-arrow-down el-icon--right"></i>
                         </el-button>
                         <el-dropdown-menu slot="dropdown">
@@ -344,8 +48,7 @@
                         </el-dropdown-menu>
                     </el-dropdown>
                     <el-dropdown style="line-height: 0">
-                        <el-button size="small" type="success" style="margin-right: 8px"
-                            :disabled="selectionList.length == 0">
+                        <el-button size="small" type="success" :disabled="selectionList.length == 0">
                             发送 SI EDI<i class="el-icon-arrow-down el-icon--right"></i>
                         </el-button>
                         <el-dropdown-menu slot="dropdown">
@@ -354,9 +57,19 @@
                             </el-dropdown-item>
                         </el-dropdown-menu>
                     </el-dropdown>
-                    <el-button type="primary" size="small" @click="updateField"
-                        :disabled="selectionList.length === 0">批量更改
-                    </el-button>
+                    <el-dropdown style="line-height: 0" @command="batchClick">
+                        <el-button size="small" type="danger" :disabled="selectionList.length == 0">
+                            批量操作<i class="el-icon-arrow-down el-icon--right"></i>
+                        </el-button>
+                        <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item command="批量更改">批量更改</el-dropdown-item>
+                            <el-dropdown-item command="批量单据请核">批量单据请核</el-dropdown-item>
+                            <el-dropdown-item command="批量撤销单据请核">批量撤销单据请核</el-dropdown-item>
+                            <el-dropdown-item command="批量生成账单">批量生成账单</el-dropdown-item>
+                            <el-dropdown-item command="批量撤销账单">批量撤销账单</el-dropdown-item>
+                            <el-dropdown-item command="批量复制">批量复制</el-dropdown-item>
+                        </el-dropdown-menu>
+                    </el-dropdown>
                     <div style="margin-top: 10px">
                         <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
 
@@ -380,16 +93,6 @@
                             </el-tab-pane>
                             <el-tab-pane label="完成" name="3"></el-tab-pane>
                         </el-tabs>
-                        <!-- <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
-                            <el-tab-pane label="接单" name="0">
-                                <span slot="label">接单</span>
-                            </el-tab-pane>
-                            <el-tab-pane label="退舱" name="1">
-                                <span slot="label" style="color: #d86363">退舱</span>
-                            </el-tab-pane>
-                            <el-tab-pane label="完成" name="3"></el-tab-pane>
-                            <el-tab-pane label="全部" name="4"></el-tab-pane>
-                        </el-tabs> -->
                     </div>
                 </template>
                 <template slot-scope="scope" slot="menu">
@@ -593,7 +296,12 @@ import {
     billsRevokeDisembarking,
     billsSubmit,
     editypesSendingEdi,
-    updateBillType
+    updateBillType,
+    checkBillsBatch,
+    revokeCheckBillsBatch,
+    generateBillBatch,
+    revokeBillBatch,
+    batchCopyBills
 } from "@/api/iosBasicData/bills";
 import { mapGetters } from "vuex";
 import billsDetails from "@/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue";
@@ -1715,7 +1423,169 @@ export default {
         }
     },
     methods: {
+        batchClick(name) {
+            if (name == '批量更改') {
+                this.updateField()
+            }
+            if (name == '批量单据请核') {
+                this.$confirm('是否批量单据请核?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                        url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
+                        pageStatus: "this.$store.getters.approvalDetails",
+                        pageLabel: "审批详情(F)",
+                    }
+                    checkBillsBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+            }
+            if (name == '批量撤销单据请核') {
+                for (let item of this.selectionList) {
+                    if (item.status == 0) {
+                        return this.$message.error("请选择已提交审核的单据");
+                    }
+                }
+                this.$confirm('是否批量撤销单据请核?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                    }
+                    revokeCheckBillsBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+            }
+            if (name == '批量生成账单') {
+                this.$confirm('是否批量生成账单?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                    }
+                    generateBillBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
+            }
+            if (name == '批量撤销账单') {
+                this.$confirm('是否批量撤销账单?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    const obj = {
+                        billsIds: this.ids,
+                    }
+                    revokeBillBatch(obj).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "操作成功!"
+                        });
+                        this.onLoad(this.page, this.query);
+                    })
+                })
 
+            }
+            if (name == '批量复制') {
+                this.$DialogForm.show({
+                    title: "复制单据",
+                    width: "300px",
+                    menuPosition: "right",
+                    data: { checkbox: "复制费用,复制箱型箱量" },
+                    option: {
+                        submitText: "确认",
+                        emptyText: "取消",
+                        span: 24,
+                        column: [
+                            {
+                                label: "单据类型",
+                                prop: "billType",
+                                type: "select",
+                                value: this.selectionList[0].billType,
+                                dicData: [
+                                    {
+                                        label: '直单',
+                                        value: 'DD'
+                                    },
+                                    {
+                                        label: '主单',
+                                        value: 'MM'
+                                    },
+                                    {
+                                        label: '分单',
+                                        value: 'MH'
+                                    }
+                                ],
+                                dataType: "string",
+                                span: 24
+                            },
+                            {
+                                label: "复制类型",
+                                prop: "checkbox",
+                                type: "checkbox",
+                                dicData: [
+                                    {
+                                        label: "复制费用",
+                                        value: "复制费用"
+                                    },
+                                    {
+                                        label: "复制箱型箱量",
+                                        value: "复制箱型箱量"
+                                    }
+                                ],
+                                dataType: "string",
+                                span: 24
+                            }
+                        ]
+                    },
+                    beforeClose: done => {
+                        done();
+                    },
+                    callback: res => {
+                        res.done();
+                        const types = res.data.checkbox ? res.data.checkbox.split(",") : []
+                        console.log(res.data.checkbox.includes('复制费用'))
+                        const obj = {
+                            ids: this.ids,
+                            billType: res.data.billType,
+                            copyCntr: res.data.checkbox.includes('复制箱型箱量') ? 1 : 0,
+                            copyFee: res.data.checkbox.includes('复制费用') ? 1 : 0
+                        }
+                        batchCopyBills(obj).then(res => {
+                            this.$message({
+                                type: "success",
+                                message: "操作成功!"
+                            });
+                            this.onLoad(this.page, this.query);
+                        })
+                        res.close();
+                    }
+                });
+            }
+
+        },
         updateField() {
             this.$refs.updateFieldRef.formData.ids = this.selectionList.map(item => item.id)
             this.$refs.updateFieldRef.dialogVisible = true

+ 60 - 0
src/views/system/businessUnlocking/config/mainList.json

@@ -0,0 +1,60 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 8,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "align": "center",
+  "menuWidth": "120",
+  "menu": true,
+  "menuFixed":false,
+  "showSummary": true,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "selection": true,
+  "indexFixed":false,
+  "tip":false,
+  "expand": false,
+  "expandWidth": 38,
+  "column": [
+    {
+      "label": "业务类型",
+      "prop": "businessTypeName",
+      "search": true,
+      "index": 2,
+      "minWidth": 80,
+      "overHidden": true,
+      "searchSpan": 8
+    },{
+      "label": "系统编号",
+      "prop": "billNo",
+      "search": true,
+      "index": 2,
+      "minWidth": 80,
+      "overHidden": true,
+      "searchSpan": 8
+    },{
+      "label": "操作员",
+      "prop": "realName",
+      "search": true,
+      "index": 3,
+      "minWidth": 80,
+      "overHidden": true,
+      "searchSpan": 8
+    },{
+      "label": "业务锁时间",
+      "prop": "lockTime",
+      "search": true,
+      "type": "date",
+      "unlinkPanels": true,
+      "searchRange": true,
+      "index": 4,
+      "minWidth": 80,
+      "overHidden": true,
+      "searchSpan": 8
+    }
+  ]
+}

+ 288 - 0
src/views/system/businessUnlocking/index.vue

@@ -0,0 +1,288 @@
+<template>
+  <div>
+    <basic-container>
+      <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad"
+        @resetColumn="resetColumn('crud', 'option', 'optionBack', 458)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 458)" :table-loading="loading"
+        @selection-change="selectionChange">
+        <template slot="menu" slot-scope="{ row, index }">
+          <!-- <el-button v-if="row.locked==0" type="text" icon="el-icon-unlock" size="small" @click="rowUnlock(row, index)">加锁</el-button> -->
+          <!-- <el-button v-if="row.locked==1" type="text" icon="el-icon-unlock" size="small" @click="rowOnlock(row, index)">解锁</el-button> -->
+          <el-button :disabled="row.locked != 0" type="text" icon="el-icon-delete" size="small"
+            @click="rowDel(row, index)">删除</el-button>
+        </template>
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" @click="allClick" :disabled="selectionList.length == 0">一键解锁
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import option from "./config/mainList.json";
+import { lockList, lockRemove, unLock } from "@/api/lock/businessUnlocking";
+import { getWorkDicts } from "@/api/system/dictbiz";
+export default {
+  name: "index",
+  data() {
+    return {
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        menuWidth: 80,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        searchIcon: true,
+        align: 'center',
+        searchIndex: 3,
+        column: [
+          {
+            label: "业务类型",
+            prop: "businessTypeName",
+            width: "120",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "业务编号",
+            prop: "srcBillNo",
+            width: "120",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "单据日期",
+            prop: "billDate",
+            width: "120",
+            overHidden: true,
+            search: true,
+            searchProp: "billDateList",
+            type: "date",
+            unlinkPanels: true,
+            searchRange: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            searchDefaultTime: ["00:00:00", "23:59:59"],
+          },
+          {
+            label: "船名",
+            prop: "srcVesselCnName",
+            width: "120",
+            overHidden: true,
+          },
+          {
+            label: "航次",
+            prop: "srcVoyageNo",
+            width: "120",
+            overHidden: true,
+          },
+          {
+            label: "MBLNO",
+            prop: "srcMblno",
+            width: "120",
+            overHidden: true,
+          },
+          {
+            label: "Reference",
+            prop: "rcRefno",
+            width: "120",
+            overHidden: true,
+          },
+          {
+            label: "加解锁操作时间",
+            prop: "lockedTime",
+            width: "120",
+            overHidden: true,
+          },
+          {
+            label: "累计已解锁次数",
+            prop: "unlockedCount",
+            width: "120",
+            overHidden: true,
+          },
+          {
+            label: "操作人",
+            prop: "operatorName",
+            width: "120",
+            overHidden: true,
+          }
+        ]
+      },
+      dataList: [],
+      form: {},
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0
+      },
+      search: {},
+      loading: false,
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(458), this.optionBack);
+  },
+  filters: {
+    moudleNameFormat(row, moudleOption) {
+      let name;
+      moudleOption.map(e => {
+        if (row == e.dictKey) {
+          name = e.dictValue;
+        }
+      });
+      return name;
+    }
+  },
+  methods: {
+    selectionChange(list) {
+      this.selectionList = list
+    },
+    searchChange(params, done) {
+      this.onLoad(this.page, params);
+      done();
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    onLoad(page, params) {
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      this.loading = true;
+      lockList(page.currentPage, page.pageSize, params)
+        .then(res => {
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 260;
+          }
+          this.dataList.forEach(item => {
+            this.$set(item, "insideList", []);
+            this.$set(item, "loading", true);
+          });
+          this.$nextTick(() => {
+            this.$refs.crud.refreshTable()
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          lockRemove({ids:row.id}).then(res => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          })
+        })
+    },
+    // 解锁
+    rowUnlock(row, index) {
+      this.$confirm("是否确认解锁?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.onLoad(this.page, this.search);
+      });
+    },
+    //加锁
+    rowOnlock(row, index) {
+      this.$confirm("是否确认加锁?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.onLoad(this.page, this.search);
+      });
+    },
+    allClick() {
+      let arr = []
+      let ids = null
+      this.selectionList.forEach(e => {
+        arr.push(e.id)
+      })
+      ids = arr.join(',')
+      this.$confirm("是否确认解锁?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        unLock({ ids: ids }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.page.currentPage = 1;
+          this.onLoad(this.page, { parentId: 0 });
+        });
+      })
+
+    },
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset()
+      }
+    },
+    //自定义列重置
+    async resetColumn(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset()
+      }
+    },
+  }
+};
+</script>
+
+<style scoped></style>

+ 1 - 0
src/views/tirePartsMall/basicData/RotationChart/index.vue

@@ -219,6 +219,7 @@ export default {
         ...params,
         current: page.currentPage,
         size: page.pageSize,
+        whetherIntegral:'0',
         ...Object.assign(params, this.search)
       }
       this.loading = true

+ 9 - 5
src/views/wel/index.vue

@@ -70,6 +70,7 @@ import { areaTypeTree } from "@/api/basicData/customerInformation";
 import xindongPower from "@/views/wel/home/xindongPower/xindongPower.vue";
 import losHome from "@/views/wel/components/losHome.vue";
 import { getLazyList } from "@/api/system/dept";
+import { isProcurement } from "@/api/basicData/configuration";
 export default {
     name: "wel",
     data() {
@@ -77,7 +78,7 @@ export default {
             billType: "",
             saberTenantId: '',
             roler: '',
-            rolerShow:true,
+            rolerShow: true,
         };
     },
     created() {
@@ -92,8 +93,11 @@ export default {
             localStorage.setItem('sysitemType', this.billType)
             localStorage.setItem('sysitemData', JSON.stringify(res.data.data))
         });
-        getLazyList().then(res=>{
-            localStorage.setItem('user-Information', res.data.data.length?JSON.stringify(res.data.data[0]):null)
+        isProcurement({ "param": "lock.term.Days" }).then(res => {
+              localStorage.setItem('lockTermDays', res.data.data)
+        })
+        getLazyList().then(res => {
+            localStorage.setItem('user-Information', res.data.data.length ? JSON.stringify(res.data.data[0]) : null)
         })
         if (!localStorage.getItem('areaTypeTree')) {
             areaTypeTree().then(res => {
@@ -119,9 +123,9 @@ export default {
 
             let matches = str.match(regex);
             if (matches) {
-                this.rolerShow=false
+                this.rolerShow = false
             } else {
-                this.rolerShow=true
+                this.rolerShow = true
             }
         },
         inPage(url) {