Commit ccced454 authored by 我在何方's avatar 我在何方
parents 74222797 9f27e22a
...@@ -360,4 +360,19 @@ export function updateAllOrderClearance(data) { ...@@ -360,4 +360,19 @@ export function updateAllOrderClearance(data) {
method: "post", method: "post",
data: data data: data
}); });
}
/**
* 获取线路配置
*
* @export
* @param {*} data
* @return {*}
*/
export function getLineInfoList(params) {
return request({
url: `/ecw/warehouse/getLineInfoList`,
method: "get",
params
});
} }
\ No newline at end of file
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}, },
computed:{ computed:{
badge(){ badge(){
return this.$store.getters.badgeData[this.item.meta.badgeField] return this.$store.getters.badgeData[this.item.meta?.badgeField]
} }
}, },
methods: { methods: {
......
...@@ -55,11 +55,7 @@ export default { ...@@ -55,11 +55,7 @@ export default {
} }
}, },
created() { created() {
// 查询待出订单数量 waitingShipment this.$store.dispatch('getBadgeData')
getWaitingShipmentCount().then(res => {
console.log('getWaitingShipmentCount', res.data)
this.$store.commit('SET_BADGE_DATA', { waitingShipment: res.data}, )
})
} }
}; };
</script> </script>
...@@ -2,6 +2,7 @@ import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login' ...@@ -2,6 +2,7 @@ import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import {getNotReadInternalMessageTotal,} from '@/api/system/internalMessage' import {getNotReadInternalMessageTotal,} from '@/api/system/internalMessage'
import {taskTodoCount, userMark} from "@/api/bpm/task"; import {taskTodoCount, userMark} from "@/api/bpm/task";
import {getWaitingShipmentCount} from "@/api/ecw/order";
const user = { const user = {
state: { state: {
...@@ -202,6 +203,14 @@ const user = { ...@@ -202,6 +203,14 @@ const user = {
reject(err) reject(err)
}) })
}) })
},
// 获取菜单角标数据,当前只有空运待出
getBadgeData({commit}){
// 查询待出订单数量 waitingShipment
getWaitingShipmentCount().then(res => {
console.log('getWaitingShipmentCount', res.data)
commit('SET_BADGE_DATA', { waitingShipment: res.data}, )
})
} }
} }
} }
......
...@@ -193,6 +193,7 @@ export const DICT_TYPE = { ...@@ -193,6 +193,7 @@ export const DICT_TYPE = {
MANUAL_EXCEPTION_TYPE:'manual_exception_type', MANUAL_EXCEPTION_TYPE:'manual_exception_type',
APPLY_STATUS:'apply_status',//特价申请审核状态 APPLY_STATUS:'apply_status',//特价申请审核状态
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type', WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
WAREHOUSING_RECORD_DETAIL_USAGE: 'warehousing_record_detail_usage', // 入仓规格类型
ECW_AUTH_TYPE:'auth_type',//品牌授权 ECW_AUTH_TYPE:'auth_type',//品牌授权
OREER_ITEM_USAGE:'order_item_usage',//用途 OREER_ITEM_USAGE:'order_item_usage',//用途
......
...@@ -206,6 +206,7 @@ import { ...@@ -206,6 +206,7 @@ import {
dealCustomsSplitNotify, dealCustomsSplitNotify,
exportPreloadGoodsList, downloadReceivableList, getAirNoticeList, zipDownload, downloadAirReceivableList exportPreloadGoodsList, downloadReceivableList, getAirNoticeList, zipDownload, downloadAirReceivableList
} from '@/api/ecw/box' } from '@/api/ecw/box'
import { getLineInfoList } from '@/api/ecw/boxAir'
import { getChannelList } from '@/api/ecw/channel' import { getChannelList } from '@/api/ecw/channel'
import { getWarehouseList } from '@/api/ecw/warehouse' import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue' import costForm from './costForm.vue'
...@@ -393,6 +394,14 @@ export default { ...@@ -393,6 +394,14 @@ export default {
getboxPage(params).then((response) => { getboxPage(params).then((response) => {
this.list = response.data.list this.list = response.data.list
this.total = response.data.total this.total = response.data.total
// var lineParams = []
// this.list.forEach(item=>{
// let line = lineParams.findIndex(li=>li.startWarehouseId==item.startWarehouseId&&li.destWarehouseId==item.destWarehouseId&&li.transportType==item.transportType)
// if(line == -1){
// lineParams.push({startWarehouseId:item.startWarehouseId,destWarehouseId:item.destWarehouseId,transportType:item.transportType})
// }
// })
// getLineInfoList(lineParams)
this.loading = false this.loading = false
}) })
}, },
......
<template> <template>
<div> <div>
<el-form ref="arrivalForm" :rules="rules" :model="airArrivalInfo" label-width="120px"> <el-form ref="arrivalForm" :rules="rules" :model="airArrivalInfo" label-width="120px">
<el-form-item :label="$t('到港情况')" prop="arriveType"> <el-form-item :label="$t('到港情况')" prop="arriveType">
<el-radio-group v-model="airArrivalInfo.arriveType"> <el-radio-group v-model="airArrivalInfo.arriveType">
<el-radio :label="0">{{ $t('一次到港') }}</el-radio> <el-radio :label="0">{{ $t('一次到港') }}</el-radio>
<el-radio :label="1">{{ $t('多次到港') }}</el-radio> <el-radio :label="1">{{ $t('多次到港') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('选择订单')" prop="arriveOrderIdList" v-show="airArrivalInfo.arriveType == 1"> <el-form-item :label="$t('选择订单')" prop="arriveOrderIdList" v-show="airArrivalInfo.arriveType == 1">
<el-select <span v-for="order in selectOrders" :key="order.id">{{ order.orderNo }} </span>
v-model="airArrivalInfo.arriveOrderIdList" <el-button type="primary" @click="orderdialogVisible = true">{{ $t('订单列表') }}</el-button>
multiple
filterable
clearable
reserve-keyword
:filter-method="filterOrder"
:placeholder="$t('请输入订单号、提单号、唛头')"
@change="selectOrderId"
>
<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>
<el-form-item :label="$t('已到港订单')" v-show="airArrivalInfo.arriveType == 1"> <el-form-item :label="$t('已到港订单')" v-show="airArrivalInfo.arriveType == 1">
<span v-for="order in airArrivalInfo.arrivalOrderList" :key="order.id">{{order.orderNo}} </span> <span v-for="order in airArrivalInfo.arrivalOrderList" :key="order.id">{{ order.orderNo }} </span>
</el-form-item> </el-form-item>
<el-form-item v-if="dtRealHeadTimeFlag||airArrivalInfo.arriveType==1" :label="$t('实际二程起飞时间')" prop="actSecondTime"> <el-form-item v-if="dtRealHeadTimeFlag || airArrivalInfo.arriveType == 1" :label="$t('实际二程起飞时间')" prop="actSecondTime">
<template slot="label" slot-scope="scope"> <template slot="label" slot-scope="scope"> <span style="color: red">*</span>{{ $t('实际二程起飞时间') }} </template>
<span style="color: red;">*</span>{{$t('实际二程起飞时间')}}
</template>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <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>
<el-form-item :label="$t('预计到港时间')" prop="estTime"> <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-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>
<el-form-item :label="$t('实际到港时间')" prop="actTime"> <el-form-item :label="$t('实际到港时间')" prop="actTime">
<template slot="label" slot-scope="scope"> <template slot="label" slot-scope="scope"> <span style="color: red">*</span>{{ $t('实际到港时间') }} </template>
<span style="color: red;">*</span>{{$t('实际到港时间')}}
</template>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <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-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button> <el-button type="primary" @click="onSubmit(1)">{{ $t('保存') }}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button> <el-button type="success" @click="onSubmit(2)">{{ $t('提交') }}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button> <el-button @click="cancel">{{ $t('关闭') }}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{$t('异常登记')}}</el-button> <el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{ $t('异常登记') }}</el-button>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close> <el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body="false" append-to-body destroy-on-close>
<regError @closeDialog="regCloseDialog" v-bind="$attrs" /> <regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog> </el-dialog>
<!-- 订单列表 -->
<el-dialog width="70%" :title="$t('选择订单')" :visible.sync="orderdialogVisible" :modal-append-to-body="false" append-to-body destroy-on-close>
<el-row :gutter="10">
<el-col :span="7">
{{ $t('关键字:') }}
<el-input style="width: 300px" v-model="searchForm.orderKeyword" :placeholder="$t('请输入订单号、提单号、唛头')" />
</el-col>
<el-col :span="5">
{{ $t("到港状态") }}
<el-select v-model="searchForm.orderPortStatus">
<el-option :value="0" :label="$t('未到港')" />
<el-option :value="1" :label="$t('已到港')" />
</el-select>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="searchOrderList"> {{ $t('查询') }}</el-button>
<el-button type="primary" @click="reloafSearch"> {{ $t('重置') }}</el-button>
</el-col>
</el-row>
<div style="margin-top: 10px">
<el-button type="primary" @click="multipleSelect">
{{ $t('批量选择') }}
</el-button>
</div>
<el-table style="margin-top: 10px" :data="statusOrderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column :label="$t('序号')" type="index" width="50"> </el-table-column>
<el-table-column :label="$t('订单号')" prop="orderNo" />
<el-table-column :label="$t('唛头')" prop="marks" />
<el-table-column :label="$t('提单号')" prop="tidanNo" />
<el-table-column width="150" :label="$t('总箱数/入仓箱数')">
<template slot-scope="scope"> {{ scope.row.totalNum }}/{{ scope.row.sumNum }} </template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" prop="">
<template slot-scope="scope"> {{ scope.row.sumVolume }}/{{ scope.row.sumWeight }} </template>
</el-table-column>
<el-table-column :label="$t('到港状态')" prop="arrival" />
<el-table-column :label="$t('控货')">
<template slot-scope="scope">
{{ cargoControlStatus[scope.row.cargoControlStatus] }}
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" prop="statusMsg" />
<el-table-column :label="$t('操作')">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="selectOrder(scope.row)">{{ $t('选择') }}</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import regError from "../../regError"; import regError from '../../regError'
import dayjs from "dayjs"; import dayjs from 'dayjs'
import { arrivalCreate } from "@/api/ecw/boxSeaAir"; import { arrivalCreate } from '@/api/ecw/boxSeaAir'
import { shipmentOrderList } from "@/api/ecw/boxAir"; import { shipmentOrderList } from '@/api/ecw/boxAir'
import { formatDateStr, serviceMsg, formatDate } from "../utils"; import { formatDateStr, serviceMsg, formatDate } from '../utils'
/** /**
* 到港 * 到港
*/ */
export default { export default {
name: "arrival", name: 'arrival',
inheritAttrs: false, inheritAttrs: false,
components: { components: {
regError, regError
}, },
data() { data() {
var validateActSecondTime = (rule, value, callback) => { var validateActSecondTime = (rule, value, callback) => {
if(!value && (this.airArrivalInfo.arriveType==0||(this.airArrivalInfo.arriveType==1&&this.airArrivalInfo.arriveOrderIdList.length>0))){ if (!value && (this.airArrivalInfo.arriveType == 0 || (this.airArrivalInfo.arriveType == 1 && this.airArrivalInfo.arriveOrderIdList.length > 0))) {
callback(new Error("必填")); callback(new Error(this.$t('必填')))
} }
callback(); callback()
}; }
var validateActTime = (rule, value, callback) => { var validateActTime = (rule, value, callback) => {
if(!value && (this.airArrivalInfo.arriveType==0||(this.airArrivalInfo.arriveType==1&&this.airArrivalInfo.arriveOrderIdList.length>0))){ if (!value && (this.airArrivalInfo.arriveType == 0 || (this.airArrivalInfo.arriveType == 1 && this.airArrivalInfo.arriveOrderIdList.length > 0))) {
callback(new Error("必填")); callback(new Error(this.$t('必填')))
} }
callback(); callback()
}; }
return { return {
// 到港对象 // 到港对象
airArrivalInfo: {}, airArrivalInfo: {},
// 校验 // 校验
rules: { rules: {
actSecondTime: [ actSecondTime: [{ validator: validateActSecondTime, trigger: 'change' }],
{ validator: validateActSecondTime, trigger: "change" }, actTime: [{ validator: validateActTime, trigger: 'change' }]
],
actTime: [
{ validator: validateActTime, trigger: "change" },
]
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
// 提示消息 // 提示消息
showMsg: false, showMsg: false,
inspectionTimeArrival: this.getDictDatas( inspectionTimeArrival: this.getDictDatas(this.DICT_TYPE.BOX_INSPECTION_TIME_ARRIVAL)[0].value,
this.DICT_TYPE.BOX_INSPECTION_TIME_ARRIVAL
)[0].value,
dtRealHeadTimeFlag: false, dtRealHeadTimeFlag: false,
orderList: [], orderList: [],
orderListFilter: [], arrivalOrderList: [],
arrivalOrderList: [] orderdialogVisible: false,
}; selectOrders: [],
multipleSelectOrder: [],
cargoControlStatus: [this.$t('控货中'), this.$t('已放完货'), this.$t('部分控货')],
searchForm: {
orderKeyword: null,
orderPortStatus: null
},
searchFormFilter: {}
}
}, },
created() { created() {
const voName = this.$attrs.currNode.voName; const voName = this.$attrs.currNode.voName
let oldData = { ...this.$attrs.shipmentObj[voName] }; let oldData = { ...this.$attrs.shipmentObj[voName] }
oldData = formatDateStr( oldData = formatDateStr(oldData, ['actSecondTime', 'estTime', 'actTime'], 'YYYY-MM-DD HH:mm:ss')
oldData, this.airArrivalInfo = oldData
["actSecondTime", "estTime", "actTime"], if (this.$attrs.shipmentObj['bookAirInfo'].voyage && this.$attrs.shipmentObj['bookAirInfo'].voyage == 2) {
"YYYY-MM-DD HH:mm:ss"
);
this.airArrivalInfo = oldData;
if(this.$attrs.shipmentObj['bookAirInfo'].voyage && this.$attrs.shipmentObj['bookAirInfo'].voyage == 2){
this.dtRealHeadTimeFlag = true this.dtRealHeadTimeFlag = true
} }
if(!this.airArrivalInfo.arriveType) this.$set(this.airArrivalInfo,'arriveType',0) if (!this.airArrivalInfo.arriveType) this.$set(this.airArrivalInfo, 'arriveType', 0)
this.$set(this.airArrivalInfo,'arriveOrderIdList',[]) this.$set(this.airArrivalInfo, 'arriveOrderIdList', [])
this.arrivalOrderList = this.$attrs.shipmentObj.airArrivalInfo?this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList:[] this.arrivalOrderList = this.$attrs.shipmentObj.airArrivalInfo ? this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList : []
shipmentOrderList(this.$attrs.shipmentObj.id).then(r=>{ shipmentOrderList(this.$attrs.shipmentObj.id).then((r) => {
this.orderList = r.data this.orderList = r.data
this.orderListFilter = r.data
}) })
}, },
computed: { computed: {
statusOrderList(){ statusOrderList() {
let data = [] let data = []
this.orderListFilter.forEach(item=>{ this.orderList.forEach((item) => {
let json = { let json = {
orderId: item.orderId, orderId: item.orderId,
orderNo: item.orderNo, orderNo: item.orderNo,
tidanNo: item.tidanNo, tidanNo: item.tidanNo,
marks: item.marks, marks: item.marks,
} sumNum: item.sumNum,
let index = this.arrivalOrderList?this.arrivalOrderList.findIndex(p=>p.orderId==item.orderId):-1 totalNum: item.totalNum,
if(index != -1){ sumVolume: item.sumVolume,
sumWeight: item.sumWeight,
statusMsg: item.statusMsg,
cargoControlStatus: item.cargoControlStatus
}
let index = this.arrivalOrderList ? this.arrivalOrderList.findIndex((p) => p.orderId == item.orderId) : -1
if (index != -1) {
json.arrival = this.$t('已到港') json.arrival = this.$t('已到港')
}else{ json.arrivalValue = 1;
} else {
json.arrival = this.$t('未到港') json.arrival = this.$t('未到港')
json.arrivalValue = 0;
} }
data.push(json) data.push(json)
}) })
if (this.searchFormFilter.orderKeyword && this.searchFormFilter.orderKeyword != '') {
data = data.filter((item) => {
return (item.orderNo && item.orderNo.indexOf(this.searchFormFilter.orderKeyword) > -1) || (item.tidanNo && item.tidanNo.indexOf(this.searchFormFilter.orderKeyword) > -1) || (item.marks && item.marks.indexOf(this.searchFormFilter.orderKeyword) > -1)
})
}
if (this.searchFormFilter.orderPortStatus != null) {
data = data.filter((item) => {
return item.arrivalValue == this.searchFormFilter.orderPortStatus
})
}
return data return data
} }
}, },
watch: { watch: {
// 实际二程起飞时间 // 实际二程起飞时间
"airArrivalInfo.actSecondTime"(val) { 'airArrivalInfo.actSecondTime'(val) {
this.compareDate(this.getHeadTravelTime(), val); this.compareDate(this.getHeadTravelTime(), val)
}, },
"airArrivalInfo.estTime"(val) { 'airArrivalInfo.estTime'(val) {
this.compareDate(this.airArrivalInfo.actTime, val); this.compareDate(this.airArrivalInfo.actTime, val)
}, },
"airArrivalInfo.actTime"(val) { 'airArrivalInfo.actTime'(val) {
this.compareDate(this.airArrivalInfo.estTime, val); this.compareDate(this.airArrivalInfo.estTime, val)
}, },
"airArrivalInfo.arriveType"(val) { 'airArrivalInfo.arriveType'(val) {
if(val == 1){ if (val == 1) {
this.$set(this.airArrivalInfo, 'actSecondTime', null) this.$set(this.airArrivalInfo, 'actSecondTime', null)
this.$set(this.airArrivalInfo, 'estTime', null) this.$set(this.airArrivalInfo, 'estTime', null)
this.$set(this.airArrivalInfo, 'actTime', null) this.$set(this.airArrivalInfo, 'actTime', null)
}else{ } else {
let oldData = { ...this.$attrs.shipmentObj[this.$attrs.currNode.voName] }; let oldData = { ...this.$attrs.shipmentObj[this.$attrs.currNode.voName] }
oldData = formatDateStr( oldData = formatDateStr(oldData, ['actSecondTime', 'estTime', 'actTime'], 'YYYY-MM-DD HH:mm:ss')
oldData,
["actSecondTime", "estTime", "actTime"],
"YYYY-MM-DD HH:mm:ss"
);
this.$set(this.airArrivalInfo, 'actSecondTime', oldData.actSecondTime) this.$set(this.airArrivalInfo, 'actSecondTime', oldData.actSecondTime)
this.$set(this.airArrivalInfo, 'estTime', oldData.estTime) this.$set(this.airArrivalInfo, 'estTime', oldData.estTime)
this.$set(this.airArrivalInfo, 'actTime', oldData.actTime) this.$set(this.airArrivalInfo, 'actTime', oldData.actTime)
...@@ -190,18 +232,39 @@ export default { ...@@ -190,18 +232,39 @@ export default {
} }
}, },
methods: { methods: {
filterOrder(val){ searchOrderList() {
if(val != ''){ this.searchFormFilter = JSON.parse(JSON.stringify(this.searchForm))
this.orderListFilter = this.orderList.filter(item=>{ },
return item.orderNo&&item.orderNo.indexOf(val) > -1 || item.tidanNo&&item.tidanNo.indexOf(val) > -1 || item.marks&&item.marks.indexOf(val) > -1 reloafSearch() {
}) this.searchForm = {}
}else{ this.searchOrderList()
this.orderListFilter = this.orderList },
selectOrder(val) {
this.selectOrders = []
this.selectOrders.push(val)
let arr = this.arrivalOrderList.find((item) => item.orderId == val.orderId)
if (arr) {
this.$set(this.airArrivalInfo, 'actSecondTime', formatDate(arr.actSecondTime))
this.$set(this.airArrivalInfo, 'estTime', formatDate(arr.estTime))
this.$set(this.airArrivalInfo, 'actTime', formatDate(arr.actTime))
} }
this.orderdialogVisible = false
this.airArrivalInfo.arriveOrderIdList.push(val.orderId)
},
handleSelectionChange(val) {
this.multipleSelectOrder = val
}, },
selectOrderId(val) { // 批量选择
if (val.length == 1) { multipleSelect() {
let arr = this.arrivalOrderList.find((item) => item.orderId == val[0]) if (this.multipleSelectOrder.length == 0) {
this.$message.error(this.$t('请先选择订单'))
return
}
this.selectOrders = []
this.selectOrders = this.multipleSelectOrder
if (this.multipleSelectOrder.length == 1) {
let arr = this.arrivalOrderList.find((item) => item.orderId == this.multipleSelectOrder[0].orderId)
if (arr) { if (arr) {
this.$set(this.airArrivalInfo, 'actSecondTime', formatDate(arr.actSecondTime)) this.$set(this.airArrivalInfo, 'actSecondTime', formatDate(arr.actSecondTime))
this.$set(this.airArrivalInfo, 'estTime', formatDate(arr.estTime)) this.$set(this.airArrivalInfo, 'estTime', formatDate(arr.estTime))
...@@ -212,73 +275,71 @@ export default { ...@@ -212,73 +275,71 @@ export default {
this.$set(this.airArrivalInfo, 'estTime', null) this.$set(this.airArrivalInfo, 'estTime', null)
this.$set(this.airArrivalInfo, 'actTime', null) this.$set(this.airArrivalInfo, 'actTime', null)
} }
this.orderdialogVisible = false
this.airArrivalInfo.arriveOrderIdList = this.multipleSelectOrder.map((item) => item.orderId)
}, },
regCloseDialog(type) { regCloseDialog(type) {
this.dialogVisible = false; this.dialogVisible = false
if (type === "error") { if (type === 'error') {
this.$emit("getBoxInfo"); this.$emit('getBoxInfo')
} }
}, },
// 获取实际二程起飞时间 // 获取实际二程起飞时间
getHeadTravelTime() { getHeadTravelTime() {
const { shippingInfo } = this.$attrs.shipmentObj; const { shippingInfo } = this.$attrs.shipmentObj
if (shippingInfo) { if (shippingInfo) {
return dayjs(shippingInfo.realHeadTravelTime).format( return dayjs(shippingInfo.realHeadTravelTime).format('YYYY-MM-DD HH:mm:ss')
"YYYY-MM-DD HH:mm:ss"
);
} }
return null; return null
}, },
// 获取预计到港时间 // 获取预计到港时间
getExpectedTime() { getExpectedTime() {
const { shippingInfo } = this.$attrs.shipmentObj; const { shippingInfo } = this.$attrs.shipmentObj
if (shippingInfo) { if (shippingInfo) {
return dayjs(shippingInfo.dtEstArrivalTime).format( return dayjs(shippingInfo.dtEstArrivalTime).format('YYYY-MM-DD HH:mm:ss')
"YYYY-MM-DD HH:mm:ss"
);
} }
return null; return null
}, },
// 时间比较 // 时间比较
compareDate(expectedTime, apConfirmTime) { compareDate(expectedTime, apConfirmTime) {
this.showMsg = false; this.showMsg = false
let date1 = null, let date1 = null,
date2 = null; date2 = null
if (expectedTime) date1 = dayjs(expectedTime); if (expectedTime) date1 = dayjs(expectedTime)
if (apConfirmTime) date2 = dayjs(apConfirmTime); if (apConfirmTime) date2 = dayjs(apConfirmTime)
if (date1 && date2) { if (date1 && date2) {
const days = date2.diff(date1, "day"); const days = date2.diff(date1, 'day')
if (days > this.inspectionTimeArrival) { if (days > this.inspectionTimeArrival) {
this.showMsg = true; this.showMsg = true
} }
} }
}, },
// 异常登记 // 异常登记
exceptionReg() { exceptionReg() {
this.dialogVisible = true; this.dialogVisible = true
}, },
/** 提交 */ /** 提交 */
onSubmit(operateType) { onSubmit(operateType) {
this.$refs["arrivalForm"].validate((valid) => { this.$refs['arrivalForm'].validate((valid) => {
if (valid) { if (valid) {
arrivalCreate({ arrivalCreate({
...this.airArrivalInfo, ...this.airArrivalInfo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
operateType, operateType
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel("submit"); this.cancel('submit')
}); })
}); })
} }
}); })
}, },
/** 取消 */ /** 取消 */
cancel(type) { cancel(type) {
this.$emit("closeDialog", type); this.$emit('closeDialog', type)
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div> <div>
<el-form <el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="160px">
ref="cusClearanceForm"
:rules="rules"
:model="cusClearanceObj"
label-width="160px"
>
<el-form-item :label="$t('清关情况')" prop="arriveType"> <el-form-item :label="$t('清关情况')" prop="arriveType">
<el-radio-group v-model="cusClearanceObj.clearanceType"> <el-radio-group v-model="cusClearanceObj.clearanceType">
<el-radio :label="0">{{ $t("一次清关") }}</el-radio> <el-radio :label="0">{{ $t('一次清关') }}</el-radio>
<el-radio :label="1">{{ $t("多次清关") }}</el-radio> <el-radio :label="1">{{ $t('多次清关') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('选择订单')" prop="clearanceOrderIdList" v-show="cusClearanceObj.clearanceType == 1">
:label="$t('选择订单')" <span v-for="order in selectOrders" :key="order.id">{{ order.orderNo }} </span>
prop="clearanceOrderIdList" <el-button type="primary" @click="orderdialogVisible = true">{{ $t('订单列表') }}</el-button>
v-show="cusClearanceObj.clearanceType == 1"
>
<span v-for="order in selectOrders" :key="order.id"
>{{ order.orderNo }}
</span>
<el-button type="primary" @click="orderdialogVisible = true">{{
$t("订单列表")
}}</el-button>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('已清关订单')" v-show="cusClearanceObj.clearanceType == 1">
:label="$t('已清关订单')" <span v-for="order in cusClearanceObj.clearanceOrderList" :key="order.id">{{ order.orderNo }} </span>
v-show="cusClearanceObj.clearanceType == 1"
>
<span
v-for="order in cusClearanceObj.clearanceOrderList"
:key="order.id"
>{{ order.orderNo }}
</span>
</el-form-item> </el-form-item>
<div> <div>
<el-form <el-form ref="airArrivalForm" :rules="airArrivalrules" :model="airArrivalInfo" label-width="160px">
ref="airArrivalForm"
:rules="airArrivalrules"
:model="airArrivalInfo"
label-width="160px"
>
<el-form-item :label="$t('实际二程起飞时间')" prop="actSecondTime"> <el-form-item :label="$t('实际二程起飞时间')" prop="actSecondTime">
<el-date-picker <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actSecondTime" value-format="yyyy-MM-dd HH:mm:ss"></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>
<el-form-item :label="$t('预计到港时间')" prop="estTime"> <el-form-item :label="$t('预计到港时间')" prop="estTime">
<el-date-picker <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.estTime" value-format="yyyy-MM-dd HH:mm:ss"></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>
<el-form-item :label="$t('实际到港时间')" prop="actTime"> <el-form-item :label="$t('实际到港时间')" prop="actTime">
<el-date-picker <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="airArrivalInfo.actTime" value-format="yyyy-MM-dd HH:mm:ss"></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-item>
</el-form> </el-form>
</div> </div>
<el-form-item :label="$t('预计清关时间')" prop="clEstTime"> <el-form-item :label="$t('预计清关时间')" prop="clEstTime">
<el-date-picker <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd HH:mm:ss"></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>
<el-form-item :label="$t('清关时间')" prop="clClearTime"> <el-form-item :label="$t('清关时间')" prop="clClearTime">
<el-date-picker <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusClearanceObj.clClearTime" value-format="yyyy-MM-dd HH:mm:ss"></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"> <p class="message-area" v-show="showMsg">
{{ $t("清关时间与预计时间不符,如有异常请登记") }} {{ $t('清关时间与预计时间不符,如有异常请登记') }}
</p> </p>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{ <el-button type="primary" @click="onSubmit(1)">{{ $t('保存') }}</el-button>
$t("保存") <el-button type="success" @click="onSubmit(2)">{{ $t('提交') }}</el-button>
}}</el-button> <el-button @click="cancel">{{ $t('关闭') }}</el-button>
<el-button type="success" @click="onSubmit(2)">{{ <el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{ $t('异常登记') }}</el-button>
$t("提交")
}}</el-button>
<el-button @click="cancel">{{ $t("关闭") }}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{
$t("异常登记")
}}</el-button>
</el-row> </el-row>
<!-- 对话框 --> <!-- 对话框 -->
<el-dialog <el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body="false" append-to-body destroy-on-close>
custom-class="shipping-dialog"
:title="$t('票异常')"
:visible.sync="dialogVisible"
width="700px"
:modal-append-to-body="false"
append-to-body
destroy-on-close
>
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" /> <regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
</el-dialog> </el-dialog>
<!-- 订单列表 --> <!-- 订单列表 -->
<el-dialog <el-dialog width="70%" :title="$t('选择订单')" :visible.sync="orderdialogVisible" :modal-append-to-body="false" append-to-body destroy-on-close>
:fullscreen="true"
:title="$t('选择订单')"
:visible.sync="orderdialogVisible"
:modal-append-to-body="false"
append-to-body
destroy-on-close
>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="7"> <el-col :span="7">
{{ $t("关键字:") }} {{ $t('关键字:') }}
<el-input <el-input style="width: 300px" v-model="searchForm.orderKeyword" :placeholder="$t('请输入订单号、提单号、唛头')" />
style="width: 300px"
v-model="orderKeyword"
:placeholder="$t('请输入订单号、提单号、唛头')"
/>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="5">
{{ $t("到港状态") }} {{ $t('到港状态') }}
<el-select v-model="orderPortStatus"> <el-select v-model="searchForm.orderPortStatus">
<el-option :value="0" :label="$t('未到港')" /> <el-option :value="0" :label="$t('未到港')" />
<el-option :value="1" :label="$t('已到港')" /> <el-option :value="1" :label="$t('已到港')" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="5">
{{ $t("清关状态") }} {{ $t('清关状态') }}
<el-select v-model="orderCustomsClearanceStatus"> <el-select v-model="searchForm.orderCustomsClearanceStatus">
<el-option :value="0" :label="$t('未清关')" /> <el-option :value="0" :label="$t('未清关')" />
<el-option :value="1" :label="$t('已清关')" /> <el-option :value="1" :label="$t('已清关')" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="4">
<el-button type="primary" @click="searchOrderList"> <el-button type="primary" @click="searchOrderList"> {{ $t('查询') }}</el-button>
{{ $t("查询") }}</el-button <el-button type="primary" @click="reloafSearch"> {{ $t('重置') }}</el-button>
>
</el-col> </el-col>
</el-row> </el-row>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-button type="primary" @click="multipleSelect"> <el-button type="primary" @click="multipleSelect">
{{ $t("批量选择") }} {{ $t('批量选择') }}
</el-button> </el-button>
</div> </div>
<el-table <el-table style="margin-top: 10px" :data="statusOrderList" @selection-change="handleSelectionChange">
style="margin-top: 10px"
:data="statusOrderList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="selection" width="55"> </el-table-column>
<el-table-column :label="$t('序号')" type="index" width="50"> <el-table-column :label="$t('序号')" type="index" width="50"> </el-table-column>
</el-table-column>
<el-table-column :label="$t('订单号')" prop="orderNo" /> <el-table-column :label="$t('订单号')" prop="orderNo" />
<el-table-column :label="$t('唛头')" prop="marks" /> <el-table-column :label="$t('唛头')" prop="marks" />
<el-table-column :label="$t('提单号')" prop="tidanNo" /> <el-table-column :label="$t('提单号')" prop="tidanNo" />
<el-table-column width="150" :label="$t('总箱数/入仓箱数')" prop="" /> <el-table-column width="150" :label="$t('总箱数/入仓箱数')">
<el-table-column :label="$t('体积/重量')" prop="" /> <template slot-scope="scope"> {{ scope.row.totalNum }}/{{ scope.row.sumNum }} </template>
<el-table-column :label="$t('清关状态')" prop="clear" /> </el-table-column>
<el-table-column :label="$t('体积/重量')" prop="">
<template slot-scope="scope"> {{ scope.row.sumVolume }}/{{ scope.row.sumWeight }} </template>
</el-table-column>
<el-table-column :label="$t('到港状态')" prop="arrival" /> <el-table-column :label="$t('到港状态')" prop="arrival" />
<el-table-column :label="$t('控货')" prop="" /> <el-table-column :label="$t('到港状态')" prop="clear" />
<el-table-column :label="$t('订单状态')" prop="" /> <el-table-column :label="$t('控货')">
<template slot-scope="scope">
{{ cargoControlStatus[scope.row.cargoControlStatus] }}
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" prop="statusMsg" />
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="primary" @click="selectOrder(scope.row)">{{ $t('选择') }}</el-button>
size="mini"
type="primary"
@click="selectOrder(scope.row)"
>{{ $t("选择") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -191,22 +113,21 @@ ...@@ -191,22 +113,21 @@
</template> </template>
<script> <script>
import regError from "../../regError"; import regError from '../../regError'
import dayjs from "dayjs"; import dayjs from 'dayjs'
import { clearanceCreate } from "@/api/ecw/boxSea"; import { clearanceCreate } from '@/api/ecw/boxSea'
import { shipmentOrderList } from "@/api/ecw/boxAir"; import { shipmentOrderList } from '@/api/ecw/boxAir'
import { formatDateStr, serviceMsg, formatDate } from "../utils"; import { formatDateStr, serviceMsg, formatDate } from '../utils'
import { updateOrderArrival } from "@/api/ecw/boxAir"; import { updateOrderArrival } from '@/api/ecw/boxAir'
import search from "bpmn-js/lib/features/search";
/** /**
* 清关 * 清关
*/ */
export default { export default {
name: "cusClearance", name: 'cusClearance',
inheritAttrs: false, inheritAttrs: false,
components: { components: {
regError, regError
}, },
data() { data() {
return { return {
...@@ -214,20 +135,12 @@ export default { ...@@ -214,20 +135,12 @@ export default {
cusClearanceObj: {}, cusClearanceObj: {},
// 校验 // 校验
rules: { rules: {
clEstTime: [ clEstTime: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
{ required: true, message: this.$t("必填"), trigger: "change" }, clClearTime: [{ required: true, message: this.$t('必填'), trigger: 'change' }]
],
clClearTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
}, },
airArrivalrules: { airArrivalrules: {
actSecondTime: [ actSecondTime: [{ required: true, message: this.$t('必填'), trigger: 'change' }],
{ required: true, message: this.$t("必填"), trigger: "change" }, actTime: [{ required: true, message: this.$t('必填'), trigger: 'change' }]
],
actTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
...@@ -240,320 +153,229 @@ export default { ...@@ -240,320 +153,229 @@ export default {
orderdialogVisible: false, orderdialogVisible: false,
selectOrders: [], selectOrders: [],
multipleSelectOrder: [], multipleSelectOrder: [],
orderKeyword: null, cargoControlStatus: [this.$t('控货中'), this.$t('已放完货'), this.$t('部分控货')],
orderPortStatus: null, searchForm: {
orderCustomsClearanceStatus: null, orderKeyword: null,
}; orderPortStatus: null,
orderCustomsClearanceStatus: null
},
searchFormFilter: {}
}
}, },
created() { created() {
const voName = this.$attrs.currNode.voName; const voName = this.$attrs.currNode.voName
let oldData = { ...this.$attrs.shipmentObj[voName] }; let oldData = { ...this.$attrs.shipmentObj[voName] }
oldData = formatDateStr(oldData, ["clEstTime"]); oldData = formatDateStr(oldData, ['clEstTime'])
oldData = formatDateStr(oldData, ["clClearTime"], "YYYY-MM-DD HH:mm:ss"); oldData = formatDateStr(oldData, ['clClearTime'], 'YYYY-MM-DD HH:mm:ss')
this.cusClearanceObj = oldData; this.cusClearanceObj = oldData
if (!this.cusClearanceObj.clearanceType) if (!this.cusClearanceObj.clearanceType) this.$set(this.cusClearanceObj, 'clearanceType', 0)
this.$set(this.cusClearanceObj, "clearanceType", 0); this.$set(this.cusClearanceObj, 'clearanceOrderIdList', [])
this.$set(this.cusClearanceObj, "clearanceOrderIdList", []); if (typeof this.$attrs.shipmentObj.airArrivalInfo?.arrivalOrderList != 'undefined' && this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList) this.arrivalOrderList = this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList
if ( if (typeof this.$attrs.shipmentObj.clearanceInfo?.clearanceOrderList != 'undefined' && this.$attrs.shipmentObj.clearanceInfo.clearanceOrderList) this.clearanceOrderList = this.$attrs.shipmentObj.clearanceInfo.clearanceOrderList
typeof this.$attrs.shipmentObj.airArrivalInfo?.arrivalOrderList !=
"undefined" &&
this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList
)
this.arrivalOrderList =
this.$attrs.shipmentObj.airArrivalInfo.arrivalOrderList;
if (
typeof this.$attrs.shipmentObj.clearanceInfo?.clearanceOrderList !=
"undefined" &&
this.$attrs.shipmentObj.clearanceInfo.clearanceOrderList
)
this.clearanceOrderList =
this.$attrs.shipmentObj.clearanceInfo.clearanceOrderList;
shipmentOrderList(this.$attrs.shipmentObj.id).then((r) => { shipmentOrderList(this.$attrs.shipmentObj.id).then((r) => {
this.orderList = r.data; this.orderList = r.data
}); })
}, },
watch: { watch: {
// 预计清关时间 // 预计清关时间
"cusClearanceObj.clEstTime"(val) { 'cusClearanceObj.clEstTime'(val) {
this.compareDate(val, this.cusClearanceObj.clClearTime); this.compareDate(val, this.cusClearanceObj.clClearTime)
}, },
// 清关时间 // 清关时间
"cusClearanceObj.clClearTime"(val) { 'cusClearanceObj.clClearTime'(val) {
this.compareDate(this.cusClearanceObj.clEstTime, val); this.compareDate(this.cusClearanceObj.clEstTime, val)
}, },
"cusClearanceObj.clearanceType"(val) { 'cusClearanceObj.clearanceType'(val) {
if (val == 1) { if (val == 1) {
this.$set(this.cusClearanceObj, "clEstTime", null); this.$set(this.cusClearanceObj, 'clEstTime', null)
this.$set(this.cusClearanceObj, "clClearTime", null); this.$set(this.cusClearanceObj, 'clClearTime', null)
} else { } else {
let oldData = { let oldData = {
...this.$attrs.shipmentObj[this.$attrs.currNode.voName], ...this.$attrs.shipmentObj[this.$attrs.currNode.voName]
}; }
oldData = formatDateStr( oldData = formatDateStr(oldData, ['clEstTime', 'clClearTime'], 'YYYY-MM-DD HH:mm:ss')
oldData, this.$set(this.cusClearanceObj, 'clClearTime', oldData.clClearTime)
["clEstTime", "clClearTime"], this.$set(this.cusClearanceObj, 'clEstTime', oldData.clEstTime)
"YYYY-MM-DD HH:mm:ss"
);
this.$set(this.cusClearanceObj, "clClearTime", oldData.clClearTime);
this.$set(this.cusClearanceObj, "clEstTime", oldData.clEstTime);
} }
}, }
}, },
computed: { computed: {
statusOrderList() { statusOrderList() {
let data = []; let data = []
this.orderList.forEach((item) => { this.orderList.forEach((item) => {
let json = { let json = {
orderId: item.orderId, orderId: item.orderId,
orderNo: item.orderNo, orderNo: item.orderNo,
tidanNo: item.tidanNo, tidanNo: item.tidanNo,
marks: item.marks, marks: item.marks,
}; sumNum: item.sumNum,
let clearindex = this.cusClearanceObj.clearanceOrderList totalNum: item.totalNum,
? this.cusClearanceObj.clearanceOrderList.findIndex( sumVolume: item.sumVolume,
(p) => p.orderId == item.orderId sumWeight: item.sumWeight,
) statusMsg: item.statusMsg,
: -1; cargoControlStatus: item.cargoControlStatus
}
let clearindex = this.cusClearanceObj.clearanceOrderList ? this.cusClearanceObj.clearanceOrderList.findIndex((p) => p.orderId == item.orderId) : -1
if (clearindex != -1) { if (clearindex != -1) {
json.clear = this.$t("已清关"); json.clear = this.$t('已清关')
json.clearValue = 1; json.clearValue = 1
} else { } else {
json.clear = this.$t("未清关"); json.clear = this.$t('未清关')
json.clearValue = 0; json.clearValue = 0
} }
let arrivalindex = this.arrivalOrderList let arrivalindex = this.arrivalOrderList ? this.arrivalOrderList.findIndex((p) => p.orderId == item.orderId) : -1
? this.arrivalOrderList.findIndex((p) => p.orderId == item.orderId)
: -1;
if (arrivalindex != -1) { if (arrivalindex != -1) {
json.arrival = this.$t("已到港"); json.arrival = this.$t('已到港')
json.arrivalValue = 1; json.arrivalValue = 1
} else { } else {
json.arrival = this.$t("未到港"); json.arrival = this.$t('未到港')
json.arrivalValue = 0; json.arrivalValue = 0
} }
data.push(json); data.push(json)
}); })
return data; if (this.searchFormFilter.orderKeyword && this.searchFormFilter.orderKeyword != '') {
}, data = data.filter((item) => {
return (item.orderNo && item.orderNo.indexOf(this.searchFormFilter.orderKeyword) > -1) || (item.tidanNo && item.tidanNo.indexOf(this.searchFormFilter.orderKeyword) > -1) || (item.marks && item.marks.indexOf(this.searchFormFilter.orderKeyword) > -1)
})
}
if (this.searchFormFilter.orderPortStatus != null) {
data = data.filter((item) => {
return item.arrivalValue == this.searchFormFilter.orderPortStatus
})
}
if (this.searchFormFilter.orderCustomsClearanceStatus != null) {
data = data.filter((item) => {
return item.clearValue == this.searchFormFilter.orderCustomsClearanceStatus
})
}
return data
}
}, },
methods: { methods: {
formatDate, formatDate,
searchOrderList() { searchOrderList() {
if (this.orderKeyword && this.orderKeyword != "") { this.searchFormFilter = JSON.parse(JSON.stringify(this.searchForm))
this.statusOrderList = this.statusOrderList.filter((item) => {
return (
(item.orderNo && item.orderNo.indexOf(this.orderKeyword) > -1) ||
(item.tidanNo && item.tidanNo.indexOf(this.orderKeyword) > -1) ||
(item.marks && item.marks.indexOf(this.orderKeyword) > -1)
);
});
}
if (this.orderPortStatus != null) {
this.statusOrderList = this.statusOrderList.filter((item) => {
return item.arrivalValue == this.orderPortStatus;
});
}
if (this.orderCustomsClearanceStatus != null) {
console.log(
this.statusOrderList,
"333",
this.orderCustomsClearanceStatus
);
this.statusOrderList = this.statusOrderList.filter((item) => {
return item.clearValue == this.orderCustomsClearanceStatus;
});
}
console.log(this.statusOrderList, "222");
}, },
selectOrderId(val) { reloafSearch() {
if (val.length == 1) { this.searchForm = {}
let arr = this.arrivalOrderList.find((item) => item.orderId == val[0]); this.searchOrderList()
if (arr) {
this.$set(
this.airArrivalInfo,
"actSecondTime",
formatDate(arr.actSecondTime)
);
this.$set(this.airArrivalInfo, "estTime", formatDate(arr.estTime));
this.$set(this.airArrivalInfo, "actTime", formatDate(arr.actTime));
}
let clear = this.clearanceOrderList.find(
(item) => item.orderId == val[0]
);
if (clear) {
this.$set(
this.cusClearanceObj,
"clEstTime",
formatDate(clear.clEstTime)
);
this.$set(
this.cusClearanceObj,
"clClearTime",
formatDate(clear.clClearTime)
);
}
} else {
this.$set(this.airArrivalInfo, "actSecondTime", null);
this.$set(this.airArrivalInfo, "estTime", null);
this.$set(this.airArrivalInfo, "actTime", null);
this.$set(this.cusClearanceObj, "clEstTime", null);
this.$set(this.cusClearanceObj, "clClearTime", null);
}
}, },
selectOrder(val) { selectOrder(val) {
this.selectOrders = []; this.selectOrders = []
this.selectOrders.push(val); this.selectOrders.push(val)
let arr = this.arrivalOrderList.find( let arr = this.arrivalOrderList.find((item) => item.orderId == val.orderId)
(item) => item.orderId == val.orderId
);
if (arr) { if (arr) {
this.$set( this.$set(this.airArrivalInfo, 'actSecondTime', formatDate(arr.actSecondTime))
this.airArrivalInfo, this.$set(this.airArrivalInfo, 'estTime', formatDate(arr.estTime))
"actSecondTime", this.$set(this.airArrivalInfo, 'actTime', formatDate(arr.actTime))
formatDate(arr.actSecondTime)
);
this.$set(this.airArrivalInfo, "estTime", formatDate(arr.estTime));
this.$set(this.airArrivalInfo, "actTime", formatDate(arr.actTime));
} }
let clear = this.clearanceOrderList.find( let clear = this.clearanceOrderList.find((item) => item.orderId == val.orderId)
(item) => item.orderId == val.orderId
);
console.log(clear, 111);
if (clear) { if (clear) {
this.$set( this.$set(this.cusClearanceObj, 'clEstTime', formatDate(clear.clEstTime))
this.cusClearanceObj, this.$set(this.cusClearanceObj, 'clClearTime', formatDate(clear.clClearTime))
"clEstTime",
formatDate(clear.clEstTime)
);
this.$set(
this.cusClearanceObj,
"clClearTime",
formatDate(clear.clClearTime)
);
} }
this.orderdialogVisible = false; this.orderdialogVisible = false
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelectOrder = val; this.multipleSelectOrder = val
}, },
multipleSelect() { multipleSelect() {
if (this.multipleSelectOrder.length == 0) { if (this.multipleSelectOrder.length == 0) {
this.$message.error(this.$t("请先选择订单")); this.$message.error(this.$t('请先选择订单'))
return; return
} }
this.selectOrders = []; this.selectOrders = []
this.selectOrders = this.multipleSelectOrder; this.selectOrders = this.multipleSelectOrder
if (this.multipleSelectOrder.length == 1) { if (this.multipleSelectOrder.length == 1) {
let arr = this.arrivalOrderList.find( let arr = this.arrivalOrderList.find((item) => item.orderId == this.multipleSelectOrder[0].orderId)
(item) => item.orderId == this.multipleSelectOrder[0].orderId
);
if (arr) { if (arr) {
this.$set( this.$set(this.airArrivalInfo, 'actSecondTime', formatDate(arr.actSecondTime))
this.airArrivalInfo, this.$set(this.airArrivalInfo, 'estTime', formatDate(arr.estTime))
"actSecondTime", this.$set(this.airArrivalInfo, 'actTime', formatDate(arr.actTime))
formatDate(arr.actSecondTime)
);
this.$set(this.airArrivalInfo, "estTime", formatDate(arr.estTime));
this.$set(this.airArrivalInfo, "actTime", formatDate(arr.actTime));
} }
let clear = this.clearanceOrderList.find( let clear = this.clearanceOrderList.find((item) => item.orderId == this.multipleSelectOrder[0].orderId)
(item) => item.orderId == this.multipleSelectOrder[0].orderId
);
if (clear) { if (clear) {
this.$set( this.$set(this.cusClearanceObj, 'clEstTime', formatDate(clear.clEstTime))
this.cusClearanceObj, this.$set(this.cusClearanceObj, 'clClearTime', formatDate(clear.clClearTime))
"clEstTime",
formatDate(clear.clEstTime)
);
this.$set(
this.cusClearanceObj,
"clClearTime",
formatDate(clear.clClearTime)
);
} }
} else { } else {
this.$set(this.airArrivalInfo, "actSecondTime", null); this.$set(this.airArrivalInfo, 'actSecondTime', null)
this.$set(this.airArrivalInfo, "estTime", null); this.$set(this.airArrivalInfo, 'estTime', null)
this.$set(this.airArrivalInfo, "actTime", null); this.$set(this.airArrivalInfo, 'actTime', null)
this.$set(this.cusClearanceObj, "clEstTime", null); this.$set(this.cusClearanceObj, 'clEstTime', null)
this.$set(this.cusClearanceObj, "clClearTime", null); this.$set(this.cusClearanceObj, 'clClearTime', null)
} }
this.orderdialogVisible = false; this.orderdialogVisible = false
}, },
getClAgent(type) { getClAgent(type) {
const agentId = this.$attrs.shipmentObj.agentInfo.agentId; const agentId = this.$attrs.shipmentObj.agentInfo.agentId
if (type === "label") { if (type === 'label') {
const selected = this.$attrs.allSupplier.find( const selected = this.$attrs.allSupplier.find((item) => item.id === agentId)
(item) => item.id === agentId return this.$l(selected, 'company') ?? agentId
);
return this.$l(selected, "company") ?? agentId;
} }
return agentId; return agentId
}, },
// 时间比较 // 时间比较
compareDate(clEstTime, clClearTime) { compareDate(clEstTime, clClearTime) {
this.showMsg = false; this.showMsg = false
let date1 = null, let date1 = null,
date2 = null; date2 = null
if (clEstTime) date1 = dayjs(clEstTime); if (clEstTime) date1 = dayjs(clEstTime)
if (clClearTime) date2 = dayjs(clClearTime); if (clClearTime) date2 = dayjs(clClearTime)
if (date1 && date2 && !date2.isSame(date1)) { if (date1 && date2 && !date2.isSame(date1)) {
this.showMsg = true; this.showMsg = true
} }
}, },
// 异常登记 // 异常登记
exceptionReg() { exceptionReg() {
this.dialogVisible = true; this.dialogVisible = true
}, },
/** 提交 */ /** 提交 */
onSubmit(operateType) { onSubmit(operateType) {
this.$refs["cusClearanceForm"].validate((valid) => { this.$refs['cusClearanceForm'].validate((valid) => {
if (valid) { if (valid) {
if ( if (this.cusClearanceObj.clearanceType == 1 && this.cusClearanceObj.clearanceOrderIdList.length > 0) {
this.cusClearanceObj.clearanceType == 1 && this.$refs['airArrivalForm'].validate((arrvalid) => {
this.cusClearanceObj.clearanceOrderIdList.length > 0
) {
this.$refs["airArrivalForm"].validate((arrvalid) => {
if (arrvalid) { if (arrvalid) {
updateOrderArrival({ updateOrderArrival({
...this.airArrivalInfo, ...this.airArrivalInfo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
orderIdList: this.cusClearanceObj.clearanceOrderIdList, orderIdList: this.cusClearanceObj.clearanceOrderIdList
}).then(() => { }).then(() => {
clearanceCreate({ clearanceCreate({
...this.cusClearanceObj, ...this.cusClearanceObj,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
clAgentId: this.getClAgent(), clAgentId: this.getClAgent(),
operateType, operateType
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel("submit"); this.cancel('submit')
}); })
}); })
}); })
} }
}); })
} else { } else {
clearanceCreate({ clearanceCreate({
...this.cusClearanceObj, ...this.cusClearanceObj,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
clAgentId: this.getClAgent(), clAgentId: this.getClAgent(),
operateType, operateType
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel("submit"); this.cancel('submit')
}); })
}); })
} }
} }
}); })
}, },
/** 取消 */ /** 取消 */
cancel(type) { cancel(type) {
this.$emit("closeDialog", type); this.$emit('closeDialog', type)
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -287,6 +287,7 @@ export default { ...@@ -287,6 +287,7 @@ export default {
remove(params).then((res) => { remove(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getSecGoods(); this.getSecGoods();
this.getPreLoad();
}); });
}).catch((res) => { }).catch((res) => {
if (res.code === 666) { if (res.code === 666) {
...@@ -300,6 +301,7 @@ export default { ...@@ -300,6 +301,7 @@ export default {
remove({ ...params, deleteType: 2 }).then((res) => { remove({ ...params, deleteType: 2 }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getSecGoods(); this.getSecGoods();
this.getPreLoad();
}); });
}); });
}) })
...@@ -308,6 +310,7 @@ export default { ...@@ -308,6 +310,7 @@ export default {
remove({ ...params, deleteType: 1 }).then((res) => { remove({ ...params, deleteType: 1 }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getSecGoods(); this.getSecGoods();
this.getPreLoad();
}); });
}); });
} }
......
...@@ -46,6 +46,18 @@ ...@@ -46,6 +46,18 @@
<el-input v-model="queryParams.weightRatioMin" :placeholder="$t('请输入 小')" clearable /> <el-input v-model="queryParams.weightRatioMin" :placeholder="$t('请输入 小')" clearable />
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" :placeholder="$t('请选择出货渠道')" @change="selectChannel">
<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="attrId">
<el-select v-model="queryParams.attrId" :placeholder="$t('特性')">
<el-option v-for="item in attrIdList" :label="item" :value="item*1" :key="item"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="airShipment"> <el-form-item prop="airShipment">
<el-checkbox v-model="queryParams.airShipment" :true-label="4" @change="changeAirShipment">{{$t('已完成备货')}}</el-checkbox> <el-checkbox v-model="queryParams.airShipment" :true-label="4" @change="changeAirShipment">{{$t('已完成备货')}}</el-checkbox>
<!-- <el-radio v-model="queryParams.airShipment" :label="4">{{$t('已完成备货')}}</el-radio> --> <!-- <el-radio v-model="queryParams.airShipment" :label="4">{{$t('已完成备货')}}</el-radio> -->
...@@ -157,7 +169,11 @@ ...@@ -157,7 +169,11 @@
{{$l(row,'prodTitle')}} {{$l(row,'prodTitle')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum" /> <el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO.cartonsNum}}
</template>
</el-table-column>
<el-table-column :label="$t('体积') + '/' + $t('重量') + '/' + $t('重货比')" align="center" width="140" prop="volumeWeight"> <el-table-column :label="$t('体积') + '/' + $t('重量') + '/' + $t('重货比')" align="center" width="140" prop="volumeWeight">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.warehouseInInfoVO.volume">{{getTotlContent(scope.row.warehouseInInfoVO,['volume'])}}</p> <p v-if="scope.row.warehouseInInfoVO.volume">{{getTotlContent(scope.row.warehouseInInfoVO,['volume'])}}</p>
...@@ -270,7 +286,14 @@ ...@@ -270,7 +286,14 @@
<dict-tag :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="row.feeType" />{{ $t('') }} <dict-tag :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="row.feeType" />{{ $t('') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum" /> <el-table-column :label="$t('箱数')" align="center" prop="warehouseInInfoVO.cartonsNum">
<template slot-scope="scope">
<span style="color: bule" v-if="scope.row.mixStatus == 1">{{scope.row.warehouseInInfoVO.cartonsNum}}{{$t('(混箱)')}}</span>
<template v-else>
{{scope.row.warehouseInInfoVO.cartonsNum}}
</template>
</template>
</el-table-column>
<el-table-column :label="$t('体积') +'/' + $t('重量')" align="center" prop="volumeWeight"> <el-table-column :label="$t('体积') +'/' + $t('重量')" align="center" prop="volumeWeight">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.warehouseInInfoVO && scope.row.warehouseInInfoVO.volume">{{getTotlContent(scope.row.warehouseInInfoVO,['volume'])}}</p> <p v-if="scope.row.warehouseInInfoVO && scope.row.warehouseInInfoVO.volume">{{getTotlContent(scope.row.warehouseInInfoVO,['volume'])}}</p>
...@@ -485,6 +508,17 @@ export default { ...@@ -485,6 +508,17 @@ export default {
} }
}; };
}, },
/** 特性 */
attrIdList() {
let data = []
if(this.queryParams.shippingChannelId){
let attrs = this.channelList.find(item=>this.queryParams.shippingChannelId == item.channelId)
if(attrs){
data = attrs.attrId.split(',')
}
}
return data
}
}, },
created() { created() {
// 查询待分拣 // 查询待分拣
...@@ -497,6 +531,9 @@ export default { ...@@ -497,6 +531,9 @@ export default {
methods: { methods: {
formatDate, formatDate,
getTotlContent, getTotlContent,
selectChannel(){
this.$set(this.queryParams,'attrId',null)
},
/* 获取城市 */ /* 获取城市 */
importCityName(id) { importCityName(id) {
var arr = this.$attrs.warehouseList.filter((item) => item.id == id); var arr = this.$attrs.warehouseList.filter((item) => item.id == id);
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<el-table-column :label="$t('重量')" align="center" prop="weight" /> <el-table-column :label="$t('重量')" align="center" prop="weight" />
<el-table-column :label="$t('订单状态')" align="center" prop=""> <el-table-column :label="$t('订单状态')" align="center" prop="">
<template slot-scope="scope"> <template slot-scope="scope">
{{getOrderError(scope.row, 'orderStatus')}} {{scope.rowstatusMsg}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('异常状态')" align="center" prop=""> <el-table-column :label="$t('异常状态')" align="center" prop="">
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
copyUserId: this.selectedUsers, copyUserId: this.selectedUsers,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel(); this.cancel("submit");
}); });
}); });
}else{ }else{
......
...@@ -363,6 +363,7 @@ export default { ...@@ -363,6 +363,7 @@ export default {
}, },
activated(){ activated(){
this.getList() this.getList()
this.$store.dispatch('getBadgeData')
}, },
created() { created() {
this.getList(); this.getList();
...@@ -371,6 +372,8 @@ export default { ...@@ -371,6 +372,8 @@ export default {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getChannelList().then(res => this.channelList = res.data) getChannelList().then(res => this.channelList = res.data)
this.$store.dispatch('getBadgeData')
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
......
...@@ -122,6 +122,7 @@ export default { ...@@ -122,6 +122,7 @@ export default {
}, },
handleSave() { handleSave() {
this.$emit('input', this.dataList) this.$emit('input', this.dataList)
this.dialogVisible = false
} }
}, },
......
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('用途')"> <el-form-item :label="$t('用途')">
<dict-selector
v-model="value.usageIds"
:type="DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE"
multiple
form-type="checkbox"
></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -70,6 +76,23 @@ ...@@ -70,6 +76,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('快递单号')">
<el-input v-model="value.expressNo" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('包装类型')">
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="$t('数量')">
<el-input v-model="value.quantityAll" />
</el-form-item>
</el-col>
</el-row>
</el-card> </el-card>
</template> </template>
......
...@@ -576,7 +576,7 @@ export default { ...@@ -576,7 +576,7 @@ export default {
let res = await getProductPrice(this.$route.query.id) let res = await getProductPrice(this.$route.query.id)
this.$set(this, 'form', res.data) this.$set(this, 'form', res.data)
// 显示渠道 // 显示渠道
if(this.readonly && this.form.shippingChannelId){ if(this.form.shippingChannelId){
getChannel(this.form.shippingChannelId).then(res => { getChannel(this.form.shippingChannelId).then(res => {
this.channel = res.data this.channel = res.data
}) })
......
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