Commit 3b5eb410 authored by 我在何方's avatar 我在何方
parents 13d1f270 a81d99d4
...@@ -46,6 +46,9 @@ export default { ...@@ -46,6 +46,9 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.items-center{
align-items: center;
}
.empty-placeholder{ .empty-placeholder{
padding: 50px; padding: 50px;
text-align: center; text-align: center;
......
import request from "@/utils/request";
// 创建出货
export function createbox(data) {
return request({
url: "/shipment/box/createAir",
method: "post",
data: data,
});
}
// 更新出货
export function updatebox(data) {
return request({
url: "/shipment/box/update",
method: "put",
data: data,
});
}
/**
* 订舱
*
* @export
* @param {*} data
* @return {*}
*/
export function booking(data) {
if (data.id) {
return request({
url: "/shipment/box-book-air/update",
method: "put",
data,
});
}
return request({
url: "/shipment/box-book-air/create",
method: "post",
data,
});
}
\ No newline at end of file
...@@ -748,4 +748,58 @@ export function splitItemUpdate(data){ ...@@ -748,4 +748,58 @@ export function splitItemUpdate(data){
data data
}) })
} }
// 可出订单列表
export function canShipmentPage(params){
return request({
url: '/air/order/can/shipment/page',
method: 'get',
params
})
}
// 待出订单列表
export function waitingShipmentPage(params){
return request({
url: '/air/order/waiting/shipment/page',
method: 'get',
params
})
}
// 备货订单列表
export function canReadyStockShipmentPage(params){
return request({
url: '/air/order/can-ready-stock/shipment/page',
method: 'get',
params
})
}
// 确认订单可出
export function setCanShipment(orderId){
return request({
url: '/air/order/can/shipment/' + orderId,
method: 'put',
})
}
// 批量可出
export function batchCanShipment(orderIdList){
return request({
url: '/air/order/can/shipment/',
method: 'put',
data: {orderIdList}
})
}
// 批量转异
export function batchException(ids){
throw new Error('接口未出,待完善,以下代码是copilot生成')
}
// 导出备货订单
export function exportReadyStock(params){
return request({
url: '/ecw/order/export/ready-stock/search',
method: 'get',
params,
responseType: 'blob'
})
}
...@@ -106,4 +106,13 @@ export function getProductPriceGetPrice(query) { ...@@ -106,4 +106,13 @@ export function getProductPriceGetPrice(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
\ No newline at end of file
// 更新单询
export function updateOrderInquiry(data) {
return request({
url: '/ecw/product-price/updateOrderInquiry',
method: 'put',
data: data
})
}
...@@ -57,8 +57,11 @@ export default { ...@@ -57,8 +57,11 @@ export default {
} }
}, },
computed:{ computed:{
dicts(){
return this.getList(this.type)
},
dictList(){ dictList(){
return this.getList(this.type).filter(this.filter) return this.dicts.filter(this.filter)
}, },
formattedList(){ formattedList(){
let arr = [] let arr = []
...@@ -104,7 +107,7 @@ export default { ...@@ -104,7 +107,7 @@ export default {
}, },
setValueSync(){ setValueSync(){
if(this.value === null || this.value === undefined || this.value === ''){ if(this.value === null || this.value === undefined || this.value === ''){
return this.valueSync = this.multiple ? [] : this.value return this.valueSync = this.multiple ? [] : this.value
} }
if(this.multiple){ if(this.multiple){
let value = this.value || [] let value = this.value || []
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div> <div>
<div class="filters mb-10"> <div class="filters mb-10">
{{$t('运输方式')}} {{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" style="width:150px" /> <dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" />
{{$t('始发地')}} {{$t('始发地')}}
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable> <el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
...@@ -50,6 +50,11 @@ ...@@ -50,6 +50,11 @@
{{$l(row.channel, 'name')}} {{$l(row.channel, 'name')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="showAttr" :label="$t('商品特性')" prop="startTitleZh">
<template slot-scope="{row}">
{{ getAttrNames(row.attrId) }}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" prop=""> <el-table-column :label="$t('操作')" prop="">
<template slot="header"> <template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox> <el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox>
...@@ -69,12 +74,15 @@ ...@@ -69,12 +74,15 @@
import {getChannelList} from '@/api/ecw/channel' import {getChannelList} from '@/api/ecw/channel'
import {getTradeCityList} from '@/api/ecw/region' import {getTradeCityList} from '@/api/ecw/region'
import {openedRouterList} from '@/api/ecw/warehouse' import {openedRouterList} from '@/api/ecw/warehouse'
import {getProductAttrList} from "@/api/ecw/productAttr";
export default { export default {
props:{ props:{
value: { value: {
type: Array type: Array
}, },
option: Object option: Object,
// 类型,sea海运,air空运
type: String
}, },
data(){ data(){
return { return {
...@@ -90,7 +98,7 @@ export default { ...@@ -90,7 +98,7 @@ export default {
hideMap: {}, // 折叠状态 hideMap: {}, // 折叠状态
checkAll: null, checkAll: null,
groupChecker: {}, // 分组全选状态 groupChecker: {}, // 分组全选状态
attrList:[], // 商品特性
} }
}, },
computed:{ computed:{
...@@ -114,12 +122,14 @@ export default { ...@@ -114,12 +122,14 @@ export default {
}) })
return ids return ids
}, },
// 根据选择的渠道筛选
availChannelList(){ availChannelList(){
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId) return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
}, },
filteredRouterList(){ filteredRouterList(){
let transportTypeList = [] let transportTypeList = []
this.transportTypeDicts this.transportTypeDicts
.filter(this.transportFilter)
.filter(transport => !this.channelId || transport.cssClass == 'channel') .filter(transport => !this.channelId || transport.cssClass == 'channel')
.forEach(item => { .forEach(item => {
if(this.transportType === null || this.transportType == '' || this.transportType == item.value){ if(this.transportType === null || this.transportType == '' || this.transportType == item.value){
...@@ -151,6 +161,25 @@ export default { ...@@ -151,6 +161,25 @@ export default {
} }
}) })
return transportTypeList return transportTypeList
},
// 是否显示商品特性(渠道)
showAttr(){
return this.type == 'air'
},
// 显示产品特性
getAttrName(){
return (id) => {
let item = this.attrList.find(item => item.id == id)
if(!item) return ''
return this.$l(item, 'attrName')
}
},
// 显示多个商品特性
getAttrNames(){
return (ids) => {
if(!ids) return ''
return ids.split(',').filter( item => !!item).map(id => this.getAttrName(id)).join(',')
}
} }
}, },
watch:{ watch:{
...@@ -188,7 +217,7 @@ export default { ...@@ -188,7 +217,7 @@ export default {
if(option){ if(option){
this.changeOption() this.changeOption()
} }
} }
}, },
created(){ created(){
...@@ -200,7 +229,7 @@ export default { ...@@ -200,7 +229,7 @@ export default {
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线 // 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
this.getOpenedRouterList() this.getOpenedRouterList()
}) })
if(this.value && this.value.length){ if(this.value && this.value.length){
this.selectedRoutes = this.value this.selectedRoutes = this.value
} }
...@@ -208,9 +237,19 @@ export default { ...@@ -208,9 +237,19 @@ export default {
if(this.option){ if(this.option){
this.changeOption() this.changeOption()
} }
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
}, },
methods:{ methods:{
getAttrList(){
getProductAttrList().then(res => {
this.attrList = res.data
})
},
changeOption(){ changeOption(){
if(!this.option) return if(!this.option) return
this.importCity = +this.option.importCity || null this.importCity = +this.option.importCity || null
...@@ -258,22 +297,13 @@ export default { ...@@ -258,22 +297,13 @@ export default {
if(index > -1){ if(index > -1){
this.selectedRoutes.splice(index, 1) this.selectedRoutes.splice(index, 1)
} }
} }
}, },
getSelectedIndex(router){ getSelectedIndex(router){
return this.selectedRoutes.findIndex(item => { return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.channelId == router.channel.channelId return item.lineId == router.id && item.channelId == router.channel.channelId
}) })
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
// break
}
})
return index */
}, },
SpanMethod({ row, column, rowIndex, columnIndex }){ SpanMethod({ row, column, rowIndex, columnIndex }){
if (columnIndex < 2 ) { if (columnIndex < 2 ) {
...@@ -290,7 +320,11 @@ export default { ...@@ -290,7 +320,11 @@ export default {
// 折叠,展开 // 折叠,展开
toggleHide(value){ toggleHide(value){
this.$set(this.hideMap, value, !this.hideMap[value]) this.$set(this.hideMap, value, !this.hideMap[value])
} },
// 运输方式筛选
transportFilter(item){
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
},
} }
} }
</script> </script>
...@@ -298,4 +332,4 @@ export default { ...@@ -298,4 +332,4 @@ export default {
.mb-10{ .mb-10{
margin-bottom: 10px margin-bottom: 10px
} }
</style> </style>
\ No newline at end of file
...@@ -466,6 +466,28 @@ export const constantRoutes = [ ...@@ -466,6 +466,28 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '/boxAir',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'query/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/query'),
props: true,
name: 'shippingDetail',
meta: {titleZh: '出货详情', titleEn: "Shipping Details", icon: '', activeMenu: '/shipment/boxDetail'}
},
{
path: 'shippingAir/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shippingAir/shippingAir'),
props: true,
name: 'shippingAir',
meta: {titleZh: '空运出货操作', titleEn: "Ocean shipment operation", icon: '', activeMenu: '/shipment/boxAir'}
}
]
},
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
......
...@@ -188,6 +188,8 @@ export const DICT_TYPE = { ...@@ -188,6 +188,8 @@ export const DICT_TYPE = {
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type', WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
ECW_AUTH_TYPE:'auth_type',//品牌授权 ECW_AUTH_TYPE:'auth_type',//品牌授权
NEED_ORDER_INQUIRY: 'need_order_inquiry', // 是否需要単询
ECASH_INIT:'ecash_init', //e-cash ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type', FEE_TYPE:'receivable_fee_type',
// PAY_TYPE:'payment_type', // PAY_TYPE:'payment_type',
......
This diff is collapsed.
<template>
<div class="shippingSea-dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="$t('运输方式')" prop="transportType">
<el-radio-group v-model="form.transportType">
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{$l(dict, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId">
<el-select v-model="form.shippingChannelId" :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" :placeholder="$t('请选择始发地')">
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" :placeholder="$t('请选择目的地')">
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的港清关')" prop="transportType">
<el-radio-group v-model="form.qingguan">
<el-radio :label="1">{{$t('我司')}}</el-radio>
<el-radio :label="2">{{$t('客户')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.qingguan==1" prop="qingguan2" :rules="[
{ required: true, message: this.$t('清关方式不能为空'), trigger: 'blur' }
]">
<el-radio-group v-model="form.qingguan2">
<el-radio :label="1">{{$t('我司清关')}}</el-radio>
<el-radio :label="2">{{$t('合作方清关')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('发货方式')" prop="transportType">
<el-radio-group v-model="form.fahuo">
<el-radio :label="1">{{$t('多票')}}</el-radio>
<el-radio :label="2">{{$t('单票')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</div>
</div>
</template>
<script>
import { createbox, updatebox } from "@/api/ecw/boxAir";
import { getChannelList } from '@/api/ecw/channel'
export default {
name: "editAirForm",
inheritAttrs: false,
props: {
transportTypes: Array,
warehouseList: Array,
cabinetList: Array,
shipmentObj: Object,
},
created() {
this.form = { ...this.shipmentObj };
this.getChannelList()
},
data() {
return {
// 表单参数
form: {},
channelList: [],
// 表单校验
rules: {
shippingChannelId: [
{ required: true, message: this.$t('出货渠道不能为空'), trigger: 'blur' }
],
startWarehouseId: [
{ required: true, message: this.$t('始发地不能为空'), trigger: 'blur' }
],
destWarehouseId: [
{ required: true, message: this.$t('目的地不能为空'), trigger: 'blur' }
]
}
};
},
methods: {
getChannelList() {
getChannelList().then((res) => (this.channelList = res.data))
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return
}
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('修改成功'))
this.$emit("closeDialog", "edit");
})
return
}
// 添加的提交
createbox(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('新增成功'))
this.$emit("closeDialog", "edit");
})
})
},
/** 取消按钮 */
cancel() {
this.$emit("closeDialog");
},
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
};
</script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
This diff is collapsed.
<template>
<div>
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId">
<supplierSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { agentSet } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
import { formatStringNumber, serviceMsg } from "../utils";
/**
* agent
*/
export default {
name: "agent",
inheritAttrs: false,
components: { supplierSelect },
data() {
return {
// agent对象
agentObj: {},
// 校验
rules: {
agentId: [{ required: true, message: this.$t("必填"), trigger: "change" }],
},
};
},
created() {
const { currNode, shipmentObj } = this.$attrs;
const voName = currNode.voName;
let oldData = { ...shipmentObj[voName] };
oldData = formatStringNumber(oldData, ["agentId"]);
this.agentObj = oldData;
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["agentForm"].validate((valid) => {
if (valid) {
agentSet({
shipmentId: this.$attrs.shipmentObj.id,
...this.agentObj,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" 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>
<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 :label="$t('卸港时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="arrivalObj.apUnloadPortTime" 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(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{$t('异常登记')}}</el-button>
</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>
<regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog>
</div>
</template>
<script>
import regError from "../../regError";
import dayjs from "dayjs";
import { arrivalCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 到港
*/
export default {
name: "arrival",
inheritAttrs: false,
components: {
regError,
},
data() {
return {
// 到港对象
arrivalObj: {},
// 校验
rules: {
apRealTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 弹窗配置
dialogVisible: false,
// 提示消息
showMsg: false,
inspectionTimeArrival: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_ARRIVAL
)[0].value,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(
oldData,
["apRealTime", "apConfirmTime"],
"YYYY-MM-DD HH:mm:ss"
);
oldData = formatDateStr(oldData, ["apUnloadPortTime"]);
this.arrivalObj = oldData;
},
watch: {
// 确认到港时间
"arrivalObj.apConfirmTime"(val) {
this.compareDate(this.getExpectedTime(), val);
},
},
methods: {
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 获取预计到港时间
getExpectedTime() {
const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) {
return dayjs(shippingInfo.dtEstArrivalTime).format(
"YYYY-MM-DD HH:mm:ss"
);
}
return null;
},
// 时间比较
compareDate(expectedTime, apConfirmTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (expectedTime) date1 = dayjs(expectedTime);
if (apConfirmTime) date2 = dayjs(apConfirmTime);
if (date1 && date2) {
const days = date2.diff(date1, "day");
if (days > this.inspectionTimeArrival) {
this.showMsg = true;
}
}
},
// 异常登记
exceptionReg() {
this.dialogVisible = true;
},
/** 提交 */
onSubmit(operateType) {
this.$refs["arrivalForm"].validate((valid) => {
if (valid) {
arrivalCreate({
...this.arrivalObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<style lang="scss" scoped>
.message-area {
margin: 0;
color: red;
}
</style>
<template>
<div>
<el-form ref="bargeForm" :model="bargeObj" :rules="rules" label-width="80px">
<el-form-item :label="$t('驳船')" prop="bgExmtStatus">
<el-radio-group v-model="bargeObj.bgExmtStatus">
<el-radio v-for="item in bargeStatus" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<div v-show="bargeObj.bgExmtStatus === '2'">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('驳船预计开船时间')" label-width="130px">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="bargeObj.bgEstShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('通知人')" label-width="80px">
<userSelect v-model="bargeObj.notifyUser" :placeholder="$t('请选择通知人')" :allUsers="this.$attrs.allUsers" />
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('驳船实际开船时间')" label-width="130px">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="bargeObj.bgRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</div>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { bargeCreate } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
/**
* 驳船
*/
export default {
name: "barge",
inheritAttrs: false,
components: { userSelect },
data() {
return {
// 驳船对象
bargeObj: {},
// 驳船状态
bargeStatus: constantDict.bgExmtStatus,
// 校验
rules: {
bgExmtStatus: [{ required: true, message: this.$t("必填"), trigger: "change" }],
},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["bgEstShipTime", "bgRealShipTime"]);
oldData = formatNumberString(oldData, ["bgExmtStatus"]);
this.bargeObj = oldData;
},
methods: {
/** 提交 */
onSubmit(operateType) {
this.$refs["bargeForm"].validate((valid) => {
if (valid) {
bargeCreate({
...this.bargeObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-form ref="blCopyForm" :model="blCopyObj" label-width="120px">
<el-form-item :label="$t('提单Copy')">
<FileUpload :limit="1" :isShowTip=false v-model="blCopyObj.copyUrl" :fileType="fileType" />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { ladingCopyCreate } from "@/api/ecw/boxSea";
import FileUpload from "@/components/FileUpload";
import { fileTypes, serviceMsg } from "../utils";
/**
* 提单copy
*/
export default {
name: "blCopy",
inheritAttrs: false,
components: { FileUpload },
data() {
return {
// 提单copy对象
blCopyObj: {},
// 文件格式
fileType: fileTypes,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
this.blCopyObj = oldData;
},
methods: {
/** 提交 */
onSubmit(operateType) {
this.$refs["blCopyForm"].validate((valid) => {
if (valid) {
ladingCopyCreate({
...this.blCopyObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-form ref="bookingForm" :rules="rules" :model="bookingObj" label-width="140px">
<el-form-item :label="$t('提单号')">
<el-input v-model="bookingObj.blNo" :placeholder="$t('请输入提单号')"></el-input>
</el-form-item>
<el-form-item :label="$t('起运港')">
<dockSelect v-model="bookingObj.departurePortId" :placeholder="$t('请选择起运港')" portType="2" :allDocks="this.$attrs.allDocks" />
</el-form-item>
<el-form-item :label="$t('目的港')">
<dockSelect v-model="bookingObj.destPortId" :placeholder="$t('请选择目的港')" portType="2" :allDocks="this.$attrs.allDocks" />
</el-form-item>
<el-form-item :label="$t('Shipper')">
<supplierSelect v-model="bookingObj.shipperId" :companyType="'5'" :placeholder="$t('请选择Shipper')" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item :label="$t('航空公司')">
<supplierSelect v-model="bookingObj.airlineCompanyId" :companyType="'7'" :placeholder="$t('请选择航空公司')" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item :label="$t('预计起飞时间')" prop="flyTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.flyTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('截关时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.closingTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('截补料时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.replenishmentTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('航程')" prop="voyage">
<el-radio-group v-model="bookingObj.voyage">
<el-radio v-for="item in voyageData" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('截止送货时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="bookingObj.deliveryTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('出货渠道')">
<el-select v-model="bookingObj.airlineTypeId" :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="$l(item, 'name')" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
</el-form>
<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 { booking } from "@/api/ecw/boxAir";
import supplierSelect from "./common/supplierSelect.vue";
import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue";
import { formatStringNumber, formatDateStr, serviceMsg, constantDict } from "../utils";
import { getChannelList } from '@/api/ecw/channel'
/**
* 订舱
*/
export default {
name: "booking",
inheritAttrs: false,
components: {
supplierSelect,
dockSelect,
userSelect,
},
props: {
shipmentObj: Object,
},
data() {
return {
// 订舱对象
bookingObj: {},
channelList: [],
voyageData: constantDict.voyageData,
// 校验
rules: {
flyTime: [{ required: true, message: this.$t("必填"), trigger: "change" }],
voyage: [{ required: true, message: this.$t("必填"), trigger: "change" }],
},
};
},
created() {
getChannelList().then((res) => (this.channelList = res.data))
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
oldData = formatStringNumber(oldData, ["shipCompanyType", "spaceCompany"]);
oldData = formatDateStr(oldData, [
"flyTime",
"closingTime",
"replenishmentTime",
"deliveryTime"
]);
this.bookingObj = oldData;
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["bookingForm"].validate((valid) => {
if (valid) {
booking({
shipmentId: this.shipmentObj.id,
...this.bookingObj,
operateType: 2,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<template>
<div>
<el-form ref="cabinetForm" :rules="rules" :model="cabinetObj" label-width="80px">
<el-form-item :label="$t('到仓时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldInWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('仓库')">
<el-select v-model="cabinetObj.ldWarehouseType" :placeholder="$t('请选择仓库')" filterable>
<el-option v-for="warehouse in $attrs.warehouseList" :key="warehouse.id" :label="$l(warehouse,'title')" :value="warehouse.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('装柜时间')" prop="ldBoxTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('出仓时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldOutWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('装柜图片')">
<ImageUpload :limit="1" :isShowTip=false v-model="cabinetObj.ldPictures" />
</el-form-item>
</el-form>
<!-- 开始装柜 -->
<el-dialog :title="$t('开始装柜')" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body>
<startPacking v-bind="$attrs" v-if="dialogVisible" v-on="$listeners" @closeDialog1="closeDialog1" />
</el-dialog>
<!-- 操作 -->
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)" :disabled="isSeal">{{$t('封柜')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="danger" @click="startCabinet" :disabled="isStartCabinet">{{$t('开始装柜')}}</el-button>
</el-row>
</div>
</template>
<script>
import startPacking from "./startPacking.vue";
import { cabinetCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../../utils";
import ImageUpload from "@/components/ImageUpload";
/**
* 装柜
*/
export default {
name: "cabinet",
inheritAttrs: false,
components: { startPacking, ImageUpload },
data() {
return {
// 弹窗
dialogVisible: false,
// 装柜对象
cabinetObj: {},
// 校验
rules: {
ldBoxTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"ldInWarehouseTime",
"ldBoxTime",
"ldOutWarehouseTime",
]);
let pictures = oldData.ldPictures;
if (oldData.ldPictures) {
pictures = JSON.parse(oldData.ldPictures);
if (Array.isArray(pictures)) {
pictures = pictures.map((item) => item.url).join(",");
}
}
this.cabinetObj = {
...oldData,
ldWarehouseType:
oldData.ldWarehouseType === 0 ? undefined : oldData.ldWarehouseType,
ldPictures: pictures,
};
},
methods: {
/** 提交 */
onSubmit(operateType) {
this.$refs["cabinetForm"].validate((valid) => {
if (valid) {
if (operateType === 2) {
const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName];
if (status !== 46) {
this.$message.error(this.$t("请先进行装柜->审批->确认封柜"));
return;
}
}
const { ldPictures } = this.cabinetObj;
let pictures = ldPictures?.split(",") ?? [];
let newPictures = [];
for (const item of pictures) {
if (item) {
newPictures.push({
type: "image",
url: item,
});
}
}
cabinetCreate({
shipmentId: this.$attrs.shipmentObj.id,
...this.cabinetObj,
ldPictures: newPictures.length ? JSON.stringify(newPictures) : "",
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
closeDialog1(type) {
this.dialogVisible = false;
if (type) this.cancel(type);
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
/** 开始装柜 */
startCabinet() {
this.dialogVisible = true;
},
},
computed: {
isStartCabinet() {
const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName];
return [46, 47].includes(status) ? true : false;
},
isSeal() {
const { currNode, shipmentObj } = this.$attrs;
const status = shipmentObj[currNode.keyName];
return status === 47 ? true : false;
},
},
};
</script>
<style lang="scss" scoped>
</style>
This diff is collapsed.
<template>
<div>
<el-form ref="cDocForm" :model="cDocObj" label-width="100px">
<el-form-item :label="$t('出单方式')">
<el-select v-model="cDocObj.cdOutBillType" :placeholder="$t('请选择出单方式')">
<el-option v-for="item in method" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<template v-if="cDocObj.cdOutBillType === '1'">
<el-form-item :label="$t('电放时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cDocObj.cdElectricTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('电放凭证附件')">
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdElectricVoucher" :fileType="fileType" />
</el-form-item>
</template>
<template v-if="cDocObj.cdOutBillType === '2'">
<el-form-item :label="$t('寄送时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cDocObj.cdSendTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('快递单号')">
<el-input v-model="cDocObj.cdBillNo" :placeholder="$t('请输入快递单号')"></el-input>
</el-form-item>
</template>
<el-form-item label="agent list">
<el-radio-group v-model="cDocObj.cdAgentlistType">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cDocObj.cdAgentlistTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item>
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdAgentlistFile" :fileType="fileType" />
</el-form-item>
<el-form-item label="soncap">
<el-radio-group v-model="cDocObj.cdSoncapType">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cDocObj.cdSoncapTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item>
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdSoncapFile" :fileType="fileType" />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { clearanceDocCreate } from "@/api/ecw/boxSea";
import {
constantDict,
formatDateStr,
formatNumberString,
fileTypes,
serviceMsg,
} from "../utils";
import FileUpload from "@/components/FileUpload";
/**
* 清关文件
*/
export default {
name: "clrDocument",
inheritAttrs: false,
components: { FileUpload },
data() {
return {
// 清关文件对象
cDocObj: {},
// 出单方式
method: constantDict.billingMethod,
// 选项
status: constantDict.isFile,
// 文件类型
fileType: fileTypes,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"cdElectricTime",
"cdSendTime",
"cdAgentlistTime",
"cdSoncapTime",
]);
oldData = formatNumberString(oldData, [
"cdOutBillType",
"cdAgentlistType",
"cdSoncapType",
]);
this.cDocObj = {
...oldData,
cdOutBillType:
oldData.cdOutBillType === 0 ? undefined : oldData.cdOutBillType,
};
if(!this.$attrs.shipmentObj.clearanceDocInfo){
this.$set(this.cDocObj,'cdOutBillType',this.$attrs.shipmentObj.clearanceDocInfo?.cdOutBillType||undefined)
}
},
methods: {
/** 提交 */
onSubmit(operateType) {
this.$refs["cDocForm"].validate((valid) => {
if (valid) {
clearanceDocCreate({
...this.cDocObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="dock in getDock" :key="dock.id" :label="$l(dock, 'title')" :value="dock.id"></el-option>
</el-select>
</template>
<script>
/**
* 码头
*/
export default {
name: "dockSelect",
inheritAttrs: false,
props: {
value: Number,
allDocks: Array,
portType: String
},
model: {
prop: "value",
event: "change",
},
data() {
return {};
},
computed: {
getDock() {
if(!this.portType) return this.allDocks;
return this.allDocks.filter(item=>item.portType==this.portType)
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<template>
<el-select filterable :value="company === 0 ? undefined : company" @change="change" v-bind="$attrs" clearable>
<el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="$l(user, 'company')"></el-option>
</el-select>
</template>
<script>
/**
* 用户
*/
export default {
name: "userSelect",
inheritAttrs: false,
props: {
value: Number | Array,
allUsers: Array,
},
model: {
prop: "value",
event: "change",
},
data() {
return {};
},
computed: {
getUser() {
this.allUsers.forEach(element => {
if(!element.companyEn) {
element.companyEn = element.companyZh
}
});
return this.allUsers;
},
company: {
get() {
return this.value
},
set(val) {
this.$emit("change", val);
}
}
},
created() {
this.company = this.value
let com = this.getUser.findIndex(item=>item.id==this.company)
if(com == -1){
this.company = 0
}
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<template>
<el-select
filterable
:value="value === 0 ? undefined : value"
@change="change"
v-bind="$attrs"
clearable
>
<el-option
v-for="supplier in getSuppliers"
:key="supplier.id"
:label="$l(supplier, 'company')"
:value="supplier.id"
></el-option>
</el-select>
</template>
<script>
/**
* 供应商
*/
export default {
name: "supplierSelect",
props: {
companyType: String,
value: Number,
allSupplier: Array,
areaType: {
type: Number,
default: 0
},
},
model: {
prop: "value",
event: "change",
},
data() {
return {};
},
computed: {
getSuppliers() {
let allSupplier = this.allSupplier.filter(
(item) => item.areaType == this.areaType
);
if(this.areaType == 1 || !this.companyType) return allSupplier;
return allSupplier.filter((item) =>
item.companyTypes.includes(this.companyType)
);
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<template>
<el-select filterable :value="value === 0 ? undefined : value" @change="change" v-bind="$attrs" clearable>
<el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="user.nickname"></el-option>
</el-select>
</template>
<script>
/**
* 用户
*/
export default {
name: "userSelect",
inheritAttrs: false,
props: {
value: Number | Array,
allUsers: Array,
},
model: {
prop: "value",
event: "change",
},
data() {
return {};
},
computed: {
getUser() {
return this.allUsers;
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<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="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(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{$t('异常登记')}}</el-button>
</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>
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
</el-dialog>
</div>
</template>
<script>
import regError from "../../regError";
import dayjs from "dayjs";
import { clearanceCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 清关
*/
export default {
name: "cusClearance",
inheritAttrs: false,
components: {
regError,
},
data() {
return {
// 清关对象
cusClearanceObj: {},
// 校验
rules: {
clEstTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
clClearTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 弹窗配置
dialogVisible: false,
// 提示消息
showMsg: false,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["clEstTime"]);
oldData = formatDateStr(oldData, ["clClearTime"], "YYYY-MM-DD HH:mm:ss");
this.cusClearanceObj = oldData;
},
watch: {
// 预计清关时间
"cusClearanceObj.clEstTime"(val) {
this.compareDate(val, this.cusClearanceObj.clClearTime);
},
// 清关时间
"cusClearanceObj.clClearTime"(val) {
this.compareDate(this.cusClearanceObj.clEstTime, val);
},
},
methods: {
getClAgent(type) {
const agentId = this.$attrs.shipmentObj.agentInfo.agentId;
if (type === "label") {
const selected = this.$attrs.allSupplier.find(
(item) => item.id === agentId
);
return this.$l(selected, "company") ?? agentId;
}
return agentId;
},
// 时间比较
compareDate(clEstTime, clClearTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (clEstTime) date1 = dayjs(clEstTime);
if (clClearTime) date2 = dayjs(clClearTime);
if (date1 && date2 && !date2.isSame(date1)) {
this.showMsg = true;
}
},
// 异常登记
exceptionReg() {
this.dialogVisible = true;
},
/** 提交 */
onSubmit(operateType) {
this.$refs["cusClearanceForm"].validate((valid) => {
if (valid) {
clearanceCreate({
...this.cusClearanceObj,
shipmentId: this.$attrs.shipmentObj.id,
clAgentId: this.getClAgent(),
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
<style lang="scss" scoped>
.message-area {
margin: 0;
color: red;
}
</style>
This diff is collapsed.
<template>
<div class="app-departure">
<el-form ref="departureForm" :rules="rules" :model="departureObj" label-width="120px">
<el-form-item :label="$t('预计开船时间')">
{{getSailingTime()}}
</el-form-item>
<el-form-item :label="$t('实际开船时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="departureObj.dtRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<p class="message-area">{{$t('订单状态与短信通知,将到指定时间更新与发送')}}</p>
<p class="message-area" v-show="showMsg">{{$t('实际开船实际与预计时间不符')}}</p>
</el-form-item>
<el-form-item :label="$t('预期到港时间')" prop="dtEstArrivalTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="departureObj.dtEstArrivalTime" 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(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</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>
<regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog>
</div>
</template>
<script>
import regError from "../../regError";
import { shippingCreate } from "@/api/ecw/boxSea";
import dayjs from "dayjs";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 起运
*/
export default {
name: "departure",
inheritAttrs: false,
components: { regError },
data() {
return {
// 起运对象
departureObj: {},
// 校验
rules: {
dtEstArrivalTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 弹窗配置
dialogVisible: false,
// 提示消息
showMsg: false,
// 异常登记
isShowError: false,
inspectionTimeShipping: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_SHIPPING
)[0].value,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["dtRealShipTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["dtEstArrivalTime"]);
this.departureObj = oldData;
},
watch: {
// 实际开船时间
"departureObj.dtRealShipTime"(val) {
this.compareDate(val, this.getSailingTime());
this.compareDate1(val, this.getSailingTime());
},
},
methods: {
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 时间比较
compareDate(dtRealShipTime, sailTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (dtRealShipTime) date1 = dayjs(dtRealShipTime);
if (sailTime) date2 = dayjs(sailTime);
if (date1 && date2 && date1.isAfter(date2)) {
this.showMsg = true;
}
},
compareDate1(dtRealShipTime, sailTime) {
this.isShowError = false;
let date1 = null,
date2 = null;
if (dtRealShipTime) date1 = dayjs(dtRealShipTime);
if (sailTime) date2 = dayjs(sailTime);
if (date1 && date2) {
const delayDay = date1.diff(date2, "day");
if (delayDay >= this.inspectionTimeShipping) this.isShowError = true;
}
},
// 异常登记
exceptionReg() {
this.dialogVisible = true;
},
/** 提交 */
onSubmit(operateType) {
this.$refs["departureForm"].validate((valid) => {
if (valid) {
shippingCreate({
...this.departureObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
// 预计开船时间
getSailingTime() {
return dayjs(this.$attrs.shipmentObj.bookSeaInfo.sailTime).format(
"YYYY-MM-DD HH:mm:ss"
);
},
},
};
</script>
<style lang="scss" scoped>
.app-departure {
.message-area {
margin: 0;
color: red;
}
}
</style>
This diff is collapsed.
<template>
<div>
<el-form ref="reviewForm" :model="reviewObj" label-width="120px">
<el-form-item :label="$t('申请理由')">
<el-input v-model="reviewObj.applyReason" type="textarea" rows="2" :placeholder="$t('请输入申请理由')" :disabled="isReview"></el-input>
</el-form-item>
<span v-if="voKey=='preInstallBackInfo'" style="color: red;margin-left: 120px;">{{$t('请注意,预装反审后,全部提单需重新制作')}}</span>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit" v-show="!isReview">{{$t('发起申请')}}</el-button>
<el-button type="primary" @click="jumpReviewDetail" v-show="isReview">{{$t('审核中')}}</el-button>
<el-button plain type="primary" @click="canclAudit" v-show="isReview">{{$t('取消审核')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { approvalCreate, approvalCancel } from "@/api/ecw/boxSea";
import { serviceMsg, toReviewDetail } from "../utils";
/**
* 反审
*/
export default {
name: "review",
inheritAttrs: false,
data() {
return {
// 反审对象
reviewObj: {},
isReview: false,
bpmProcessId: "",
voKey: "",
};
},
created() {
const { currNode, shipmentObj } = this.$attrs;
let voKey = "";
switch (currNode.type) {
case "preinstall":
voKey = "preInstallBackInfo";
break;
case "cabinet":
voKey = "cabinetBackInfo";
break;
case "unloading":
voKey = "cabinetUnloadBackApprovalInfo";
break;
}
if (voKey) {
this.isReview = shipmentObj[voKey] ? true : false;
if (shipmentObj[voKey] && shipmentObj[voKey].approvalStatus !== 1) {
this.isReview = false;
}
if (shipmentObj[voKey]) {
this.bpmProcessId = shipmentObj[voKey].bpmProcessId;
}
if (this.isReview) {
this.$set(
this.reviewObj,
"applyReason",
shipmentObj[voKey].applyReason
);
}
}
this.voKey = voKey;
},
methods: {
/* 取消审核 */
canclAudit() {
const { shipmentObj } = this.$attrs;
approvalCancel({
applyReason: this.$t("取消反审核"),
id: shipmentObj[this.voKey].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
},
jumpReviewDetail() {
toReviewDetail.apply(this, [this.bpmProcessId]);
this.$emit("closeDialog");
},
/** 提交 */
onSubmit() {
this.$refs["reviewForm"].validate((valid) => {
if (valid) {
const { currNode, shipmentObj } = this.$attrs;
let approvalType = 4; // 预装反审
if (currNode.type === "cabinet") approvalType = 9; // 装柜反审
if (currNode.type === "unloading") approvalType = 7; // 卸柜反审核
approvalCreate({
shipmentId: shipmentObj.id,
...this.reviewObj,
approvalStatus: 0,
approvalType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div style="width: 100%;min-width: 100px">
<el-select v-model="val">
<el-option :value="item.id" :label="$l(item, 'title') + item.fuhao" v-for="(item) in options"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "currency-select",
props:{
options:{
type:Array,
default:()=>[]
},
value:{
type: [Number,String],
default:undefined,
}
},
data(){
return{
val:''
}
},
created() {
this.val = this.value;
},
watch:{
val(){
this.$emit('input',this.val)
},
value(val){
console.log(val,'valllll')
this.val = val;
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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