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

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

parents f1657038 55aee6cb
......@@ -48,7 +48,7 @@
{{$l(row, 'destTitle')}}
</template>
</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}">
{{$l(row.channel, 'name')}}
</template>
......@@ -328,6 +328,8 @@ export default {
},
// 运输方式筛选
transportFilter(item){
// 未指定类型则全部可用
if(!this.type) return true
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
},
}
......
......@@ -216,6 +216,7 @@ export const DICT_TYPE = {
BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
BOX_AIR_SHIPMENT_PROCESS: 'air_shipment_process', // 空运出货
BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型
......
......@@ -8,6 +8,11 @@
<el-form-item :label="$t('柜号')" prop="cubNo">
<el-input v-model="queryParams.cubNo" :placeholder="$t('请输入柜号')" clearable @keyup.enter.native="handleQuery" />
</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-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')">
......@@ -78,12 +83,12 @@
</template>
</el-table-column>
<el-table-column :label="$t('方数(预装/已装)')" align="center" prop="">
<el-table-column :label="$t('方数(分拣/已装)')" align="center" prop="">
<template slot-scope="{row}">
{{row.boxStatistics.volume}}/{{row.boxStatistics.loadVolume}}
</template>
</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}">
{{row.boxStatistics.weight}}/{{row.boxStatistics.loadWeight}}
</template>
......@@ -113,12 +118,12 @@
<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-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit" :disabled="scope.row.prStatus>21">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item command="air">{{$t('操作')}}-{{$t('空运')}}</el-dropdown-item>
<el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="batchMarkup">{{$t('批量加价')}}</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.prStatus<25" command="editLadingBill">{{$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" v-has-permi="['shipment:air:action']">{{$t('操作')}}-{{$t('空运')}}</el-dropdown-item>
<el-dropdown-item command="error" v-has-permi="['shipment:air:exception']">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost" v-has-permi="['shipment:air:fee']">{{$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" v-has-permi="['shipment:air:editLadingBill']">{{$t('编辑提货单')}}</el-dropdown-item>
<!-- <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>-->
</el-dropdown-menu>
......@@ -128,13 +133,13 @@
{{$t('下载')}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="downloadPreloadGoodsList" v-hasPermi="['shipment:box: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="downloadReceivableList" v-hasPermi="['shipment:box: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="downloadSoncapFiles" v-hasPermi="['shipment:box: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="downloadLadingCopy" v-hasPermi="['shipment:box:download:downloadLadingCopy']">{{$t('提单Copy')}}</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:air:download:downloadLoadGoodsList']">{{$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:air:download:downloadAgentListFiles']">agent list</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:air:download:zipDownload']">{{$t('提货单')}}</el-dropdown-item>
<el-dropdown-item command="downloadLadingCopy" v-hasPermi="['shipment:air:download:downloadLadingCopy']">{{$t('提单Copy')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
......@@ -152,7 +157,7 @@
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template>
<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 v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" type="air" />
......@@ -170,7 +175,8 @@
<el-table-column :label="$t('自编号')" align="center" prop="selfNo" />
<el-table-column :label="$t('类型')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" />
{{scope.row.noticeText}}
<!--<dict-tag :type="DICT_TYPE.BOX_SHIPPING_NOTICE_TYPE" :value="String(scope.row.noticeType)" />-->
</template>
</el-table-column>
<el-table-column :label="$t('预计时间')" align="center">
......@@ -215,6 +221,7 @@ import {
} from "./shippingAir/utils";
import {getCabinetPage} from "@/api/ecw/cabinet";
import LadingBill from "@/views/ecw/box/ladingBill/index.vue";
import {listUser} from "@/api/system/user";
export default {
name: 'indexAir',
......@@ -306,6 +313,7 @@ export default {
this.$t("部分完成"),
this.$t("已完成"),
],
allUsers: []
}
},
computed: {
......@@ -351,6 +359,12 @@ export default {
this.getList()
this.getChannelList()
this.queryNotice()
// 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allUsers = data.list ?? [];
});
},
methods: {
formatDate,
......@@ -552,13 +566,14 @@ export default {
break;
case "handle":
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);
}
if ([5, 6, 7].includes(noticeType)) {
// 10 是起飞异常,参考海运的起运异常6处理
if ([5, 6, 7, 10].includes(noticeType)) {
this.$router.push("/boxAir/query/" + row.id);
}
if([9].includes(noticeType)){
if([9, 12, 13].includes(noticeType)){
await dealCustomsSplitNotify(row.notifyId)
}
this.closeDialog();
......
......@@ -2,12 +2,12 @@
<div class="shippingSea-dialog">
<el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item :label="$t('操作步骤')">
<el-select v-if="flag=='sea'" 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-select v-model="errorObj.opStep" :placeholder="$t('请选择操作步骤')">
<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 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-select>
</el-select>-->
</el-form-item>
<el-form-item :label="$t('票异常')">
<el-select v-model="errorObj.billAbnId" :placeholder="$t('请选择票异常')">
......@@ -75,10 +75,21 @@ export default {
label: this.$t(""),
},
],
flag: "sea",
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() {
const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode?.dataKey ?? undefined };
......
......@@ -102,6 +102,11 @@ export default {
"airArrivalInfo.actTime"(val) {
this.compareDate(this.airArrivalInfo.estTime, val);
},
// 确认到港时间
"arrivalObj.apConfirmTime"(val) {
this.compareDate(this.getExpectedTime(), val);
},
},
methods: {
regCloseDialog(type) {
......@@ -110,7 +115,7 @@ export default {
this.$emit("getBoxInfo");
}
},
// 获取预计到港时间
// 获取实际二程起飞时间
getHeadTravelTime() {
const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) {
......@@ -120,6 +125,16 @@ export default {
}
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) {
this.showMsg = false;
......
<template>
<div>
<el-select
filterable
:value="value === 0 ? undefined : value"
@change="change"
v-bind="$attrs"
clearable
>
<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"
></el-option>
</el-select>
<div>
<el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
<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">
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content">
<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>
</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-tooltip>
</el-option>
</el-select>
</div>
</template>
......@@ -68,3 +62,10 @@ export default {
},
};
</script>
<style scoped>
.iclass {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
......@@ -22,7 +22,7 @@
</el-form-item>
<el-form-item :label="$t('状态')" prop="dcCustomsStatus">
<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-form-item>
......@@ -30,21 +30,21 @@
<div v-show="cusDeclarationObj.dcCustomsStatus === '3'">
<el-form-item :label="$t('查验')">
<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-form-item>
</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-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 :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 :label="$t('退场状态')" v-if="cusDeclarationObj.dcCheckStatus === '1' || cusDeclarationObj.dcCheckStatus === '2'">
{{getCheckExamineStatus}}
{{ getCheckExamineStatus }}
</el-form-item>
</div>
......@@ -54,25 +54,29 @@
</el-form-item>
<el-form-item :label="$t('过机状态')" prop="overMachineStatus">
<el-radio-group v-model="cusDeclarationObj.overMachineStatus" :disabled="inReview||inOverReview">
<el-radio :label="1">{{$t('顺利')}}</el-radio>
<el-radio :label="2">{{$t('异常')}}</el-radio>
<el-radio-group v-model="cusDeclarationObj.overMachineStatus" :disabled="inReview || inOverReview">
<el-radio :label="1">{{ $t('顺利') }}</el-radio>
<el-radio :label="2">{{ $t('异常') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="overMachineAbnormalStatus" v-show="cusDeclarationObj.overMachineStatus == 2">
<el-radio-group v-model="cusDeclarationObj.overMachineAbnormalStatus" :disabled="inReview||inOverReview">
<el-radio :label="1">{{$t('敏感货')}}</el-radio>
<el-radio :label="2">{{$t('重量误报')}}</el-radio>
<el-form-item prop="overMachineAbnormalStatus" v-show="cusDeclarationObj.overMachineStatus == 2">
<el-radio-group v-model="cusDeclarationObj.overMachineAbnormalStatus" :disabled="inReview || inOverReview">
<el-radio :label="1">{{ $t('敏感货') }}</el-radio>
<el-radio :label="2">{{ $t('重量误报') }}</el-radio>
</el-radio-group>
</el-form-item>
<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 :label="1">{{$t('退场时间')}}<el-tooltip class="item" effect="dark" :content="$t('选择退场时间,填写退场时间后,提交删单退场审核,订单返回到“已订舱”环节修改订舱号后,提交之后直接到报关流程')" placement="top">
<div class="el-icon-question"></div>
</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 v-model="cusDeclarationObj.deleteExitType" :disabled="inReview || inOverReview">
<el-radio :label="1"
>{{ $t('退场时间')
}}<el-tooltip class="item" effect="dark" :content="$t('选择退场时间,填写退场时间后,提交删单退场审核,订单返回到“已订舱”环节修改订舱号后,提交之后直接到报关流程')" placement="top">
<div class="el-icon-question"></div> </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-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && cusDeclarationObj.deleteExitType == 1" :label="$t('退场时间')">
......@@ -80,39 +84,39 @@
</el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1">
<el-form-item :label="$t('删单退场状态')">
{{getOverExamineStatus}}
{{ getOverExamineStatus }}
</el-form-item>
</el-form-item>
<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 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 :label="1">{{$t('机场误差3%')}}</el-radio>
<el-radio :label="2">{{$t('超过误差10KG')}}</el-radio>
<el-radio :label="3">{{$t('过机放行-未找到重货订单')}}</el-radio>
<el-radio :label="4">{{$t('过机放行-已找到重货订单')}}</el-radio>
<el-radio :label="1">{{ $t('机场误差3%') }}</el-radio>
<el-radio :label="2">{{ $t('超过误差10KG') }}</el-radio>
<el-radio :label="3">{{ $t('过机放行-未找到重货订单') }}</el-radio>
<el-radio :label="4">{{ $t('过机放行-已找到重货订单') }}</el-radio>
</el-radio-group>
</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">
<template slot="append">
{{ $t('KG') }}
</template>
</el-input>
</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" />
</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-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" />
</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">
{{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>
</el-form-item>
......@@ -120,26 +124,25 @@
<el-button type="primary">{{$t('下载装箱单')}}</el-button>
</el-form-item> -->
<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>
<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" plain @click="canclAudit">{{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-row>
<el-row class="operate-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" @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 @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="exceptionReg" :disabled="!isShowError">{{$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" @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 @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="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</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-form label-width="100px">
......@@ -159,15 +162,15 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<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>
</el-table-column>
</el-table>
</el-row>
<el-row class="cost-title">
<div>{{$t('额外费用订单')}}</div>
<div>{{ $t('额外费用订单') }}</div>
<div>
<el-button size="small" @click="restCostList()">{{$t('重置')}}</el-button>
<el-button size="small" @click="restCostList()">{{ $t('重置') }}</el-button>
</div>
</el-row>
<el-row>
......@@ -181,8 +184,8 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<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 type="primary" size="small" @click="updateExtraCost(scope.row)">{{ $t('修改') }}</el-button>
<el-button size="small" @click="restCostList(scope.row)">{{ $t('重置') }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -191,50 +194,32 @@
</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" />
</el-dialog>
</div>
</template>
<script>
import supplierSelect from "./common/supplierSelect.vue";
import usersSelect from "./common/usersSelect.vue";
import ordersSelect from "./common/ordersSelect.vue";
import {
customsCreate,
extraCostList,
extraCostOrder,
extraCostCreate,
extraCostUpdate,
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";
import supplierSelect from './common/supplierSelect.vue'
import usersSelect from './common/usersSelect.vue'
import ordersSelect from './common/ordersSelect.vue'
import { customsCreate, extraCostList, extraCostOrder, extraCostCreate, extraCostUpdate, 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 {
name: "cusDeclaration",
name: 'cusDeclaration',
inheritAttrs: false,
components: { supplierSelect, ImageUpload, regError, usersSelect, ordersSelect },
props: {
shipmentObj: Object,
shipmentObj: Object
},
data() {
return {
......@@ -242,32 +227,20 @@ export default {
cusDeclarationObj: {},
// 校验
rules: {
dcBoxWgt: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
dcGoodsWgt: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
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("必填")}
],
dcBoxWgt: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
dcGoodsWgt: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
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: {
title: "",
dialogVisible: false,
title: '',
dialogVisible: false
},
// 订单号
orderNo: "",
orderNo: '',
// 订单列表
costOrderList: [],
// 额外费用列表
......@@ -278,439 +251,402 @@ export default {
// 异常登记
regDialogVisible: false,
isShowError: false,
inspectionTimecustoms: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_CUSTOMS
)[0].value,
inspectionTimecustoms: this.getDictDatas(this.DICT_TYPE.BOX_INSPECTION_TIME_CUSTOMS)[0].value,
isDownload: false,
normalOrderList: [],
isShowNormal: false,
sectionOrderList: []
};
}
},
created() {
const { currNode } = this.$attrs;
const { voName } = currNode;
const { currNode } = this.$attrs
const { voName } = currNode
let oldData = {
...this.shipmentObj[voName],
documentInfo: this.shipmentObj.documentInfo?.split(",") ?? [],
};
documentInfo: this.shipmentObj.documentInfo?.split(',') ?? []
}
if (!this.shipmentObj[voName]) {
oldData.dcCustomsType = oldData.dcCustomsType
? oldData.dcCustomsType
: this.getDcCustomsType(oldData.documentInfo);
oldData.dcCustomsType = oldData.dcCustomsType ? oldData.dcCustomsType : this.getDcCustomsType(oldData.documentInfo)
}
oldData = formatDateStr(oldData, [
"dcCutOffTime",
"dcCheckTime",
"dcPassTime",
"dcDecTime",
]);
oldData = formatNumberString(oldData, [
"dcCustomsType",
"dcCustomsStatus",
"dcCheckStatus",
]);
oldData = formatDateStr(oldData, ['dcCutOffTime', 'dcCheckTime', 'dcPassTime', 'dcDecTime'])
oldData = formatNumberString(oldData, ['dcCustomsType', 'dcCustomsStatus', 'dcCheckStatus'])
oldData.overDealUser = this.strToArray(oldData.overDealUser)
oldData.overOrders = this.strToArray(oldData.overOrders)
this.cusDeclarationObj = oldData;
if(this.shipmentObj.overMachineExamineStatus == 1){
this.$set(this.cusDeclarationObj, "overMachineStatus", 2)
this.$set(this.cusDeclarationObj, "overMachineAbnormalStatus", 1)
this.cusDeclarationObj = oldData
if (this.shipmentObj.overMachineExamineStatus == 1) {
this.$set(this.cusDeclarationObj, 'overMachineStatus', 2)
this.$set(this.cusDeclarationObj, 'overMachineAbnormalStatus', 1)
}
if(this.shipmentObj.customsDeleteExitApprovalInfo){
if(this.shipmentObj.customsDeleteExitApprovalInfo.details){
if (this.shipmentObj.customsDeleteExitApprovalInfo) {
if (this.shipmentObj.customsDeleteExitApprovalInfo.details) {
let details = JSON.parse(this.shipmentObj.customsDeleteExitApprovalInfo.details)
this.$set(this.cusDeclarationObj, "deleteExitType", details.deleteExitType)
this.$set(this.cusDeclarationObj, "deleteExitTime", details.deleteExitTime)
this.$set(this.cusDeclarationObj, 'deleteExitType', details.deleteExitType)
this.$set(this.cusDeclarationObj, 'deleteExitTime', details.deleteExitTime)
}
}
boxGoodsDetail({
shipmentId: this.shipmentObj.id,
secId: 0
}).then((res) => {
this.sectionOrderList = res.data.sectionOrderList;
});
shipmentId: this.shipmentObj.id,
secId: 0
}).then((res) => {
this.sectionOrderList = res.data.sectionOrderList
})
},
methods: {
strToArray(str) {
if(!str) return []
let array = str?.split(",") ?? []
return array.map(item=>{return Number(item)})
if (!str) return []
let array = str?.split(',') ?? []
return array.map((item) => {
return Number(item)
})
},
getCustomsOrderList(dcCustomsType) {
customsOrderList({
shipmentId: this.shipmentObj.id,
customsTypes: dcCustomsType === "3" ? "2,3" : dcCustomsType,
customsTypes: dcCustomsType === '3' ? '2,3' : dcCustomsType
}).then((res) => {
this.normalOrderList = res.data ?? [];
if (dcCustomsType === "1") {
this.isShowNormal = false;
this.normalOrderList = res.data ?? []
if (dcCustomsType === '1') {
this.isShowNormal = false
} else {
this.isShowNormal = true;
this.isShowNormal = true
}
});
})
},
getOrders(id) {
let order = this.sectionOrderList.find(item=>item.orderId==id)
if(order){
let order = this.sectionOrderList.find((item) => item.orderId == id)
if (order) {
return order.orderNo
}
return ''
},
regCloseDialog(type) {
this.regDialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
this.regDialogVisible = false
if (type === 'error') {
this.$emit('getBoxInfo')
}
},
// 时间比较
compareDate(dcDecTime, dcPassTime) {
this.isShowError = false;
this.isShowError = false
let date1 = null,
date2 = null;
if (dcDecTime) date1 = dayjs(dcDecTime);
if (dcPassTime) date2 = dayjs(dcPassTime);
date2 = null
if (dcDecTime) date1 = dayjs(dcDecTime)
if (dcPassTime) date2 = dayjs(dcPassTime)
if (date1 && date2) {
const delayDay = date2.diff(date1, "day");
if (delayDay >= this.inspectionTimecustoms) this.isShowError = true;
const delayDay = date2.diff(date1, 'day')
if (delayDay >= this.inspectionTimecustoms) this.isShowError = true
}
},
// 异常登记
exceptionReg() {
this.regDialogVisible = true;
this.regDialogVisible = true
},
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push({
path: "/order/detail",
query: { orderId: row.orderId },
});
path: '/order/detail',
query: { orderId: row.orderId }
})
},
getDcCustomsType(documentInfo = []) {
const newList = Array.from(new Set(documentInfo));
const newList = Array.from(new Set(documentInfo))
if (newList.length > 1) {
return "3";
return '3'
}
if (newList.length === 1) {
return newList[0] === "1" ? "1" : "2";
return newList[0] === '1' ? '1' : '2'
}
},
getButtonLabel(documentInfo = []) {
const newList = Array.from(new Set(documentInfo));
return newList.length >= 2 ? this.$t("混合报关") : this.$t("VGM声明");
const newList = Array.from(new Set(documentInfo))
return newList.length >= 2 ? this.$t('混合报关') : this.$t('VGM声明')
},
submitCustomsCreate(operateType) {
let parems = {... this.cusDeclarationObj}
parems.overDealUser = !Array.isArray(parems.overDealUser)?null:parems.overDealUser.join(',')
parems.overOrders = !Array.isArray(parems.overOrders)?null:parems.overOrders.join(',')
let parems = { ...this.cusDeclarationObj }
parems.overDealUser = !Array.isArray(parems.overDealUser) ? null : parems.overDealUser.join(',')
parems.overOrders = !Array.isArray(parems.overOrders) ? null : parems.overOrders.join(',')
customsCreate({
...parems,
shipmentId: this.shipmentObj.id,
operateType,
operateType
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
this.cancel('submit')
})
})
},
//提交删单退场审核
approvalCreate(){
// this.$refs["cusDeclarationForm"].validate((valid) => {
// if (valid) {}
// })
if(!this.cusDeclarationObj.deleteExitType){
this.$message.error(this.$t("请选择删单退场类型或者时间"));
return;
}
if(this.cusDeclarationObj.deleteExitType == 1 && !this.cusDeclarationObj.deleteExitTime){
this.$message.error(this.$t("请选择退场时间"));
return;
}
let details = {
deleteExitType: this.cusDeclarationObj.deleteExitType,
deleteExitTime: this.cusDeclarationObj.deleteExitTime
}
approvalCreate({
approvalCreate() {
this.$refs['cusDeclarationForm'].validate((valid) => {
if (valid) {
if (!this.cusDeclarationObj.deleteExitType) {
this.$message.error(this.$t('请选择删单退场类型或者时间'))
return
}
if (this.cusDeclarationObj.deleteExitType == 1 && !this.cusDeclarationObj.deleteExitTime) {
this.$message.error(this.$t('请选择退场时间'))
return
}
let details = {
deleteExitType: this.cusDeclarationObj.deleteExitType,
deleteExitTime: this.cusDeclarationObj.deleteExitTime
}
approvalCreate({
shipmentId: this.shipmentObj.id,
approvalStatus: 0,
approvalType: 11,
details: JSON.stringify(details)
}).then(() => {
this.onSubmit(1)
});
})
}
})
},
/** 提交 */
onSubmit(operateType) {
this.$refs["cusDeclarationForm"].validate((valid) => {
this.$refs['cusDeclarationForm'].validate((valid) => {
if (valid) {
if (operateType === 1) {
this.submitCustomsCreate(operateType);
return;
this.submitCustomsCreate(operateType)
return
// 保存
}
// 提交
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj;
const { dcCustomsStatus, dcCheckStatus } = this.cusDeclarationObj
// 1.状态 报关中/放行 直接提交
if (dcCustomsStatus !== "3") {
this.submitCustomsCreate(operateType);
return;
if (dcCustomsStatus !== '3') {
this.submitCustomsCreate(operateType)
return
}
// 2.查验状态,空 直接提交
if (!dcCheckStatus) {
this.submitCustomsCreate(operateType);
return;
this.submitCustomsCreate(operateType)
return
}
// 3.查验状态,查验后放行 直接提交
if (dcCheckStatus === "3") {
const { overMachineExamineStatus } = this.shipmentObj;
if (dcCheckStatus === '3') {
const { overMachineExamineStatus } = this.shipmentObj
// 没有退场审核中的状态
if (overMachineExamineStatus !== 1) {
this.submitCustomsCreate(operateType);
return;
this.submitCustomsCreate(operateType)
return
}
}
// 4.查验状态,退场/部分退场 提示
if (["1", "2"].includes(dcCheckStatus)) {
const { overMachineExamineStatus } = this.shipmentObj;
if (['1', '2'].includes(dcCheckStatus)) {
const { overMachineExamineStatus } = this.shipmentObj
// 退场审核状态,1-审核中,2-审核成功,3-审核失败,4-取消
if ([0, 2, 3, 4].includes(overMachineExamineStatus)) {
this.$modal
.confirm(this.$t(
`您确认提交${
dcCheckStatus === "1" ? this.$t("全部退场") : this.$t("部分退场")
}审核吗?`)
)
.then(() => {
let parems = {... this.cusDeclarationObj}
parems.overDealUser = !Array.isArray(parems.overDealUser)?null:parems.overDealUser.join(',')
parems.overOrders = !Array.isArray(parems.overOrders)?null:parems.overOrders.join(',')
customsCreate({
...parems,
shipmentId: this.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.$emit("getBoxInfo");
});
});
});
this.$modal.confirm(this.$t(`您确认提交${dcCheckStatus === '1' ? this.$t('全部退场') : this.$t('部分退场')}审核吗?`)).then(() => {
let parems = { ...this.cusDeclarationObj }
parems.overDealUser = !Array.isArray(parems.overDealUser) ? null : parems.overDealUser.join(',')
parems.overOrders = !Array.isArray(parems.overOrders) ? null : parems.overOrders.join(',')
customsCreate({
...parems,
shipmentId: this.shipmentObj.id,
operateType
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.$emit('getBoxInfo')
})
})
})
} else {
this.submitCustomsCreate(operateType);
this.submitCustomsCreate(operateType)
}
}
}
});
})
},
/* 查询订单号 */
searchOrder() {
if (!this.orderNo) {
this.$message.error(this.$t("请输入订单号"));
return;
this.$message.error(this.$t('请输入订单号'))
return
}
extraCostOrder({
shipmentId: this.shipmentObj.id,
orderNo: this.orderNo,
orderNo: this.orderNo
}).then((res) => {
serviceMsg(res, this).then(() => {
this.costOrderList = [
{
orderNo: this.orderNo,
orderId: res.data,
},
];
this.searchCostList();
});
});
orderId: res.data
}
]
this.searchCostList()
})
})
},
/* 查询额外费用订单 */
searchCostList() {
extraCostList({
shipmentId: this.shipmentObj.id,
shipmentId: this.shipmentObj.id
}).then((res) => {
this.costList = res.data;
});
this.costList = res.data
})
},
/* 创建额外费用 */
createExtraCost(row) {
if (!row.fee) {
this.$message.error(this.$t("请输入费用"));
return;
this.$message.error(this.$t('请输入费用'))
return
}
extraCostCreate({
fee: row.fee,
orderId: row.orderId,
orderNo: row.orderNo,
shipmentId: this.shipmentObj.id,
shipmentId: this.shipmentObj.id
}).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList();
});
});
this.searchCostList()
})
})
},
/* 修改额外费用 */
updateExtraCost(row) {
if (!row.fee) {
this.$message.error(this.$t("请输入费用"));
return;
this.$message.error(this.$t('请输入费用'))
return
}
extraCostUpdate(row).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList();
});
});
this.searchCostList()
})
})
},
/* 重置 */
restCostList(row) {
if (row) {
resetById({ id: row.id }).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList();
});
});
this.searchCostList()
})
})
} else {
resetByShipmentId({ id: this.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => {
this.searchCostList();
});
});
this.searchCostList()
})
})
}
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
this.$emit('closeDialog', type)
},
// 下载VGM
downloadVGM() {
window.open(
"http://pdatest.groupage.cn//apivue/boxTrack/vgmExport?token=930b11a41d9ca06f306d157f336a5dcb&id=1752"
);
window.open('http://pdatest.groupage.cn//apivue/boxTrack/vgmExport?token=930b11a41d9ca06f306d157f336a5dcb&id=1752')
},
// 额外费用
extraCost() {
// 清空额外费用
this.orderNo = "";
this.costOrderList = [];
this.costList = [];
this.$set(
this.dialogConfig,
"title",
`${this.shipmentObj.selfNo} ` + this.$t("报关费用")
);
this.$set(this.dialogConfig, "dialogVisible", true);
this.searchCostList();
this.orderNo = ''
this.costOrderList = []
this.costList = []
this.$set(this.dialogConfig, 'title', `${this.shipmentObj.selfNo} ` + this.$t('报关费用'))
this.$set(this.dialogConfig, 'dialogVisible', true)
this.searchCostList()
},
// 计算VGM重量
calcVGM(dcBoxWgt, dcGoodsWgt) {
let dcBoxWgtTmp = 0,
dcGoodsWgtTmp = 0;
dcGoodsWgtTmp = 0
if (!Number.isNaN(Number(dcBoxWgt))) {
dcBoxWgtTmp = Number(dcBoxWgt);
dcBoxWgtTmp = Number(dcBoxWgt)
}
if (!Number.isNaN(Number(dcGoodsWgt))) {
dcGoodsWgtTmp = Number(dcGoodsWgt);
dcGoodsWgtTmp = Number(dcGoodsWgt)
}
this.$set(
this.cusDeclarationObj,
"dcVgmWgt",
Decimal.add(dcBoxWgtTmp, dcGoodsWgtTmp).toFixed(2)
);
this.$set(this.cusDeclarationObj, 'dcVgmWgt', Decimal.add(dcBoxWgtTmp, dcGoodsWgtTmp).toFixed(2))
},
// 审核详情
jumpReviewDetail() {
const { customsApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [customsApprovalInfo.bpmProcessId]);
this.cancel("close");
const { customsApprovalInfo } = this.shipmentObj
toReviewDetail.apply(this, [customsApprovalInfo.bpmProcessId])
this.cancel('close')
},
//删单退场审核详情
exitReviewDetail() {
const { customsDeleteExitApprovalInfo } = this.shipmentObj;
toReviewDetail.apply(this, [customsDeleteExitApprovalInfo.bpmProcessId]);
this.cancel("close");
const { customsDeleteExitApprovalInfo } = this.shipmentObj
toReviewDetail.apply(this, [customsDeleteExitApprovalInfo.bpmProcessId])
this.cancel('close')
},
/* 取消退场审核 */
canclAudit() {
console.log(this.shipmentObj)
approvalCancel({
applyReason: this.$t("取消审核"),
id: this.shipmentObj["customsApprovalInfo"].id,
shipmentId: this.shipmentObj.id,
applyReason: this.$t('取消审核'),
id: this.shipmentObj['customsApprovalInfo'].id,
shipmentId: this.shipmentObj.id
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.cancel("close");
this.$emit("getBoxInfo");
});
});
this.cancel('close')
this.$emit('getBoxInfo')
})
})
},
/* 取消删单退场审核 */
canclOverAudit() {
console.log(this.shipmentObj)
approvalCancel({
applyReason: this.$t("取消审核"),
id: this.shipmentObj["customsDeleteExitApprovalInfo"].id,
shipmentId: this.shipmentObj.id,
applyReason: this.$t('取消审核'),
id: this.shipmentObj['customsDeleteExitApprovalInfo'].id,
shipmentId: this.shipmentObj.id
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.cancel("close");
this.$emit("getBoxInfo");
});
});
this.cancel('close')
this.$emit('getBoxInfo')
})
})
},
/* 判断查验选择是否禁用 */
disabledRadio(item) {
const { overMachineExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {}; // 部分退场状态并且审核通过,退场不可选择
if (
overMachineExamineStatus === 2 &&
dcCheckStatus === 2 &&
checkDealStatus === 0 &&
item.value === "1"
) {
return true;
const { overMachineExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
const { dcCheckStatus } = customsInfo ?? {} // 部分退场状态并且审核通过,退场不可选择
if (overMachineExamineStatus === 2 && dcCheckStatus === 2 && checkDealStatus === 0 && item.value === '1') {
return true
}
return false;
return false
},
/* 下载报关单 */
downloadCusFile() {
downloadFileByUrl("downloadCustomFiles", {
shipmentId: this.shipmentObj.id,
});
},
downloadFileByUrl('downloadCustomFiles', {
shipmentId: this.shipmentObj.id
})
}
},
watch: {
"cusDeclarationObj.dcCustomsType"(val) {
this.getCustomsOrderList(val);
'cusDeclarationObj.dcCustomsType'(val) {
this.getCustomsOrderList(val)
},
"cusDeclarationObj.documentInfo"(val) {
this.isDownload = false;
if (val.includes("2")) {
this.isDownload = true;
'cusDeclarationObj.documentInfo'(val) {
this.isDownload = false
if (val.includes('2')) {
this.isDownload = true
}
},
"cusDeclarationObj.dcBoxWgt"(dcBoxWgt) {
this.calcVGM(dcBoxWgt, this.cusDeclarationObj.dcGoodsWgt);
'cusDeclarationObj.dcBoxWgt'(dcBoxWgt) {
this.calcVGM(dcBoxWgt, this.cusDeclarationObj.dcGoodsWgt)
},
"cusDeclarationObj.dcGoodsWgt"(dcGoodsWgt) {
this.calcVGM(this.cusDeclarationObj.dcBoxWgt, dcGoodsWgt);
'cusDeclarationObj.dcGoodsWgt'(dcGoodsWgt) {
this.calcVGM(this.cusDeclarationObj.dcBoxWgt, dcGoodsWgt)
},
"cusDeclarationObj.dcCustomsStatus"(val) {
if (val !== "3") {
this.$set(this.cusDeclarationObj, "dcCheckStatus", "");
'cusDeclarationObj.dcCustomsStatus'(val) {
if (val !== '3') {
this.$set(this.cusDeclarationObj, 'dcCheckStatus', '')
// this.$set(this.cusDeclarationObj, "dcPassTime", "");
} else {
const { customsInfo } = this.shipmentObj;
this.$set(
this.cusDeclarationObj,
"dcCheckStatus",
(customsInfo?.dcCheckStatus && String(customsInfo?.dcCheckStatus)) ||
"3"
);
const { customsInfo } = this.shipmentObj
this.$set(this.cusDeclarationObj, 'dcCheckStatus', (customsInfo?.dcCheckStatus && String(customsInfo?.dcCheckStatus)) || '3')
}
},
shipmentObj: {
......@@ -718,121 +654,102 @@ export default {
immediate: true,
handler: function (val) {
// 监听查验状态变化
let { overMachineExamineStatus, checkExamineStatus } = val;
let { overMachineExamineStatus, checkExamineStatus } = val
if (overMachineExamineStatus === 1) {
// 按钮变成审核中
this.inOverReview = true;
this.inOverReview = true
}
if (checkExamineStatus === 1) {
// 按钮变成审核中
this.inReview = true;
this.inReview = true
}
},
}
},
// 报关时间
"cusDeclarationObj.dcDecTime"(val) {
this.compareDate(val, this.cusDeclarationObj.dcPassTime);
'cusDeclarationObj.dcDecTime'(val) {
this.compareDate(val, this.cusDeclarationObj.dcPassTime)
},
// 放行时间
"cusDeclarationObj.dcPassTime"(val) {
this.compareDate(this.cusDeclarationObj.dcDecTime, val);
'cusDeclarationObj.dcPassTime'(val) {
this.compareDate(this.cusDeclarationObj.dcDecTime, val)
},
// 查验状态
"cusDeclarationObj.dcCheckStatus"(val) {
const { customsInfo } = this.shipmentObj;
'cusDeclarationObj.dcCheckStatus'(val) {
const { customsInfo } = this.shipmentObj
if (val != customsInfo?.dcCheckStatus) {
this.$set(this.cusDeclarationObj, "dcPassTime", "");
this.$set(this.cusDeclarationObj, 'dcPassTime', '')
}
},
}
},
computed: {
/* 获取报关审核退场状态文字 */
getCheckExamineStatus() {
const { checkExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
const { checkExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
const { dcCheckStatus } = customsInfo ?? {}
if (checkExamineStatus === 1) {
return dcCheckStatus === 1
? this.$t("退场审核中")
: this.$t("部分退场审核中");
return dcCheckStatus === 1 ? this.$t('退场审核中') : this.$t('部分退场审核中')
}
if (checkExamineStatus === 2 && checkDealStatus === 0) {
return dcCheckStatus === 1
? this.$t("审核通过,退场中")
: this.$t("审核通过,部分退场中");
return dcCheckStatus === 1 ? this.$t('审核通过,退场中') : this.$t('审核通过,部分退场中')
}
return this.$t("未审核");
return this.$t('未审核')
},
/* 获取报关审核删单退场状态文字 */
getOverExamineStatus() {
const { overMachineExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
const { overMachineExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
const { dcCheckStatus } = customsInfo ?? {}
if (overMachineExamineStatus === 1) {
return dcCheckStatus === 1
? this.$t("删单退场审核中")
: this.$t("删单退场审核中");
return dcCheckStatus === 1 ? this.$t('删单退场审核中') : this.$t('删单退场审核中')
}
if (overMachineExamineStatus === 2 && checkDealStatus === 0) {
return dcCheckStatus === 1
? this.$t("删单退场审核通过,退场中")
: this.$t("删单退场审核通过,退场中");
return dcCheckStatus === 1 ? this.$t('删单退场审核通过,退场中') : this.$t('删单退场审核通过,退场中')
}
return this.$t("未审核");
return this.$t('未审核')
},
/* 判断是否已处理 */
isCheckDeal() {
return (type) => {
const { overMachineExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
const { overMachineExamineStatus, checkDealStatus, customsInfo } = this.shipmentObj
const { dcCheckStatus } = customsInfo ?? {}
// 状态
if (type === "status") {
if (type === 'status') {
// 退场/部分退场 审核通过未处理,禁用
if (
overMachineExamineStatus === 2 &&
[1, 2].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
return true;
if (overMachineExamineStatus === 2 && [1, 2].includes(dcCheckStatus) && checkDealStatus === 0) {
return true
}
}
// 查验
if (type === "check") {
if (type === 'check') {
// 退场 审核通过未处理,禁用
// 部分退场 审核通过未处理,由 disabledRadio 方法判断
if (
overMachineExamineStatus === 2 &&
[1].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
return true;
if (overMachineExamineStatus === 2 && [1].includes(dcCheckStatus) && checkDealStatus === 0) {
return true
}
}
// 提交/保存
if (type === "submit") {
const { dcCheckStatus: newCheckStatus } = this.cusDeclarationObj;
if (type === 'submit') {
const { dcCheckStatus: newCheckStatus } = this.cusDeclarationObj
// 退场/部分退场 审核通过未处理
if (overMachineExamineStatus === 2 && checkDealStatus === 0) {
// 退场,禁用
if (dcCheckStatus === 1) return true;
if (dcCheckStatus === 1) return true
// 部分退场
if (dcCheckStatus === 2) {
// 修改为查验后放行,可用,其他禁用
if (newCheckStatus === "3") return false;
return true;
if (newCheckStatus === '3') return false
return true
}
}
}
return false;
};
},
},
};
return false
}
}
}
}
</script>
<style lang="scss">
......
......@@ -33,6 +33,7 @@
"
>{{ $t('新建合包箱号') }}</el-button
>
<el-button class="ml-10" @click="pack">{{$t('补单')}}</el-button>
</el-row>
<el-row style="margin-top: 5px">
<el-table border :data="pagList" max-height="600px">
......@@ -42,7 +43,7 @@
<template slot-scope="scope"> {{ scope.row.pkgLength }}*{{ scope.row.pkgWidth }}*{{ scope.row.pkgHight }} </template>
</el-table-column>
<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="sumWeight" />
<el-table-column :label="$t('入仓数量(个)')" align="center" prop="sumQuantity" />
......@@ -103,10 +104,12 @@
</el-dialog>
<!-- 装箱 -->
<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">
<el-radio-button :label="1">{{ $t('未装箱列表') }}</el-radio-button>
<el-radio-button :label="2">{{ $t('已装箱列表') }}</el-radio-button>
</el-radio-group>
<div class="flex">
<el-radio-group v-model="pkgPageType">
<el-radio-button :label="1">{{ $t('未装箱列表') }}</el-radio-button>
<el-radio-button :label="2">{{ $t('已装箱列表') }}</el-radio-button>
</el-radio-group>
</div>
<un-pkg-page v-if="pkgPageType == 1" :pkgData="pkgData" :shipmentObj="shipmentObj" />
<pkg-page v-if="pkgPageType == 2" :pkgData="pkgData" :shipmentObj="shipmentObj" @closeDialog="closeDialog" />
</el-dialog>
......@@ -121,6 +124,14 @@
</el-row>
</el-col>
</el-row>
<supplement-order
v-if="showPackDialog"
:shipmentObj="shipmentObj"
:warehouseList="$attrs.warehouseList"
@close="showPackDialog=false"
@supplementFinish="onSupplementFinish"
></supplement-order>
</div>
</template>
......@@ -130,8 +141,10 @@ import { formatDate, serviceMsg } from '../../utils'
import unPkgPage from './unPkgPage.vue'
import PkgPage from './pkgPage.vue'
import printTag from './printTag.vue'
import SupplementOrder from "./supplementOrder.vue";
export default {
components: {
SupplementOrder,
unPkgPage,
PkgPage,
printTag
......@@ -171,7 +184,9 @@ export default {
pkgPagedialogVisible: false,
pkgData: {},
printdialogVisible: false,
tagData: {}
tagData: {},
// 是否显示补单弹层
showPackDialog: false
}
},
created() {
......@@ -261,6 +276,14 @@ export default {
this.$emit("closeDialog", "submit");
});
});
},
// 补单
pack(){
this.showPackDialog=true
},
// 提交补单
onSupplementFinish(){
this.showPackDialog = false
}
}
}
......
......@@ -111,7 +111,7 @@
]">
<el-input v-model="sealBoxForm.sumNum" style="width: 180px">
<template slot="append">
{{ $t('') }}
{{ $t('') }}
</template>
</el-input>
</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 @@
<div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<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 :label="$t('提单号M/BL NO.')" class="two-element">
<el-input v-model="subMaterialObj.blMblNo" :placeholder="$t('请输入提单号')"></el-input>
......@@ -106,6 +106,7 @@ export default {
units: [],
// 柜型
cabinetType: "/",
agentFlag: true
};
},
created() {
......@@ -145,8 +146,9 @@ export default {
this.$set(this.subMaterialObj,'kgs',this.shipmentObj.customsInfo?.dcGoodsWgt||undefined)
this.$set(this.subMaterialObj,'containerSealNo',(this.shipmentObj.trailerInfo?.tlContainerNo||'')+'/'+(this.shipmentObj.trailerInfo?.tlStripSeal||'/'))
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: {
getSup(id) {
......
......@@ -259,10 +259,6 @@ export default {
if (start.includes(val[keyName])) {
node.currStatus = "start";
if (type === "mergePkg"){
++nodeIndex;
continue;
}
}
if (start.includes(val[keyName]) && val[voName]) {
......
......@@ -29,7 +29,7 @@
<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-row>
</div>
......@@ -47,6 +47,7 @@ import { getLadingShipperPage } from "@/api/ecw/ladingShipper";
// 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用
import { airBaseData } from "./utils";
import { airOneData } from "./utils";
/**
* 海运操作主页面
*/
......@@ -62,6 +63,7 @@ export default {
data() {
return {
airBaseData,
airOneData,
shipmentObj: {},
warehouseList: [],
// 供应商
......@@ -76,6 +78,7 @@ export default {
seaBaseData: [],
// 状态
statusLabel: "",
flag: false
};
},
created() {
......@@ -122,22 +125,9 @@ export default {
this.shipmentObj = data ?? {};
this.seaBaseData = this.airBaseData()
if(this.shipmentObj.destinationClearance==3&&this.shipmentObj.deliveryType==2){
this.seaBaseData = this.seaBaseData.filter(item=>{
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.seaBaseData = this.airOneData()
}
this.flag = true
});
},
},
......
......@@ -87,7 +87,7 @@ function airBaseData() {
/**
* 合包状态:161待合包 162已合包
*/
voName: "trailerInfo",
voName: "boxMergePkgBackVO",
keyName: "mergePkgStatus",
status: {
start: [161],
......@@ -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 {
getColmnMapping,
getSeaStatus,
airBaseData,
airOneData,
constantDict,
formatStringNumber,
formatDateStr,
......
......@@ -69,8 +69,8 @@
</el-table-column>
<el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180">
<template slot-scope="{row}">
<div :style="{red: row.overdueStatus == 0 ? 'red' : null}">{{ parseTime(row.endTime, '{y}-{m}-{d}') }}</div>
<div v-if="row.overdueStatus == 0" style="color: red">{{ $t('已过期') }}</div>
<div :style="{color: !row.overdueStatus ? 'red' : null}">{{ parseTime(row.endTime, '{y}-{m}-{d}') }}</div>
<div v-if="!row.overdueStatus" style="color: red">{{ $t('已过期') }}</div>
</template>
</el-table-column>
<!--
......
......@@ -177,10 +177,9 @@
{{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求')">
<template v-for="packageType in order.packageType.split(',')">
<dict-tag class="mr-10" v-if="packageType" :key="packageType" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" :value="packageType" />
<template v-if="order.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>
</el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求备注')">
{{order.packageRemarks}}
......@@ -277,7 +276,7 @@
</el-tab-pane>
<el-tab-pane :label="$t('订单动态')" name="second">
<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') }}
<div>{{$l(activity, 'remarks')}}</div>
</el-timeline-item>
......@@ -505,9 +504,11 @@ import FeeDetail from "@/views/ecw/order/components/FeeDetail.vue";
import PackHistory from './components/PackHistory';
import PackHistoryDetail from './components/PackHistoryDetail';
import {getSupplier, getSupplierPage} from '@/api/ecw/supplier'
import {formatTime} from "@/utils";
export default {
name: "detail",
components: {
DeclarationDocuments,
ImageDisplay,
OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,PackHistory,PackHistoryDetail,
......@@ -629,6 +630,8 @@ export default {
getUnitList().then(res => this.unitList = res.data)
},
methods: {
parseTime,
formatTime,
checkPermi, // 检查权限
// 获取储位名称
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