Commit 0365364a authored by zhoutong's avatar zhoutong

报关-未填写报关时间,提交删单退场审核,前端拦截了,但是接口提交成功

parent 92d4c4e8
...@@ -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,18 +84,18 @@ ...@@ -80,18 +84,18 @@
</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">
...@@ -107,12 +111,12 @@ ...@@ -107,12 +111,12 @@
<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,156 +251,144 @@ export default { ...@@ -278,156 +251,144 @@ 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,
...@@ -440,277 +401,252 @@ export default { ...@@ -440,277 +401,252 @@ export default {
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(',')
}审核吗?`)
)
.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({ 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.$emit("getBoxInfo"); 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 && return false
checkDealStatus === 0 &&
item.value === "1"
) {
return true;
}
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">
......
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