Commit dd93306e authored by dragondean@qq.com's avatar dragondean@qq.com

空运出货列表通知弹出提醒

parent 8110b523
......@@ -194,7 +194,7 @@
</template>
<script>
import { deletebox, getbox, getboxPage, exportboxExcel } from '@/api/ecw/box'
import {deletebox, getbox, getboxPage, exportboxExcel, getNoticeList, dealCustomsSplitNotify} from '@/api/ecw/box'
import { getChannelList } from '@/api/ecw/channel'
import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue'
......@@ -342,13 +342,27 @@ export default {
getWarehouseList().then((res) => (this.warehouseList = res.data))
this.getList()
this.getChannelList()
this.queryNotice()
},
methods: {
formatDate,
getChannelList() {
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() {
this.loading = true
......@@ -455,85 +469,99 @@ export default {
.catch(() => {})
},
/** 查看按钮操作 */
handleCommand(row, command) {
switch (command) {
case "detail":
this.$router.push("/boxAir/query/" + row.id);
break;
case 'air':
this.$router.push('/boxAir/shippingAir/' + row.id)
break
async handleCommand(row, command) {
console.log(command, row);
switch (command) {
case "detail":
this.$router.push("/boxAir/query/" + row.id);
break;
case 'air':
this.$router.push('/boxAir/shippingAir/' + row.id)
break
case 'edit':
this.handleUpdate(row)
break
case 'edit':
this.handleUpdate(row)
break
case 'delete':
this.handleDelete(row);
break;
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = this.$t(
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
{
selfNo: row.selfNo,
cubNo: row.cubNo,
cabinetLabel: cabinetLabel,
}
);
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "fullscreen", true);
break;
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = this.$t(
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
{
selfNo: row.selfNo,
cubNo: row.cubNo,
cabinetLabel: cabinetLabel,
}
);
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "fullscreen", true);
break;
case 'batchMarkup':
this.$router.push('/boxAir/batch_markup?shipmentId=' + row.id)
break
case "downloadPreloadGoodsList":
downloadFile(
command,
{ shipmentId: row.id },
this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
case "downloadLoadGoodsList":
downloadFile(
command,
{ shipmentId: row.id },
this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
case "downloadReceivableList":
downloadFile(
command,
{ shipmentId: row.id },
this.$t("应收汇总表") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
case "zipDownload":
downloadFile(
command,
{ shipmentId: row.id },
this.$t("提货单") + `(${row.selfNo}).zip`,
"zip"
);
break;
case "downloadAgentListFiles":
case "downloadSoncapFiles":
case "downloadLadingCopy":
downloadFileByUrl(command, { shipmentId: row.id });
break;
downloadFile(
command,
{shipmentId: row.id},
this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
case "downloadLoadGoodsList":
downloadFile(
command,
{shipmentId: row.id},
this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
case "downloadReceivableList":
downloadFile(
command,
{shipmentId: row.id},
this.$t("应收汇总表") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
case "zipDownload":
downloadFile(
command,
{shipmentId: row.id},
this.$t("提货单") + `(${row.selfNo}).zip`,
"zip"
);
break;
case "downloadAgentListFiles":
case "downloadSoncapFiles":
case "downloadLadingCopy":
downloadFileByUrl(command, {shipmentId: row.id});
break;
case "handle":
const { noticeType } = row;
if ([1, 2, 3, 4, 8].includes(noticeType)) {
this.$router.push("/boxAir/shippingAir/" + row.id);
}
if ([5, 6, 7].includes(noticeType)) {
this.$router.push("/boxAir/query/" + row.id);
}
if([9].includes(noticeType)){
await dealCustomsSplitNotify(row.notifyId)
}
this.closeDialog();
break;
}
if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row;
this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
}
},
}
if (["editLadingBill", "cost", "error"].includes(command)) {
this.currRow = row;
this.$set(this.dialogCfg, "dialogType", command);
this.$set(this.dialogCfg, "width", "600px");
this.$set(this.dialogCfg, "open", true);
}
},
}
}
</script>
......
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