Commit 5ea7e595 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 99b731f9 3d3bceee
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-form-item> </el-form-item>
<el-form-item label="" prop="dateRangeCreateTime"> <el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" clearable/> <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" clearable />
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatus"> <el-form-item :label="$t('状态')" prop="boxStatus">
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('自编号')" prop="selfNo"> <el-form-item :label="$t('自编号')" prop="selfNo">
<el-input <el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.selfNo"
:placeholder="$t('请输入自编号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('柜号')" prop="cubNo"> <el-form-item :label="$t('柜号')" prop="cubNo">
<el-input <el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.cubNo"
:placeholder="$t('请输入柜号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('柜型')" prop="cabinetId"> <el-form-item :label="$t('柜型')" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')" clearable> <el-select v-model="queryParams.cabinetId" :placeholder="$t('请选择柜型')" clearable>
<el-option <el-option v-for="item in cabinetList" :label="$l(item, 'name')" :value="item.id" :key="item.id"></el-option>
v-for="item in cabinetList"
:label="item.name"
:value="item.name"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable>
v-model="queryParams.startWarehouseId" <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
:placeholder="$t('请选择始发地')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId"> <el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select <el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable>
v-model="queryParams.destWarehouseId" <el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
:placeholder="$t('请选择目的地')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="date"> <el-form-item label="" prop="dateType">
<el-select <el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small">
v-model="queryParams.dateType" <el-option v-for="item in dateTypes" :key="item.value" :label="$l(item, 'label')" :value="item.value" />
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" clearable />
v-model="queryParams.dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-:placeholder="$t('开始日期')"
end-:placeholder="$t('结束日期')"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatus"> <el-form-item :label="$t('状态')" prop="boxStatus">
<el-select <el-select v-model="queryParams.boxStatus" :placeholder="$t('请选择状态')" clearable size="small">
v-model="queryParams.boxStatus" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR_SHIPMENT_STATUS)" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" />
:placeholder="$t('请选择状态')"
clearable
size="small"
>
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR_SHIPMENT_STATUS)"
:key="dict.value"
:label="$l(dict, 'label')"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -120,32 +51,14 @@ ...@@ -120,32 +51,14 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:box:create']">{{$t('出货安排')}}
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['shipment:box:create']"
>{{$t('出货安排')}}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export']">{{$t('导出')}}
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['shipment:box:export']"
>{{$t('导出')}}
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
...@@ -163,10 +76,7 @@ ...@@ -163,10 +76,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式')" align="center" prop="transportType"> <el-table-column :label="$t('运输方式')" align="center" prop="transportType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType" />
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="scope.row.transportType"
/>
</template> </template>
</el-table-column> </el-table-column>
...@@ -176,11 +86,7 @@ ...@@ -176,11 +86,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('方数') + '(' + $t('预装') + '/' + $t('已装') + ')'" align="center" prop="squareNumber">
:label="$t('方数') + '(' + $t('预装') + '/' + $t('已装') + ')'"
align="center"
prop="squareNumber"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.boxStatistics.volume }}/{{ row.boxStatistics.loadVolume }} {{ row.boxStatistics.volume }}/{{ row.boxStatistics.loadVolume }}
</template> </template>
...@@ -193,39 +99,20 @@ ...@@ -193,39 +99,20 @@
<el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" /> <el-table-column :label="$t('状态')" align="center" prop="shipmentStatusText" />
<el-table-column <el-table-column :label="$t('日期')" align="center" prop="createTime" width="180">
:label="$t('日期')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss') }}</span>
new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="200px"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" <el-dropdown trigger="click" @command="(command)=>handleCommand(scope.row, command)" style="marginRight:10px;">
v-hasPermi="['shipment:box:query']">{{$t('查看')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['shipment:box:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['shipment:box:delete']">{{$t('删除')}}</el-button> -->
<el-dropdown
trigger="click"
@command="(command) => handleCommand(scope.row, command)"
style="marginRight:10px;"
>
<el-button type="primary"> <el-button type="primary">
{{$t('操作')}}<i class="el-icon-arrow-down el-icon--right"></i> {{$t('操作')}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">{{$t('编辑')}}</el-dropdown-item> <el-dropdown-item command="edit">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item command="seaAir" <el-dropdown-item command="seaAir">{{$t('操作')}}-{{$t('海空联运')}}</el-dropdown-item>
>{{$t('操作')}}-{{$t('海空联运')}}</el-dropdown-item
>
<el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item> <el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item> <el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item> <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>
...@@ -250,55 +137,49 @@ ...@@ -250,55 +137,49 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" @pagination="getList" @current-change="pageChange" />
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog <el-dialog :title="dialogCfg.title" :visible.sync="dialogCfg.open" :width="dialogCfg.width" :fullscreen="dialogCfg.fullscreen" append-to-body class="shippingSea-dialog">
:title="dialogCfg.title" <template v-if="dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'">
:visible.sync="dialogCfg.open" <editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
:width="dialogCfg.width"
:fullscreen="dialogCfg.fullscreen"
append-to-body
class="shippingSea-dialog"
>
<template
v-if="
dialogCfg.dialogType === 'edit' || dialogCfg.dialogType === 'add'
"
>
<editForm
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
:warehouseList="warehouseList"
:transportTypes="transportTypes"
:cabinetList="cabinetList"
/>
</template> </template>
<template v-if="dialogCfg.dialogType === 'cost'"> <template v-if="dialogCfg.dialogType === 'cost'">
<costForm <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
/>
</template> </template>
<template v-if="dialogCfg.dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" />
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
:allUsers="allUsers"
/>
</template> </template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'"> <template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" /> <ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'notice'">
<div class="notice-dialog">
<div class="notice-title">{{$t('您有{cnt}个待处理出货操作,请尽快前往处理', {cnt: noticeList.length})}}</div>
<el-table :data="noticeList" height="500px" border>
<el-table-column :label="$t('自编号')" align="center" prop="selfNo" />
<el-table-column :label="$t('类型')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" />
</template>
</el-table-column>
<el-table-column :label="$t('预计时间')" align="center">
<template slot-scope="scope">
{{formatDate(scope.row.createTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="80">
<template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'handle')">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="operate-button">
<el-button type="primary" @click="closeDialog">{{$t('关闭窗口')}}</el-button>
</el-row>
</div>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -308,24 +189,25 @@ import { ...@@ -308,24 +189,25 @@ import {
deletebox, deletebox,
getbox, getbox,
getboxPage, getboxPage,
exportboxExcel exportboxExcel,
} from '@/api/ecw/box' getNoticeList,
} from "@/api/ecw/box";
import { import {
downloadFile, downloadFile,
downloadFileByUrl, downloadFileByUrl,
formatDate, formatDate,
} from "./shippingSea/utils"; } from "./shippingSea/utils";
import { getCabinetPage } from '@/api/ecw/cabinet' import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from '@/api/ecw/channel' import { getChannelList } from "@/api/ecw/channel";
import { getWarehouseList } from '@/api/ecw/warehouse' import { getWarehouseList } from "@/api/ecw/warehouse";
import costForm from './costForm.vue' import costForm from "./costForm.vue";
import regError from './regError.vue' import regError from "./regError.vue";
import editForm from './editSeaAirForm.vue' import editForm from "./editSeaAirForm.vue";
import ladingBill from "./ladingBill/index.vue"; import ladingBill from "./ladingBill/index.vue";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
export default { export default {
name: 'EcwBoxIndexseaair', name: "EcwBoxIndexseaair",
components: { components: {
costForm, costForm,
regError, regError,
...@@ -335,14 +217,13 @@ export default { ...@@ -335,14 +217,13 @@ export default {
data() { data() {
return { return {
dateTypes: [ dateTypes: [
{ value: '1', label: this.$t('预装时间') }, { value: "1", label: this.$t("预装时间") },
{ value: '2', label: this.$t('装柜时间') }, { value: "2", label: this.$t("装柜时间") },
{ value: '3', label: this.$t('起运时间') }, { value: "3", label: this.$t("起运时间") },
{ value: '4', label: this.$t('到港时间') }, { value: "4", label: this.$t("到港时间") },
{ value: '5', label: this.$t('清关时间') }, { value: "5", label: this.$t("清关时间") },
{ value: '6', label: this.$t('提货时间') } { value: "6", label: this.$t("提货时间") },
], ],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -354,9 +235,7 @@ export default { ...@@ -354,9 +235,7 @@ export default {
// 出货列表 // 出货列表
list: [], list: [],
// 弹出层标题 // 弹出层标题
title: '', // 弹出类型
// 是否显示弹出层
open: false,
dialogCfg: { dialogCfg: {
title: "", title: "",
dialogType: "", dialogType: "",
...@@ -370,120 +249,117 @@ export default { ...@@ -370,120 +249,117 @@ export default {
dateRangeCreateTime: [], dateRangeCreateTime: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null
}, },
cabinetList: [], cabinetList: [],
channelList: [], channelList: [],
warehouseList: [], warehouseList: [],
allUsers: [] transportTypes: [],
} // 通知列表
noticeList: [],
allUsers: [],
};
}, },
computed: { computed: {
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
(item) => item.tradeType == '2' || item.type == '3' (item) => item.tradeType == "2" || item.type == "3"
) );
}, },
importWarehouseList() { importWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
(item) => item.tradeType == '1' || item.type == '3' (item) => item.tradeType == "1" || item.type == "3"
) );
}, },
getCabinetName() { getCabinetName() {
return (cabinetId) => { return (cabinetId) => {
for (let index in this.cabinetList) { for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index] let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) { if (cabinetItem.id == cabinetId) {
return cabinetItem.name return cabinetItem.name;
}
} }
return '/'
} }
return "/";
};
}, },
getShipChannelName() { getShipChannelName() {
return (shippingChannelId) => { return (shippingChannelId) => {
for (let index in this.channelList) { for (let index in this.channelList) {
let channelItem = this.channelList[index] let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) { if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, 'name') return this.$l(channelItem, "name");
}
}
return '/'
} }
} }
return "/";
};
},
}, },
created() { created() {
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "4");
getWarehouseList().then((res) => (this.warehouseList = res.data));
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list;
});
this.getList();
this.getChannelList();
this.queryNotice();
// 用户 // 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => { listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res; const { data } = res;
this.allUsers = data.list ?? []; this.allUsers = data.list ?? [];
}); });
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == '4')
getWarehouseList().then((res) => (this.warehouseList = res.data))
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list
})
this.getList()
this.getChannelList()
}, },
methods: { methods: {
formatDate,
getChannelList() { getChannelList() {
getChannelList().then((res) => (this.channelList = res.data)) getChannelList().then((res) => (this.channelList = res.data));
},
queryNotice() {
getNoticeList({
transportTypeList: this.transportTypes.map((item) => item.value),
}).then((res) => {
const { data } = res;
this.noticeList = data ?? [];
if (data.length) {
this.$set(this.dialogCfg, "title", this.$t("出货操作提醒"));
this.$set(this.dialogCfg, "dialogType", "notice");
this.$set(this.dialogCfg, "width", "650px");
this.$set(this.dialogCfg, "open", true);
}
});
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true this.loading = true;
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams } let params = { ...this.queryParams };
params.transportType = 4 params.transportType = 4;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime') this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询 // 执行查询
getboxPage(params).then((response) => { getboxPage(params).then((response) => {
this.list = response.data.list this.list = response.data.list;
this.total = response.data.total this.total = response.data.total;
this.loading = false this.loading = false;
}) });
},
/** 取消按钮 */
cancel() {
this.open = false
this.reset()
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
cabinetId: undefined,
startWarehouseId: undefined,
destWarehouseId: undefined,
transportType: '4'
}
this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1 this.queryParams.page = 1;
this.getList() this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = [] this.queryParams = {};
this.resetForm('queryForm') this.dateRangeCreateTime = [];
this.handleQuery() this.resetForm("queryForm");
this.handleQuery();
},
resetForm() {
this.$refs["queryForm"].resetFields();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
...@@ -507,96 +383,94 @@ export default { ...@@ -507,96 +383,94 @@ export default {
this.$set(this.dialogCfg, "open", true); this.$set(this.dialogCfg, "open", true);
}); });
}, },
/* 关闭弹窗 */
closeDialog(type) {
this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") {
this.getList();
}
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id const id = row.id;
this.$modal this.$modal
.confirm(this.$t('是否确认删除出货编号为{id}的数据项?', {id})) .confirm(this.$t("是否确认删除出货编号为{id}的数据项?", { id }))
.then(function () { .then(function () {
return deletebox(id) return deletebox(id);
}) })
.then(() => { .then(() => {
this.getList() this.getList();
this.$modal.msgSuccess(this.$t('删除成功')) this.$modal.msgSuccess(this.$t("删除成功"));
}) })
.catch(() => {}) .catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams } let params = { ...this.queryParams };
params.pageNo = undefined params.page = undefined;
params.pageSize = undefined params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime') this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行导出 // 执行导出
this.$modal this.$modal
.confirm(this.$t('是否确认导出所有出货数据项?')) .confirm(this.$t("是否确认导出所有出货数据项?"))
.then(() => { .then(() => {
this.exportLoading = true this.exportLoading = true;
return exportboxExcel(params) return exportboxExcel(params);
}) })
.then((response) => { .then((response) => {
this.$download.excel(response, '${table.classComment}.xls') this.$download.excel(response, "${table.classComment}.xls");
this.exportLoading = false this.exportLoading = false;
}) })
.catch(() => {}) .catch(() => {});
},
/* 关闭弹窗 */
closeDialog(type) {
this.$set(this.dialogCfg, "open", false);
if (type === "add" || type === "edit") {
this.getList();
}
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCommand(row, command) { handleCommand(row, command) {
this.$set(this.dialogCfg, "fullscreen", false); this.$set(this.dialogCfg, "fullscreen", false);
switch (command) { switch (command) {
case 'seaAir': case "seaAir":
this.$router.push('/boxSeaAir/shippingSeaAir/' + row.id) this.$router.push("/boxSeaAir/shippingSeaAir/" + row.id);
break break;
case "detail": case "detail":
this.$router.push("/boxSeaAir/query/" + row.id); this.$router.push("/boxSeaAir/query/" + row.id);
break; break;
case 'edit': case "edit":
this.handleUpdate(row) this.handleUpdate(row);
break break;
case 'delete': case "delete":
this.handleDelete(row) this.handleDelete(row);
break break;
case "editLadingBill": case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId); const cabinetLabel = this.getCabinetName(row.cabinetId);
/* const title = const title = this.$t(
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
`查看提单 ${row.selfNo ?? ""} 柜号:${ {
row.cubNo ?? ""
} 柜型:${cabinetLabel}`; */
const title = this.$t('查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}`', {
selfNo: row.selfNo, selfNo: row.selfNo,
cubNo: row.cubNo, cubNo: row.cubNo,
cabinetLabel: cabinetLabel cabinetLabel: cabinetLabel,
}) }
);
this.$set(this.dialogCfg, "title", title); this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "fullscreen", true); this.$set(this.dialogCfg, "fullscreen", true);
break; break;
case 'cost': case "cost":
this.$set(this.dialogCfg, 'title', this.$t('费用登记')) this.$set(this.dialogCfg, "title", this.$t("费用登记"));
break break;
case "error":
this.$set(this.dialogCfg, "title", this.$t("异常登记"));
break;
case 'error':
this.$set(this.dialogCfg, 'title', this.$t('异常登记'))
break
case "downloadPreloadGoodsList": case "downloadPreloadGoodsList":
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('预装单') + `(${row.selfNo}).xlsx`, this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx" "xlsx"
); );
break; break;
...@@ -604,7 +478,7 @@ export default { ...@@ -604,7 +478,7 @@ export default {
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('已装单') + `(${row.selfNo}).xlsx`, this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx" "xlsx"
); );
break; break;
...@@ -612,7 +486,7 @@ export default { ...@@ -612,7 +486,7 @@ export default {
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('应收汇总表') + `(${row.selfNo}).xlsx`, this.$t("应收汇总表") + `(${row.selfNo}).xlsx`,
"xlsx" "xlsx"
); );
break; break;
...@@ -620,7 +494,7 @@ export default { ...@@ -620,7 +494,7 @@ export default {
downloadFile( downloadFile(
command, command,
{ shipmentId: row.id }, { shipmentId: row.id },
this.$t('提货单') + `(${row.selfNo}).zip`, this.$t("提货单") + `(${row.selfNo}).zip`,
"zip" "zip"
); );
break; break;
...@@ -629,15 +503,45 @@ export default { ...@@ -629,15 +503,45 @@ export default {
case "downloadLadingCopy": case "downloadLadingCopy":
downloadFileByUrl(command, { shipmentId: row.id }); downloadFileByUrl(command, { shipmentId: row.id });
break; break;
case "handle":
const { noticeType } = row;
if ([1, 2, 3, 4, 8].includes(noticeType)) {
this.$router.push("/boxSeaAir/shippingSeaAir/" + row.id);
}
if ([5, 6, 7].includes(noticeType)) {
this.$router.push("/boxSeaAir/query/" + row.id);
}
this.closeDialog();
break;
} }
if (["editLadingBill", "cost", "error"].includes(command)) { if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row; this.currRow = row;
this.currRow.bosType = 'seaAir' this.currRow.bosType = "seaAir";
this.$set(this.dialogCfg, "dialogType", command); this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px"); this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true); this.$set(this.dialogCfg, "open", true);
} }
},
/* 分页 */
pageChange(page) {
this.pageParam.page = page;
this.getList();
},
},
};
</script>
<style lang="scss" scoped>
.notice-dialog {
::v-deep .notice-title {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
} }
::v-deep .operate-button {
margin-top: 10px;
text-align: center;
} }
} }
</script> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment