Commit c5a4f36f authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents f1657038 55aee6cb
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
{{$l(row, 'destTitle')}} {{$l(row, 'destTitle')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('渠道')" prop="startTitleZh" v-if="type == 'air'"> <el-table-column :label="$t('渠道')" prop="startTitleZh" v-if="[3,4].indexOf(+item.value) > -1">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{$l(row.channel, 'name')}} {{$l(row.channel, 'name')}}
</template> </template>
...@@ -328,6 +328,8 @@ export default { ...@@ -328,6 +328,8 @@ export default {
}, },
// 运输方式筛选 // 运输方式筛选
transportFilter(item){ transportFilter(item){
// 未指定类型则全部可用
if(!this.type) return true
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1 return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
}, },
} }
......
...@@ -216,6 +216,7 @@ export const DICT_TYPE = { ...@@ -216,6 +216,7 @@ export const DICT_TYPE = {
BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位 BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常 BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程 BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
BOX_AIR_SHIPMENT_PROCESS: 'air_shipment_process', // 空运出货
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', // 出货通知类型
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
<el-form-item :label="$t('柜号')" prop="cubNo"> <el-form-item :label="$t('柜号')" prop="cubNo">
<el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')"> <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')">
...@@ -78,12 +83,12 @@ ...@@ -78,12 +83,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('方数(预装/已装)')" align="center" prop=""> <el-table-column :label="$t('方数(分拣/已装)')" align="center" prop="">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.boxStatistics.volume}}/{{row.boxStatistics.loadVolume}} {{row.boxStatistics.volume}}/{{row.boxStatistics.loadVolume}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('重量(预装/已装)')" align="center" prop="weight"> <el-table-column :label="$t('重量(分拣/已装)')" align="center" prop="weight">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.boxStatistics.weight}}/{{row.boxStatistics.loadWeight}} {{row.boxStatistics.weight}}/{{row.boxStatistics.loadWeight}}
</template> </template>
...@@ -113,12 +118,12 @@ ...@@ -113,12 +118,12 @@
<el-dropdown trigger="click" @command="(command) => handleCommand(scope.row, command)" style="marginRight:10px;"> <el-dropdown trigger="click" @command="(command) => handleCommand(scope.row, command)" style="marginRight:10px;">
<el-button type="primary"> {{ $t('操作') }}<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-button type="primary"> {{ $t('操作') }}<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit" :disabled="scope.row.prStatus>21">{{$t('编辑')}}</el-dropdown-item> <el-dropdown-item command="edit" v-has-permi="['shipment:air:edit']" :disabled="scope.row.prStatus>21">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item command="air">{{$t('操作')}}-{{$t('空运')}}</el-dropdown-item> <el-dropdown-item command="air" v-has-permi="['shipment:air:action']">{{$t('操作')}}-{{$t('空运')}}</el-dropdown-item>
<el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item> <el-dropdown-item command="error" v-has-permi="['shipment:air:exception']">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item> <el-dropdown-item command="cost" v-has-permi="['shipment:air:fee']">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="batchMarkup">{{$t('批量加价')}}</el-dropdown-item> <el-dropdown-item command="batchMarkup" v-has-permi="['shipment:air:batchMarkup']">{{$t('批量加价')}}</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.prStatus<25" command="editLadingBill">{{$t('编辑提货单')}}</el-dropdown-item> <el-dropdown-item :disabled="scope.row.prStatus<25" command="editLadingBill" v-has-permi="['shipment:air:editLadingBill']">{{$t('编辑提货单')}}</el-dropdown-item>
<!-- <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>--> <!-- <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>-->
</el-dropdown-menu> </el-dropdown-menu>
...@@ -128,13 +133,13 @@ ...@@ -128,13 +133,13 @@
{{$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="downloadPreloadGoodsList" v-hasPermi="['shipment:box:download:downloadPreloadGoodsList']">{{$t('预装单')}}</el-dropdown-item> <el-dropdown-item command="downloadPreloadGoodsList" v-hasPermi="['shipment:air:download:downloadPreloadGoodsList']">{{$t('预装单')}}</el-dropdown-item>
<!--el-dropdown-item command="downloadLoadGoodsList" v-hasPermi="['shipment:box:download:downloadLoadGoodsList']">{{$t('已装单')}}</el-dropdown-item--> <!--el-dropdown-item command="downloadLoadGoodsList" v-hasPermi="['shipment:air:download:downloadLoadGoodsList']">{{$t('已装单')}}</el-dropdown-item-->
<el-dropdown-item command="downloadReceivableList" v-hasPermi="['shipment:box:download:downloadReceivableList']">{{$t('应收汇总表')}}</el-dropdown-item> <el-dropdown-item command="downloadReceivableList" v-hasPermi="['shipment:air:download:downloadReceivableList']">{{$t('应收汇总表')}}</el-dropdown-item>
<el-dropdown-item command="downloadAgentListFiles" v-hasPermi="['shipment:box:download:downloadAgentListFiles']">agent list</el-dropdown-item> <el-dropdown-item command="downloadAgentListFiles" v-hasPermi="['shipment:air:download:downloadAgentListFiles']">agent list</el-dropdown-item>
<el-dropdown-item command="downloadSoncapFiles" v-hasPermi="['shipment:box:download:downloadSoncapFiles']">soncap</el-dropdown-item> <el-dropdown-item command="downloadSoncapFiles" v-hasPermi="['shipment:air:download:downloadSoncapFiles']">soncap</el-dropdown-item>
<el-dropdown-item command="zipDownload" v-hasPermi="['shipment:box:download:zipDownload']">{{$t('提货单')}}</el-dropdown-item> <el-dropdown-item command="zipDownload" v-hasPermi="['shipment:air:download:zipDownload']">{{$t('提货单')}}</el-dropdown-item>
<el-dropdown-item command="downloadLadingCopy" v-hasPermi="['shipment:box:download:downloadLadingCopy']">{{$t('提单Copy')}}</el-dropdown-item> <el-dropdown-item command="downloadLadingCopy" v-hasPermi="['shipment:air:download:downloadLadingCopy']">{{$t('提单Copy')}}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
...@@ -152,7 +157,7 @@ ...@@ -152,7 +157,7 @@
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" /> <costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
<template v-if="dialogCfg.dialogType === 'error'"> <template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" /> <regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" flag="air" />
</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" type="air" /> <ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" type="air" />
...@@ -170,7 +175,8 @@ ...@@ -170,7 +175,8 @@
<el-table-column :label="$t('自编号')" align="center" prop="selfNo" /> <el-table-column :label="$t('自编号')" align="center" prop="selfNo" />
<el-table-column :label="$t('类型')" align="center"> <el-table-column :label="$t('类型')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" /> {{scope.row.noticeText}}
<!--<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('预计时间')" align="center"> <el-table-column :label="$t('预计时间')" align="center">
...@@ -215,6 +221,7 @@ import { ...@@ -215,6 +221,7 @@ import {
} from "./shippingAir/utils"; } from "./shippingAir/utils";
import {getCabinetPage} from "@/api/ecw/cabinet"; import {getCabinetPage} from "@/api/ecw/cabinet";
import LadingBill from "@/views/ecw/box/ladingBill/index.vue"; import LadingBill from "@/views/ecw/box/ladingBill/index.vue";
import {listUser} from "@/api/system/user";
export default { export default {
name: 'indexAir', name: 'indexAir',
...@@ -306,6 +313,7 @@ export default { ...@@ -306,6 +313,7 @@ export default {
this.$t("部分完成"), this.$t("部分完成"),
this.$t("已完成"), this.$t("已完成"),
], ],
allUsers: []
} }
}, },
computed: { computed: {
...@@ -351,6 +359,12 @@ export default { ...@@ -351,6 +359,12 @@ export default {
this.getList() this.getList()
this.getChannelList() this.getChannelList()
this.queryNotice() this.queryNotice()
// 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allUsers = data.list ?? [];
});
}, },
methods: { methods: {
formatDate, formatDate,
...@@ -552,13 +566,14 @@ export default { ...@@ -552,13 +566,14 @@ export default {
break; break;
case "handle": case "handle":
const { noticeType } = row; const { noticeType } = row;
if ([1, 2, 3, 4, 8].includes(noticeType)) { if ([1, 2, 3, 4, 8, 14].includes(noticeType)) {
this.$router.push("/boxAir/shippingAir/" + row.id); this.$router.push("/boxAir/shippingAir/" + row.id);
} }
if ([5, 6, 7].includes(noticeType)) { // 10 是起飞异常,参考海运的起运异常6处理
if ([5, 6, 7, 10].includes(noticeType)) {
this.$router.push("/boxAir/query/" + row.id); this.$router.push("/boxAir/query/" + row.id);
} }
if([9].includes(noticeType)){ if([9, 12, 13].includes(noticeType)){
await dealCustomsSplitNotify(row.notifyId) await dealCustomsSplitNotify(row.notifyId)
} }
this.closeDialog(); this.closeDialog();
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<div class="shippingSea-dialog"> <div class="shippingSea-dialog">
<el-form ref="errorForm" :model="errorObj" label-width="140px"> <el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item :label="$t('操作步骤')"> <el-form-item :label="$t('操作步骤')">
<el-select v-if="flag=='sea'" v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')"> <el-select v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> <el-option v-for="type in this.getDictDatas(DICT_TYPE[this.process])" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select> </el-select>
<el-select v-if="flag=='seaAir'" v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')"> <!--<el-select v-if="flag=='seaAir'" v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> <el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select> </el-select>-->
</el-form-item> </el-form-item>
<el-form-item :label="$t('票异常')"> <el-form-item :label="$t('票异常')">
<el-select v-model="errorObj.billAbnId" :placeholder="$t('请选择票异常')"> <el-select v-model="errorObj.billAbnId" :placeholder="$t('请选择票异常')">
...@@ -75,10 +75,21 @@ export default { ...@@ -75,10 +75,21 @@ export default {
label: this.$t(""), label: this.$t(""),
}, },
], ],
flag: "sea",
delayDay: 0, delayDay: 0,
}; };
}, },
computed:{
flag(){
return this.$attrs.flag || 'sea'
},
process(){
return {
'air': 'BOX_AIR_SHIPMENT_PROCESS',
'sea': 'BOX_SHIPPING_PROCESS',
'seaAir': 'BOX_SEA_AIR'
}[this.flag]
}
},
created() { created() {
const { currNode } = this.$attrs; const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode?.dataKey ?? undefined }; this.errorObj = { opStep: currNode?.dataKey ?? undefined };
......
...@@ -102,6 +102,11 @@ export default { ...@@ -102,6 +102,11 @@ export default {
"airArrivalInfo.actTime"(val) { "airArrivalInfo.actTime"(val) {
this.compareDate(this.airArrivalInfo.estTime, val); this.compareDate(this.airArrivalInfo.estTime, val);
}, },
// 确认到港时间
"arrivalObj.apConfirmTime"(val) {
this.compareDate(this.getExpectedTime(), val);
},
}, },
methods: { methods: {
regCloseDialog(type) { regCloseDialog(type) {
...@@ -110,7 +115,7 @@ export default { ...@@ -110,7 +115,7 @@ export default {
this.$emit("getBoxInfo"); this.$emit("getBoxInfo");
} }
}, },
// 获取预计到港时间 // 获取实际二程起飞时间
getHeadTravelTime() { getHeadTravelTime() {
const { shippingInfo } = this.$attrs.shipmentObj; const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) { if (shippingInfo) {
...@@ -120,6 +125,16 @@ export default { ...@@ -120,6 +125,16 @@ export default {
} }
return null; return null;
}, },
// 获取预计到港时间
getExpectedTime() {
const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) {
return dayjs(shippingInfo.dtEstArrivalTime).format(
"YYYY-MM-DD HH:mm:ss"
);
}
return null;
},
// 时间比较 // 时间比较
compareDate(expectedTime, apConfirmTime) { compareDate(expectedTime, apConfirmTime) {
this.showMsg = false; this.showMsg = false;
......
<template> <template>
<div> <div>
<el-select <el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
filterable <el-option v-for="supplier in getSuppliers" :key="supplier.id" :label="$t('公司名称:') + $l(supplier, 'company') + $t(',地址:') + supplier.externalBackVO.receiveAddress + $t(',邮箱:') + supplier.externalBackVO.receiveEmail + $t(',品名:') + supplier.externalBackVO.goodName + $t(',From M No:') + supplier.externalBackVO.fromNo + $t(',BA No:') + supplier.externalBackVO.baNo" :value="supplier.id" style="width: 600px">
:value="value === 0 ? undefined : value" <el-tooltip class="item" effect="dark" placement="top">
@change="change" <div slot="content">
v-bind="$attrs" <span>{{ $t('公司名称:') + $l(supplier, 'company') + $t(',地址:') + supplier.externalBackVO.receiveAddress + $t(',邮箱:') + supplier.externalBackVO.receiveEmail + $t(',品名:') + supplier.externalBackVO.goodName + $t(',From M No:') + supplier.externalBackVO.fromNo + $t(',BA No:') + supplier.externalBackVO.baNo }}</span>
clearable </div>
> <div class="iclass">{{ $t('公司名称:') + $l(supplier, 'company') + $t(',地址:') + supplier.externalBackVO.receiveAddress + $t(',邮箱:') + supplier.externalBackVO.receiveEmail + $t(',品名:') + supplier.externalBackVO.goodName + $t(',From M No:') + supplier.externalBackVO.fromNo + $t(',BA No:') + supplier.externalBackVO.baNo }}</div>
<el-option </el-tooltip>
v-for="supplier in getSuppliers" </el-option>
:key="supplier.id" </el-select>
:label="$t('公司名称:')+$l(supplier, 'company')+$t(',地址:')+supplier.externalBackVO.receiveAddress+$t(',邮箱:')+supplier.externalBackVO.receiveEmail+$t(',品名:')+supplier.externalBackVO.goodName+$t(',From M No:')+supplier.externalBackVO
.fromNo+$t(',BA No:')+supplier.externalBackVO
.baNo"
:value="supplier.id"
></el-option>
</el-select>
</div> </div>
</template> </template>
...@@ -68,3 +62,10 @@ export default { ...@@ -68,3 +62,10 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
.iclass {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-form-item> </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 || inOverReview || isCheckDeal('status')"> <el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview || inOverReview || isCheckDeal('status')">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{$l(item, 'label')}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -30,21 +30,21 @@ ...@@ -30,21 +30,21 @@
<div v-show="cusDeclarationObj.dcCustomsStatus === '3'"> <div v-show="cusDeclarationObj.dcCustomsStatus === '3'">
<el-form-item :label="$t('查验')"> <el-form-item :label="$t('查验')">
<el-radio-group v-model="cusDeclarationObj.dcCheckStatus" :disabled="inReview || inOverReview || isCheckDeal('check')"> <el-radio-group v-model="cusDeclarationObj.dcCheckStatus" :disabled="inReview || inOverReview || isCheckDeal('check')">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value" :disabled="disabledRadio(item)">{{$l(item, 'label')}}</el-radio> <el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CHECK_STATUS)" :key="item.value" :label="item.value" :disabled="disabledRadio(item)">{{ $l(item, 'label') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</div> </div>
<!-- 退场 --> <!-- 退场 -->
<div v-show="['1','2','3'].includes(cusDeclarationObj.dcCheckStatus)"> <div v-show="['1', '2', '3'].includes(cusDeclarationObj.dcCheckStatus)">
<el-form-item :label="$t('查验时间')"> <el-form-item :label="$t('查验时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcCheckTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcCheckTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('查验前图片')"> <el-form-item :label="$t('查验前图片')">
<ImageUpload :limit="1" :isShowTip=false v-model="cusDeclarationObj.dcCheckPreImg" /> <ImageUpload :limit="1" :isShowTip="false" v-model="cusDeclarationObj.dcCheckPreImg" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('退场状态')" v-if="cusDeclarationObj.dcCheckStatus === '1' || cusDeclarationObj.dcCheckStatus === '2'"> <el-form-item :label="$t('退场状态')" v-if="cusDeclarationObj.dcCheckStatus === '1' || cusDeclarationObj.dcCheckStatus === '2'">
{{getCheckExamineStatus}} {{ getCheckExamineStatus }}
</el-form-item> </el-form-item>
</div> </div>
...@@ -54,25 +54,29 @@ ...@@ -54,25 +54,29 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('过机状态')" prop="overMachineStatus"> <el-form-item :label="$t('过机状态')" prop="overMachineStatus">
<el-radio-group v-model="cusDeclarationObj.overMachineStatus" :disabled="inReview||inOverReview"> <el-radio-group v-model="cusDeclarationObj.overMachineStatus" :disabled="inReview || inOverReview">
<el-radio :label="1">{{$t('顺利')}}</el-radio> <el-radio :label="1">{{ $t('顺利') }}</el-radio>
<el-radio :label="2">{{$t('异常')}}</el-radio> <el-radio :label="2">{{ $t('异常') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item prop="overMachineAbnormalStatus" v-show="cusDeclarationObj.overMachineStatus == 2"> <el-form-item prop="overMachineAbnormalStatus" v-show="cusDeclarationObj.overMachineStatus == 2">
<el-radio-group v-model="cusDeclarationObj.overMachineAbnormalStatus" :disabled="inReview||inOverReview"> <el-radio-group v-model="cusDeclarationObj.overMachineAbnormalStatus" :disabled="inReview || inOverReview">
<el-radio :label="1">{{$t('敏感货')}}</el-radio> <el-radio :label="1">{{ $t('敏感货') }}</el-radio>
<el-radio :label="2">{{$t('重量误报')}}</el-radio> <el-radio :label="2">{{ $t('重量误报') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1" :label="$t('删单退场类型')"> <el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1" :label="$t('删单退场类型')">
<el-radio-group v-model="cusDeclarationObj.deleteExitType" :disabled="inReview||inOverReview"> <el-radio-group v-model="cusDeclarationObj.deleteExitType" :disabled="inReview || inOverReview">
<el-radio :label="1">{{$t('退场时间')}}<el-tooltip class="item" effect="dark" :content="$t('选择退场时间,填写退场时间后,提交删单退场审核,订单返回到“已订舱”环节修改订舱号后,提交之后直接到报关流程')" placement="top"> <el-radio :label="1"
<div class="el-icon-question"></div> >{{ $t('退场时间')
</el-tooltip></el-radio> }}<el-tooltip class="item" effect="dark" :content="$t('选择退场时间,填写退场时间后,提交删单退场审核,订单返回到“已订舱”环节修改订舱号后,提交之后直接到报关流程')" placement="top">
<el-radio :label="2">{{$t('返回仓库')}}<el-tooltip class="item" effect="dark" :content="$t('删单退场审核通过后,通过PDA空运退场到仓进行货物入仓')" placement="top"> <div class="el-icon-question"></div> </el-tooltip
<div class="el-icon-question"></div> ></el-radio>
</el-tooltip></el-radio> <el-radio :label="2"
>{{ $t('返回仓库')
}}<el-tooltip class="item" effect="dark" :content="$t('删单退场审核通过后,通过PDA空运退场到仓进行货物入仓')" placement="top">
<div class="el-icon-question"></div> </el-tooltip
></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && cusDeclarationObj.deleteExitType == 1" :label="$t('退场时间')"> <el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && cusDeclarationObj.deleteExitType == 1" :label="$t('退场时间')">
...@@ -80,39 +84,39 @@ ...@@ -80,39 +84,39 @@
</el-form-item> </el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1"> <el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1">
<el-form-item :label="$t('删单退场状态')"> <el-form-item :label="$t('删单退场状态')">
{{getOverExamineStatus}} {{ getOverExamineStatus }}
</el-form-item> </el-form-item>
</el-form-item> </el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && ![1].includes(shipmentObj.overMachineExamineStatus)"> <el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && ![1].includes(shipmentObj.overMachineExamineStatus)">
<el-button type="primary" @click="approvalCreate">{{$t('提交删单退场审核')}}</el-button> <el-button type="primary" @click="approvalCreate">{{ $t('提交删单退场审核') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="weightMisreport" v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 2"> <el-form-item prop="weightMisreport" v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 2">
<el-radio-group v-model="cusDeclarationObj.weightMisreport" :disabled="inOverReview"> <el-radio-group v-model="cusDeclarationObj.weightMisreport" :disabled="inOverReview">
<el-radio :label="1">{{$t('机场误差3%')}}</el-radio> <el-radio :label="1">{{ $t('机场误差3%') }}</el-radio>
<el-radio :label="2">{{$t('超过误差10KG')}}</el-radio> <el-radio :label="2">{{ $t('超过误差10KG') }}</el-radio>
<el-radio :label="3">{{$t('过机放行-未找到重货订单')}}</el-radio> <el-radio :label="3">{{ $t('过机放行-未找到重货订单') }}</el-radio>
<el-radio :label="4">{{$t('过机放行-已找到重货订单')}}</el-radio> <el-radio :label="4">{{ $t('过机放行-已找到重货订单') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('超出机场重量')" prop="overWeight" v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 2"> <el-form-item :label="$t('超出机场重量')" prop="overWeight" v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 2">
<el-input v-model="cusDeclarationObj.overWeight" style="width: 180px"> <el-input v-model="cusDeclarationObj.overWeight" style="width: 180px">
<template slot="append"> <template slot="append">
{{ $t('KG') }} {{ $t('KG') }}
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('处理人')" prop="overDealUser" v-show="cusDeclarationObj.overMachineStatus == 2"> <el-form-item :label="$t('处理人')" prop="overDealUser" v-show="cusDeclarationObj.overMachineStatus == 2">
<usersSelect v-model="cusDeclarationObj.overDealUser" :placeholder="$t('请选择处理人')" :allUsers="this.$attrs.allUsers" /> <usersSelect v-model="cusDeclarationObj.overDealUser" :placeholder="$t('请选择处理人')" :allUsers="this.$attrs.allUsers" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注')" prop="overRemarks" v-show="cusDeclarationObj.overMachineStatus == 2"> <el-form-item :label="$t('备注')" prop="overRemarks" v-show="cusDeclarationObj.overMachineStatus == 2">
<el-input v-model="cusDeclarationObj.overRemarks" style="width: 180px" /> <el-input v-model="cusDeclarationObj.overRemarks" style="width: 180px" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('超重订单')" prop="overOrders" v-show="cusDeclarationObj.overMachineStatus == 2&&cusDeclarationObj.weightMisreport == 4"> <el-form-item :label="$t('超重订单')" prop="overOrders" v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.weightMisreport == 4">
<ordersSelect v-model="cusDeclarationObj.overOrders" :placeholder="$t('请选择超重订单')" :shipmentId="shipmentObj.id" /> <ordersSelect v-model="cusDeclarationObj.overOrders" :placeholder="$t('请选择超重订单')" :shipmentId="shipmentObj.id" />
</el-form-item> </el-form-item>
<el-form-item prop="overOrders" v-show="cusDeclarationObj.overOrders.length > 0"> <el-form-item prop="overOrders" v-show="cusDeclarationObj.overOrders.length > 0">
<div v-for="order in cusDeclarationObj.overOrders" :key="order"> <div v-for="order in cusDeclarationObj.overOrders" :key="order">
{{getOrders(order)}} <el-button type="text" @click="$router.push('/order/warehousing-update?id='+order)">{{$t('入仓修改')}}</el-button> {{ getOrders(order) }} <el-button type="text" @click="$router.push('/order/warehousing-update?id=' + order)">{{ $t('入仓修改') }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -120,26 +124,25 @@ ...@@ -120,26 +124,25 @@
<el-button type="primary">{{$t('下载装箱单')}}</el-button> <el-button type="primary">{{$t('下载装箱单')}}</el-button>
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('报关单')" v-show="isDownload"> <el-form-item :label="$t('报关单')" v-show="isDownload">
<el-button type="primary" @click="downloadCusFile">{{$t('下载所有报关单')}}</el-button> <el-button type="primary" @click="downloadCusFile">{{ $t('下载所有报关单') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button" v-if="inReview"> <el-row class="operate-button" v-if="inReview">
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? $t('全部退场审核中') : $t('部分退场审核中')}}</el-button> <el-button type="primary" @click="jumpReviewDetail">{{ cusDeclarationObj.dcCheckStatus === '1' ? $t('全部退场审核中') : $t('部分退场审核中') }}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? $t('取消全部退场审核') : $t('取消部分退场审核')}}</el-button> <el-button type="primary" plain @click="canclAudit">{{ cusDeclarationObj.dcCheckStatus === '1' ? $t('取消全部退场审核') : $t('取消部分退场审核') }}</el-button>
</el-row> </el-row>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" v-if="inOverReview" @click="exitReviewDetail">{{$t('删单退场审核中')}}</el-button> <el-button type="primary" v-if="inOverReview" @click="exitReviewDetail">{{ $t('删单退场审核中') }}</el-button>
<el-button type="primary" v-if="inOverReview" plain @click="canclOverAudit">{{$t('取消删单退场审核')}}</el-button> <el-button type="primary" v-if="inOverReview" plain @click="canclOverAudit">{{ $t('取消删单退场审核') }}</el-button>
<el-button type="primary" @click="onSubmit(1)" :disabled="isCheckDeal('submit')">{{$t('保存')}}</el-button> <el-button type="primary" @click="onSubmit(1)" :disabled="isCheckDeal('submit')">{{ $t('保存') }}</el-button>
<el-button type="success" v-if="!inReview&&!inOverReview" @click="onSubmit(2)" :disabled="isCheckDeal('submit')">{{$t('提交')}}</el-button> <el-button type="success" v-if="!inReview && !inOverReview" @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-button type="primary" @click="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog customsClearance" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" width="700px" :modal-append-to-body=false append-to-body> <el-dialog custom-class="shipping-dialog customsClearance" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" width="700px" :modal-append-to-body="false" append-to-body>
<el-row> <el-row>
<el-row> <el-row>
<el-form label-width="100px"> <el-form label-width="100px">
...@@ -159,15 +162,15 @@ ...@@ -159,15 +162,15 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center"> <el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" @click="createExtraCost(scope.row)">{{$t('确定')}}</el-button> <el-button type="primary" size="small" @click="createExtraCost(scope.row)">{{ $t('确定') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-row> </el-row>
<el-row class="cost-title"> <el-row class="cost-title">
<div>{{$t('额外费用订单')}}</div> <div>{{ $t('额外费用订单') }}</div>
<div> <div>
<el-button size="small" @click="restCostList()">{{$t('重置')}}</el-button> <el-button size="small" @click="restCostList()">{{ $t('重置') }}</el-button>
</div> </div>
</el-row> </el-row>
<el-row> <el-row>
...@@ -181,8 +184,8 @@ ...@@ -181,8 +184,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center"> <el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" @click="updateExtraCost(scope.row)">{{$t('修改')}}</el-button> <el-button type="primary" size="small" @click="updateExtraCost(scope.row)">{{ $t('修改') }}</el-button>
<el-button size="small" @click="restCostList(scope.row)">{{$t('重置')}}</el-button> <el-button size="small" @click="restCostList(scope.row)">{{ $t('重置') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -191,50 +194,32 @@ ...@@ -191,50 +194,32 @@
</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> <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" /> <regError @closeDialog="regCloseDialog" v-bind="$attrs" :shipmentObj="shipmentObj" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import supplierSelect from "./common/supplierSelect.vue"; import supplierSelect from './common/supplierSelect.vue'
import usersSelect from "./common/usersSelect.vue"; import usersSelect from './common/usersSelect.vue'
import ordersSelect from "./common/ordersSelect.vue"; import ordersSelect from './common/ordersSelect.vue'
import { import { customsCreate, extraCostList, extraCostOrder, extraCostCreate, extraCostUpdate, approvalCancel, resetById, resetByShipmentId, customsOrderList, approvalCreate, boxGoodsDetail } from '@/api/ecw/boxSea'
customsCreate, import { formatNumberString, formatDateStr, serviceMsg, toReviewDetail, downloadFileByUrl } from '../utils'
extraCostList, import ImageUpload from '@/components/ImageUpload'
extraCostOrder, import Decimal from 'decimal.js'
extraCostCreate, import regError from '../../regError'
extraCostUpdate, import dayjs from 'dayjs'
approvalCancel,
resetById,
resetByShipmentId,
customsOrderList,
approvalCreate,
boxGoodsDetail
} from "@/api/ecw/boxSea";
import {
formatNumberString,
formatDateStr,
serviceMsg,
toReviewDetail,
downloadFileByUrl,
} from "../utils";
import ImageUpload from "@/components/ImageUpload";
import Decimal from "decimal.js";
import regError from "../../regError";
import dayjs from "dayjs";
/** /**
* 报关 * 报关
*/ */
export default { export default {
name: "cusDeclaration", name: 'cusDeclaration',
inheritAttrs: false, inheritAttrs: false,
components: { supplierSelect, ImageUpload, regError, usersSelect, ordersSelect }, components: { supplierSelect, ImageUpload, regError, usersSelect, ordersSelect },
props: { props: {
shipmentObj: Object, shipmentObj: Object
}, },
data() { data() {
return { return {
...@@ -242,32 +227,20 @@ export default { ...@@ -242,32 +227,20 @@ export default {
cusDeclarationObj: {}, cusDeclarationObj: {},
// 校验 // 校验
rules: { rules: {
dcBoxWgt: [ dcBoxWgt: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
{ required: true, message: this.$t("必填"), trigger: "change" }, dcGoodsWgt: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
], dcCustomsType: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
dcGoodsWgt: [ dcCustomsStatus: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
{ required: true, message: this.$t("必填"), trigger: "change" }, dcDecTime: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
], overMachineStatus: [{ required: true, pattern: /^[12]$/, message: this.$t('必填') }]
dcCustomsType: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
dcCustomsStatus: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
dcDecTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
overMachineStatus: [
{ required: true, pattern: /^[12]$/, message: this.$t("必填")}
],
}, },
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
title: "", title: '',
dialogVisible: false, dialogVisible: false
}, },
// 订单号 // 订单号
orderNo: "", orderNo: '',
// 订单列表 // 订单列表
costOrderList: [], costOrderList: [],
// 额外费用列表 // 额外费用列表
...@@ -278,439 +251,402 @@ export default { ...@@ -278,439 +251,402 @@ export default {
// 异常登记 // 异常登记
regDialogVisible: false, regDialogVisible: false,
isShowError: false, isShowError: false,
inspectionTimecustoms: this.getDictDatas( inspectionTimecustoms: this.getDictDatas(this.DICT_TYPE.BOX_INSPECTION_TIME_CUSTOMS)[0].value,
this.DICT_TYPE.BOX_INSPECTION_TIME_CUSTOMS
)[0].value,
isDownload: false, isDownload: false,
normalOrderList: [], normalOrderList: [],
isShowNormal: false, isShowNormal: false,
sectionOrderList: [] sectionOrderList: []
}; }
}, },
created() { created() {
const { currNode } = this.$attrs; const { currNode } = this.$attrs
const { voName } = currNode; const { voName } = currNode
let oldData = { let oldData = {
...this.shipmentObj[voName], ...this.shipmentObj[voName],
documentInfo: this.shipmentObj.documentInfo?.split(",") ?? [], documentInfo: this.shipmentObj.documentInfo?.split(',') ?? []
}; }
if (!this.shipmentObj[voName]) { if (!this.shipmentObj[voName]) {
oldData.dcCustomsType = oldData.dcCustomsType oldData.dcCustomsType = oldData.dcCustomsType ? oldData.dcCustomsType : this.getDcCustomsType(oldData.documentInfo)
? oldData.dcCustomsType
: this.getDcCustomsType(oldData.documentInfo);
} }
oldData = formatDateStr(oldData, [ oldData = formatDateStr(oldData, ['dcCutOffTime', 'dcCheckTime', 'dcPassTime', 'dcDecTime'])
"dcCutOffTime", oldData = formatNumberString(oldData, ['dcCustomsType', 'dcCustomsStatus', 'dcCheckStatus'])
"dcCheckTime",
"dcPassTime",
"dcDecTime",
]);
oldData = formatNumberString(oldData, [
"dcCustomsType",
"dcCustomsStatus",
"dcCheckStatus",
]);
oldData.overDealUser = this.strToArray(oldData.overDealUser) oldData.overDealUser = this.strToArray(oldData.overDealUser)
oldData.overOrders = this.strToArray(oldData.overOrders) oldData.overOrders = this.strToArray(oldData.overOrders)
this.cusDeclarationObj = oldData; this.cusDeclarationObj = oldData
if(this.shipmentObj.overMachineExamineStatus == 1){ if (this.shipmentObj.overMachineExamineStatus == 1) {
this.$set(this.cusDeclarationObj, "overMachineStatus", 2) this.$set(this.cusDeclarationObj, 'overMachineStatus', 2)
this.$set(this.cusDeclarationObj, "overMachineAbnormalStatus", 1) this.$set(this.cusDeclarationObj, 'overMachineAbnormalStatus', 1)
} }
if(this.shipmentObj.customsDeleteExitApprovalInfo){ if (this.shipmentObj.customsDeleteExitApprovalInfo) {
if(this.shipmentObj.customsDeleteExitApprovalInfo.details){ if (this.shipmentObj.customsDeleteExitApprovalInfo.details) {
let details = JSON.parse(this.shipmentObj.customsDeleteExitApprovalInfo.details) let details = JSON.parse(this.shipmentObj.customsDeleteExitApprovalInfo.details)
this.$set(this.cusDeclarationObj, "deleteExitType", details.deleteExitType) this.$set(this.cusDeclarationObj, 'deleteExitType', details.deleteExitType)
this.$set(this.cusDeclarationObj, "deleteExitTime", details.deleteExitTime) this.$set(this.cusDeclarationObj, 'deleteExitTime', details.deleteExitTime)
} }
} }
boxGoodsDetail({ boxGoodsDetail({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
secId: 0 secId: 0
}).then((res) => { }).then((res) => {
this.sectionOrderList = res.data.sectionOrderList; this.sectionOrderList = res.data.sectionOrderList
}); })
}, },
methods: { methods: {
strToArray(str) { strToArray(str) {
if(!str) return [] if (!str) return []
let array = str?.split(",") ?? [] let array = str?.split(',') ?? []
return array.map(item=>{return Number(item)}) return array.map((item) => {
return Number(item)
})
}, },
getCustomsOrderList(dcCustomsType) { getCustomsOrderList(dcCustomsType) {
customsOrderList({ customsOrderList({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
customsTypes: dcCustomsType === "3" ? "2,3" : dcCustomsType, customsTypes: dcCustomsType === '3' ? '2,3' : dcCustomsType
}).then((res) => { }).then((res) => {
this.normalOrderList = res.data ?? []; this.normalOrderList = res.data ?? []
if (dcCustomsType === "1") { if (dcCustomsType === '1') {
this.isShowNormal = false; this.isShowNormal = false
} else { } else {
this.isShowNormal = true; this.isShowNormal = true
} }
}); })
}, },
getOrders(id) { getOrders(id) {
let order = this.sectionOrderList.find(item=>item.orderId==id) let order = this.sectionOrderList.find((item) => item.orderId == id)
if(order){ if (order) {
return order.orderNo return order.orderNo
} }
return '' return ''
}, },
regCloseDialog(type) { regCloseDialog(type) {
this.regDialogVisible = false; this.regDialogVisible = false
if (type === "error") { if (type === 'error') {
this.$emit("getBoxInfo"); this.$emit('getBoxInfo')
} }
}, },
// 时间比较 // 时间比较
compareDate(dcDecTime, dcPassTime) { compareDate(dcDecTime, dcPassTime) {
this.isShowError = false; this.isShowError = false
let date1 = null, let date1 = null,
date2 = null; date2 = null
if (dcDecTime) date1 = dayjs(dcDecTime); if (dcDecTime) date1 = dayjs(dcDecTime)
if (dcPassTime) date2 = dayjs(dcPassTime); if (dcPassTime) date2 = dayjs(dcPassTime)
if (date1 && date2) { if (date1 && date2) {
const delayDay = date2.diff(date1, "day"); const delayDay = date2.diff(date1, 'day')
if (delayDay >= this.inspectionTimecustoms) this.isShowError = true; if (delayDay >= this.inspectionTimecustoms) this.isShowError = true
} }
}, },
// 异常登记 // 异常登记
exceptionReg() { exceptionReg() {
this.regDialogVisible = true; this.regDialogVisible = true
}, },
/* 跳转订单详情 */ /* 跳转订单详情 */
jumpOrderDetail(row) { jumpOrderDetail(row) {
this.$router.push({ this.$router.push({
path: "/order/detail", path: '/order/detail',
query: { orderId: row.orderId }, query: { orderId: row.orderId }
}); })
}, },
getDcCustomsType(documentInfo = []) { getDcCustomsType(documentInfo = []) {
const newList = Array.from(new Set(documentInfo)); const newList = Array.from(new Set(documentInfo))
if (newList.length > 1) { if (newList.length > 1) {
return "3"; return '3'
} }
if (newList.length === 1) { if (newList.length === 1) {
return newList[0] === "1" ? "1" : "2"; return newList[0] === '1' ? '1' : '2'
} }
}, },
getButtonLabel(documentInfo = []) { getButtonLabel(documentInfo = []) {
const newList = Array.from(new Set(documentInfo)); const newList = Array.from(new Set(documentInfo))
return newList.length >= 2 ? this.$t("混合报关") : this.$t("VGM声明"); return newList.length >= 2 ? this.$t('混合报关') : this.$t('VGM声明')
}, },
submitCustomsCreate(operateType) { submitCustomsCreate(operateType) {
let parems = {... this.cusDeclarationObj} let parems = { ...this.cusDeclarationObj }
parems.overDealUser = !Array.isArray(parems.overDealUser)?null:parems.overDealUser.join(',') parems.overDealUser = !Array.isArray(parems.overDealUser) ? null : parems.overDealUser.join(',')
parems.overOrders = !Array.isArray(parems.overOrders)?null:parems.overOrders.join(',') parems.overOrders = !Array.isArray(parems.overOrders) ? null : parems.overOrders.join(',')
customsCreate({ customsCreate({
...parems, ...parems,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
operateType, operateType
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel("submit"); this.cancel('submit')
}); })
}); })
}, },
//提交删单退场审核 //提交删单退场审核
approvalCreate(){ approvalCreate() {
// this.$refs["cusDeclarationForm"].validate((valid) => { this.$refs['cusDeclarationForm'].validate((valid) => {
// if (valid) {} if (valid) {
// }) if (!this.cusDeclarationObj.deleteExitType) {
if(!this.cusDeclarationObj.deleteExitType){ this.$message.error(this.$t('请选择删单退场类型或者时间'))
this.$message.error(this.$t("请选择删单退场类型或者时间")); return
return; }
} if (this.cusDeclarationObj.deleteExitType == 1 && !this.cusDeclarationObj.deleteExitTime) {
if(this.cusDeclarationObj.deleteExitType == 1 && !this.cusDeclarationObj.deleteExitTime){ this.$message.error(this.$t('请选择退场时间'))
this.$message.error(this.$t("请选择退场时间")); return
return; }
} let details = {
let details = { deleteExitType: this.cusDeclarationObj.deleteExitType,
deleteExitType: this.cusDeclarationObj.deleteExitType, deleteExitTime: this.cusDeclarationObj.deleteExitTime
deleteExitTime: this.cusDeclarationObj.deleteExitTime }
} approvalCreate({
approvalCreate({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
approvalStatus: 0, approvalStatus: 0,
approvalType: 11, approvalType: 11,
details: JSON.stringify(details) details: JSON.stringify(details)
}).then(() => { }).then(() => {
this.onSubmit(1) this.onSubmit(1)
}); })
}
})
}, },
/** 提交 */ /** 提交 */
onSubmit(operateType) { onSubmit(operateType) {
this.$refs["cusDeclarationForm"].validate((valid) => { this.$refs['cusDeclarationForm'].validate((valid) => {
if (valid) { if (valid) {
if (operateType === 1) { if (operateType === 1) {
this.submitCustomsCreate(operateType); this.submitCustomsCreate(operateType)
return; return
// 保存 // 保存
} }
// 提交 // 提交
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj; const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj
// 1.状态 报关中/放行 直接提交 // 1.状态 报关中/放行 直接提交
if (dcCustomsStatus !== "3") { if (dcCustomsStatus !== '3') {
this.submitCustomsCreate(operateType); this.submitCustomsCreate(operateType)
return; return
} }
// 2.查验状态,空 直接提交 // 2.查验状态,空 直接提交
if (!dcCheckStatus) { if (!dcCheckStatus) {
this.submitCustomsCreate(operateType); this.submitCustomsCreate(operateType)
return; return
} }
// 3.查验状态,查验后放行 直接提交 // 3.查验状态,查验后放行 直接提交
if (dcCheckStatus === "3") { if (dcCheckStatus === '3') {
const { overMachineExamineStatus } = this.shipmentObj; const { overMachineExamineStatus } = this.shipmentObj
// 没有退场审核中的状态 // 没有退场审核中的状态
if (overMachineExamineStatus !== 1) { if (overMachineExamineStatus !== 1) {
this.submitCustomsCreate(operateType); this.submitCustomsCreate(operateType)
return; return
} }
} }
// 4.查验状态,退场/部分退场 提示 // 4.查验状态,退场/部分退场 提示
if (["1", "2"].includes(dcCheckStatus)) { if (['1', '2'].includes(dcCheckStatus)) {
const { overMachineExamineStatus } = this.shipmentObj; const { overMachineExamineStatus } = this.shipmentObj
// 退场审核状态,1-审核中,2-审核成功,3-审核失败,4-取消 // 退场审核状态,1-审核中,2-审核成功,3-审核失败,4-取消
if ([0, 2, 3, 4].includes(overMachineExamineStatus)) { if ([0, 2, 3, 4].includes(overMachineExamineStatus)) {
this.$modal this.$modal.confirm(this.$t(`您确认提交${dcCheckStatus === '1' ? this.$t('全部退场') : this.$t('部分退场')}审核吗?`)).then(() => {
.confirm(this.$t( let parems = { ...this.cusDeclarationObj }
`您确认提交${ parems.overDealUser = !Array.isArray(parems.overDealUser) ? null : parems.overDealUser.join(',')
dcCheckStatus === "1" ? this.$t("全部退场") : this.$t("部分退场") parems.overOrders = !Array.isArray(parems.overOrders) ? null : parems.overOrders.join(',')
}审核吗?`) customsCreate({
) ...parems,
.then(() => { shipmentId: this.shipmentObj.id,
let parems = {... this.cusDeclarationObj} operateType
parems.overDealUser = !Array.isArray(parems.overDealUser)?null:parems.overDealUser.join(',') }).then((res) => {
parems.overOrders = !Array.isArray(parems.overOrders)?null:parems.overOrders.join(',') serviceMsg(res, this).then(() => {
customsCreate({ // 触发外层重新查询出货信息
...parems, this.$emit('getBoxInfo')
shipmentId: this.shipmentObj.id, })
operateType, })
}).then((res) => { })
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.$emit("getBoxInfo");
});
});
});
} else { } else {
this.submitCustomsCreate(operateType); this.submitCustomsCreate(operateType)
} }
} }
} }
}); })
}, },
/* 查询订单号 */ /* 查询订单号 */
searchOrder() { searchOrder() {
if (!this.orderNo) { if (!this.orderNo) {
this.$message.error(this.$t("请输入订单号")); this.$message.error(this.$t('请输入订单号'))
return; return
} }
extraCostOrder({ extraCostOrder({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
orderNo: this.orderNo, orderNo: this.orderNo
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.costOrderList = [ this.costOrderList = [
{ {
orderNo: this.orderNo, orderNo: this.orderNo,
orderId: res.data, orderId: res.data
}, }
]; ]
this.searchCostList(); this.searchCostList()
}); })
}); })
}, },
/* 查询额外费用订单 */ /* 查询额外费用订单 */
searchCostList() { searchCostList() {
extraCostList({ extraCostList({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id
}).then((res) => { }).then((res) => {
this.costList = res.data; this.costList = res.data
}); })
}, },
/* 创建额外费用 */ /* 创建额外费用 */
createExtraCost(row) { createExtraCost(row) {
if (!row.fee) { if (!row.fee) {
this.$message.error(this.$t("请输入费用")); this.$message.error(this.$t('请输入费用'))
return; return
} }
extraCostCreate({ extraCostCreate({
fee: row.fee, fee: row.fee,
orderId: row.orderId, orderId: row.orderId,
orderNo: row.orderNo, orderNo: row.orderNo,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.searchCostList(); this.searchCostList()
}); })
}); })
}, },
/* 修改额外费用 */ /* 修改额外费用 */
updateExtraCost(row) { updateExtraCost(row) {
if (!row.fee) { if (!row.fee) {
this.$message.error(this.$t("请输入费用")); this.$message.error(this.$t('请输入费用'))
return; return
} }
extraCostUpdate(row).then((res) => { extraCostUpdate(row).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.searchCostList(); this.searchCostList()
}); })
}); })
}, },
/* 重置 */ /* 重置 */
restCostList(row) { restCostList(row) {
if (row) { if (row) {
resetById({ id: row.id }).then((res) => { resetById({ id: row.id }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.searchCostList(); this.searchCostList()
}); })
}); })
} else { } else {
resetByShipmentId({ id: this.shipmentObj.id }).then((res) => { resetByShipmentId({ id: this.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.searchCostList(); this.searchCostList()
}); })
}); })
} }
}, },
/** 取消 */ /** 取消 */
cancel(type) { cancel(type) {
this.$emit("closeDialog", type); this.$emit('closeDialog', type)
}, },
// 下载VGM // 下载VGM
downloadVGM() { downloadVGM() {
window.open( window.open('http://pdatest.groupage.cn//apivue/boxTrack/vgmExport?token=930b11a41d9ca06f306d157f336a5dcb&id=1752')
"http://pdatest.groupage.cn//apivue/boxTrack/vgmExport?token=930b11a41d9ca06f306d157f336a5dcb&id=1752"
);
}, },
// 额外费用 // 额外费用
extraCost() { extraCost() {
// 清空额外费用 // 清空额外费用
this.orderNo = ""; this.orderNo = ''
this.costOrderList = []; this.costOrderList = []
this.costList = []; this.costList = []
this.$set( this.$set(this.dialogConfig, 'title', `${this.shipmentObj.selfNo} ` + this.$t('报关费用'))
this.dialogConfig, this.$set(this.dialogConfig, 'dialogVisible', true)
"title", this.searchCostList()
`${this.shipmentObj.selfNo} ` + this.$t("报关费用")
);
this.$set(this.dialogConfig, "dialogVisible", true);
this.searchCostList();
}, },
// 计算VGM重量 // 计算VGM重量
calcVGM(dcBoxWgt, dcGoodsWgt) { calcVGM(dcBoxWgt, dcGoodsWgt) {
let dcBoxWgtTmp = 0, let dcBoxWgtTmp = 0,
dcGoodsWgtTmp = 0; dcGoodsWgtTmp = 0
if (!Number.isNaN(Number(dcBoxWgt))) { if (!Number.isNaN(Number(dcBoxWgt))) {
dcBoxWgtTmp = Number(dcBoxWgt); dcBoxWgtTmp = Number(dcBoxWgt)
} }
if (!Number.isNaN(Number(dcGoodsWgt))) { if (!Number.isNaN(Number(dcGoodsWgt))) {
dcGoodsWgtTmp = Number(dcGoodsWgt); dcGoodsWgtTmp = Number(dcGoodsWgt)
} }
this.$set( this.$set(this.cusDeclarationObj, 'dcVgmWgt', Decimal.add(dcBoxWgtTmp, dcGoodsWgtTmp).toFixed(2))
this.cusDeclarationObj,
"dcVgmWgt",
Decimal.add(dcBoxWgtTmp, dcGoodsWgtTmp).toFixed(2)
);
}, },
// 审核详情 // 审核详情
jumpReviewDetail() { jumpReviewDetail() {
const { customsApprovalInfo } = this.shipmentObj; const { customsApprovalInfo } = this.shipmentObj
toReviewDetail.apply(this, [customsApprovalInfo.bpmProcessId]); toReviewDetail.apply(this, [customsApprovalInfo.bpmProcessId])
this.cancel("close"); this.cancel('close')
}, },
//删单退场审核详情 //删单退场审核详情
exitReviewDetail() { exitReviewDetail() {
const { customsDeleteExitApprovalInfo } = this.shipmentObj; const { customsDeleteExitApprovalInfo } = this.shipmentObj
toReviewDetail.apply(this, [customsDeleteExitApprovalInfo.bpmProcessId]); toReviewDetail.apply(this, [customsDeleteExitApprovalInfo.bpmProcessId])
this.cancel("close"); this.cancel('close')
}, },
/* 取消退场审核 */ /* 取消退场审核 */
canclAudit() { canclAudit() {
console.log(this.shipmentObj) console.log(this.shipmentObj)
approvalCancel({ approvalCancel({
applyReason: this.$t("取消审核"), applyReason: this.$t('取消审核'),
id: this.shipmentObj["customsApprovalInfo"].id, id: this.shipmentObj['customsApprovalInfo'].id,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息 // 触发外层重新查询出货信息
this.cancel("close"); this.cancel('close')
this.$emit("getBoxInfo"); this.$emit('getBoxInfo')
}); })
}); })
}, },
/* 取消删单退场审核 */ /* 取消删单退场审核 */
canclOverAudit() { canclOverAudit() {
console.log(this.shipmentObj) console.log(this.shipmentObj)
approvalCancel({ approvalCancel({
applyReason: this.$t("取消审核"), applyReason: this.$t('取消审核'),
id: this.shipmentObj["customsDeleteExitApprovalInfo"].id, id: this.shipmentObj['customsDeleteExitApprovalInfo'].id,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息 // 触发外层重新查询出货信息
this.cancel("close"); this.cancel('close')
this.$emit("getBoxInfo"); this.$emit('getBoxInfo')
}); })
}); })
}, },
/* 判断查验选择是否禁用 */ /* 判断查验选择是否禁用 */
disabledRadio(item) { disabledRadio(item) {
const { overMachineExamineStatus, checkDealStatus, customsInfo } = const { overMachineExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
this.shipmentObj; const { dcCheckStatus } = customsInfo ?? {} // 部分退场状态并且审核通过,退场不可选择
const { dcCheckStatus } = customsInfo ?? {}; // 部分退场状态并且审核通过,退场不可选择 if (overMachineExamineStatus === 2 && dcCheckStatus === 2 && checkDealStatus === 0 && item.value === '1') {
if ( return true
overMachineExamineStatus === 2 &&
dcCheckStatus === 2 &&
checkDealStatus === 0 &&
item.value === "1"
) {
return true;
} }
return false; return false
}, },
/* 下载报关单 */ /* 下载报关单 */
downloadCusFile() { downloadCusFile() {
downloadFileByUrl("downloadCustomFiles", { downloadFileByUrl('downloadCustomFiles', {
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id
}); })
}, }
}, },
watch: { watch: {
"cusDeclarationObj.dcCustomsType"(val) { 'cusDeclarationObj.dcCustomsType'(val) {
this.getCustomsOrderList(val); this.getCustomsOrderList(val)
}, },
"cusDeclarationObj.documentInfo"(val) { 'cusDeclarationObj.documentInfo'(val) {
this.isDownload = false; this.isDownload = false
if (val.includes("2")) { if (val.includes('2')) {
this.isDownload = true; this.isDownload = true
} }
}, },
"cusDeclarationObj.dcBoxWgt"(dcBoxWgt) { 'cusDeclarationObj.dcBoxWgt'(dcBoxWgt) {
this.calcVGM(dcBoxWgt, this.cusDeclarationObj.dcGoodsWgt); this.calcVGM(dcBoxWgt, this.cusDeclarationObj.dcGoodsWgt)
}, },
"cusDeclarationObj.dcGoodsWgt"(dcGoodsWgt) { 'cusDeclarationObj.dcGoodsWgt'(dcGoodsWgt) {
this.calcVGM(this.cusDeclarationObj.dcBoxWgt, dcGoodsWgt); this.calcVGM(this.cusDeclarationObj.dcBoxWgt, dcGoodsWgt)
}, },
"cusDeclarationObj.dcCustomsStatus"(val) { 'cusDeclarationObj.dcCustomsStatus'(val) {
if (val !== "3") { if (val !== '3') {
this.$set(this.cusDeclarationObj, "dcCheckStatus", ""); this.$set(this.cusDeclarationObj, 'dcCheckStatus', '')
// this.$set(this.cusDeclarationObj, "dcPassTime", ""); // this.$set(this.cusDeclarationObj, "dcPassTime", "");
} else { } else {
const { customsInfo } = this.shipmentObj; const { customsInfo } = this.shipmentObj
this.$set( this.$set(this.cusDeclarationObj, 'dcCheckStatus', (customsInfo?.dcCheckStatus && String(customsInfo?.dcCheckStatus)) || '3')
this.cusDeclarationObj,
"dcCheckStatus",
(customsInfo?.dcCheckStatus && String(customsInfo?.dcCheckStatus)) ||
"3"
);
} }
}, },
shipmentObj: { shipmentObj: {
...@@ -718,121 +654,102 @@ export default { ...@@ -718,121 +654,102 @@ export default {
immediate: true, immediate: true,
handler: function (val) { handler: function (val) {
// 监听查验状态变化 // 监听查验状态变化
let { overMachineExamineStatus, checkExamineStatus } = val; let { overMachineExamineStatus, checkExamineStatus } = val
if (overMachineExamineStatus === 1) { if (overMachineExamineStatus === 1) {
// 按钮变成审核中 // 按钮变成审核中
this.inOverReview = true; this.inOverReview = true
} }
if (checkExamineStatus === 1) { if (checkExamineStatus === 1) {
// 按钮变成审核中 // 按钮变成审核中
this.inReview = true; this.inReview = true
} }
}, }
}, },
// 报关时间 // 报关时间
"cusDeclarationObj.dcDecTime"(val) { 'cusDeclarationObj.dcDecTime'(val) {
this.compareDate(val, this.cusDeclarationObj.dcPassTime); this.compareDate(val, this.cusDeclarationObj.dcPassTime)
}, },
// 放行时间 // 放行时间
"cusDeclarationObj.dcPassTime"(val) { 'cusDeclarationObj.dcPassTime'(val) {
this.compareDate(this.cusDeclarationObj.dcDecTime, val); this.compareDate(this.cusDeclarationObj.dcDecTime, val)
}, },
// 查验状态 // 查验状态
"cusDeclarationObj.dcCheckStatus"(val) { 'cusDeclarationObj.dcCheckStatus'(val) {
const { customsInfo } = this.shipmentObj; const { customsInfo } = this.shipmentObj
if (val != customsInfo?.dcCheckStatus) { if (val != customsInfo?.dcCheckStatus) {
this.$set(this.cusDeclarationObj, "dcPassTime", ""); this.$set(this.cusDeclarationObj, 'dcPassTime', '')
} }
}, }
}, },
computed: { computed: {
/* 获取报关审核退场状态文字 */ /* 获取报关审核退场状态文字 */
getCheckExamineStatus() { getCheckExamineStatus() {
const { checkExamineStatus, checkDealStatus, customsInfo } = const { checkExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
this.shipmentObj; const { dcCheckStatus } = customsInfo ?? {}
const { dcCheckStatus } = customsInfo ?? {};
if (checkExamineStatus === 1) { if (checkExamineStatus === 1) {
return dcCheckStatus === 1 return dcCheckStatus === 1 ? this.$t('退场审核中') : this.$t('部分退场审核中')
? this.$t("退场审核中")
: this.$t("部分退场审核中");
} }
if (checkExamineStatus === 2 && checkDealStatus === 0) { if (checkExamineStatus === 2 && checkDealStatus === 0) {
return dcCheckStatus === 1 return dcCheckStatus === 1 ? this.$t('审核通过,退场中') : this.$t('审核通过,部分退场中')
? this.$t("审核通过,退场中")
: this.$t("审核通过,部分退场中");
} }
return this.$t("未审核"); return this.$t('未审核')
}, },
/* 获取报关审核删单退场状态文字 */ /* 获取报关审核删单退场状态文字 */
getOverExamineStatus() { getOverExamineStatus() {
const { overMachineExamineStatus, checkDealStatus, customsInfo } = const { overMachineExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
this.shipmentObj; const { dcCheckStatus } = customsInfo ?? {}
const { dcCheckStatus } = customsInfo ?? {};
if (overMachineExamineStatus === 1) { if (overMachineExamineStatus === 1) {
return dcCheckStatus === 1 return dcCheckStatus === 1 ? this.$t('删单退场审核中') : this.$t('删单退场审核中')
? this.$t("删单退场审核中")
: this.$t("删单退场审核中");
} }
if (overMachineExamineStatus === 2 && checkDealStatus === 0) { if (overMachineExamineStatus === 2 && checkDealStatus === 0) {
return dcCheckStatus === 1 return dcCheckStatus === 1 ? this.$t('删单退场审核通过,退场中') : this.$t('删单退场审核通过,退场中')
? this.$t("删单退场审核通过,退场中")
: this.$t("删单退场审核通过,退场中");
} }
return this.$t("未审核"); return this.$t('未审核')
}, },
/* 判断是否已处理 */ /* 判断是否已处理 */
isCheckDeal() { isCheckDeal() {
return (type) => { return (type) => {
const { overMachineExamineStatus, checkDealStatus, customsInfo } = const { overMachineExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
this.shipmentObj; const { dcCheckStatus } = customsInfo ?? {}
const { dcCheckStatus } = customsInfo ?? {};
// 状态 // 状态
if (type === "status") { if (type === 'status') {
// 退场/部分退场 审核通过未处理,禁用 // 退场/部分退场 审核通过未处理,禁用
if ( if (overMachineExamineStatus === 2 && [1, 2].includes(dcCheckStatus) && checkDealStatus === 0) {
overMachineExamineStatus === 2 && return true
[1, 2].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
return true;
} }
} }
// 查验 // 查验
if (type === "check") { if (type === 'check') {
// 退场 审核通过未处理,禁用 // 退场 审核通过未处理,禁用
// 部分退场 审核通过未处理,由 disabledRadio 方法判断 // 部分退场 审核通过未处理,由 disabledRadio 方法判断
if ( if (overMachineExamineStatus === 2 && [1].includes(dcCheckStatus) && checkDealStatus === 0) {
overMachineExamineStatus === 2 && return true
[1].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
return true;
} }
} }
// 提交/保存 // 提交/保存
if (type === "submit") { if (type === 'submit') {
const { dcCheckStatus: newCheckStatus } = this.cusDeclarationObj; const { dcCheckStatus: newCheckStatus } = this.cusDeclarationObj
// 退场/部分退场 审核通过未处理 // 退场/部分退场 审核通过未处理
if (overMachineExamineStatus === 2 && checkDealStatus === 0) { if (overMachineExamineStatus === 2 && checkDealStatus === 0) {
// 退场,禁用 // 退场,禁用
if (dcCheckStatus === 1) return true; if (dcCheckStatus === 1) return true
// 部分退场 // 部分退场
if (dcCheckStatus === 2) { if (dcCheckStatus === 2) {
// 修改为查验后放行,可用,其他禁用 // 修改为查验后放行,可用,其他禁用
if (newCheckStatus === "3") return false; if (newCheckStatus === '3') return false
return true; return true
} }
} }
} }
return false; return false
}; }
}, }
}, }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
" "
>{{ $t('新建合包箱号') }}</el-button >{{ $t('新建合包箱号') }}</el-button
> >
<el-button class="ml-10" @click="pack">{{$t('补单')}}</el-button>
</el-row> </el-row>
<el-row style="margin-top: 5px"> <el-row style="margin-top: 5px">
<el-table border :data="pagList" max-height="600px"> <el-table border :data="pagList" max-height="600px">
...@@ -42,7 +43,7 @@ ...@@ -42,7 +43,7 @@
<template slot-scope="scope"> {{ scope.row.pkgLength }}*{{ scope.row.pkgWidth }}*{{ scope.row.pkgHight }} </template> <template slot-scope="scope"> {{ scope.row.pkgLength }}*{{ scope.row.pkgWidth }}*{{ scope.row.pkgHight }} </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('订单数')" align="center" prop="orderCount" /> <el-table-column :label="$t('订单数')" align="center" prop="orderCount" />
<el-table-column :label="$t('箱数')" align="center" prop="sumCount" /> <el-table-column :label="$t('箱数')" align="center" prop="sumNum" />
<el-table-column :label="$t('入仓体积')" align="center" prop="sumVolume" /> <el-table-column :label="$t('入仓体积')" align="center" prop="sumVolume" />
<el-table-column :label="$t('入仓重量')" align="center" prop="sumWeight" /> <el-table-column :label="$t('入仓重量')" align="center" prop="sumWeight" />
<el-table-column :label="$t('入仓数量(个)')" align="center" prop="sumQuantity" /> <el-table-column :label="$t('入仓数量(个)')" align="center" prop="sumQuantity" />
...@@ -103,10 +104,12 @@ ...@@ -103,10 +104,12 @@
</el-dialog> </el-dialog>
<!-- 装箱 --> <!-- 装箱 -->
<el-dialog :title="pkgPageTitle" :visible.sync="pkgPagedialogVisible" :fullscreen="true" :modal-append-to-body="false" append-to-body @close="pkgPageType=0"> <el-dialog :title="pkgPageTitle" :visible.sync="pkgPagedialogVisible" :fullscreen="true" :modal-append-to-body="false" append-to-body @close="pkgPageType=0">
<el-radio-group v-model="pkgPageType"> <div class="flex">
<el-radio-button :label="1">{{ $t('未装箱列表') }}</el-radio-button> <el-radio-group v-model="pkgPageType">
<el-radio-button :label="2">{{ $t('已装箱列表') }}</el-radio-button> <el-radio-button :label="1">{{ $t('未装箱列表') }}</el-radio-button>
</el-radio-group> <el-radio-button :label="2">{{ $t('已装箱列表') }}</el-radio-button>
</el-radio-group>
</div>
<un-pkg-page v-if="pkgPageType == 1" :pkgData="pkgData" :shipmentObj="shipmentObj" /> <un-pkg-page v-if="pkgPageType == 1" :pkgData="pkgData" :shipmentObj="shipmentObj" />
<pkg-page v-if="pkgPageType == 2" :pkgData="pkgData" :shipmentObj="shipmentObj" @closeDialog="closeDialog" /> <pkg-page v-if="pkgPageType == 2" :pkgData="pkgData" :shipmentObj="shipmentObj" @closeDialog="closeDialog" />
</el-dialog> </el-dialog>
...@@ -121,6 +124,14 @@ ...@@ -121,6 +124,14 @@
</el-row> </el-row>
</el-col> </el-col>
</el-row> </el-row>
<supplement-order
v-if="showPackDialog"
:shipmentObj="shipmentObj"
:warehouseList="$attrs.warehouseList"
@close="showPackDialog=false"
@supplementFinish="onSupplementFinish"
></supplement-order>
</div> </div>
</template> </template>
...@@ -130,8 +141,10 @@ import { formatDate, serviceMsg } from '../../utils' ...@@ -130,8 +141,10 @@ import { formatDate, serviceMsg } from '../../utils'
import unPkgPage from './unPkgPage.vue' import unPkgPage from './unPkgPage.vue'
import PkgPage from './pkgPage.vue' import PkgPage from './pkgPage.vue'
import printTag from './printTag.vue' import printTag from './printTag.vue'
import SupplementOrder from "./supplementOrder.vue";
export default { export default {
components: { components: {
SupplementOrder,
unPkgPage, unPkgPage,
PkgPage, PkgPage,
printTag printTag
...@@ -171,7 +184,9 @@ export default { ...@@ -171,7 +184,9 @@ export default {
pkgPagedialogVisible: false, pkgPagedialogVisible: false,
pkgData: {}, pkgData: {},
printdialogVisible: false, printdialogVisible: false,
tagData: {} tagData: {},
// 是否显示补单弹层
showPackDialog: false
} }
}, },
created() { created() {
...@@ -261,6 +276,14 @@ export default { ...@@ -261,6 +276,14 @@ export default {
this.$emit("closeDialog", "submit"); this.$emit("closeDialog", "submit");
}); });
}); });
},
// 补单
pack(){
this.showPackDialog=true
},
// 提交补单
onSupplementFinish(){
this.showPackDialog = false
} }
} }
} }
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
]"> ]">
<el-input v-model="sealBoxForm.sumNum" style="width: 180px"> <el-input v-model="sealBoxForm.sumNum" style="width: 180px">
<template slot="append"> <template slot="append">
{{ $t('') }} {{ $t('') }}
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
......
<template>
<el-dialog :visible.sync="show" class="supplementOrder" append-to-body fullscreen :title="$t('补单')">
<el-card>
<!-- 内容区 -->
<el-row class="content-area">
<!-- 左侧 -->
<el-col :span="6" class="left-area">
<!--<el-row>
<el-button type="primary" @click="addPart">{{$t('新增')}}</el-button>
<el-button type="danger" @click="deletePart">{{$t('删除')}}</el-button>
</el-row>-->
<el-scrollbar style="height:calc(100% - 40px)">
<el-row v-for="item in partList" :key="item.id" class="title-info" :class="item.id === partData.id ? 'selected' : ''">
<div @click="partClick(item)">
<!--<p>{{item.title}}</p>-->
<p>{{$t('出货渠道')}}:{{channelName}}</p>
</div>
<el-collapse-transition>
<div v-if="item.fold === false ? true : false">
<div v-for="(secGoog, index) in item.sectionOrderList" :key="index" class="part-secGoog">
<p>{{secGoog.orderNo}}</p>
<p>{{secGoog.prodTitleZh}}</p>
<div>
<i class="el-icon-delete" @click="deleteOrder(secGoog)"></i>
</div>
</div>
</div>
</el-collapse-transition>
<div class="part-secGoog">
<template>
{{getTotlContent(item.secStatistics)}}
</template>
</div>
</el-row>
</el-scrollbar>
</el-col>
<!-- 右侧 -->
<el-col :span="18" class="right-area">
<el-row class="right-title">
<div>{{$t('货物筛选')}}</div>
<div>{{$t('出货渠道')}}:{{channelName}}</div>
<div>{{$t('可出特性')}}:{{attrName}}</div>
<div></div>
</el-row>
<!-- 搜索工作栏 -->
<el-row>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item :label="$t('始发地')">
<p>{{importCityName(queryParams.startWarehouseId)}}</p>
</el-form-item>
<el-form-item :label="$t('国家')" prop="destination">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')" @change="clearDestWarehouseIdList">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destination">
<el-select v-model="queryParams.destWarehouseIdList" :placeholder="$t('请选择目的地')" multiple>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable />
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="orderNo">
<el-select v-model="queryParams.channelId" clearable :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="queryAllData">{{$t('搜索')}}</el-button>
</el-form-item>
</el-form>
</el-row>
<!-- 表格 -->
<el-scrollbar style="height:calc(100% - 164px)">
<el-row v-for="(item, index) in toBePreList" :key="index" class="toBePre-table">
<el-row class="table-title">
<div>{{item.orderNo}}</div>
<div>{{$t('发往')}}:{{item.destWarehouseName}}</div>
<div :class="item.customsType !== 1 ? 'custom_type_red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item.customsType" />
</div>
<div>{{$t('入仓时间')}}:{{formatDate(item.rucangTime)}}</div>
<div>
<el-button type="text" @click="handleGoods('all', item)">[{{$t('全部预装')}}]</el-button>
<el-button type="text" @click="foldTable(index, item)">[{{item.fold ? $t('展开') : $t('收起')}}]</el-button>
</div>
</el-row>
<el-collapse-transition>
<div v-show="!item.fold">
<el-table v-loading="loading" :data="item.boxOrderItemList" border>
<el-table-column :label="$t('序号')" type="index" align="center" width="50" />
<el-table-column :label="$t('品名')" align="center" prop="" min-width="500">
<template slot-scope="{row}">
{{$l(row,'prodTitle')}}
</template>
</el-table-column>
<el-table-column :label="$t('品牌')" align="center" prop="brandType" width="120">
<template slot-scope="scope">
<template v-if="scope.row.brandName">{{scope.row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" width="120" />
<el-table-column :label="$t('体积')" align="center" prop="volume" width="120">
<template slot-scope="scope">
<p v-if="scope.row.volume">{{getTotlContent(scope.row,['volume'])}}</p>
</template>
</el-table-column>
<el-table-column :label="$t('重量')" align="center" prop="weight" width="120">
<template slot-scope="scope">
<p v-if="scope.row.weight">{{getTotlContent(scope.row,['weight'])}}</p>
</template>
</el-table-column>
<!-- <el-table-column :label="$t('预装柜')"
align="center"
prop=""
width="120">{{ $t('无返回') }}</el-table-column> -->
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleGoods('singele',scope.row)">{{$t('预装')}}</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-collapse-transition>
</el-row>
</el-scrollbar>
<!-- 分页 -->
<el-pagination background layout="prev, pager, next" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination>
</el-col>
</el-row>
</el-card>
<el-row>
<el-col :span="6" class="totle-info">
<div>
<p>{{$t('总计')}}:</p>
<p>{{sumStatistics(partList)}}</p>
</div>
<!--<div>
<p>{{$t('容量')}}:</p>
<p>{{calcCapacity}}</p>
</div>-->
</el-col>
</el-row>
<el-row class="button-area">
<el-button type="primary" @click="handlerFinish">{{$t('完成')}}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import {
loadSecGoodsList,
createSection,
deleteSection,
remove,
} from "@/api/ecw/boxSea";
import { preloadPage, createGoods } from '@/api/ecw/boxAir'
import { getWarehouseList } from "@/api/ecw/warehouse"
import {
formatDate,
getTotlContent,
serviceMsg,
getCapacity,
sumStatistics,
} from "../../utils";
import { getListTree } from "@/api/ecw/region";
import {getChannelList} from "@/api/ecw/channel";
/**
* 补单
*/
export default {
name: "supplementOrder",
inheritAttrs: false,
data() {
return {
//国家列表
countryList:[],
//仓库列表
warehouseList: [],
// 二维码/条码编号
cabinetNo: "",
// 表格数据
listData: [],
// 选中部分
partData: {},
// 部分列表
partList: [],
// 部分统计
loadStatistics: {},
// 查询参数
queryParams: {
startWarehouseId: this.$attrs.shipmentObj.startWarehouseId,
},
pageParam: { pageNo: 1, pageSize: 10 },
// 待预装
toBePreList: [],
total: 0,
loading: false,
unloadStatistics: {},
show: true,
// 渠道列表
channelList: []
};
},
watch:{
show(show){
if(!show){
this.$emit('close')
}
}
},
created() {
this.getCountry()
getChannelList().then(res => this.channelList = res.data)
},
methods: {
//获取国家
async getCountry() {
let countryList = await getListTree({treeType: 1})
this.countryList = countryList.data
let warehouseList = await getWarehouseList()
this.warehouseList = warehouseList.data
let warehouse = this.warehouseList.find(item=>item.id == this.$attrs.shipmentObj.destWarehouseId)
console.log(warehouse,'warehouse')
if(warehouse){
this.$set(this.queryParams,'destCountryId', warehouse.guojia)
}
this.queryAllData();
},
/* 查询已预装 */
getSecGoods() {
loadSecGoodsList({ shipmentId: this.$attrs.shipmentObj.id }).then(
(res) => {
this.partList = res.data.map((item, index) => {
item.fold = true;
if (
Object.keys(this.partData).length &&
this.partData.id === item.id
) {
item.fold = false;
}
return {
...item,
title: this.$t("第{index}部分", { index: index + 1 }),
};
});
if (this.partList.length && !Object.keys(this.partData).length) {
this.partList[0].fold = false;
this.partData = this.partList[0];
}
}
);
},
/* 查询待预装 */
getPreLoad() {
this.loading = true;
// 处理查询参数
let params = {
...this.queryParams,
shipmentId: this.$attrs.shipmentObj.id,
};
preloadPage({ ...params, ...this.pageParam }).then((res) => {
const { data } = res;
this.toBePreList = data.dataList?.list ?? [];
this.total = data.dataList?.total ?? 0;
this.unloadStatistics = data.unloadStatistics ?? {};
this.loading = false;
});
},
/* 删除订单 */
deleteOrder(data) {
let params = {
secId: this.partData.id,
shipmentId: this.$attrs.shipmentObj.id,
orderId: data.orderId,
};
remove(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
}).catch((res) => {
if (res.code === 666) {
this.$confirm(res.msg+this.$t('是否需要一起移出?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '确定移出',
cancelButtonText: '仅移出当前订单'
})
.then((_) => {
remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
})
.catch(action => {
if(action =='cancel'){
remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
}
});
}
});
},
/** 预装 */
handleGoods(type, item) {
let params = {
secId: this.partData.id,
shipmentId: this.$attrs.shipmentObj.id,
orderId: item.orderId,
isCover: 1
};
if (type === "all") {
params.orderItemIdList = item.boxOrderItemList.map(
(data) => data.orderItemId
);
} else {
params.orderItemIdList = [item.orderItemId];
}
createGoods(params)
.then((res) => {
const { data } = res;
if (data.relationMsg) {
const msg = data.relationMsg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
loadRelationOrder(data).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
} else {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
}
})
.catch((res) => {
if (res.code === 555) {
const msg = res.msg && res.msg.replaceAll(",", "");
this.$confirm(msg, this.$t("提示"), {
dangerouslyUseHTMLString: true,
type: "warning",
})
.then((_) => {
createGoods({ ...params, relationStatus: 1 }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((_) => {
this.queryAllData();
});
}
if (res.code === 566) {
this.$confirm(res.msg+this.$t('是否需要一起预装?'), this.$t("提示"), {
dangerouslyUseHTMLString: true,
distinguishCancelAndClose: true,
confirmButtonText: '预装关联单',
cancelButtonText: '仅当前订单'
})
.then((_) => {
createGoods({ ...params, relationStatus: 2, singleLoad: false }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
})
.catch((action) => {
if(action =='cancel'){
createGoods({ ...params, relationStatus: 2, singleLoad: true }).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
}
});
}
});
},
/* 增加部分 */
addPart() {
createSection({
shipmentId: this.$attrs.shipmentObj.id,
isCover: 1,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
},
/* 删除部分 */
deletePart() {
this.$confirm(
this.$t("确认删除该部分及其已预装订单?"),
this.$t("提示"),
{
type: "warning",
}
)
.then((_) => {
let params = {
id: this.partData.id,
deleteType: 2
};
deleteSection(params).then((res) => {
serviceMsg(res, this).then(() => {
this.partData = {};
this.getSecGoods();
});
});
})
.catch((_) => {});
},
/* 部分点击 */
partClick(item) {
item.fold = !item.fold;
this.partData = item;
let copyList = [...this.partList];
copyList = copyList.map((cItem) => {
cItem.fold = true;
if (item.id === cItem.id) {
cItem.fold = false;
return cItem;
}
});
this.$set(this.partList, copyList);
},
/* 获取城市 */
importCityName(id) {
var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? this.$l(arr[0], "title") : this.$t("");
},
/* 待预装订单分页 */
pageChange(page) {
this.pageParam.pageNo = page;
this.getPreLoad();
},
/* 折叠 */
foldTable(index, item) {
item.fold = !item.fold;
this.$set(this.toBePreList, index, item);
},
/* 查询所有数据 */
queryAllData() {
this.getSecGoods();
this.pageParam.pageNo = 1;
this.getPreLoad();
},
/* 完成 */
handlerFinish() {
this.$confirm(this.$t("确定执行操作?"), this.$t("提示"), {
type: "warning",
})
.then((_) => {
this.$emit("supplementFinish");
})
.catch((_) => {});
},
formatDate,
getTotlContent,
sumStatistics,
//切换国家时清除目的仓
clearDestWarehouseIdList() {
this.queryParams.destWarehouseIdList = []
}
},
computed: {
/** 目的地 */
importWarehouseList() {
return this.$attrs.warehouseList.filter(
(item) => (item.tradeType == "1" || item.type == "3") && item.guojia == this.queryParams.destCountryId
);
},
/* 容量 */
calcCapacity() {
const { cabinetRespVO } = this.$attrs.shipmentObj;
return getCapacity(cabinetRespVO);
},
// 渠道
channelName(){
return this.$l(this.$attrs.shipmentObj?.channelRespVO, 'name')
},
// 可出特性
attrName(){
return this.$attrs.shipmentObj?.channelRespVO?.attrNameList.join(",")
}
},
};
</script>
<style lang="scss">
.supplementOrder {
display: flex;
flex-direction: column;
p {
margin: 0;
}
.el-card__body {
height: 100%;
}
.content-area {
display: flex;
height: 100%;
.left-area {
border-right: 3px solid #e6ebf5;
.el-scrollbar__view {
padding-right: 10px;
}
.title-info {
margin-top: 10px;
height: auto;
&.selected {
> div:first-child {
background-color: #4f9cdd;
color: #fff;
}
}
> div:first-child {
font-size: 16px;
background-color: #f2f2f2;
line-height: 30px;
text-align: center;
cursor: pointer;
}
.part-secGoog {
margin-top: 5px;
display: flex;
align-items: center;
> p {
margin-right: 10px;
color: #4f9cdd;
}
> div {
flex: 1;
text-align: right;
> i {
cursor: pointer;
color: red;
}
}
}
}
}
.right-area {
padding-left: 10px;
.right-title {
display: flex;
align-items: center;
margin-bottom: 10px;
font-size: 16px;
> div:first-child {
font-size: 18px;
}
> div:first-child + div {
margin-left: 20px;
}
> div:last-child {
flex: 1;
text-align: right;
font-size: 18px;
color: red;
}
}
.table-title {
display: flex;
align-items: center;
line-height: 30px;
background-color: #4f9cdd;
color: #fff;
> div {
margin-left: 10px;
}
> div:last-child {
flex: 1;
display: flex;
justify-content: flex-end;
> .el-button--text {
color: #fff;
}
> .el-button--text:last-child {
margin-right: 10px;
}
}
}
.el-pagination {
margin-top: 10px;
padding: 0;
text-align: right;
}
.toBePre-table {
margin-bottom: 10px;
}
}
}
.totle-info {
font-size: 20px;
margin-top: 15px;
> div {
display: flex;
margin-bottom: 5px;
}
}
.button-area {
text-align: center;
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px"> <el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<el-form-item :label="$t('代理商AGENT')"> <el-form-item :label="$t('代理商AGENT')">
<supplierSelect v-model="subMaterialObj.agentId" :areaType="1" :placeholder="$t('请选择供应商')" :allSupplier="this.$attrs.allSupplier" disabled /> <supplierSelect v-model="subMaterialObj.agentId" :areaType="1" :placeholder="$t('请选择供应商')" :allSupplier="this.$attrs.allSupplier" :disabled="agentFlag" @change="getSup" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('提单号M/BL NO.')" class="two-element"> <el-form-item :label="$t('提单号M/BL NO.')" class="two-element">
<el-input v-model="subMaterialObj.blMblNo" :placeholder="$t('请输入提单号')"></el-input> <el-input v-model="subMaterialObj.blMblNo" :placeholder="$t('请输入提单号')"></el-input>
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
units: [], units: [],
// 柜型 // 柜型
cabinetType: "/", cabinetType: "/",
agentFlag: true
}; };
}, },
created() { created() {
...@@ -145,8 +146,9 @@ export default { ...@@ -145,8 +146,9 @@ export default {
this.$set(this.subMaterialObj,'kgs',this.shipmentObj.customsInfo?.dcGoodsWgt||undefined) this.$set(this.subMaterialObj,'kgs',this.shipmentObj.customsInfo?.dcGoodsWgt||undefined)
this.$set(this.subMaterialObj,'containerSealNo',(this.shipmentObj.trailerInfo?.tlContainerNo||'')+'/'+(this.shipmentObj.trailerInfo?.tlStripSeal||'/')) this.$set(this.subMaterialObj,'containerSealNo',(this.shipmentObj.trailerInfo?.tlContainerNo||'')+'/'+(this.shipmentObj.trailerInfo?.tlStripSeal||'/'))
this.subMaterialObj.containerSealNo = this.subMaterialObj.containerSealNo.replace('//','') this.subMaterialObj.containerSealNo = this.subMaterialObj.containerSealNo.replace('//','')
this.getSup(this.subMaterialObj.agentId) if(this.subMaterialObj.agentId) this.getSup(this.subMaterialObj.agentId)
} }
if(!this.subMaterialObj.agentId) this.agentFlag = false
}, },
methods: { methods: {
getSup(id) { getSup(id) {
......
...@@ -259,10 +259,6 @@ export default { ...@@ -259,10 +259,6 @@ export default {
if (start.includes(val[keyName])) { if (start.includes(val[keyName])) {
node.currStatus = "start"; node.currStatus = "start";
if (type === "mergePkg"){
++nodeIndex;
continue;
}
} }
if (start.includes(val[keyName]) && val[voName]) { if (start.includes(val[keyName]) && val[voName]) {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :allLading="allLading" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" /> <seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :allLading="allLading" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" />
<!-- 海运步骤图 --> <!-- 海运步骤图 -->
<seaStepDetail v-if="seaBaseData.length>0" :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" /> <seaStepDetail v-if="flag" :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -47,6 +47,7 @@ import { getLadingShipperPage } from "@/api/ecw/ladingShipper"; ...@@ -47,6 +47,7 @@ import { getLadingShipperPage } from "@/api/ecw/ladingShipper";
// 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用 // 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用
import { airBaseData } from "./utils"; import { airBaseData } from "./utils";
import { airOneData } from "./utils";
/** /**
* 海运操作主页面 * 海运操作主页面
*/ */
...@@ -62,6 +63,7 @@ export default { ...@@ -62,6 +63,7 @@ export default {
data() { data() {
return { return {
airBaseData, airBaseData,
airOneData,
shipmentObj: {}, shipmentObj: {},
warehouseList: [], warehouseList: [],
// 供应商 // 供应商
...@@ -76,6 +78,7 @@ export default { ...@@ -76,6 +78,7 @@ export default {
seaBaseData: [], seaBaseData: [],
// 状态 // 状态
statusLabel: "", statusLabel: "",
flag: false
}; };
}, },
created() { created() {
...@@ -122,22 +125,9 @@ export default { ...@@ -122,22 +125,9 @@ export default {
this.shipmentObj = data ?? {}; this.shipmentObj = data ?? {};
this.seaBaseData = this.airBaseData() this.seaBaseData = this.airBaseData()
if(this.shipmentObj.destinationClearance==3&&this.shipmentObj.deliveryType==2){ if(this.shipmentObj.destinationClearance==3&&this.shipmentObj.deliveryType==2){
this.seaBaseData = this.seaBaseData.filter(item=>{ this.seaBaseData = this.airOneData()
var flag = true
item.forEach(element => {
if(element.type == 'agent'){
flag = false
}
if(element.type == 'unloading'){
flag = false
}
if(element.type == 'cusClearance'){
flag = false
}
});
return flag
})
} }
this.flag = true
}); });
}, },
}, },
......
...@@ -87,7 +87,7 @@ function airBaseData() { ...@@ -87,7 +87,7 @@ function airBaseData() {
/** /**
* 合包状态:161待合包 162已合包 * 合包状态:161待合包 162已合包
*/ */
voName: "trailerInfo", voName: "boxMergePkgBackVO",
keyName: "mergePkgStatus", keyName: "mergePkgStatus",
status: { status: {
start: [161], start: [161],
...@@ -326,6 +326,251 @@ function airBaseData() { ...@@ -326,6 +326,251 @@ function airBaseData() {
]; ];
} }
/**
* 客户+单票流程
*
* @return {*}
*/
function airOneData() {
return [
[
{
title: i18n.$t("订舱"),
imgSrc: {
start: require("@/assets/images/shipping/dc-start.png"),
end: require("@/assets/images/shipping/dc-end.png"),
},
type: "booking", // 类型
dataKey: "1", // 字典数据键值
/**
* 订舱状态:11、未订舱;12、已订舱
*/
voName: "bookAirInfo", // 订舱对象vo
keyName: "bkStatus",
status: {
start: [11],
wait: [],
end: [12],
},
},
],
[
{
title: i18n.$t("分拣"),
imgSrc: {
start: require("@/assets/images/shipping/yz-start.png"),
wait: require("@/assets/images/shipping/yz-wait.png"),
end: require("@/assets/images/shipping/yz-end.png"),
},
type: "preinstall",
dataKey: "2", // 字典数据键值
/**
* 预装状态:21、未预装;22、预装中;23、预装审核中;24、预装审核失败;25、预装审核成功
*/
voName: "preInstallInfo",
keyName: "prStatus",
status: {
start: [21],
wait: [22, 23, 24],
end: [25],
},
}
],
[
{
title: i18n.$t("理货"),
imgSrc: {
start: require("@/assets/images/shipping/lh-start.png"),
wait: require("@/assets/images/shipping/lh-wait.png"),
end: require("@/assets/images/shipping/lh-end.png"),
},
type: "tally",
dataKey: "16", // 字典数据键值
/**
* 理货状态:2111、未理货;2112、已理货
*/
voName: "tallyInfo",
keyName: "tyStatus",
status: {
start: [2111],
wait: [],
end: [2112],
},
},
{
title: i18n.$t("合包"),
imgSrc: {
start: require("@/assets/images/shipping/qg-start.png"),
wait: require("@/assets/images/shipping/qg-wait.png"),
end: require("@/assets/images/shipping/qg-end.png"),
},
type: "mergePkg",
dataKey: "3", // 字典数据键值
/**
* 合包状态:161待合包 162已合包
*/
voName: "boxMergePkgBackVO",
keyName: "mergePkgStatus",
status: {
start: [161],
wait: [],
end: [162],
},
},
],
[
{
title: i18n.$t("出货"),
imgSrc: {
start: require("@/assets/images/shipping/zg-start.png"),
wait: require("@/assets/images/shipping/zg-wait.png"),
end: require("@/assets/images/shipping/zg-end.png"),
},
type: "shipment",
dataKey: "4", // 字典数据键值
/**
* 出货状态:171、待出货 172、出货审核中 173、审核失败 174、审核成功 = 175、已出货
*/
voName: "boxAirShipmentBackVO",
keyName: "airShipmentStatus",
status: {
start: [171],
wait: [172,173],
end: [175],
},
},
{
title: i18n.$t("出仓"),
imgSrc: {
start: require("@/assets/images/shipping/zg-start.png"),
wait: require("@/assets/images/shipping/zg-wait.png"),
end: require("@/assets/images/shipping/zg-end.png"),
},
type: "checkout",
dataKey: "5", // 字典数据键值
/**
* 出仓状态:221、未出仓 222、已出仓
*/
voName: "boxAirCheckoutBackVO",
keyName: "checkoutStatus",
status: {
start: [221],
wait: [],
end: [222],
},
},
],
[
{
title: i18n.$t("报关"),
imgSrc: {
start: require("@/assets/images/shipping/bg-start.png"),
wait: require("@/assets/images/shipping/bg-wait.png"),
end: require("@/assets/images/shipping/bg-end.png"),
},
type: "cusDeclaration",
dataKey: "5", // 字典数据键值
/**
*报关状态:51、未报关;52、报关中;53、已报关
*/
voName: "customsInfo",
keyName: "dcStatus",
status: {
start: [51],
wait: [52],
end: [53],
},
},
{
title: i18n.$t("提单补料"),
imgSrc: {
start: require("@/assets/images/shipping/tdcl-start.png"),
wait: require("@/assets/images/shipping/tdcl-wait.png"),
end: require("@/assets/images/shipping/tdcl-end.png"),
},
type: "subMaterial",
dataKey: "7", // 字典数据键值
/**
* 提单补料状态:71、未提单补料;72、已提单补料
*/
voName: "ladingBillInfo",
keyName: "blStatus",
status: {
start: [71],
wait: [],
end: [72],
},
},
],
[
{
title: i18n.$t("起飞"),
imgSrc: {
start: require("@/assets/images/shipping/ecqf-start.png"),
wait: require("@/assets/images/shipping/ecqf-wait.png"),
end: require("@/assets/images/shipping/ecqf-end.png"),
},
type: "twoWayTakeoff",
dataKey: "9", // 字典数据键值
/**
* 起飞状态:231、未起飞;232、已起飞
*/
voName: "boxAirFlyInfo",
keyName: "flyStatus",
status: {
start: [231],
wait: [],
end: [232],
},
},
],
[
{
type: "clrDocument",
imgSrc: {
start: require("@/assets/images/shipping/qg-start.png"),
wait: require("@/assets/images/shipping/qg-wait.png"),
end: require("@/assets/images/shipping/qg-end.png"),
},
title: i18n.$t("清关文件"),
dataKey: "11", // 字典数据键值
/**
* 清关文件状态:111、未清关文件;112、已清关文件
*/
voName: "clearanceDocInfo",
keyName: "cdStatus",
status: {
start: [111],
wait: [],
end: [112],
},
},
],
[
{
title: i18n.$t("结算"),
imgSrc: {
start: require("@/assets/images/shipping/js-start.png"),
wait: require("@/assets/images/shipping/js-wait.png"),
end: require("@/assets/images/shipping/js-end.png"),
},
type: "settlement",
dataKey: "15", // 字典数据键值
/**
* 结算状态:191、未结算;192、结算中;193、已结算
*/
voName: "settlementInfo",
keyName: "slStatus",
status: {
start: [191],
wait: [192],
end: [193],
},
},
],
];
}
/** /**
* 详情显示列 * 详情显示列
* *
...@@ -934,6 +1179,7 @@ export { ...@@ -934,6 +1179,7 @@ export {
getColmnMapping, getColmnMapping,
getSeaStatus, getSeaStatus,
airBaseData, airBaseData,
airOneData,
constantDict, constantDict,
formatStringNumber, formatStringNumber,
formatDateStr, formatDateStr,
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180"> <el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180">
<template slot-scope="{row}"> <template slot-scope="{row}">
<div :style="{red: row.overdueStatus == 0 ? 'red' : null}">{{ parseTime(row.endTime, '{y}-{m}-{d}') }}</div> <div :style="{color: !row.overdueStatus ? 'red' : null}">{{ parseTime(row.endTime, '{y}-{m}-{d}') }}</div>
<div v-if="row.overdueStatus == 0" style="color: red">{{ $t('已过期') }}</div> <div v-if="!row.overdueStatus" style="color: red">{{ $t('已过期') }}</div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <!--
......
...@@ -177,10 +177,9 @@ ...@@ -177,10 +177,9 @@
{{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}} {{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求')"> <el-descriptions-item :label="$t('特殊要求')">
<template v-for="packageType in order.packageType.split(',')"> <template v-if="order.packageType">
<dict-tag class="mr-10" v-if="packageType" :key="packageType" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" :value="packageType" /> <dict-tag v-for="packageType in order.packageType.split(',').filter(item => !!item)" class="mr-10" :key="packageType" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" :value="packageType" />
</template> </template>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求备注')"> <el-descriptions-item :label="$t('特殊要求备注')">
{{order.packageRemarks}} {{order.packageRemarks}}
...@@ -277,7 +276,7 @@ ...@@ -277,7 +276,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('订单动态')" name="second"> <el-tab-pane :label="$t('订单动态')" name="second">
<el-timeline v-if="order.orderTimeVOList && order.orderTimeVOList.length" :reverse="true"> <el-timeline v-if="order.orderTimeVOList && order.orderTimeVOList.length" :reverse="true">
<el-timeline-item v-for="(activity, index) in order.orderTimeVOList" :key="index" :timestamp="activity.timestamp"> <el-timeline-item v-for="(activity, index) in order.orderTimeVOList" :key="index" :timestamp="parseTime(activity.businessTime)">
{{ $l(activity, 'title') }} {{ $l(activity, 'title') }}
<div>{{$l(activity, 'remarks')}}</div> <div>{{$l(activity, 'remarks')}}</div>
</el-timeline-item> </el-timeline-item>
...@@ -505,9 +504,11 @@ import FeeDetail from "@/views/ecw/order/components/FeeDetail.vue"; ...@@ -505,9 +504,11 @@ import FeeDetail from "@/views/ecw/order/components/FeeDetail.vue";
import PackHistory from './components/PackHistory'; import PackHistory from './components/PackHistory';
import PackHistoryDetail from './components/PackHistoryDetail'; import PackHistoryDetail from './components/PackHistoryDetail';
import {getSupplier, getSupplierPage} from '@/api/ecw/supplier' import {getSupplier, getSupplierPage} from '@/api/ecw/supplier'
import {formatTime} from "@/utils";
export default { export default {
name: "detail", name: "detail",
components: { components: {
DeclarationDocuments,
ImageDisplay, ImageDisplay,
OperateLogDetail, OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,PackHistory,PackHistoryDetail, PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,PackHistory,PackHistoryDetail,
...@@ -629,6 +630,8 @@ export default { ...@@ -629,6 +630,8 @@ export default {
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
}, },
methods: { methods: {
parseTime,
formatTime,
checkPermi, // 检查权限 checkPermi, // 检查权限
// 获取储位名称 // 获取储位名称
getLocationName(locationArr){ getLocationName(locationArr){
......
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