Commit ff7ca453 authored by 我在何方's avatar 我在何方
parents dc5d9b63 a88149a6
...@@ -318,3 +318,12 @@ export function downloadLadingCopy(params) { ...@@ -318,3 +318,12 @@ export function downloadLadingCopy(params) {
params, params,
}); });
} }
// 更新异常订单状态
export function updateAbnormalOrder(data) {
return request({
url: "/shipment/box/updateAbnormalOrder",
method: "post",
data,
});
}
...@@ -285,3 +285,12 @@ export function cancelDelayApproval(data) { ...@@ -285,3 +285,12 @@ export function cancelDelayApproval(data) {
data: data, data: data,
}) })
} }
// 获取客户审批详情
export function getApproval(id) {
return request({
url: '/ecw/customer-approval/get',
method: 'get',
params: {id}
})
}
\ No newline at end of file
...@@ -203,7 +203,14 @@ export const DICT_TYPE = { ...@@ -203,7 +203,14 @@ export const DICT_TYPE = {
BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程 BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型 BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型 BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型
BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state' BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state',
BOX_INSPECTION_TIME_CUSTOMS: 'inspection_time_customs', // 校验时间-报关
BOX_INSPECTION_TIME_SHIPPING: 'inspection_time_shipping', // 校验时间-起运
BOX_INSPECTION_TIME_ARRIVAL: 'inspection_time_arrival', // 校验时间-到港
BOX_SHIPPING_UPDATE_TYPE: "shipping_update_type",// 更新类型
BOX_CUSTOMS_ERROR_TYPE: "customs_error_type",// 报关异常状态
BOX_SHIPPING_ERROR_TYPE: "shipping_error_type",// 起运异常状态
BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态
} }
/** /**
......
...@@ -331,6 +331,12 @@ export default { ...@@ -331,6 +331,12 @@ export default {
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath
}, },
// 客户延期
customer_delay:{
component: () => import('@/views/ecw/customer/components/Delay'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
} }
console.log(this.processInstance.processDefinition.formCustomViewPath.trim()) console.log(this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()] return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" width="80"> <el-table-column :label="$t('操作')" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'sea')">{{$t('处理')}}</el-button> <el-button type="text" @click="handleCommand(scope.row, 'handle')">{{$t('处理')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -372,7 +372,9 @@ export default { ...@@ -372,7 +372,9 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm(this.$t('是否确认删除出货编号为 {no} 的数据项?', {no: row.selfNo})) .confirm(
this.$t("是否确认删除出货编号为 {no} 的数据项?", { no: row.selfNo })
)
.then(function () { .then(function () {
return deletebox(row.id); return deletebox(row.id);
}) })
...@@ -432,11 +434,14 @@ export default { ...@@ -432,11 +434,14 @@ export default {
case "editLadingBill": case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId); const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = this.$t('查看提单 {selfNo} 柜号:{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;
...@@ -453,7 +458,7 @@ export default { ...@@ -453,7 +458,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;
...@@ -461,7 +466,7 @@ export default { ...@@ -461,7 +466,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;
...@@ -469,7 +474,7 @@ export default { ...@@ -469,7 +474,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;
...@@ -486,6 +491,16 @@ export default { ...@@ -486,6 +491,16 @@ 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("/boxSea/shippingSea/" + row.id);
}
if ([5, 6, 7].includes(noticeType)) {
this.$router.push("/boxSea/query/" + row.id);
}
this.closeDialog();
break;
} }
if (["editLadingBill", "cost", "error"].includes(command)) { if (["editLadingBill", "cost", "error"].includes(command)) {
......
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
<p class="box-weight"> <p class="box-weight">
{{getSectionInfo}} {{getSectionInfo}}
</p> </p>
<div style="margin-left:30px;">
<el-button type="primary" size="small" @click="()=>updateStatus('selected')">{{$t('更新所选订单状态')}}</el-button>
<el-button type="primary" size="small" @click="()=>updateStatus('all')">{{$t('更新全部订单状态')}}</el-button>
</div>
<div class="document-status"> <div class="document-status">
<p>{{$t('单证状态')}}</p> <p>{{$t('单证状态')}}</p>
<template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)"> <template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)">
...@@ -62,7 +66,8 @@ ...@@ -62,7 +66,8 @@
</template> </template>
</div> </div>
</div> </div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border> <el-table :data="sectionObj.sectionOrderList" style="width: 100%" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" :selectable="selectable"></el-table-column>>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" /> <el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column prop="orderNo" :label="$t('订单号')" align="center"> <el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<template v-slot="scope"> <template v-slot="scope">
...@@ -93,6 +98,11 @@ ...@@ -93,6 +98,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column> <el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.abnormalDealStatus === 1" @click="()=>updateStatus('single', scope.row)">{{$t('更新状态')}}</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('状态')" name="status"> <el-tab-pane :label="$t('状态')" name="status">
...@@ -137,7 +147,7 @@ ...@@ -137,7 +147,7 @@
<el-tab-pane :label="$t('异常')" name="error"> <el-tab-pane :label="$t('异常')" name="error">
<el-table :data="errorList" style="width: 100%" border> <el-table :data="errorList" style="width: 100%" border>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" /> <el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column prop="opStep" :label="$t('操作步骤')" align="center"> <el-table-column prop="opStep" :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PROCESS" :value="scope.row.opStep" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PROCESS" :value="scope.row.opStep" />
</template> </template>
...@@ -147,8 +157,9 @@ ...@@ -147,8 +157,9 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.opStep" /> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.opStep" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="abnDetail" :label="$t('异常详情')" align="center" width="800"></el-table-column> <el-table-column prop="abnDetail" :label="$t('异常描述')" align="center" width="700"></el-table-column>
<el-table-column prop="" :label="$t('异常时间')" align="center"> <el-table-column prop="delayDays" :label="$t('异常延迟天数')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('异常时间')" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.abnStartTime">{{formatDate(scope.row.abnStartTime)}} - </span> <span v-if="scope.row.abnStartTime">{{formatDate(scope.row.abnStartTime)}} - </span>
<span v-if="scope.row.abnEndTime">{{formatDate(scope.row.abnEndTime)}}</span> <span v-if="scope.row.abnEndTime">{{formatDate(scope.row.abnEndTime)}}</span>
...@@ -182,6 +193,9 @@ ...@@ -182,6 +193,9 @@
<template v-if="dialogConfig.type === 'error'"> <template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" /> <regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" />
</template> </template>
<template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" />
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -199,8 +213,6 @@ import { getChannelList } from "@/api/ecw/channel"; ...@@ -199,8 +213,6 @@ import { getChannelList } from "@/api/ecw/channel";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse";
import { import {
getSeaStatus,
getStatusName,
getTotlContent, getTotlContent,
formatDate, formatDate,
serviceMsg, serviceMsg,
...@@ -212,6 +224,7 @@ import { getSupplierPage } from "@/api/ecw/supplier"; ...@@ -212,6 +224,7 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import costForm from "./costForm.vue"; import costForm from "./costForm.vue";
import regError from "./regError.vue"; import regError from "./regError.vue";
import editForm from "./editForm.vue"; import editForm from "./editForm.vue";
import updateError from "./updateError.vue";
export default { export default {
name: "boxDetail", name: "boxDetail",
...@@ -222,6 +235,7 @@ export default { ...@@ -222,6 +235,7 @@ export default {
costForm, costForm,
regError, regError,
editForm, editForm,
updateError,
}, },
created() { created() {
this.transportTypes = this.getDictDatas( this.transportTypes = this.getDictDatas(
...@@ -276,18 +290,85 @@ export default { ...@@ -276,18 +290,85 @@ export default {
{ title: this.$t("预装单"), serviceName: "downloadPreloadGoodsList" }, { title: this.$t("预装单"), serviceName: "downloadPreloadGoodsList" },
{ title: this.$t("已装单"), serviceName: "downloadLoadGoodsList" }, { title: this.$t("已装单"), serviceName: "downloadLoadGoodsList" },
{ title: this.$t("应收汇总表"), serviceName: "downloadReceivableList" }, { title: this.$t("应收汇总表"), serviceName: "downloadReceivableList" },
{ title: this.$t("提货单"), serviceName: "zipDownload", fileFormat: "zip" }, {
title: this.$t("提货单"),
serviceName: "zipDownload",
fileFormat: "zip",
},
{ {
title: "agent list", title: "agent list",
serviceName: "downloadAgentListFiles", serviceName: "downloadAgentListFiles",
type: "url", type: "url",
}, },
{ title: "soncap", serviceName: "downloadSoncapFiles", type: "url" }, { title: "soncap", serviceName: "downloadSoncapFiles", type: "url" },
{ title: this.$t("提单Copy"), serviceName: "downloadLadingCopy", type: "url" }, {
title: this.$t("提单Copy"),
serviceName: "downloadLadingCopy",
type: "url",
},
], ],
// 选中行
selectedRows: [],
// 修改异常
errorInfo: {
orderList: [],
},
}; };
}, },
methods: { methods: {
selectable(row, index) {
if (row.abnormalDealStatus === 1) return false;
return true;
},
/* 全选 */
handleSelectionChange(selected) {
this.selectedRows = selected;
},
/* 更新状态 */
updateStatus(type, row) {
let orders = [];
if (type === "selected") {
if (!this.selectedRows.length) {
this.$message.error("请选择需要更新的订单");
return;
}
orders = this.selectedRows;
} else if (type === "all") {
// 筛选未处理的订单
orders = this.sectionObj.sectionOrderList.filter(
(item) => item.abnormalDealStatus === 0
);
if (!orders.length) {
this.$message.error("没有订单需要更新");
return;
}
} else if (type === "single") {
orders = [row];
}
this.getErrorType();
this.$set(this.errorInfo, "orderList", orders);
// 判断异常类型
this.handleCommand("updateError");
},
getErrorType() {
for (const [key, value] of Object.entries(this.shipmentObj)) {
// 报关异常 customsInfo
if (key === "customsInfo" && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "customs");
this.$set(this.dialogConfig, "title", this.$t("更新报关异常状态"));
}
// 起运异常 shippingInfo
if (key === "shippingInfo" && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "shipping");
this.$set(this.dialogConfig, "title", this.$t("更新起运异常状态"));
}
// 到港异常 arrivalInfo
if (key === "arrivalInfo" && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "arrival");
this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态"));
}
}
},
// 初始化字典数据 // 初始化字典数据
initData() { initData() {
// 查询渠道 // 查询渠道
...@@ -316,7 +397,7 @@ export default { ...@@ -316,7 +397,7 @@ export default {
this.sectionList = res.data.map((item, index) => { this.sectionList = res.data.map((item, index) => {
return { return {
...item, ...item,
title: this.$t('第{index}部分', {index: index + 1}), title: this.$t("第{index}部分", { index: index + 1 }),
}; };
}); });
}); });
...@@ -363,7 +444,7 @@ export default { ...@@ -363,7 +444,7 @@ export default {
// 供应商 // 供应商
getSupplier(id) { getSupplier(id) {
let arr = this.allSupplier.find((item) => item.id == id) ?? {}; let arr = this.allSupplier.find((item) => item.id == id) ?? {};
return this.$l(arr, 'company'); return this.$l(arr, "company");
}, },
editCostClick(row) { editCostClick(row) {
this.costDetail = row; this.costDetail = row;
...@@ -401,15 +482,19 @@ export default { ...@@ -401,15 +482,19 @@ export default {
this.$set(this.dialogConfig, "title", this.$t("费用登记")); this.$set(this.dialogConfig, "title", this.$t("费用登记"));
this.$set(this.dialogConfig, "type", "cost"); this.$set(this.dialogConfig, "type", "cost");
break; break;
case "error": case "error":
this.$set(this.dialogConfig, "visible", true); this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "title", this.$t("异常登记")); this.$set(this.dialogConfig, "title", this.$t("异常登记"));
this.$set(this.dialogConfig, "type", "error"); this.$set(this.dialogConfig, "type", "error");
break; break;
case "delete": case "delete":
this.$modal this.$modal
.confirm( .confirm(
$t('是否确认删除出货编号为 {no} 的数据项?', {no: this.shipmentObj.selfNo}) this.$t("是否确认删除出货编号为 {no} 的数据项?", {
no: this.shipmentObj.selfNo,
})
) )
.then(() => { .then(() => {
return deletebox(this.shipmentId); return deletebox(this.shipmentId);
...@@ -430,6 +515,11 @@ export default { ...@@ -430,6 +515,11 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
break; break;
case "updateError":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "type", "updateError");
break;
} }
}, },
// 关闭弹框 // 关闭弹框
...@@ -446,6 +536,9 @@ export default { ...@@ -446,6 +536,9 @@ export default {
this.errorList = res.data; this.errorList = res.data;
}); });
} }
if (type === "detail") {
this.getBoxGoodsDetail();
}
}, },
formatDate, formatDate,
downloadDetailFile(row) { downloadDetailFile(row) {
...@@ -483,7 +576,7 @@ export default { ...@@ -483,7 +576,7 @@ export default {
return (shippingChannelId) => { return (shippingChannelId) => {
for (const channelItem of this.channelList) { for (const channelItem of this.channelList) {
if (channelItem.channelId == shippingChannelId) { if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, 'name'); return this.$l(channelItem, "name");
} }
} }
}; };
...@@ -498,20 +591,14 @@ export default { ...@@ -498,20 +591,14 @@ export default {
} }
}; };
}, },
/* 状态 */
getBoxStatus() {
return (shippingVO) => {
return getStatusName(getSeaStatus(shippingVO));
};
},
/* 总计 */ /* 总计 */
getBoxSum() { getBoxSum() {
return (boxStatistics) => { return (boxStatistics) => {
if (boxStatistics) { if (boxStatistics) {
return this.$t("{num}箱 {volum}m³", { return this.$t("{num}箱 {volum}m³", {
num: boxStatistics.num ?? 0, num: boxStatistics.num ?? 0,
volume: boxStatistics.weight ?? 0 volume: boxStatistics.weight ?? 0,
}) });
/* `${boxStatistics.num ?? 0} ${boxStatistics.volume ?? 0}m3 ${ /* `${boxStatistics.num ?? 0} ${boxStatistics.volume ?? 0}m3 ${
boxStatistics.weight ?? 0 boxStatistics.weight ?? 0
}kg`; */ }kg`; */
...@@ -523,7 +610,7 @@ export default { ...@@ -523,7 +610,7 @@ export default {
getCityName() { getCityName() {
return (id) => { return (id) => {
let arr = this.warehouseList.filter((item) => item.id == id); let arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? this.$l(arr[0], 'title') : this.$t("无"); return arr.length > 0 ? this.$l(arr[0], "title") : this.$t("无");
}; };
}, },
// 部分信息 // 部分信息
......
...@@ -17,12 +17,17 @@ ...@@ -17,12 +17,17 @@
<el-form-item :label="$t('异常情况')"> <el-form-item :label="$t('异常情况')">
<el-input v-model="errorObj.abnDetail" type="textarea" rows="2" :placeholder="$t('请输入异常情况')"></el-input> <el-input v-model="errorObj.abnDetail" type="textarea" rows="2" :placeholder="$t('请输入异常情况')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('异常时间')" prop="arrivalTime" class="two-element"> <el-form-item :label="$t('异常时间')" prop="arrivalTime" class="three-element">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="errorObj.abnStartTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="errorObj.abnStartTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="errorObj.abnEndTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="errorObj.abnEndTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<div class="delayTime">延迟时间:{{delayDay}}</div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否更新订单状态')"> <el-form-item :label="$t('通知人')">
<userSelect v-model="errorObj.notifyUsers" :placeholder="$t('请选择通知人')" :allUsers="this.$attrs.allUsers" multiple />
</el-form-item>
<!-- <el-form-item :label="$t('是否更新订单状态')">
<el-radio-group v-model="errorObj.orderStatus"> <el-radio-group v-model="errorObj.orderStatus">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
...@@ -32,7 +37,7 @@ ...@@ -32,7 +37,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('英文内容')"> <el-form-item :label="$t('英文内容')">
<el-input v-model="errorObj.contentEn" type="textarea" rows="2" :placeholder="$t('请输入英文内容')"></el-input> <el-input v-model="errorObj.contentEn" type="textarea" rows="2" :placeholder="$t('请输入英文内容')"></el-input>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
...@@ -45,12 +50,16 @@ ...@@ -45,12 +50,16 @@
<script> <script>
import { abnormalCreate } from "@/api/ecw/boxSea"; import { abnormalCreate } from "@/api/ecw/boxSea";
import { serviceMsg } from "./shippingSea/utils"; import { serviceMsg } from "./shippingSea/utils";
import userSelect from "./shippingSea/nodePage/common/userSelect.vue";
import dayjs from "dayjs";
/** /**
* 异常登记 * 异常登记
*/ */
export default { export default {
name: "regError", name: "regError",
inheritAttrs: false, inheritAttrs: false,
components: { userSelect },
data() { data() {
return { return {
// 异常对象 // 异常对象
...@@ -66,23 +75,47 @@ export default { ...@@ -66,23 +75,47 @@ export default {
label: this.$t(""), label: this.$t(""),
}, },
], ],
flag: 'sea' flag: "sea",
delayDay: 0,
}; };
}, },
created() { created() {
const { currNode } = this.$attrs; const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode?.dataKey ?? undefined }; this.errorObj = { opStep: currNode?.dataKey ?? undefined };
if(this.$attrs.shipmentObj.bosType == 'seaAir'){ if (this.$attrs.shipmentObj.bosType == "seaAir") {
this.flag = 'seaAir'; this.flag = "seaAir";
} }
}, },
watch: {
// 异常开始时间
"errorObj.abnStartTime"(val) {
this.compareDate(val, this.errorObj.abnEndTime);
},
// 异常结束时间
"errorObj.abnEndTime"(val) {
this.compareDate(this.errorObj.abnStartTime, val);
},
},
methods: { methods: {
// 时间比较
compareDate(abnStartTime, abnEndTime) {
this.delayDay = 0;
let date1 = null,
date2 = null;
if (abnStartTime) date1 = dayjs(abnStartTime);
if (abnEndTime) date2 = dayjs(abnEndTime);
if (date1 && date2) {
this.delayDay = date2.diff(date1, "day");
}
},
/** 提交 */ /** 提交 */
onSubmit() { onSubmit() {
this.$refs["errorForm"].validate((valid) => { this.$refs["errorForm"].validate((valid) => {
if (valid) { if (valid) {
abnormalCreate({ abnormalCreate({
...this.errorObj, ...this.errorObj,
delayDays: this.delayDay,
notifyUsers: this.errorObj.notifyUsers?.join(",") ?? "",
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
...@@ -108,18 +141,14 @@ export default { ...@@ -108,18 +141,14 @@ export default {
.operate-button { .operate-button {
text-align: center; text-align: center;
} }
.two-element-formItem { .three-element {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
> :last-child { > .el-date-editor {
margin-left: 10px; margin-right: 10px;
}
> .delayTime {
width: 300px;
} }
} }
} }
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
import { approvalDetail } from "@/api/ecw/box"; import { approvalDetail } from "@/api/ecw/box";
import { import {
getSeaStatus, getSeaStatus,
getStatusName,
getTotlContent, getTotlContent,
} from "./shippingSea/utils"; } from "./shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
...@@ -196,12 +195,6 @@ export default { ...@@ -196,12 +195,6 @@ export default {
} }
}; };
}, },
/* 货柜状态 */
getCabinetStatus() {
return (shippingVO) => {
return getStatusName(getSeaStatus(shippingVO));
};
},
/* 体积重量 */ /* 体积重量 */
getVolumeWeight() { getVolumeWeight() {
return (total) => { return (total) => {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close> <el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" /> <regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -50,12 +50,17 @@ export default { ...@@ -50,12 +50,17 @@ export default {
arrivalObj: {}, arrivalObj: {},
// 校验 // 校验
rules: { rules: {
apRealTime: [{ required: true, message: this.$t("必填"), trigger: "change" }], apRealTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
// 提示消息 // 提示消息
showMsg: false, showMsg: false,
inspectionTimeArrival: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_ARRIVAL
)[0].value,
}; };
}, },
created() { created() {
...@@ -76,11 +81,19 @@ export default { ...@@ -76,11 +81,19 @@ export default {
}, },
}, },
methods: { methods: {
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 获取预计到港时间 // 获取预计到港时间
getExpectedTime() { getExpectedTime() {
const { shippingInfo } = this.$attrs.shipmentObj; const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) { if (shippingInfo) {
return dayjs(shippingInfo.dtEstArrivalTime).format("YYYY-MM-DD HH:mm:ss"); return dayjs(shippingInfo.dtEstArrivalTime).format(
"YYYY-MM-DD HH:mm:ss"
);
} }
return null; return null;
}, },
...@@ -93,7 +106,7 @@ export default { ...@@ -93,7 +106,7 @@ export default {
if (apConfirmTime) date2 = dayjs(apConfirmTime); if (apConfirmTime) date2 = dayjs(apConfirmTime);
if (date1 && date2) { if (date1 && date2) {
const days = date2.diff(date1, "day"); const days = date2.diff(date1, "day");
if (days > 5) { if (days > this.inspectionTimeArrival) {
this.showMsg = true; this.showMsg = true;
} }
} }
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
<el-form-item :label="$t('截关时间')"> <el-form-item :label="$t('截关时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('报关时间')" prop="dcDecTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcDecTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('状态')" prop="dcCustomsStatus"> <el-form-item :label="$t('状态')" prop="dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview || isCheckDeal('status')"> <el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview || isCheckDeal('status')">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
...@@ -88,6 +91,7 @@ ...@@ -88,6 +91,7 @@
<el-button type="success" v-if="!inReview" @click="onSubmit(2)" :disabled="isCheckDeal('submit')">{{$t('提交')}}</el-button> <el-button type="success" v-if="!inReview" @click="onSubmit(2)" :disabled="isCheckDeal('submit')">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button> <el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">{{$t('额外费用')}}</el-button> <el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">{{$t('额外费用')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
...@@ -141,6 +145,11 @@ ...@@ -141,6 +145,11 @@
</el-row> </el-row>
</el-row> </el-row>
</el-dialog> </el-dialog>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="regDialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="regCloseDialog" v-bind="$attrs" :shipmentObj="shipmentObj" />
</el-dialog>
</div> </div>
</template> </template>
...@@ -165,6 +174,8 @@ import { ...@@ -165,6 +174,8 @@ import {
} from "../utils"; } from "../utils";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
import Decimal from "decimal.js"; import Decimal from "decimal.js";
import regError from "../../regError";
import dayjs from "dayjs";
/** /**
* 报关 * 报关
...@@ -172,7 +183,7 @@ import Decimal from "decimal.js"; ...@@ -172,7 +183,7 @@ import Decimal from "decimal.js";
export default { export default {
name: "cusDeclaration", name: "cusDeclaration",
inheritAttrs: false, inheritAttrs: false,
components: { supplierSelect, ImageUpload }, components: { supplierSelect, ImageUpload, regError },
props: { props: {
shipmentObj: Object, shipmentObj: Object,
}, },
...@@ -194,6 +205,9 @@ export default { ...@@ -194,6 +205,9 @@ export default {
dcCustomsStatus: [ dcCustomsStatus: [
{ required: true, message: this.$t("必填"), trigger: "change" }, { required: true, message: this.$t("必填"), trigger: "change" },
], ],
dcDecTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
}, },
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
...@@ -208,6 +222,12 @@ export default { ...@@ -208,6 +222,12 @@ export default {
costList: [], costList: [],
// 是否审核中 // 是否审核中
inReview: false, inReview: false,
// 异常登记
regDialogVisible: false,
isShowError: false,
inspectionTimecustoms: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_CUSTOMS
)[0].value,
}; };
}, },
created() { created() {
...@@ -228,15 +248,39 @@ export default { ...@@ -228,15 +248,39 @@ export default {
"dcCutOffTime", "dcCutOffTime",
"dcCheckTime", "dcCheckTime",
"dcPassTime", "dcPassTime",
"dcDecTime",
]); ]);
oldData = formatNumberString(oldData, [ oldData = formatNumberString(oldData, [
"dcCustomsType", "dcCustomsType",
"dcCustomsStatus", "dcCustomsStatus",
"dcCheckStatus", "dcCheckStatus",
]); ]);
this.cusDeclarationObj = oldData; this.cusDeclarationObj = oldData;
}, },
methods: { methods: {
regCloseDialog(type) {
this.regDialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 时间比较
compareDate(dcDecTime, dcPassTime) {
this.isShowError = false;
let date1 = null,
date2 = null;
if (dcDecTime) date1 = dayjs(dcDecTime);
if (dcPassTime) date2 = dayjs(dcPassTime);
if (date1 && date2) {
const delayDay = date2.diff(date1, "day");
if (delayDay >= this.inspectionTimecustoms) this.isShowError = true;
}
},
// 异常登记
exceptionReg() {
this.regDialogVisible = true;
},
/* 跳转订单详情 */ /* 跳转订单详情 */
jumpOrderDetail(row) { jumpOrderDetail(row) {
this.$router.push({ this.$router.push({
...@@ -520,6 +564,20 @@ export default { ...@@ -520,6 +564,20 @@ export default {
} }
}, },
}, },
// 报关时间
"cusDeclarationObj.dcDecTime"(val) {
this.compareDate(val, this.cusDeclarationObj.dcPassTime);
},
// 放行时间
"cusDeclarationObj.dcPassTime"(val) {
this.compareDate(this.cusDeclarationObj.dcDecTime, val);
},
// 查验状态
"cusDeclarationObj.dcCheckStatus"(val) {
if (val !== this.cusDeclarationObj.dcCheckStatus) {
this.$set(this.cusDeclarationObj, "dcPassTime", "");
}
},
}, },
computed: { computed: {
/* 获取报关审核退场状态文字 */ /* 获取报关审核退场状态文字 */
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button> <el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button> <el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button> <el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{$t('异常登记')}}</el-button> <el-button type="primary" @click="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close> <el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" /> <regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -56,6 +56,11 @@ export default { ...@@ -56,6 +56,11 @@ export default {
dialogVisible: false, dialogVisible: false,
// 提示消息 // 提示消息
showMsg: false, showMsg: false,
// 异常登记
isShowError: false,
inspectionTimeShipping: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_SHIPPING
)[0].value,
}; };
}, },
created() { created() {
...@@ -69,9 +74,16 @@ export default { ...@@ -69,9 +74,16 @@ export default {
// 实际开船时间 // 实际开船时间
"departureObj.dtRealShipTime"(val) { "departureObj.dtRealShipTime"(val) {
this.compareDate(val, this.getSailingTime()); this.compareDate(val, this.getSailingTime());
this.compareDate1(val, this.getSailingTime());
}, },
}, },
methods: { methods: {
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 时间比较 // 时间比较
compareDate(dtRealShipTime, sailTime) { compareDate(dtRealShipTime, sailTime) {
this.showMsg = false; this.showMsg = false;
...@@ -83,6 +95,17 @@ export default { ...@@ -83,6 +95,17 @@ export default {
this.showMsg = true; this.showMsg = true;
} }
}, },
compareDate1(dtRealShipTime, sailTime) {
this.isShowError = false;
let date1 = null,
date2 = null;
if (dtRealShipTime) date1 = dayjs(dtRealShipTime);
if (sailTime) date2 = dayjs(sailTime);
if (date1 && date2) {
const delayDay = date1.diff(date2, "day");
if (delayDay >= this.inspectionTimeShipping) this.isShowError = true;
}
},
// 异常登记 // 异常登记
exceptionReg() { exceptionReg() {
this.dialogVisible = true; this.dialogVisible = true;
......
...@@ -236,6 +236,10 @@ export default { ...@@ -236,6 +236,10 @@ export default {
if (end.includes(val[keyName])) { if (end.includes(val[keyName])) {
node.currStatus = "end"; node.currStatus = "end";
// 判断是否存在异常未处理
if (val[voName].hasAbnormal) {
continue;
}
// 报关 // 报关
if (type === "cusDeclaration") { if (type === "cusDeclaration") {
const { dcCustomsStatus, dcCheckStatus } = val; const { dcCustomsStatus, dcCheckStatus } = val;
......
...@@ -45,7 +45,7 @@ import { getDockPage } from "@/api/ecw/dock"; ...@@ -45,7 +45,7 @@ import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
// 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用 // 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用
import { getSeaStatus, getStatusName, seaBaseData } from "./utils"; import { seaBaseData } from "./utils";
/** /**
* 海运操作主页面 * 海运操作主页面
*/ */
...@@ -115,12 +115,6 @@ export default { ...@@ -115,12 +115,6 @@ export default {
}); });
}, },
}, },
watch: {
/* 监听发货对象 */
shipmentObj(val) {
// this.statusLabel = getStatusName(getSeaStatus(val));
},
},
}; };
</script> </script>
......
...@@ -4,79 +4,6 @@ import FileSaver from "file-saver"; ...@@ -4,79 +4,6 @@ import FileSaver from "file-saver";
import Decimal from "decimal.js"; import Decimal from "decimal.js";
import i18n from "@/i18n"; import i18n from "@/i18n";
/**
* 节点状态值
*
* @return {*}
*/
function getStatusName(statu) {
const statusName = new Map();
statusName.set(11, i18n.$t("未订舱"));
statusName.set(12, i18n.$t("已订舱"));
statusName.set(21, i18n.$t("未预装"));
statusName.set(22, i18n.$t("预装中"));
statusName.set(23, i18n.$t("预装审核中"));
statusName.set(24, i18n.$t("预装审核失败"));
statusName.set(25, i18n.$t("预装审核成功"));
statusName.set(2111, i18n.$t("未理货"));
statusName.set(2112, i18n.$t("已理货"));
statusName.set(31, i18n.$t("未派车"));
statusName.set(32, i18n.$t("已派车"));
statusName.set(41, i18n.$t("未装柜"));
statusName.set(42, i18n.$t("装柜中"));
statusName.set(43, i18n.$t("已装柜、待封柜"));
statusName.set(44, i18n.$t("封柜审核中"));
statusName.set(45, i18n.$t("封柜审核失败"));
statusName.set(46, i18n.$t("封柜审核成功"));
statusName.set(47, i18n.$t("已封柜,待出仓"));
statusName.set(51, i18n.$t("未报关"));
statusName.set(52, i18n.$t("报关中"));
statusName.set(53, i18n.$t("已报关"));
statusName.set(61, i18n.$t("未配船"));
statusName.set(62, i18n.$t("已配船"));
statusName.set(71, i18n.$t("未提单补料"));
statusName.set(72, i18n.$t("已提单补料"));
statusName.set(81, i18n.$t("未驳船"));
statusName.set(82, i18n.$t("已驳船"));
statusName.set(91, i18n.$t("未起运"));
statusName.set(92, i18n.$t("已起运"));
statusName.set(101, i18n.$t("未上传"));
statusName.set(102, i18n.$t("已上传"));
statusName.set(111, i18n.$t("未清关文件"));
statusName.set(112, i18n.$t("已清关文件"));
statusName.set(121, i18n.$t("未到港"));
statusName.set(122, i18n.$t("已到港"));
statusName.set(131, i18n.$t("未清关"));
statusName.set(132, i18n.$t("已清关"));
statusName.set(181, i18n.$t("未卸柜"));
statusName.set(182, i18n.$t("卸柜中"));
statusName.set(183, i18n.$t("卸柜审核中"));
statusName.set(184, i18n.$t("卸柜审核失败"));
statusName.set(185, i18n.$t("卸柜审核成功"));
statusName.set(186, i18n.$t("已卸柜"));
statusName.set(191, i18n.$t("未结算"));
statusName.set(192, i18n.$t("结算中"));
statusName.set(193, i18n.$t("已结算"));
return statusName.get(statu);
}
/** /**
* 海运流程 * 海运流程
* *
...@@ -1537,7 +1464,6 @@ function downloadFileByUrl(funName, params) { ...@@ -1537,7 +1464,6 @@ function downloadFileByUrl(funName, params) {
} }
export { export {
getStatusName,
getColmnMapping, getColmnMapping,
getSeaStatus, getSeaStatus,
seaBaseData, seaBaseData,
......
...@@ -44,7 +44,7 @@ import { getSupplierPage } from "@/api/ecw/supplier"; ...@@ -44,7 +44,7 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import { getChannelList } from '@/api/ecw/channel'; import { getChannelList } from '@/api/ecw/channel';
import { getDockPage } from "@/api/ecw/dock"; import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
import { getSeaStatus, getStatusName, seaAirBaseData } from "../shippingSea/utils"; import { seaAirBaseData } from "../shippingSea/utils";
import {arrryToKeyedObjectBy} from '@/utils/index' import {arrryToKeyedObjectBy} from '@/utils/index'
/** /**
...@@ -130,12 +130,6 @@ export default { ...@@ -130,12 +130,6 @@ export default {
}); });
}, },
}, },
watch: {
/* 监听发货对象 */
shipmentObj(val) {
this.statusLabel = getStatusName(getSeaStatus(val));
},
},
}; };
</script> </script>
......
<template>
<div class="shipping-update-error">
<!-- 更新报关异常状态 -->
<div class="message-title">{{headerTitle}}</div>
<el-form ref="updateErrorForm" :rules="rules" :model="updateObj" label-width="140px">
<el-form-item :label="$t('更新类型')" prop="type">
<el-radio-group v-model="updateObj.type">
<el-radio v-for="item in this.getDictDatas(this.DICT_TYPE.BOX_SHIPPING_UPDATE_TYPE)" :key="item.value" :label="item.value">{{$l(item, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('更新订单状态')">
<el-radio-group v-model="updateObj.updateOrder">
<el-radio v-for="item in types" :key="item.value" :label="item.value">{{$l(item, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="customize">
<el-input v-model="updateObj.customize" :placeholder="$t('请输入')" :disabled="!isEnter"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { updateAbnormalOrder } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils";
export default {
name: "updateError",
inheritAttrs: false,
components: {},
props: {
shipmentObj: Object,
errorInfo: Object,
},
data() {
return {
updateObj: {},
rules: {
type: [{ required: true, message: this.$t("必填"), trigger: "change" }],
},
types: [],
isEnter: false,
headerTitle: "",
};
},
methods: {
onSubmit() {
this.$refs["updateErrorForm"].validate((valid) => {
if (valid) {
let text = "";
// 自定义
if (this.updateObj.updateOrder === "0") {
text = this.updateObj.customize;
} else {
const dict = this.types.find(
(item) => item.value === this.updateObj.updateOrder
);
text = this.$l(dict, "label");
}
const { orderList } = this.errorInfo;
updateAbnormalOrder({
shipmentId: this.shipmentObj.id,
orderIdList: orderList.map((item) => item.orderId) ?? [],
type: this.updateObj.type,
text,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "detail");
});
});
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
watch: {
errorInfo: {
handler: function (val) {
const { errorType, orderList } = val;
this.headerTitle = this.$t("确定给{selfNo}下的{orderNos}更新状态吗?", {
selfNo: this.shipmentObj.selfNo,
orderNos: orderList.map((item) => item.orderNo).join(",") ?? "",
});
switch (errorType) {
// 报关异常
case "customs":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_CUSTOMS_ERROR_TYPE
);
break;
case "shipping":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_SHIPPING_ERROR_TYPE
);
break;
case "arrival":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_ARRIVAL_ERROR_TYPE
);
break;
}
},
immediate: true,
},
"updateObj.updateOrder"(val) {
if (val === "0") {
this.isEnter = true;
this.rules.customize = [
{ required: true, message: this.$t("必填"), trigger: "change" },
];
} else {
this.isEnter = false;
this.rules.customize = [];
this.$refs["updateErrorForm"].clearValidate("customize");
}
},
},
};
</script>
<style lang="scss" scoped>
.shipping-update-error {
.message-title {
text-align: center;
font-size: 20px;
margin: 0 20px 10px;
}
}
</style>
<template>
<div>
<el-descriptions :column="4">
<el-descriptions-item label="客户编号">{{detail.customerId}}</el-descriptions-item>
<el-descriptions-item label="客户名称">{{detail.customerName}}</el-descriptions-item>
<el-descriptions-item label="跟进客服">{{detail.followUpSalesmanName}}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{detail.createTime|parseTime}}</el-descriptions-item>
<el-descriptions-item label="申请凭证" :span="4">
<el-image v-for="(item, index) in pictures" :key="index" :src="item" style="width:100px; height:100px" :preview-src-list="pictures"></el-image>
</el-descriptions-item>
<el-descriptions-item label="申请原因" :span="4">{{detail.reason}}</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
import { getApproval } from '@/api/ecw/customer';
import {parseTime} from '@/utils/ruoyi'
export default {
filters: {parseTime},
props:{
id: [String, Number]
},
data(){
return {
info: null
}
},
computed:{
detail(){
if(!this.info) return null
return JSON.parse(this.info.details)
},
pictures(){
if(!this.detail) return []
return this.detail.voucher.split(',').filter(item => !!item)
}
},
created(){
getApproval(this.id).then(res => {
this.info = res.data
})
}
}
</script>
\ No newline at end of file
...@@ -35,6 +35,11 @@ ...@@ -35,6 +35,11 @@
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector> <dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item :label="$t('货运类型')" prop="transportType">
<dict-selector :type="DICT_TYPE.TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('常用提货网点')" prop="pickupPoint"> <el-form-item :label="$t('常用提货网点')" prop="pickupPoint">
<el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')"> <el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')">
...@@ -661,7 +666,7 @@ export default { ...@@ -661,7 +666,7 @@ export default {
return return
} }
const form = {...this.form, type: this.form.type?.join(','), taxRate: Number(this.form.taxRate)} const form = {...this.form, type: this.form.type?.join(','), transportType: this.form.transportType?.join(','), taxRate: Number(this.form.taxRate)}
// 检查路线是否启用了但是没选择目的仓 // 检查路线是否启用了但是没选择目的仓
let errors = 0 let errors = 0
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<el-form-item label="标题英文" prop="titleEn"> <el-form-item label="标题英文" prop="titleEn">
<el-input v-model="queryParams.titleEn" placeholder="请输入标题英文" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.titleEn" placeholder="请输入标题英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="0-启用,1-停用" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择0-启用,1-停用" clearable size="small"> <el-select v-model="queryParams.status" placeholder="请选择" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<el-table-column label="标题英文" align="center" prop="titleEn" /> <el-table-column label="标题英文" align="center" prop="titleEn" />
<el-table-column label="内容中文" align="center" prop="contentZh" /> <el-table-column label="内容中文" align="center" prop="contentZh" />
<el-table-column label="内容英语" align="center" prop="contentEn" /> <el-table-column label="内容英语" align="center" prop="contentEn" />
<el-table-column label="0-启用,1-停用" align="center" prop="status" /> <el-table-column label="状态" align="center" prop="status" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
......
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