Commit 6a37aa84 authored by 我在何方's avatar 我在何方
parents edcca0b1 f5b0e37b
......@@ -331,6 +331,15 @@ export function downloadReceivableList(params) {
});
}
// 空运的应收汇总下载
export function downloadAirReceivableList(params) {
return request({
url: "/ecw/box-preload-goods/downloadAirBillReceivable",
method: "get",
params,
});
}
// 下载提单copy
export function downloadLadingCopy(params) {
return request({
......
......@@ -288,3 +288,76 @@ export function takeoffCreate(data) {
}
/***************************** 起运 end *******************************/
/**
* 获取出货订单列表
*
* @export
* @param {*} data
* @return {*}
*/
export function shipmentOrderList(shipmentId) {
return request({
url: "/shipment/box/shipmentOrderList?shipmentId="+shipmentId,
method: "get"
});
}
/**
* 更新订单到港状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateOrderArrival(data) {
return request({
url: `/ecw/box-arrival-air/updateOrderArrival`,
method: "post",
data: data
});
}
/**
* 更新所有订单到港状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateAllOrderArrival(data) {
return request({
url: `/ecw/box-arrival-air/updateAllOrderArrival`,
method: "post",
data: data
});
}
/**
* 更新订单清关状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateOrderClearance(data) {
return request({
url: `/ecw/box-clearance/updateOrderClearance`,
method: "post",
data: data
});
}
/**
* 更新所有订单清关状态
*
* @export
* @param {*} data
* @return {*}
*/
export function updateAllOrderClearance(data) {
return request({
url: `/ecw/box-clearance/updateAllOrderClearance`,
method: "post",
data: data
});
}
\ No newline at end of file
......@@ -229,6 +229,7 @@ export const DICT_TYPE = {
BOX_CUSTOMS_ERROR_TYPE: "customs_error_type",// 报关异常状态
BOX_SHIPPING_ERROR_TYPE: "shipping_error_type",// 起运异常状态
BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态
BOX_FLYING_ERROR_TYPE: 'flying_error_type',// 航班异常状态
SETTLEMENT_STATUS: 'settlement_status', // 结算状态
APP_TYPE:"app_type", //系统类型
......
......@@ -3,12 +3,12 @@
<el-form ref="costForm" :model="costObj" :rules="rules" label-width="80px">
<el-form-item :label="$t('操作步骤')" prop="opStepType">
<el-select v-if="flag=='sea'" v-model="costObj.opStepType" :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="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in 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="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<!--<el-select v-if="flag=='seaAir'" v-model="costObj.opStepType" :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('费用类型')" prop="costType">
......@@ -51,6 +51,7 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils";
import { getCurrencyList } from "@/api/ecw/currency";
import {getDictDatas} from "@/utils/dict";
export default {
name: "costForm",
......@@ -70,9 +71,21 @@ export default {
price: [{ required: true, message: this.$t("金额不能为空"), trigger: "blur" }],
priceUnit: [{ required: true, message: this.$t("金额单位不能为空"), trigger: "blur" }]
},
flag: 'sea'
// flag: 'sea'
};
},
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() {
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
......@@ -84,11 +97,12 @@ export default {
getCurrencyList().then((res) => {
this.currencyList = res.data ?? [];
});
if(this.$attrs.shipmentObj.bosType == 'seaAir'){
/*if(this.$attrs.shipmentObj.bosType == 'seaAir'){
this.flag = 'seaAir';
}
}*/
},
methods: {
getDictDatas,
submit() {
this.$refs["costForm"].validate((valid) => {
if (valid) {
......
......@@ -154,7 +154,7 @@
<editAirForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" />
</template>
<template v-if="dialogCfg.dialogType === 'cost'">
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" flag="air" />
</template>
<template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers" flag="air" />
......@@ -207,7 +207,7 @@ import {
exportboxExcel,
getNoticeList,
dealCustomsSplitNotify,
exportPreloadGoodsList, downloadReceivableList, getAirNoticeList, zipDownload
exportPreloadGoodsList, downloadReceivableList, getAirNoticeList, zipDownload, downloadAirReceivableList
} from '@/api/ecw/box'
import { getChannelList } from '@/api/ecw/channel'
import { getWarehouseList } from '@/api/ecw/warehouse'
......@@ -546,7 +546,7 @@ export default {
break;
case "downloadReceivableList":
this.exportExcel(
downloadReceivableList,
downloadAirReceivableList,
{shipmentId: row.id}
);
break;
......
......@@ -145,10 +145,10 @@
<editForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template>
<template v-if="dialogCfg.dialogType === 'cost'">
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" flag="seaAir" />
</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="seaAir" />
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
......
......@@ -192,10 +192,10 @@
<editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template>
<template v-if="dialogConfig.type === 'cost'">
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" />
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" :flag="flag" />
</template>
<template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" />
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" :flag="flag" />
</template>
<template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" />
......@@ -639,6 +639,11 @@ export default {
} else {
return getTotlContent(secStatistics);
}
},
// 异常登记和费用登记用到的标识
flag(){
// 地址中有seaAir则表示海空联运,否则就是海运
return this.$route.fullPath.toLowerCase().indexOf('seaair') > -1 ? 'seaAir' : 'air'
}
},
};
......
......@@ -58,10 +58,6 @@
<p class="box-weight">
{{getSectionInfo}}
</p>
<div style="margin-left:30px;">
<el-button type="primary" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateStatus('selected')">{{$t('更新所选订单状态')}}</el-button>
<el-button type="primary" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateStatus('all')">{{$t('更新全部订单状态')}}</el-button>
</div>
<div class="document-status">
<p>{{$t('单证状态')}}</p>
<template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)">
......@@ -69,8 +65,16 @@
</template>
</div>
</div>
<div style="margin:20px 0 20px 0;">
<el-button type="primary" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateStatus('selected')">{{$t('更新所选订单状态')}}</el-button>
<el-button type="primary" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateStatus('all')">{{$t('更新全部订单状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.sapStatus==152&&(shipmentObj.airArrivalInfo&&shipmentObj.airArrivalInfo.arriveType==1)" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateArrivalStatus('selected')">{{$t('更新所选订单到港状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.sapStatus==152&&(shipmentObj.airArrivalInfo&&shipmentObj.airArrivalInfo.arriveType==1)" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateArrivalStatus('all')">{{$t('更新全部订单到港状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.clStatus==132&&(shipmentObj.clearanceInfo&&shipmentObj.clearanceInfo.clearanceType==1)" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateClearStatus('selected')">{{$t('更新所选订单清关状态')}}</el-button>
<el-button type="primary" v-if="shipmentObj.clStatus==132&&(shipmentObj.clearanceInfo&&shipmentObj.clearanceInfo.clearanceType==1)" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateClearStatus('all')">{{$t('更新全部订单清关状态')}}</el-button>
</div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" :selectable="selectable"></el-table-column>>
<el-table-column type="selection" width="50"></el-table-column>>
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" />
<el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<template v-slot="scope">
......@@ -195,7 +199,7 @@
<editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template>
<template v-if="dialogConfig.type === 'cost'">
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" />
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" flag="air" />
</template>
<template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" flag="air" />
......@@ -203,6 +207,12 @@
<template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" />
</template>
<template v-if="dialogConfig.type === 'updateArrival'">
<updateArrival v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :arrivalInfo="arrivalInfo" />
</template>
<template v-if="dialogConfig.type === 'updateClear'">
<updateClear v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :clearInfo="clearInfo" />
</template>
</el-dialog>
</div>
</template>
......@@ -232,6 +242,8 @@ import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editForm.vue";
import updateError from "./updateError.vue";
import updateArrival from "./updateArrival.vue";
import updateClear from "./updateClear.vue";
import { listUser } from "@/api/system/user";
export default {
......@@ -244,6 +256,8 @@ export default {
regError,
editForm,
updateError,
updateArrival,
updateClear
},
created() {
this.transportTypes = this.getDictDatas(
......@@ -332,6 +346,12 @@ export default {
errorType: "",
operate: "",
},
arrivalInfo: {
orderList: []
},
clearInfo: {
orderList: []
},
};
},
methods: {
......@@ -364,12 +384,41 @@ export default {
} else if (type === "single") {
orders = [row];
}
console.log('getErrorType', type)
this.getErrorType();
this.$set(this.errorInfo, "orderList", orders);
this.$set(this.errorInfo, "operate", type);
// 判断异常类型
this.handleCommand("updateError");
},
/* 更新到港状态 */
updateArrivalStatus(type) {
let orders = [];
if (type === "selected") {
if (!this.selectedRows.length) {
this.$message.error("请选择需要更新的订单");
return;
}
orders = this.selectedRows.map(item=>{return item.orderId});
}
this.$set(this.arrivalInfo, "orderList", orders);
this.$set(this.arrivalInfo, "type", type);
this.handleCommand("updateArrival");
},
/* 更新清关状态 */
updateClearStatus(type) {
let orders = [];
if (type === "selected") {
if (!this.selectedRows.length) {
this.$message.error("请选择需要更新的订单");
return;
}
orders = this.selectedRows.map(item=>{return item.orderId});
}
this.$set(this.clearInfo, "orderList", orders);
this.$set(this.clearInfo, "type", type);
this.handleCommand("updateClear");
},
getErrorType() {
for (const [key, value] of Object.entries(this.shipmentObj)) {
// 报关异常 customsHasAbnormal
......@@ -387,6 +436,12 @@ export default {
this.$set(this.errorInfo, "errorType", "arrival");
this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态"));
}
// 起飞异常
if (key === "flyingHasAbnormal" && value) {
this.$set(this.errorInfo, "errorType", "flight");
this.$set(this.dialogConfig, "title", this.$t("更新起飞异常状态"));
}
console.log(key, value)
}
},
// 初始化字典数据
......@@ -540,6 +595,14 @@ export default {
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "type", "updateError");
break;
case "updateArrival":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "type", "updateArrival");
break;
case "updateClear":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "type", "updateClear");
break;
}
},
// 关闭弹框
......
<template>
<div>
<el-form ref="arrivalForm" :rules="rules" :model="airArrivalInfo" label-width="120px">
<!-- <el-form-item :label="$t('预计到港时间')">{{getExpectedTime()}}</el-form-item>
<el-form-item :label="$t('实际到港时间')" prop="apRealTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apRealTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-form-item :label="$t('到港情况')" prop="arriveType">
<el-radio-group v-model="airArrivalInfo.arriveType">
<el-radio :label="0">{{ $t('一次到港') }}</el-radio>
<el-radio :label="1">{{ $t('多次到港') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('选择订单')" prop="arriveOrderIdList" v-show="airArrivalInfo.arriveType == 1">
<el-select
v-model="airArrivalInfo.arriveOrderIdList"
multiple
filterable
clearable
reserve-keyword
:filter-method="filterOrder"
:placeholder="$t('请输入订单号、提单号、唛头')"
>
<el-option
v-for="(item) in statusOrderList"
:key="item.orderId"
:label="item.orderNo+' '+item.arrival"
:value="item.orderId">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('已到港订单')" v-show="airArrivalInfo.arriveType == 1">
<span v-for="order in airArrivalInfo.arrivalOrderList" :key="order.id">{{order.orderNo}} </span>
</el-form-item>
<el-form-item :label="$t('确认到港')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apConfirmTime" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
<p class="message-area" v-show="showMsg">{{$t('请确认是否有异常,如有异常请进行异常登记')}}</p>
</el-form-item> -->
<el-form-item v-if="dtRealHeadTimeFlag" :label="$t('实际二程起飞时间')" prop="actSecondTime">
<el-form-item v-if="dtRealHeadTimeFlag||airArrivalInfo.arriveType==1" :label="$t('实际二程起飞时间')" prop="actSecondTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计到港时间')" prop="estTime">
......@@ -42,6 +59,7 @@
import regError from "../../regError";
import dayjs from "dayjs";
import { arrivalCreate } from "@/api/ecw/boxSeaAir";
import { shipmentOrderList } from "@/api/ecw/boxAir";
import { formatDateStr, serviceMsg } from "../utils";
/**
......@@ -54,16 +72,28 @@ export default {
regError,
},
data() {
var validateActSecondTime = (rule, value, callback) => {
if(!value && (this.airArrivalInfo.arriveType==0||(this.airArrivalInfo.arriveType==1&&this.airArrivalInfo.arriveOrderIdList.length>0))){
callback(new Error("必填"));
}
callback();
};
var validateActTime = (rule, value, callback) => {
if(!value && (this.airArrivalInfo.arriveType==0||(this.airArrivalInfo.arriveType==1&&this.airArrivalInfo.arriveOrderIdList.length>0))){
callback(new Error("必填"));
}
callback();
};
return {
// 到港对象
airArrivalInfo: {},
// 校验
rules: {
actSecondTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
{ validator: validateActSecondTime, trigger: "change" },
],
actTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
{ validator: validateActTime, trigger: "change" },
]
},
// 弹窗配置
......@@ -73,7 +103,9 @@ export default {
inspectionTimeArrival: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_ARRIVAL
)[0].value,
dtRealHeadTimeFlag: false
dtRealHeadTimeFlag: false,
orderList: [],
orderListFilter: [],
};
},
created() {
......@@ -88,6 +120,33 @@ export default {
if(this.$attrs.shipmentObj['bookAirInfo'].voyage && this.$attrs.shipmentObj['bookAirInfo'].voyage == 2){
this.dtRealHeadTimeFlag = true
}
if(!this.airArrivalInfo.arriveType) this.$set(this.airArrivalInfo,'arriveType',0)
this.$set(this.airArrivalInfo,'arriveOrderIdList',this.airArrivalInfo.arrivalOrderList.map(item=>{return item.orderId}))
shipmentOrderList(this.$attrs.shipmentObj.id).then(r=>{
this.orderList = r.data
this.orderListFilter = r.data
})
},
computed: {
statusOrderList(){
let data = []
this.orderListFilter.forEach(item=>{
let json = {
orderId: item.orderId,
orderNo: item.orderNo,
tidanNo: item.tidanNo,
marks: item.marks,
}
let index = this.airArrivalInfo.arrivalOrderList.findIndex(p=>p.orderId==item.orderId)
if(index != -1){
json.arrival = this.$t('已到港')
}else{
json.arrival = this.$t('未到港')
}
data.push(json)
})
return data
}
},
watch: {
// 实际二程起飞时间
......@@ -109,6 +168,15 @@ export default {
},
},
methods: {
filterOrder(val){
if(val != ''){
this.orderListFilter = this.orderList.filter(item=>{
return item.orderNo.indexOf(val) > -1 || item.tidanNo.indexOf(val) > -1 || item.marks.indexOf(val) > -1
})
}else{
this.orderListFilter = this.orderList
}
},
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
......
<template>
<div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<!-- <el-form-item :label="$t('清关代理')">{{getClAgent('label')}}</el-form-item> -->
<el-form-item :label="$t('清关情况')" prop="arriveType">
<el-radio-group v-model="cusClearanceObj.clearanceType">
<el-radio :label="0">{{ $t('一次清关') }}</el-radio>
<el-radio :label="1">{{ $t('多次清关') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('选择订单')" prop="clearanceOrderIdList" v-show="cusClearanceObj.clearanceType == 1">
<el-select
v-model="cusClearanceObj.clearanceOrderIdList"
multiple
filterable
clearable
reserve-keyword
:filter-method="filterOrder"
:placeholder="$t('请输入订单号、提单号、唛头')"
>
<el-option
v-for="(item) in statusOrderList"
:key="item.orderId"
:label="item.orderNo+' '+item.arrival"
:value="item.orderId">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('已清关订单')" v-show="cusClearanceObj.clearanceType == 1">
<span v-for="order in cusClearanceObj.clearanceOrderList" :key="order.id">{{order.orderNo}} </span>
</el-form-item>
<el-card v-for="order in cusClearanceObj.clearanceOrderIdList" :key="order" style="margin: 20px;">
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('订单号')">
{{arrivalOrderList.find(item=>item.orderId==order).orderNo}}
</el-form-item>
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('实际二程起飞时间')" prop="actSecondTime">
{{formatDate(arrivalOrderList.find(item=>item.orderId==order).actSecondTime)}}
</el-form-item>
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('预计到港时间')" prop="estTime">
{{formatDate(arrivalOrderList.find(item=>item.orderId==order).estTime)}}
</el-form-item>
<el-form-item v-if="cusClearanceObj.clearanceType==1" :label="$t('实际到港时间')" prop="actTime">
{{formatDate(arrivalOrderList.find(item=>item.orderId==order).actTime)}}
</el-form-item>
</el-card>
<el-form-item :label="$t('预计清关时间')" prop="clEstTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
......@@ -29,7 +71,8 @@
import regError from "../../regError";
import dayjs from "dayjs";
import { clearanceCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../utils";
import { shipmentOrderList } from "@/api/ecw/boxAir";
import { formatDateStr, serviceMsg, formatDate } from "../utils";
/**
* 清关
......@@ -57,6 +100,9 @@ export default {
dialogVisible: false,
// 提示消息
showMsg: false,
orderList: [],
orderListFilter: [],
arrivalOrderList: []
};
},
created() {
......@@ -65,6 +111,13 @@ export default {
oldData = formatDateStr(oldData, ["clEstTime"]);
oldData = formatDateStr(oldData, ["clClearTime"], "YYYY-MM-DD HH:mm:ss");
this.cusClearanceObj = oldData;
if(!this.cusClearanceObj.clearanceType) this.$set(this.cusClearanceObj,'clearanceType',0)
this.$set(this.cusClearanceObj,'clearanceOrderIdList',this.cusClearanceObj.clearanceOrderList.map(item=>{return item.orderId}))
this.arrivalOrderList = this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList
shipmentOrderList(this.$attrs.shipmentObj.id).then(r=>{
this.orderList = r.data
this.orderListFilter = r.data
})
},
watch: {
// 预计清关时间
......@@ -76,7 +129,38 @@ export default {
this.compareDate(this.cusClearanceObj.clEstTime, val);
},
},
computed: {
statusOrderList(){
let data = []
this.orderListFilter.forEach(item=>{
let json = {
orderId: item.orderId,
orderNo: item.orderNo,
tidanNo: item.tidanNo,
marks: item.marks,
}
let index = this.cusClearanceObj.clearanceOrderList.findIndex(p=>p.orderId==item.orderId)
if(index != -1){
json.arrival = this.$t('已清关')
}else{
json.arrival = this.$t('未清关')
}
data.push(json)
})
return data
}
},
methods: {
formatDate,
filterOrder(val){
if(val != ''){
this.orderListFilter = this.orderList.filter(item=>{
return item.orderNo.indexOf(val) > -1 || item.tidanNo.indexOf(val) > -1 || item.marks.indexOf(val) > -1
})
}else{
this.orderListFilter = this.orderList
}
},
getClAgent(type) {
const agentId = this.$attrs.shipmentObj.agentInfo.agentId;
if (type === "label") {
......
......@@ -16,7 +16,7 @@
{{$t('过机重量异常')}}: {{$t('过机放行-未找到重货订单')}}
</p>
<p style="color:#D9001B;" v-if="pageData.boxCustomsBackVO&&pageData.boxCustomsBackVO.overMachineStatus==2&&pageData.boxCustomsBackVO.overMachineAbnormalStatus==2&&pageData.boxCustomsBackVO.weightMisreport==4">
{{$t('过机重量异常')}}: {{$t('过机放行-已找到重货订单')}}:{{pageData.boxCustomsBackVO.overOrders}}
{{$t('过机重量异常')}}: {{$t('过机放行-已找到重货订单')}}:<span v-for="order in strToArray(pageData.boxCustomsBackVO.overOrders)" :key="order">{{ getOrders(order) }}</span>
</p>
</el-row>
<el-row class="number-area">
......@@ -153,6 +153,7 @@ import {
approvalCancel,
getSectionList,
singleUnload,
boxGoodsDetail
} from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow";
......@@ -192,6 +193,7 @@ export default {
totalStatistics: {},
},
selectedUsers: [],
sectionOrderList: []
};
},
created() {
......@@ -205,9 +207,29 @@ export default {
};
});
});
boxGoodsDetail({
shipmentId: this.$attrs.shipmentObj.id,
secId: 0
}).then((res) => {
this.sectionOrderList = res.data.sectionOrderList
})
},
methods: {
getTotlContent,
getOrders(id) {
let order = this.sectionOrderList.find((item) => item.orderId == id)
if (order) {
return order.orderNo
}
return ''
},
strToArray(str) {
if (!str) return []
let array = str?.split(',') ?? []
return array.map((item) => {
return Number(item)
})
},
/* 获取卸柜数据 */
getLoadGoodsList() {
this.loading = true;
......
<template>
<div class="shipping-update-error">
<div class="message-title">{{headerTitle}}</div>
<el-form ref="arrivalForm" :rules="rules" :model="airArrivalInfo" label-width="120px">
<el-form-item :label="$t('实际二程起飞时间')" prop="actSecondTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计到港时间')" prop="estTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.estTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('实际到港时间')" prop="actTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">{{$t('确定')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</el-row>
</div>
</template>
<script>
import { updateOrderArrival, updateAllOrderArrival } from "@/api/ecw/boxAir";
export default {
name: "updateError",
inheritAttrs: false,
components: {},
props: {
shipmentObj: Object,
arrivalInfo: Object,
},
data() {
return {
// 到港对象
airArrivalInfo: {},
// 校验
rules: {
actSecondTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
actTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
]
},
headerTitle: "",
};
},
watch: {
arrivalInfo: {
handler: function (val) {
const { orderList, type } = val;
if (type === "selected") {
this.headerTitle = this.$t(
"确定给{selfNo}下的{orderNos}更新状态吗?",
{
selfNo: this.shipmentObj.selfNo,
orderNos: orderList.map((item) => item.orderNo).join(",") ?? "",
}
);
} else {
this.headerTitle = this.$t(
`确定给{selfNo}下的${
type === "all" ? this.$t("所有订单") : this.$t("所选订单")
}更新状态吗?`,
{
selfNo: this.shipmentObj.selfNo,
}
);
}
},
immediate: true,
},
},
methods: {
onSubmit() {
this.$refs["arrivalForm"].validate((valid) => {
if (valid) {
if(this.arrivalInfo.type == 'selected'){
let param = {
shipmentId: this.shipmentObj.id,
orderIdList: this.arrivalInfo.orderList
}
updateOrderArrival({...this.airArrivalInfo, ...param}).then(()=>{
this.$message.success("成功");
this.cancel()
})
}else{
let param = {
shipmentId: this.shipmentObj.id
}
updateAllOrderArrival({...this.airArrivalInfo, ...param}).then(()=>{
this.$message.success("成功");
this.cancel()
})
}
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
.shipping-update-error {
.message-title {
text-align: center;
font-size: 20px;
margin: 0 20px 10px;
}
}
</style>
<template>
<div class="shipping-update-error">
<div class="message-title">{{headerTitle}}</div>
<el-form ref="arrivalForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item :label="$t('预计清关时间')" prop="clEstTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('清关时间')" prop="clClearTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clClearTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<p class="message-area" v-show="showMsg">{{$t('清关时间与预计时间不符,如有异常请登记')}}</p>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">{{$t('确定')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</el-row>
</div>
</template>
<script>
import { updateOrderClearance, updateAllOrderClearance } from "@/api/ecw/boxAir";
export default {
name: "updateError",
inheritAttrs: false,
components: {},
props: {
shipmentObj: Object,
clearInfo: Object,
},
data() {
return {
// 到港对象
cusClearanceObj: {},
// 校验
rules: {
clEstTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
clClearTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
]
},
headerTitle: "",
};
},
watch: {
clearInfo: {
handler: function (val) {
const { orderList, type } = val;
if (type === "selected") {
this.headerTitle = this.$t(
"确定给{selfNo}下的{orderNos}更新状态吗?",
{
selfNo: this.shipmentObj.selfNo,
orderNos: orderList.map((item) => item.orderNo).join(",") ?? "",
}
);
} else {
this.headerTitle = this.$t(
`确定给{selfNo}下的${
type === "all" ? this.$t("所有订单") : this.$t("所选订单")
}更新状态吗?`,
{
selfNo: this.shipmentObj.selfNo,
}
);
}
},
immediate: true,
},
},
methods: {
onSubmit() {
this.$refs["arrivalForm"].validate((valid) => {
if (valid) {
if(this.clearInfo.type == 'selected'){
let param = {
shipmentId: this.shipmentObj.id,
orderIdList: this.clearInfo.orderList
}
updateOrderClearance({...this.cusClearanceObj, ...param}).then(()=>{
this.$message.success("成功");
this.cancel()
})
}else{
let param = {
shipmentId: this.shipmentObj.id
}
updateAllOrderClearance({...this.cusClearanceObj, ...param}).then(()=>{
this.$message.success("成功");
this.cancel()
})
}
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
.shipping-update-error {
.message-title {
text-align: center;
font-size: 20px;
margin: 0 20px 10px;
}
}
</style>
......@@ -123,6 +123,11 @@ export default {
this.DICT_TYPE.BOX_ARRIVAL_ERROR_TYPE
);
break;
case "flight":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_FLYING_ERROR_TYPE
);
break;
}
},
immediate: true,
......
......@@ -87,22 +87,28 @@
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="createTime" width="180">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_IS_DRAFT" :value="row.status" />
<template v-if="row.status === 1">
<template v-if="row.putonStatus === 1">{{$t('已发布,投放中')}}</template>
<template v-else-if="row.putonStatus === -1">{{$t('取消投放')}}</template>
<!--投放状态暂时就只有上诉两种,如果出现了其他的应该视为异常状态,为了方便发现问题所以直接显示投放字典-->
<dict-tag v-else :type="DICT_TYPE.ECW_COUPON_PUTON_STATUS" :value="row.putonStatus" />
</template>
<template v-else>{{$t('草稿')}}</template>
</template>
</el-table-column>
<el-table-column :label="$t('投放状态')" align="center" prop="putonStatus" width="180">
<!--<el-table-column :label="$t('投放状态')" align="center" prop="putonStatus" width="180">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_PUTON_STATUS" :value="row.putonStatus" />
</template>
</el-table-column>
</el-table-column>-->
<el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row, true)"
v-hasPermi="['ecw:coupon:show']">{{ $t('查看') }}</el-button>
<el-button v-if="scope.row.putonStatus == 1" size="mini" type="text" icon="el-icon-edit" @click="setPutonStatus(scope.row, -1)"
<el-button v-if="scope.row.status === 1 && scope.row.putonStatus == 1" size="mini" type="text" icon="el-icon-edit" @click="setPutonStatus(scope.row, -1)"
v-hasPermi="['ecw:coupon:show']">{{ $t('取消投放') }}</el-button>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="setPutonStatus(scope.row, 1)"
<el-button v-else-if="scope.row.status === 1" size="mini" type="text" icon="el-icon-edit" @click="setPutonStatus(scope.row, 1)"
v-hasPermi="['ecw:coupon:show']">{{ $t('投放') }}</el-button>
<el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
......
......@@ -201,6 +201,11 @@
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</template>
</el-table-column>
<el-table-column prop="brand" :label="$t('特性')" width="90px">
<template slot-scope="{row}">
{{showAttrText(row.warehouseInInfoVO ? row.warehouseInProdAttrIds : row.prodAttrIds)}}
</template>
</el-table-column>
<el-table-column prop="num" :label="$t('填单件数')" width="90px"/>
<el-table-column prop="sumNum" :label="$t('入仓件数')" width="90px">
<template slot-scope="{row}">
......@@ -244,10 +249,10 @@
<template slot-scope="{row}">
<template v-if="row.charging ==1">
<template v-if="!row.oneSeaFreight">{{ $t('未报价') }}</template>
<template v-if="!row.originalSeaFreight">{{ $t('未报价') }}</template>
<el-link type="primary" @click="showFeeDetail(row, 'clearance')" v-else>{{$t('全包价')}} {{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}</el-link>
</template>
<template v-else-if="!row.oneSeaFreight && !row.oneClearanceFreight">{{ $t('未报价') }}</template>
<template v-else-if="!row.originalSeaFreight && !row.oneClearanceFreight">{{ $t('未报价') }}</template>
<template v-else>
<el-link type="primary" @click="showFeeDetail(row, 'freight')">
{{$t('运费')}}{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
......@@ -505,6 +510,7 @@ import PackHistory from './components/PackHistory';
import PackHistoryDetail from './components/PackHistoryDetail';
import {getSupplier, getSupplierPage} from '@/api/ecw/supplier'
import {formatTime} from "@/utils";
import {getProductAttrList} from "@/api/ecw/productAttr";
export default {
name: "detail",
components: {
......@@ -561,7 +567,9 @@ export default {
packAfterData:null,//显示打包历史详情
showDeclaration:false, //显示报关资料
showFeeSummary: false, // 是否显示费用汇总
offerData:'' //关联报价单
offerData:'', //关联报价单
// 特性列表
attrList: []
}
},
computed:{
......@@ -593,6 +601,18 @@ export default {
return JSON.parse(this.order.departureVO.departure)
}
return {}
},
// 显示特性
showAttrText(){
return ids => {
if(!ids) return ''
ids = !Array.isArray(ids) ? ids.split(',') : ids
const attrMap = {}
this.attrList.forEach(item => {
attrMap[item.id] = this.$l(item, 'attrName')
})
return ids.map(id => attrMap[id]).join(',')
}
}
},
watch:{
......@@ -628,6 +648,9 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
methods: {
parseTime,
......
......@@ -411,7 +411,7 @@
<el-table-column :label="$t('快递单号')" prop="expressNo"></el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList">
<template v-slot="{ row, column, $index }">
{{getLocationName(row.orderLocationList)}}
<warehouse-area-select :value="row.orderLocationList" :warehouse-id="currentWarehouseId"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
......@@ -609,7 +609,7 @@ export default {
}
Promise.all([this.getList(), this.getOrder()]).then(res => {
if(this.orderData.inWarehouseState != 207 && this.splitData.length){
this.reset()
// this.reset()
}
// 空运需要获取货币和体积单位
......
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