|
@@ -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 {
|