Commit 67041d9a authored by huhaiqing's avatar huhaiqing

增加出货提醒以及全局提示

parent ad60d709
......@@ -210,7 +210,23 @@ function jsonToFormData(params) {
return formData;
}
// 根据订单ID下载提货单
// 创建制作提货单
export function getNoticeList(data) {
return request({
url: "/shipment/box/noticeList",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/**
* 根据订单ID下载提货单
*
* @export
* @param {*} orderId
* @return {*}
*/
export function downloadByOrderId(orderId) {
return request({
url: "/shipment/make-bill-of-lading/downloadByOrderId",
......
......@@ -196,6 +196,7 @@ export const DICT_TYPE = {
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型
}
/**
......
......@@ -161,6 +161,33 @@
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
</template>
<template v-if="dialogCfg.dialogType === 'notice'">
<div class="notice-dialog">
<div class="notice-title">您有一个/多个待处理出货操作,请尽快前往处理:</div>
<el-table :data="noticeList" height="500px" border>
<el-table-column label="自编号" align="center" prop="selfNo" />
<el-table-column label="类型" 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="操作时间" align="center">
<template slot-scope="scope">
{{formatDate(scope.row.createTime)}}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'sea')">处理</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="operate-button">
<el-button type="primary" @click="closeDialog">关闭窗口</el-button>
</el-row>
</div>
</template>
</el-dialog>
</div>
</template>
......@@ -171,10 +198,13 @@ import {
getbox,
getboxPage,
exportboxExcel,
downloadAgentListFiles,
downloadSoncapFiles,
getNoticeList,
} from "@/api/ecw/box";
import { downloadFile, downloadFileByUrl } from "./shippingSea/utils";
import {
downloadFile,
downloadFileByUrl,
formatDate,
} from "./shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListTree } from "@/api/ecw/region";
......@@ -232,8 +262,10 @@ export default {
cabinetList: [],
warehouseList: [],
transportTypes: [],
//国家信息列表
// 国家信息列表
countryList: [],
// 通知列表
noticeList: [],
};
},
computed: {
......@@ -268,8 +300,22 @@ export default {
});
this.getList();
this.getCountryList();
this.queryNotice();
},
methods: {
formatDate,
queryNotice() {
getNoticeList({}).then((res) => {
const { data } = res;
this.noticeList = data ?? [];
if (data.length) {
this.$set(this.dialogCfg, "title", "出货操作提醒");
this.$set(this.dialogCfg, "dialogType", "notice");
this.$set(this.dialogCfg, "width", "650px");
this.$set(this.dialogCfg, "open", true);
}
});
},
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
......@@ -455,3 +501,17 @@ export default {
},
};
</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;
}
}
</style>
......@@ -214,7 +214,7 @@
<p>重货比:</p>
<p>{{item.weightRatio}}</p>
</div>
<div v-if="item.isExternalWarehouse === 0" style="color:blue;fontWeight:bold;">
<div v-if="item.isExternalWarehouse === 1" style="color:blue;fontWeight:bold;">
<p>外部仓</p>
</div>
<div class="table-button">
......@@ -370,7 +370,7 @@ export default {
operatorData: {},
// 校验
rules: {
noticeUser: [{ required: true, message: "必填", trigger: "change" }],
noticeUser: [{ required: true, message: "目的地操作员必填", trigger: "change" }],
},
// 出货信息
shipmentObj: this.$attrs.shipmentObj,
......@@ -462,8 +462,10 @@ export default {
},
/** 提交 */
onSubmit() {
this.$refs["operatorForm"].validate((valid) => {
if (valid) {
this.$refs["operatorForm"].validate((valid, errors) => {
if (!valid) {
return this.$showFormValidateErrors(errors);
}
approvalCreate({
...this.operatorData,
applyReason: "预装审核",
......@@ -476,7 +478,6 @@ export default {
this.$emit("closeDialog", "submit");
});
});
}
});
},
/* 统计列 */
......
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