Commit 90236d41 authored by dragondean@qq.com's avatar dragondean@qq.com

fix conflict

parents 28cecd72 30c229b1
import request from "@/utils/request";
/**
* 订舱
*
* @export
* @param {*} data
* @return {*}
*/
export function booking(data) {
return request({
url: "/ecw/box-book-sea/create",
method: "post",
data,
});
}
/**
* 拖车
*
* @export
* @param {*} data
* @return {*}
*/
export function trailer(data) {
return request({
url: "/ecw/box-trailer/create",
method: "post",
data,
});
}
/**
* agent
*
* @export
* @param {*} data
* @return {*}
*/
export function agentSet(data) {
return request({
url: "/shipment/box/agentSet",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/**
* 配船
*
* @export
* @param {*} data
* @return {*}
*/
export function shipConfigure(data) {
return request({
url: "/shipment/box/shipConfigure",
method: "post",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
data: jsonToFormData(data),
});
}
/**
* 提单补料
*
* @export
* @param {*} data
* @return {*}
*/
export function billCreate(data) {
return request({
url: "/ecw/box-lading-bill/create",
method: "post",
data,
});
}
/**
* 驳船
*
* @export
* @param {*} data
* @return {*}
*/
export function bargeCreate(data) {
return request({
url: "/ecw/box-barge/create",
method: "post",
data,
});
}
/**
* 起运
*
* @export
* @param {*} data
* @return {*}
*/
export function shippingCreate(data) {
return request({
url: "/ecw/box-shipping/create",
method: "post",
data,
});
}
/**
* 提单copy
*
* @export
* @param {*} data
* @return {*}
*/
export function ladingCopyCreate(data) {
return request({
url: "/ecw/box-lading-copy/create",
method: "post",
data,
});
}
/**
* 清关文件
*
* @export
* @param {*} data
* @return {*}
*/
export function clearanceDocCreate(data) {
return request({
url: "/ecw/box-clearance-doc/create",
method: "post",
data,
});
}
/**
* 到港
*
* @export
* @param {*} data
* @return {*}
*/
export function arrivalCreate(data) {
return request({
url: "/ecw/box-arrival/create",
method: "post",
data,
});
}
/**
* 清关
*
* @export
* @param {*} data
* @return {*}
*/
export function clearanceCreate(data) {
return request({
url: "/ecw/box-clearance/create",
method: "post",
data,
});
}
/**
* 结算
*
* @export
* @param {*} data
* @return {*}
*/
export function settlementCreate(data) {
return request({
url: "/ecw/box-settlement/create",
method: "post",
data,
});
}
/***************************** 预装 start **********************************/
/**
* 获得已预装部分列表
*
* @export
* @param {*} params
* @return {*}
*/
export function secGoodsList(params) {
return request({
url: "/ecw/box-preload-goods/secGoodsList",
method: "get",
params,
});
}
/**
* 获得订单预装分页
*
* @export
* @param {*} params
* @return {*}
*/
export function preloadPage(params) {
return request({
url: "/ecw/order/preloadPage",
method: "get",
params,
});
}
/**
* 创建预装部分
*
* @export
* @param {*} params
* @return {*}
*/
export function createSection(data) {
return request({
url: "/ecw/box-preload-section/create",
method: "post",
data,
});
}
/**
* 删除预装部分
*
* @export
* @param {*} params
* @return {*}
*/
export function deleteSection(id) {
return request({
url: "/ecw/box-preload-goods/deleteSection?id=" + id,
method: "delete",
});
}
/**
* 删除预装货物
*
* @export
* @param {*} params
* @return {*}
*/
export function deleteGoods(id) {
return request({
url: "/ecw/box-preload-goods/delete?ids=" + id.join(","),
method: "delete",
});
}
/**
* 预装
*
* @export
* @param {*} params
* @return {*}
*/
export function createGoods(data) {
return request({
url: "/ecw/box-preload-goods/create",
method: "post",
data,
});
}
/***************************** 预装 end **********************************/
/**
* 服务提示消息回调
*
* @export
* @param {*} result
* @param {*} _vue
* @return {*}
*/
export function serviceMsg(result, _vue) {
return new Promise((resolve, reject) => {
const { code, msg } = result;
if (code === 0) {
_vue.$message.success("操作成功");
resolve();
} else {
_vue.$message.error(msg);
reject();
}
});
}
function jsonToFormData(params) {
const formData = new FormData();
for (const [key, value] of Object.entries(params)) {
formData.append(key, value);
}
return formData;
}
...@@ -381,7 +381,7 @@ export const constantRoutes = [ ...@@ -381,7 +381,7 @@ export const constantRoutes = [
meta: {title: '出货详情', icon: '', activeMenu: '/shipment/box'} meta: {title: '出货详情', icon: '', activeMenu: '/shipment/box'}
}, */ }, */
{ {
path: 'shippingSea/:boxId(\\d+)', path: 'shippingSea/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shippingSea/shippingSea'), component: (resolve) => import('@/views/ecw/box/shippingSea/shippingSea'),
props: true, props: true,
name: 'shippingSea', name: 'shippingSea',
......
...@@ -148,12 +148,14 @@ export const DICT_TYPE = { ...@@ -148,12 +148,14 @@ export const DICT_TYPE = {
ECASH_INIT:'ecash_init', //e-cash ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'fee_type', FEE_TYPE:'fee_type',
PAY_TYPE:'pay_type', // PAY_TYPE:'payment_type',
RECEIVE_FLAG:'receive_flag', RECEIVE_FLAG:'receive_flag',
COMDINED_VALUE_ADDED_FEE:'combined_value_added_fee', COMDINED_VALUE_ADDED_FEE:'combined_value_added_fee',
ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求 ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求
ORDER_ABNORMAL_STATE:'order_abnormal_state' ORDER_ABNORMAL_STATE:'order_abnormal_state',
// ========== 出货模块 ==========
BOX_SHIPMENT_TRAILER_STATUS: 'shipment_trailer_status', // 拖车状态
} }
/** /**
......
<template> <template>
<div> <div>
<el-form ref="agentForm" :model="agentObj" label-width="120px"> <el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item label="代理商Agent"> <el-form-item label="代理商Agent" prop="agentId">
<el-select v-model="agentObj.agent" placeholder="请选择代理商"> <supplierSelect v-model="agentObj.agentId" placeholder="请选择代理商" v-bind="$attrs" />
</el-select>
</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">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
...@@ -15,15 +13,22 @@ ...@@ -15,15 +13,22 @@
</template> </template>
<script> <script>
import { agentSet, serviceMsg } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
/** /**
* agent * agent
*/ */
export default { export default {
name: "agent", name: "agent",
components: { supplierSelect },
data() { data() {
return { return {
// agent对象 // agent对象
agentObj: {}, agentObj: {},
// 校验
rules: {
agentId: [{ required: true, message: "必填", trigger: "change" }],
},
}; };
}, },
methods: { methods: {
...@@ -31,7 +36,14 @@ export default { ...@@ -31,7 +36,14 @@ export default {
onSubmit() { onSubmit() {
this.$refs["agentForm"].validate((valid) => { this.$refs["agentForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); agentSet({
shipmentId: this.$attrs.shipmentObj.id,
...this.agentObj,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
<div> <div>
<el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" label-width="120px"> <el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" label-width="120px">
<el-form-item label="预计到港时间">{{arrivalObj.expectedTime}}</el-form-item> <el-form-item label="预计到港时间">{{arrivalObj.expectedTime}}</el-form-item>
<el-form-item label="实际到港时间"> <el-form-item label="实际到港时间" prop="apRealTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.actualTime"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.apRealTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="确认到港" prop="confirmTime"> <el-form-item label="确认到港">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.confirmTime"> <el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.apConfirmTime" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker> </el-date-picker>
<p class="message-area" v-show="showMsg">请确认是否有异常,如有异常请进行异常登记</p> <p class="message-area" v-show="showMsg">请确认是否有异常,如有异常请进行异常登记</p>
</el-form-item> </el-form-item>
<el-form-item label="卸港时间"> <el-form-item label="卸港时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="arrivalObj.dischargeTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="arrivalObj.apUnloadPortTime" value-format="yyyy-MM-dd"></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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button> <el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row> </el-row>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<script> <script>
import regError from "./regError"; import regError from "./regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 到港 * 到港
...@@ -44,12 +45,10 @@ export default { ...@@ -44,12 +45,10 @@ export default {
data() { data() {
return { return {
// 到港对象 // 到港对象
arrivalObj: { arrivalObj: {},
expectedTime: "2022-07-18",
},
// 校验 // 校验
rules: { rules: {
actualTime: [{ required: true, message: "必填", trigger: "change" }], apRealTime: [{ required: true, message: "必填", trigger: "change" }],
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
...@@ -60,21 +59,21 @@ export default { ...@@ -60,21 +59,21 @@ export default {
watch: { watch: {
// 预计到港时间 // 预计到港时间
"arrivalObj.expectedTime"(val) { "arrivalObj.expectedTime"(val) {
this.compareDate(val, this.arrivalObj.confirmTime); this.compareDate(val, this.arrivalObj.apConfirmTime);
}, },
// 确认到港时间 // 确认到港时间
"arrivalObj.confirmTime"(val) { "arrivalObj.apConfirmTime"(val) {
this.compareDate(this.arrivalObj.expectedTime, val); this.compareDate(this.arrivalObj.expectedTime, val);
}, },
}, },
methods: { methods: {
// 时间比较 // 时间比较
compareDate(expectedTime, confirmTime) { 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 (confirmTime) date2 = dayjs(confirmTime); if (apConfirmTime) date2 = dayjs(apConfirmTime);
if (date1 && date2) { if (date1 && date2) {
const days = date2.date() - date1.date(); const days = date2.date() - date1.date();
if (days > 5) { if (days > 5) {
...@@ -87,10 +86,18 @@ export default { ...@@ -87,10 +86,18 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["arrivalForm"].validate((valid) => { this.$refs["arrivalForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); arrivalCreate({
...this.arrivalObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
<template> <template>
<div> <div>
<el-form ref="bargeForm" :model="bargeObj" label-width="80px"> <el-form ref="bargeForm" :model="bargeObj" :rules="rules" label-width="80px">
<el-form-item label="驳船"> <el-form-item label="驳船" prop="bgExmtStatus">
<el-radio-group v-model="bargeObj.status"> <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 v-for="item in bargeStatus" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div v-show="bargeObj.status === '2'"> <div v-show="bargeObj.bgExmtStatus === '2'">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驳船预计开船时间" label-width="130px"> <el-form-item label="驳船预计开船时间" label-width="130px">
<el-date-picker type="date" placeholder="请选择日期" v-model="bargeObj.expectedTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="bargeObj.bgEstShipTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="bargeObj.feedTimePerson" placeholder="请选择通知人"> <userSelect v-model="bargeObj.notifyUser" placeholder="请选择通知人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="驳船实际开船时间" label-width="130px"> <el-form-item label="驳船实际开船时间" label-width="130px">
<el-date-picker type="date" placeholder="请选择日期" v-model="bargeObj.actualTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="bargeObj.bgRealShipTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { bargeCreate, serviceMsg } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
/** /**
* 驳船 * 驳船
*/ */
export default { export default {
name: "barge", name: "barge",
components: { userSelect },
data() { data() {
return { return {
// 驳船对象 // 驳船对象
...@@ -56,14 +59,26 @@ export default { ...@@ -56,14 +59,26 @@ export default {
label: "有驳船", label: "有驳船",
}, },
], ],
// 校验
rules: {
bgExmtStatus: [{ required: true, message: "必填", trigger: "change" }],
},
}; };
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["bargeForm"].validate((valid) => { this.$refs["bargeForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); bargeCreate({
...this.bargeObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -2,20 +2,21 @@ ...@@ -2,20 +2,21 @@
<div> <div>
<el-form ref="blCopyForm" :model="blCopyObj" label-width="120px"> <el-form ref="blCopyForm" :model="blCopyObj" label-width="120px">
<el-form-item label="提单Copy"> <el-form-item label="提单Copy">
<el-upload action="" :file-list="blCopyObj.fileList"> <el-upload action="" :file-list="blCopyObj.copyUrl">
<el-button size="small" type="primary">选择文件</el-button> <el-button size="small" type="primary">选择文件</el-button>
</el-upload> </el-upload>
</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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { ladingCopyCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 提单copy * 提单copy
*/ */
...@@ -24,17 +25,23 @@ export default { ...@@ -24,17 +25,23 @@ export default {
data() { data() {
return { return {
// 提单copy对象 // 提单copy对象
blCopyObj: { blCopyObj: {},
fileList: [],
},
}; };
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["blCopyForm"].validate((valid) => { this.$refs["blCopyForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); ladingCopyCreate({
...this.blCopyObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
<template> <template>
<div> <div>
<el-form ref="bookingForm" :rules="rules" :model="booking" label-width="140px"> <el-form ref="bookingForm" :rules="rules" :model="bookingObj" label-width="140px">
<el-form-item label="SO NO"> <el-form-item label="SO NO.">
<el-input v-model="booking.soNo" placeholder="请输入SO NO"></el-input> <el-input v-model="bookingObj.sono" placeholder="请输入SO NO."></el-input>
</el-form-item> </el-form-item>
<el-form-item label="船公司类型"> <el-form-item label="船公司类型">
<el-select v-model="booking.type" placeholder="请选择船公司类型"> <supplierSelect v-model="bookingObj.shipCompanyType" :companyType="'9'" placeholder="请选择船公司类型" v-bind="$attrs" />
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="驳船港"> <el-form-item label="驳船港">
<el-select v-model="booking.bargePort" placeholder="请选择驳船港"> <dockSelect v-model="bookingObj.bargePort" placeholder="请选择驳船港" v-bind="$attrs" />
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="大船港"> <el-form-item label="大船港">
<el-select v-model="booking.bigShipPort" placeholder="请选择大船港"> <dockSelect v-model="bookingObj.bigPort" placeholder="请选择大船港" v-bind="$attrs" />
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的港"> <el-form-item label="目的港">
<el-select v-model="booking.destination" placeholder="请选择目的港"> <dockSelect v-model="bookingObj.destPort" placeholder="请选择目的港" v-bind="$attrs" />
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="订舱公司"> <el-form-item label="订舱公司">
<el-select v-model="booking.bookingCompany" placeholder="请选择订舱公司"> <supplierSelect v-model="bookingObj.spaceCompany" :companyType="'1'" placeholder="请选择订舱公司" v-bind="$attrs" />
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="预计驳船时间" prop="time"> <el-form-item label="预计驳船时间" prop="bargeTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.bargeTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.bargeTime"></el-date-picker>
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计开船时间" prop="time"> <el-form-item label="预计开船时间" prop="sailTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.departureTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.sailTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <userSelect v-model="bookingObj.feedTimePerson1" placeholder="请选择通知人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -50,13 +39,12 @@ ...@@ -50,13 +39,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计提单补料时间"> <el-form-item label="预计提单补料时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.feedTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.feedTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <userSelect v-model="bookingObj.feedTimePerson2" placeholder="请选择通知人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -64,13 +52,12 @@ ...@@ -64,13 +52,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计报关时间"> <el-form-item label="预计报关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.declarationTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.declarationTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <userSelect v-model="bookingObj.feedTimePerson3" placeholder="请选择通知人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -78,13 +65,12 @@ ...@@ -78,13 +65,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计截关时间"> <el-form-item label="预计截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.cutOffTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.cutOffTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <userSelect v-model="bookingObj.feedTimePerson4" placeholder="请选择通知人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -99,29 +85,49 @@ ...@@ -99,29 +85,49 @@
</template> </template>
<script> <script>
import { booking, serviceMsg } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue";
/** /**
* 订舱 * 订舱
*/ */
export default { export default {
name: "booking", name: "booking",
components: {
supplierSelect,
dockSelect,
userSelect,
},
props: {
shipmentObj: Object,
},
data() { data() {
return { return {
// 船公司类型
types: ["PIL", "MSK", "CMA", "COSCO", "ZIM", "ONE", "OOCL", "MSC", "HPL"],
// 订舱对象 // 订舱对象
booking: {}, bookingObj: {},
// 校验 // 校验
rules: { rules: {
time: [{ required: true, message: "必填", trigger: "change" }], bargeTime: [{ required: true, message: "必填", trigger: "change" }],
sailTime: [{ required: true, message: "必填", trigger: "change" }],
}, },
}; };
}, },
created() {},
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit() {
this.$refs["bookingForm"].validate((valid) => { this.$refs["bookingForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); booking({
shipmentId: this.$attrs.shipmentObj.id,
...this.bookingObj,
operateType: 2,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<div> <div>
<el-form ref="cabinetForm" :rules="rules" :model="cabinet" label-width="80px"> <el-form ref="cabinetForm" :rules="rules" :model="cabinet" label-width="80px">
<el-form-item label="到仓时间"> <el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.arrivalTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.arrivalTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="仓库"> <el-form-item label="仓库">
<el-select v-model="cabinet.warehouse" placeholder="请选择仓库"> <el-select v-model="cabinet.warehouse" placeholder="请选择仓库">
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="装柜时间" prop="time"> <el-form-item label="装柜时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.cabinetTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.cabinetTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="出仓时间"> <el-form-item label="出仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.outTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.outTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="装柜图片"> <el-form-item label="装柜图片">
<el-upload action="" :limit="1" :file-list="cabinet.fileList"> <el-upload action="" :limit="1" :file-list="cabinet.fileList">
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="预计时间" prop="estimatedTime"> <el-form-item label="预计时间" prop="estimatedTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="modifyCabinetObj.estimatedTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="modifyCabinetObj.estimatedTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="选择柜型" prop="cabinetType"> <el-form-item label="选择柜型" prop="cabinetType">
<el-select v-model="modifyCabinetObj.cabinetType" placeholder="请选择柜型"> <el-select v-model="modifyCabinetObj.cabinetType" placeholder="请选择柜型">
......
...@@ -4,72 +4,74 @@ ...@@ -4,72 +4,74 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="出单方式"> <el-form-item label="出单方式">
<el-select v-model="cDocObj.method" placeholder="请选择出单方式"> <el-select v-model="cDocObj.cdOutBillType" placeholder="请选择出单方式">
<el-option v-for="item in method" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="电放时间"> <el-form-item label="电放时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.dischargeTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdElectricTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="寄送时间"> <el-form-item label="寄送时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.deliveryTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdSendTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="快递单号"> <el-form-item label="快递单号">
<el-input v-model="cDocObj.courierNumber" placeholder="请输入快递单号"></el-input> <el-input v-model="cDocObj.cdBillNo" placeholder="请输入快递单号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="电放凭证附件"> <el-form-item label="电放凭证附件">
<el-upload action="" :file-list="cDocObj.fileList"> <el-upload action="" :file-list="cDocObj.cdElectricVoucher">
<el-button size="small" type="primary">选择文件</el-button> <el-button size="small" type="primary">选择文件</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="agent list"> <el-form-item label="agent list">
<el-radio-group v-model="cDocObj.agent"> <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 v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.agenTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdAgentlistTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-upload action="" :file-list="cDocObj.agentFileList"> <el-upload action="" :file-list="cDocObj.cdAgentlistFile">
<el-button size="small" type="primary">选择文件</el-button> <el-button size="small" type="primary">选择文件</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="soncap"> <el-form-item label="soncap">
<el-radio-group v-model="cDocObj.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 v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.soncapTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdSoncapTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-upload action="" :file-list="cDocObj.soncapFileList"> <el-upload action="" :file-list="cDocObj.cdSoncapFile">
<el-button size="small" type="primary">选择文件</el-button> <el-button size="small" type="primary">选择文件</el-button>
</el-upload> </el-upload>
</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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { clearanceDocCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 清关文件 * 清关文件
*/ */
...@@ -78,18 +80,16 @@ export default { ...@@ -78,18 +80,16 @@ export default {
data() { data() {
return { return {
// 清关文件对象 // 清关文件对象
cDocObj: { cDocObj: {},
fileList: [],
},
// 出单方式 // 出单方式
method: [ method: [
{ {
value: "1", value: "1",
label: "正本", label: "电放",
}, },
{ {
value: "2", value: "2",
label: "电放", label: "正本",
}, },
], ],
// 选项 // 选项
...@@ -107,10 +107,18 @@ export default { ...@@ -107,10 +107,18 @@ export default {
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["cDocForm"].validate((valid) => { this.$refs["cDocForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); clearanceDocCreate({
...this.cDocObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs">
<el-option v-for="dock in getDock" :key="dock.id" :label="dock.titleZh" :value="dock.id"></el-option>
</el-select>
</template>
<script>
/**
* 码头
*/
export default {
name: "dockSelect",
props: {
value: Number,
},
model: {
prop: "value",
event: "change",
},
data() {
return {
supplier: [],
};
},
computed: {
getDock() {
return this.$attrs.allDocks;
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs">
<el-option v-for="supplier in getSuppliers" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option>
</el-select>
</template>
<script>
/**
* 供应商
*/
export default {
name: "supplierSelect",
props: {
companyType: String,
value: Number,
},
model: {
prop: "value",
event: "change",
},
data() {
return {
supplier: [],
};
},
computed: {
getSuppliers() {
if (!this.companyType) return this.$attrs.allSupplier;
return this.$attrs.allSupplier.filter((item) =>
item.companyTypes.includes(this.companyType)
);
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<template>
<el-select filterable :value="value" @change="change" v-bind="$attrs">
<el-option v-for="user in getUser" :key="user.id" :value="user.id">{{user.nickname}}</el-option>
</el-select>
</template>
<script>
/**
* 用户
*/
export default {
name: "userSelect",
props: {
value: Number,
},
model: {
prop: "value",
event: "change",
},
data() {
return {
supplier: [],
};
},
computed: {
getUser() {
return this.$attrs.allUsers;
},
},
methods: {
change(val) {
this.$emit("change", val);
},
},
};
</script>
<template> <template>
<div> <div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px"> <el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item label="清关代理">{{cusClearanceObj.agent}}</el-form-item> <el-form-item label="清关代理">{{cusClearanceObj.clAgentId}}</el-form-item>
<el-form-item label="预计清关时间" prop="expectedTime"> <el-form-item label="预计清关时间" prop="clEstTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearanceObj.expectedTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="清关时间" prop="confirmTime"> <el-form-item label="清关时间" prop="clClearTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="cusClearanceObj.confirmTime"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="cusClearanceObj.clClearTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<p class="message-area" v-show="showMsg">清关时间与预计时间不符,如有异常请登记</p> <p class="message-area" v-show="showMsg">清关时间与预计时间不符,如有异常请登记</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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button> <el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row> </el-row>
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<script> <script>
import regError from "./regError"; import regError from "./regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 清关 * 清关
...@@ -40,13 +41,11 @@ export default { ...@@ -40,13 +41,11 @@ export default {
data() { data() {
return { return {
// 清关对象 // 清关对象
cusClearanceObj: { cusClearanceObj: {},
agent: "test111",
},
// 校验 // 校验
rules: { rules: {
expectedTime: [{ required: true, message: "必填", trigger: "change" }], clEstTime: [{ required: true, message: "必填", trigger: "change" }],
confirmTime: [{ required: true, message: "必填", trigger: "change" }], clClearTime: [{ required: true, message: "必填", trigger: "change" }],
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
...@@ -56,22 +55,22 @@ export default { ...@@ -56,22 +55,22 @@ export default {
}, },
watch: { watch: {
// 预计清关时间 // 预计清关时间
"cusClearanceObj.expectedTime"(val) { "cusClearanceObj.clEstTime"(val) {
this.compareDate(val, this.cusClearanceObj.confirmTime); this.compareDate(val, this.cusClearanceObj.clClearTime);
}, },
// 清关时间 // 清关时间
"cusClearanceObj.confirmTime"(val) { "cusClearanceObj.clClearTime"(val) {
this.compareDate(this.cusClearanceObj.expectedTime, val); this.compareDate(this.cusClearanceObj.clEstTime, val);
}, },
}, },
methods: { methods: {
// 时间比较 // 时间比较
compareDate(expectedTime, confirmTime) { compareDate(clEstTime, clClearTime) {
this.showMsg = false; this.showMsg = false;
let date1 = null, let date1 = null,
date2 = null; date2 = null;
if (expectedTime) date1 = dayjs(expectedTime); if (clEstTime) date1 = dayjs(clEstTime);
if (confirmTime) date2 = dayjs(confirmTime); if (clClearTime) date2 = dayjs(clClearTime);
if (date1 && date2 && date2 !== date1) { if (date1 && date2 && date2 !== date1) {
this.showMsg = true; this.showMsg = true;
} }
...@@ -81,10 +80,18 @@ export default { ...@@ -81,10 +80,18 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["cusClearanceForm"].validate((valid) => { this.$refs["cusClearanceForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); clearanceCreate({
...this.cusClearanceObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="截关时间"> <el-form-item label="截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.cutTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.cutTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-radio-group v-model="cusDeclaration.status"> <el-radio-group v-model="cusDeclaration.status">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<!-- 退场 --> <!-- 退场 -->
<div v-show="cusDeclaration.check === '1' || cusDeclaration.check === '2'"> <div v-show="cusDeclaration.check === '1' || cusDeclaration.check === '2'">
<el-form-item label="查验时间"> <el-form-item label="查验时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.checkTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.checkTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="查验前图片"> <el-form-item label="查验前图片">
<el-upload action="" :limit="1" :file-list="cusDeclaration.checkFile"> <el-upload action="" :limit="1" :file-list="cusDeclaration.checkFile">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!-- 放行 --> <!-- 放行 -->
<el-form-item label="放行时间" v-show="cusDeclaration.status === '2' || cusDeclaration.check === '2'"> <el-form-item label="放行时间" v-show="cusDeclaration.status === '2' || cusDeclaration.check === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.releaseTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="cusDeclaration.releaseTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="装箱单"> <el-form-item label="装箱单">
......
...@@ -4,20 +4,19 @@ ...@@ -4,20 +4,19 @@
<el-form-item label="预计开船时间"> <el-form-item label="预计开船时间">
</el-form-item> </el-form-item>
<el-form-item label="实际开船时间"> <el-form-item label="实际开船时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="departureObj.actualTime"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="departureObj.dtRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<p class="message-area">订单状态与短信通知,将到指定时间更新与发送</p> <p class="message-area">订单状态与短信通知,将到指定时间更新与发送</p>
<p class="message-area" v-show="showMsg">实际开船实际与预计时间不符</p> <p class="message-area" v-show="showMsg">实际开船实际与预计时间不符</p>
</el-form-item> </el-form-item>
<el-form-item label="预期到港时间" prop="arrivalTime"> <el-form-item label="预期到港时间" prop="dtEstArrivalTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="departureObj.arrivalTime"> <el-date-picker type="date" placeholder="请选择日期" v-model="departureObj.dtEstArrivalTime" value-format="yyyy-MM-dd"></el-date-picker>
</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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button> <el-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row> </el-row>
...@@ -31,6 +30,7 @@ ...@@ -31,6 +30,7 @@
<script> <script>
import regError from "./regError"; import regError from "./regError";
import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 起运 * 起运
...@@ -44,7 +44,9 @@ export default { ...@@ -44,7 +44,9 @@ export default {
departureObj: {}, departureObj: {},
// 校验 // 校验
rules: { rules: {
arrivalTime: [{ required: true, message: "必填", trigger: "change" }], dtEstArrivalTime: [
{ required: true, message: "必填", trigger: "change" },
],
}, },
// 弹窗配置 // 弹窗配置
dialogVisible: false, dialogVisible: false,
...@@ -54,22 +56,22 @@ export default { ...@@ -54,22 +56,22 @@ export default {
}, },
watch: { watch: {
// 实际开船时间 // 实际开船时间
"departureObj.actualTime"(val) { "departureObj.dtRealShipTime"(val) {
this.compareDate(val, this.departureObj.arrivalTime); this.compareDate(val, this.departureObj.dtEstArrivalTime);
}, },
// 预计到港时间 // 预计到港时间
"departureObj.arrivalTime"(val) { "departureObj.dtEstArrivalTime"(val) {
this.compareDate(this.departureObj.actualTime, val); this.compareDate(this.departureObj.dtRealShipTime, val);
}, },
}, },
methods: { methods: {
// 时间比较 // 时间比较
compareDate(actualTime, arrivalTime) { compareDate(dtRealShipTime, dtEstArrivalTime) {
this.showMsg = false; this.showMsg = false;
let date1 = null, let date1 = null,
date2 = null; date2 = null;
if (actualTime) date1 = new Date(actualTime); if (dtRealShipTime) date1 = new Date(dtRealShipTime);
if (arrivalTime) date2 = new Date(arrivalTime); if (dtEstArrivalTime) date2 = new Date(dtEstArrivalTime);
if (date1 && date2 && date1 > date2) { if (date1 && date2 && date1 > date2) {
this.showMsg = true; this.showMsg = true;
} }
...@@ -79,10 +81,18 @@ export default { ...@@ -79,10 +81,18 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["departureForm"].validate((valid) => { this.$refs["departureForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); shippingCreate({
...this.departureObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
<template> <template>
<div class="preinstall"> <div class="preinstall">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="入仓时间" prop="warehousingTime"> <el-form-item label="入仓时间" prop="rucangtime">
<el-date-picker v-model="queryParams.warehousingTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> <el-date-picker v-model="queryParams.rucangtime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
<el-form-item label="始发地" prop="startWarehouseId"> <el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地" clearable size="small"> <el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地" clearable size="small">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的地" prop="destWarehouseId"> <el-form-item label="目的地" prop="destWarehouseIdList">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地"> <el-select v-model="queryParams.destWarehouseIdList" placeholder="请选择目的地" multiple>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="orderStatus">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable size="small"> <el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable size="small">
<el-option v-for="item in stateOps" :label="item.label" :value="item.value" :key="item.value"></el-option> <el-option v-for="item in stateOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备案" prop="filing"> <el-form-item label="备案" prop="productRecord">
<el-select v-model="queryParams.filing" placeholder="请选择备案" clearable size="small"> <el-select v-model="queryParams.productRecord" placeholder="请选择备案" clearable size="small">
<el-option v-for="item in filingOps" :label="item.label" :value="item.value" :key="item.value"></el-option> <el-option v-for="item in filingOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="报关方式" prop="declarationMethod"> <el-form-item label="报关方式" prop="customsType">
<el-select v-model="queryParams.declarationMethod" placeholder="请选择报关方式" clearable size="small"> <el-select v-model="queryParams.customsType" placeholder="请选择报关方式" clearable size="small">
<el-option v-for="item in declarationMethodOps" :label="item.label" :value="item.value" :key="item.value"></el-option> <el-option v-for="item in declarationMethodOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="订单号码" prop="orderNo"> <el-form-item label="订单号" prop="toBePreOrderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号码" clearable /> <el-input v-model="queryParams.orderNo" placeholder="请输入订单号码" clearable />
</el-form-item> </el-form-item>
<el-form-item label="已预装单号" prop="preinstalledNo"> <el-form-item label="已预装单号" prop="preOrderNo">
<el-input v-model="queryParams.preinstalledNo" placeholder="请输入已预装单号" clearable /> <el-input v-model="queryParams.preOrderNo" placeholder="请输入已预装单号" clearable />
</el-form-item> </el-form-item>
<el-form-item label="品名" prop="productName"> <el-form-item label="品名" prop="itemName">
<el-input v-model="queryParams.productName" placeholder="请输入品名" clearable /> <el-input v-model="queryParams.itemName" placeholder="请输入品名" clearable />
</el-form-item> </el-form-item>
<el-form-item label="重货比" prop="ratioMin"> <el-form-item label="重货比" prop="weightRatioMax">
<el-input v-model="queryParams.ratioMin" placeholder="请输入" clearable /> <el-input v-model="queryParams.weightRatioMax" placeholder="请输入 大" clearable />
</el-form-item> </el-form-item>
<el-form-item label="" prop="ratioMax"> <el-form-item label="" prop="weightRatioMin">
<el-input v-model="queryParams.ratioMax" placeholder="请输入" clearable /> <el-input v-model="queryParams.weightRatioMin" placeholder="请输入 小" clearable />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索已预装订单</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery('pre')">搜索已预装订单</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索待预装订单</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery('toBePre')">搜索待预装订单</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10"> <el-row :gutter="10">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery('toBePre')"></right-toolbar>
</el-row> </el-row>
<!-- 表格 --> <!-- 表格 -->
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px" class="preinstall-card">
<el-row class="preinstall-title"> <el-row class="preinstall-title">
<div> <div>
<p>自编号:</p> <p>自编号:</p>
<p>111</p> <p>{{shipmentObj.selfNo}}</p>
</div> </div>
<div> <div>
<p>柜号:</p> <p>柜号:</p>
<p>111</p> <p>{{shipmentObj.cubNo}}</p>
</div> </div>
<div> <div>
<p>容量:</p> <p>容量:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div> <div>
<p>始发地:</p> <p>始发地:</p>
<p>111</p> <p>{{importCityName(shipmentObj.startWarehouseId)}}</p>
</div> </div>
<div> <div>
<p>目的地:</p> <p>目的地:</p>
<p>111</p> <p>{{importCityName(shipmentObj.destWarehouseId)}}</p>
</div> </div>
</el-row> </el-row>
<el-row class="preinstall-table"> <el-row class="preinstall-table">
...@@ -90,106 +89,156 @@ ...@@ -90,106 +89,156 @@
<div class="table-label">已预装订单</div> <div class="table-label">已预装订单</div>
<div> <div>
<p>总计:</p> <p>总计:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div class="red-label"> <div class="red-label">
<p>可预装方数:</p> <p>可预装方数:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div class="red-label"> <div class="red-label">
<p>重量:</p> <p>重量:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div class="table-button"> <div class="table-button">
<el-button type="success" size="small">增加</el-button> <el-button type="success" size="small" @click="addPart">增加</el-button>
</div> </div>
</el-row> </el-row>
<el-row class="preinstall-title"> <el-scrollbar style="height:calc(100% - 43px)">
<div> <el-row v-for="(part, index) in preList" :key="index" class="pre-part">
<p>第一部分</p> <el-row class="preinstall-title">
<p>111</p> <div class="pre-part-info">
</div> <p>{{index+1}}部分</p>
<div class="table-button"> <p>
<el-button type="danger" size="small">删除部分</el-button> <span>{{part.secStatistics ? part.secStatistics.num : 0}}</span>
<el-button type="danger" size="small">删除订单</el-button> <span>{{part.secStatistics ? part.secStatistics.volume : 0}}</span>
<el-button type="primary" size="small">收起</el-button> <span>{{part.secStatistics ? part.secStatistics.weight : 0}}kg</span>
</div> </p>
</el-row> </div>
<el-table v-loading="loading" :data="list"> <div class="table-button">
<el-table-column type="selection" width="55" /> <el-button type="danger" size="small" @click="deletePart(part)">删除部分</el-button>
<el-table-column label="订单号" align="center" prop="selfNo" /> <el-button type="danger" size="small" @click="deleteOrder('selected', part)">删除订单</el-button>
<el-table-column label="目的地" align="center" prop="cubNo" /> <el-button type="primary" size="small" @click="foldTable(index, part)">{{part.fold ? '展开' : '收起'}}</el-button>
<el-table-column label="入仓时间" align="center" prop="cabinetId" /> </div>
<el-table-column label="品名" align="center" prop="transportType" /> </el-row>
<el-table-column label="箱数" align="center" prop="squareNumber" /> <el-table v-loading="preLoading" border :data="part.sectionGoodsList" v-show="!part.fold" @select="(selection)=>checkboxSelect(selection, part)" @select-all="(selection)=>checkboxSelect(selection, part)">
<el-table-column label="体积/重量/重货比" align="center" prop="weight" /> <el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="订单号" align="center" prop="orderId" width="120" />
<template slot-scope="scope"> <el-table-column label="目的地" align="center" prop="destWarehouseName" width="120" />
<el-button type="primary" size="small">操作</el-button> <el-table-column label="入仓时间" align="center" prop="rucangtime" width="120" />
<el-button type="primary" size="small">操作</el-button> <el-table-column label="品名" align="center" prop="prodTitleZh" width="120" />
</template> <el-table-column label="箱数" align="center" prop="num" />
</el-table-column> <el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
</el-table> <template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p>
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="报关方式" align="center" prop="customsType" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</template>
</el-table-column>
<el-table-column label="备案" align="center" prop="productRecord" width="100">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.productRecord" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)">
<el-button type="primary" size="small" icon="el-icon-edit-outline" circle></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="bPart" v-for="(bPart, index) in preList" :key="bPart.id" v-show="bPart.id !== part.id">{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="danger" size="small" icon="el-icon-minus" circle style="margin-left:10px;" @click="deleteOrder('row',scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-scrollbar>
</el-col> </el-col>
<!-- 待预装订单 --> <!-- 待预装订单 -->
<el-col :span="12"> <el-col :span="12">
<el-row class="preinstall-title"> <el-row class="preinstall-title">
<div class="table-label">待预装订单</div> <div class="table-label red-label">待预装订单</div>
<div class="preinstall-title preinstalled"> <div class="preinstall-title preinstalled">
<div class="red-label"> <div class="red-label">
<p>筛选后待预装数量:</p> <p>筛选后待预装数量:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div class="red-label"> <div class="red-label">
<p>方数:</p> <p>方数:</p>
<p>111</p> <p>无返回</p>
</div> </div>
<div class="red-label"> <div class="red-label">
<p>重量:</p> <p>重量:</p>
<p>111</p> <p>无返回</p>
</div> </div>
</div> </div>
</el-row> </el-row>
<el-row> <el-scrollbar style="height:calc(100% - 40px)">
<el-row class="preinstall-title order-title"> <el-pagination background layout="prev, pager, next" :page-size="pageParam.pageSize" :total="total" @current-change="pageChange" v-show="total > 0"></el-pagination>
<div> <el-row v-for="(item, index) in toBePreList" :key="index" class="tobePre-row">
<p>EC11111</p> <el-row class="preinstall-title order-title">
</div> <div>
<div> <p>{{item.orderNo}}</p>
<p>发往:</p> </div>
<p>111</p> <div>
</div> <p>发往:</p>
<div> <p>{{item.destWarehouseName}}</p>
<p>海运拼仓</p> </div>
</div> <div>
<div> <p>{{item.warehouseType}}</p>
<p>入仓时间</p> </div>
<p>111</p> <div>
</div> <p>入仓时间:</p>
<div> <p>{{item.rucangtime}}</p>
<p>重货比</p> </div>
<p>111</p> <div>
</div> <p>重货比:</p>
<div class="table-button"> <p>{{item.weightRatio}}</p>
<el-button type="primary" size="small">预装</el-button> </div>
</div> <div class="table-button">
<el-dropdown trigger="click" @command="(command)=>handleGoods('all',item,command)">
<el-button type="success" size="small">预装全部</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="part" v-for="(part, index) in preList" :key="part.id">第{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</el-row>
<el-table v-loading="toBePreLoading" :data="item.orderItemList" border show-summary :summary-method="getSummaries">
<el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column label="品名" align="center" prop="prodTitleZh" />
<el-table-column label="备案" align="center" prop="brandType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量" align="center" prop="volumeWeight">
<template slot-scope="scope">
<p v-if="scope.row.volume">{{scope.row.volume}}</p>
<p v-if="scope.row.weight">{{scope.row.weight}}kg</p>
</template>
</el-table-column>
<el-table-column label="报关方式" align="center" prop="" />
<el-table-column label="包装类型" align="center" prop="" />
<el-table-column label="材质" align="center" prop="material" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)">
<el-button type="primary" size="small">预装</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="part" v-for="(part, index) in preList" :key="part.id">{{index+1}}部分</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row> </el-row>
<el-table v-loading="loading" :data="list"> </el-scrollbar>
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="品名" align="center" prop="selfNo" />
<el-table-column label="备案" align="center" prop="cubNo" />
<el-table-column label="箱数" align="center" prop="cabinetId" />
<el-table-column label="体积/重量" align="center" prop="transportType" />
<el-table-column label="报关方式" align="center" prop="squareNumber" />
<el-table-column label="包装类型" align="center" prop="weight" />
<el-table-column label="材质" align="center" prop="boxStatus" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">预装</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
...@@ -199,8 +248,7 @@ ...@@ -199,8 +248,7 @@
<el-row> <el-row>
<el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules"> <el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules">
<el-form-item label="目的地操作员" prop="operator"> <el-form-item label="目的地操作员" prop="operator">
<el-select v-model="operatorData.operator" placeholder="请选择目的地操作员" clearable size="small"> <userSelect v-model="operatorData.operator" placeholder="请选择目的地操作员" v-bind="$attrs" size="small" />
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
...@@ -214,13 +262,23 @@ ...@@ -214,13 +262,23 @@
<script> <script>
import { DICT_TYPE } from "@/utils/dict"; import { DICT_TYPE } from "@/utils/dict";
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse";
import {
secGoodsList,
preloadPage,
createSection,
deleteSection,
serviceMsg,
createGoods,
deleteGoods,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
/** /**
* 预装 * 预装
*/ */
export default { export default {
name: "preinstall", name: "preinstall",
components: {}, components: { userSelect },
data() { data() {
return { return {
// 状态 // 状态
...@@ -234,29 +292,35 @@ export default { ...@@ -234,29 +292,35 @@ export default {
declarationMethodOps: this.getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE), declarationMethodOps: this.getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE),
// 仓库 // 仓库
warehouseList: [], warehouseList: [],
// 遮罩层 // 查询标识
loading: false, type: "",
// 已预装 遮罩层
preLoading: false,
preList: [],
// 选中行
selectedRows: {},
// 待预装
toBePreLoading: false,
toBePreList: [],
total: 0,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
// 总条数
total: 0,
// 出货列表
list: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {},
pageNo: 1, pageParam: { pageNo: 1, pageSize: 5 },
pageSize: 10,
},
// 目的地操作员 // 目的地操作员
operatorData: { operatorData: {
operator: null, operator: null,
}, },
// 校验 // 校验
rules: { rules: {
operator: [ operator: [{ required: true, message: "必填", trigger: "change" }],
{ required: true, message: "必填", trigger: "change" },
],
}, },
// 出货信息
shipmentObj: this.$attrs.shipmentObj,
}; };
}, },
computed: { computed: {
...@@ -276,44 +340,57 @@ export default { ...@@ -276,44 +340,57 @@ export default {
created() { created() {
// 查询仓库数据 // 查询仓库数据
getWarehouseList().then((res) => (this.warehouseList = res.data)); getWarehouseList().then((res) => (this.warehouseList = res.data));
// this.getList(); // 查询待预装
this.handleQuery("toBePre");
}, },
methods: { methods: {
/** 查询列表 */ /* 获取城市 */
getList() { importCityName(id) {
this.loading = true; var arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : "";
},
/* 选中行 */
checkboxSelect(selection, part) {
this.selectedRows[part.id] = selection;
},
/* 查询已预装 */
getSecGoods() {
this.preLoading = true;
// 处理查询参数
let params = { ...this.queryParams };
// 已预装单号
params.orderNo = params.preOrderNo;
params.shipmentId = this.shipmentObj.id;
secGoodsList(params).then((res) => {
this.preList = res.data;
this.preLoading = false;
});
},
/* 查询待预装 */
getPreLoad() {
this.toBePreLoading = true;
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams }; let params = { ...this.queryParams };
// 执行查询 // 订单号
getboxPage(params).then((response) => { params.orderNo = params.toBePreOrderNo;
this.list = response.data.list; preloadPage({ ...params, ...this.pageParam }).then((res) => {
this.total = response.data.total; this.toBePreList = res.data.list;
this.loading = false; this.total = res.data.total;
this.toBePreLoading = false;
}); });
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery(type) {
this.queryParams.pageNo = 1; this.pageParam.pageNo = 1;
this.getList(); if (type === "pre") {
this.getSecGoods();
} else {
this.getPreLoad();
}
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery();
},
/** 查看按钮操作 */
handleCommand(row, command) {
switch (command) {
case "sea":
this.$router.push("/boxSea/shippingSea/" + row.id);
break;
case "edit":
break;
case "delete":
break;
}
}, },
/** 提交 */ /** 提交 */
onSubmit() { onSubmit() {
...@@ -323,12 +400,130 @@ export default { ...@@ -323,12 +400,130 @@ export default {
} }
}); });
}, },
/* 统计列 */
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (column.property === "brandType") {
sums[index] = "合计";
return;
}
if (column.property === "num") {
sums[index] = this.calcSum(column.property, data) ?? 0;
}
if (column.property === "volumeWeight") {
const volume = this.calcSum("volume", data);
const weight = this.calcSum("weight", data);
sums[index] = `${volume ?? 0}m³ ${weight ?? 0}kg`;
}
});
return sums;
},
/* 计算总和 */
calcSum(key, data) {
const values = data.map((item) => Number(item[key]));
if (!values.every((value) => isNaN(value))) {
return values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
}
},
/* 待预装订单分页 */
pageChange(page) {
this.queryParams.page = page;
this.getPreLoad();
},
/* 折叠 */
foldTable(index, part) {
part.fold = !part.fold;
this.$set(this.preList, index, part);
},
/* 增加部分 */
addPart() {
createSection({ shipmentId: this.shipmentObj.id }).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
},
/* 删除部分 */
deletePart(part) {
this.$confirm("确认删除该部分及其已预装订单?", "提示", {
type: "warning",
})
.then((_) => {
deleteSection(part.id).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
});
})
.catch((_) => {});
},
/** 预装 */
handleGoods(type, item, part) {
let params = {
secId: part.id,
shipmentId: this.shipmentObj.id,
orderId: item.orderId,
};
if (type === "all") {
params.orderItemIdList = item.orderItemList.map(
(data) => data.orderItemId
);
} else {
params.orderItemIdList = [item.orderItemId];
}
createGoods(params).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
},
/* 删除订单 */
deleteOrder(type, data) {
let ids = [];
if (type === "selected") {
const rows = this.selectedRows[data.id] ?? [];
if (!rows.length) {
this.$message.warning("请选择订单");
return;
}
ids = rows.map((item) => item.orderItemId);
}
if (type === "row") {
ids.push(data.orderItemId);
}
deleteGoods(ids).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
});
});
},
/* 查询所有数据 */
queryAllData() {
this.getSecGoods();
this.pageParam.pageNo = 1;
this.getPreLoad();
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.preinstall { .preinstall {
display: flex;
flex-direction: column;
p { p {
margin: 0; margin: 0;
} }
...@@ -359,7 +554,8 @@ export default { ...@@ -359,7 +554,8 @@ export default {
} }
.table-label { .table-label {
font-size: 14px; font-size: 16px;
font-weight: bolder;
} }
.red-label { .red-label {
color: red; color: red;
...@@ -373,6 +569,7 @@ export default { ...@@ -373,6 +569,7 @@ export default {
} }
.preinstall-table { .preinstall-table {
display: flex; display: flex;
height: calc(100% - 30px);
> div { > div {
border: 1px solid #e6ebf5; border: 1px solid #e6ebf5;
padding: 10px 0px; padding: 10px 0px;
...@@ -381,5 +578,32 @@ export default { ...@@ -381,5 +578,32 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
} }
.pre-part {
margin-bottom: 10px;
margin-right: 10px;
.pre-part-info {
font-weight: bolder;
> p:first-child {
color: #13ce66;
margin-right: 10px;
}
> p:last-child {
> span {
margin-right: 5px;
}
}
}
}
.preinstall-card {
.el-card__body {
height: 100%;
.tobePre-row {
margin-top: 10px;
}
}
}
} }
</style> </style>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input> <el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="异常时间" prop="arrivalTime" class="two-element"> <el-form-item label="异常时间" prop="arrivalTime" class="two-element">
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorStart"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorStart" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorend"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorend" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="是否更新订单状态"> <el-form-item label="是否更新订单状态">
<el-radio-group v-model="errorObj.updateOrder"> <el-radio-group v-model="errorObj.updateOrder">
......
<template>
<div>
<el-form ref="settlementForm" :model="settlementObj" label-width="80px">
<el-form-item label="可结算">
<el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.slSettlementTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="已结算">
<el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.slSettledTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button>
</el-row>
</div>
</template>
<script>
import { settlementCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 结算
*/
export default {
name: "settlement",
data() {
return {
// 结算对象
settlementObj: {},
};
},
methods: {
/** 提交 */
onSubmit(operateType) {
this.$refs["settlementForm"].validate((valid) => {
if (valid) {
settlementCreate({
...this.settlementObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template> <template>
<div> <div>
<el-form ref="shipForm" :model="shipObj" label-width="80px"> <el-form ref="shipForm" :model="shipObj" :rules="rules" label-width="80px">
<el-form-item label="状态"> <el-form-item label="状态" prop="saExmtStatus">
<el-radio-group v-model="shipObj.status"> <el-radio-group v-model="shipObj.saExmtStatus">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="配船时间" v-show="shipObj.status === '2'"> <el-form-item label="配船时间" v-show="shipObj.saExmtStatus === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="shipObj.shipTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="shipObj.shipTime" value-format="yyyy-MM-dd"></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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { shipConfigure, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 配船 * 配船
*/ */
export default { export default {
name: "ship", name: "ship",
props: {
shipmentObj: Object,
},
data() { data() {
return { return {
// 配船对象 // 配船对象
...@@ -40,14 +44,26 @@ export default { ...@@ -40,14 +44,26 @@ export default {
label: "已配", label: "已配",
}, },
], ],
// 校验
rules: {
saExmtStatus: [{ required: true, message: "必填", trigger: "change" }],
},
}; };
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["shipForm"].validate((valid) => { this.$refs["shipForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); shipConfigure({
operateType,
shipmentId: this.shipmentObj.id,
...this.shipObj,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -2,39 +2,32 @@ ...@@ -2,39 +2,32 @@
<div> <div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px"> <el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<el-form-item label="代理商AGENT"> <el-form-item label="代理商AGENT">
<el-select v-model="subMaterialObj.agent" placeholder="请选择供应商"> <supplierSelect v-model="subMaterialObj.agentId" placeholder="请选择供应商" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="提单号M/BL NO." class="two-element"> <el-form-item label="提单号M/BL NO." class="two-element">
<el-input v-model="subMaterialObj.billNo" placeholder="请输入提单号"></el-input> <el-input v-model="subMaterialObj.blMblNo" placeholder="请输入提单号"></el-input>
<el-button type="primary">提单确认</el-button> <el-button type="primary">提单确认件</el-button>
</el-form-item> </el-form-item>
<el-form-item label="SO NO."> <el-form-item label="SO NO.">
<el-input v-model="subMaterialObj.soNo" placeholder="请输入SO NO"></el-input> <el-input v-model="subMaterialObj.soNo" placeholder="请输入SO NO"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="装货港"> <el-form-item label="装货港">
<el-select v-model="subMaterialObj.loadingPort" placeholder="请选择装货港"> <dockSelect v-model="subMaterialObj.startPortId" placeholder="请选择装货港" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的港"> <el-form-item label="目的港">
<el-select v-model="subMaterialObj.destination" placeholder="请选择目的港"> <dockSelect v-model="subMaterialObj.destPortId" placeholder="请选择目的港" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="船公司"> <el-form-item label="船公司">
<el-select v-model="subMaterialObj.shippingCompany" placeholder="请选择船公司"> <supplierSelect v-model="subMaterialObj.shipCompanyId" :companyType="'9'" placeholder="请选择船公司" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="托运人"> <el-form-item label="托运人">
<el-select v-model="subMaterialObj.shipper" placeholder="请选择托运人"> <userSelect v-model="subMaterialObj.shipperId" placeholder="请选择托运人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="收货人"> <el-form-item label="收货人">
<el-select v-model="subMaterialObj.consignee" placeholder="请选择收货人"> <userSelect v-model="subMaterialObj.consigneeId" placeholder="请选择收货人" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="通知方"> <el-form-item label="通知方">
<el-select v-model="subMaterialObj.notifyParty" placeholder="请选择通知方"> <userSelect v-model="subMaterialObj.notifyingId" placeholder="请选择通知方" v-bind="$attrs" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="Mark & No."> <el-form-item label="Mark & No.">
<el-input v-model="subMaterialObj.markNo"></el-input> <el-input v-model="subMaterialObj.markNo"></el-input>
...@@ -42,47 +35,58 @@ ...@@ -42,47 +35,58 @@
<el-form-item label="包装数量与单位" class="two-element"> <el-form-item label="包装数量与单位" class="two-element">
<el-input v-model="subMaterialObj.quantity" placeholder="请输入包装数量"></el-input> <el-input v-model="subMaterialObj.quantity" placeholder="请输入包装数量"></el-input>
<el-select v-model="subMaterialObj.unit" placeholder="请选择单位"> <el-select v-model="subMaterialObj.unit" placeholder="请选择单位">
<el-option v-for="unit in units" :key="unit.id" :value="unit.fuhao">{{unit.titleZh}}</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="毛重(KGS)"> <el-form-item label="毛重(KGS)">
<el-input v-model="subMaterialObj.grossWeight" placeholder="请输入毛重(KGS)"></el-input> <el-input v-model="subMaterialObj.kgs" placeholder="请输入毛重(KGS)"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="立方数(CBM)"> <el-form-item label="立方数(CBM)">
<el-input v-model="subMaterialObj.mesaurement" placeholder="请输入立方数(CBM)"></el-input> <el-input v-model="subMaterialObj.mesaurement" placeholder="请输入立方数(CBM)"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="货物描述"> <el-form-item label="货物描述">
<el-input v-model="subMaterialObj.description" placeholder="请输入货物描述"></el-input> <el-input v-model="subMaterialObj.goodsDesc" placeholder="请输入货物描述"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="柜号/封条"> <el-form-item label="柜号/封条">
<el-input v-model="subMaterialObj.container" placeholder="请输入柜号/封条"></el-input> <el-input v-model="subMaterialObj.containerSealNo" placeholder="请输入柜号/封条"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="柜型"> <el-form-item label="柜型">
111 {{getCabinetName(shipmentObj.cabinetId)}}
</el-form-item> </el-form-item>
<el-form-item label="出单方式"> <el-form-item label="出单方式">
<el-radio-group v-model="subMaterialObj.billingMethod"> <el-radio-group v-model="subMaterialObj.issueType">
<el-radio v-for="item in method" :key="item.value" :label="item.value">{{item.label}}</el-radio> <el-radio v-for="item in method" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="subMaterialObj.remark" type="textarea" rows="2" placeholder="请输入备注"></el-input> <el-input v-model="subMaterialObj.remarks" type="textarea" rows="2" placeholder="请输入备注"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button type="primary">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import supplierSelect from "./common/supplierSelect.vue";
import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue";
import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 提单补料 * 提单补料
*/ */
export default { export default {
name: "subMaterial", name: "subMaterial",
components: { supplierSelect, dockSelect, userSelect },
props: {
shipmentObj: Object,
},
data() { data() {
return { return {
// 提单补料对象 // 提单补料对象
...@@ -100,14 +104,36 @@ export default { ...@@ -100,14 +104,36 @@ export default {
label: "电放", label: "电放",
}, },
], ],
// 单位
units: [],
}; };
}, },
created() {
// 获取单位
getUnitList().then((res) => {
const { data } = res;
this.units = data ?? [];
});
// 柜型
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list;
});
},
computed: {},
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["subMaterialForm"].validate((valid) => { this.$refs["subMaterialForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); billCreate({
...this.subMaterialObj,
shipmentId: this.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
...@@ -115,6 +141,16 @@ export default { ...@@ -115,6 +141,16 @@ export default {
cancel() { cancel() {
this.$emit("closeDialog"); this.$emit("closeDialog");
}, },
/* 获取柜名 */
getCabinetName(cabinetId) {
for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) {
return cabinetItem.name;
}
}
return "/";
},
}, },
}; };
</script> </script>
......
<template> <template>
<div> <div>
<el-form ref="trailerForm" :rules="rules" :model="trailer" label-width="120px" class="trailer-form"> <el-form ref="trailerForm" :rules="rules" :model="trailerObj" label-width="120px">
<el-form-item label="状态"> <el-form-item label="状态">
<el-select v-model="trailer.status" placeholder="请选择状态"> <el-select v-model="trailerObj.tlContainerStatus" placeholder="请选择状态">
<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_TRAILER_STATUS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="拖车公司"> <el-form-item label="拖车公司">
<el-select v-model="trailer.trailerCompany" placeholder="请选择拖车公司"> <supplierSelect v-model="trailerObj.tlCompanyId" :companyType="'4'" placeholder="请选择拖车公司" v-bind="$attrs" />
<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="拖车时间" prop="time"> <el-form-item label="拖车时间" prop="tlTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="trailer.trailerTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="trailerObj.tlTime"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="车牌"> <el-form-item label="车牌">
<el-input v-model="trailer.licensePlate" placeholder="请输入车牌"></el-input> <el-input v-model="trailerObj.tlLicensePlate " placeholder="请输入车牌"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="司机"> <el-form-item label="司机">
<el-input v-model="trailer.driver" placeholder="请输入司机"></el-input> <el-input v-model="trailerObj.tlDriver" placeholder="请输入司机"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="司机联系方式"> <el-form-item label="司机联系方式">
<el-input v-model="trailer.telephone" placeholder="请输入司机联系方式"></el-input> <el-input v-model="trailerObj.tlDriverContact" placeholder="请输入司机联系方式"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="货柜号"> <el-form-item label="货柜号">
<el-input v-model="trailer.containerNumber" placeholder="请输入货柜号"></el-input> <el-input v-model="trailerObj.tlContainerNo" placeholder="请输入货柜号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="封条"> <el-form-item label="封条">
<el-input v-model="trailer.seal" placeholder="请输入封条"></el-input> <el-input v-model="trailerObj.tlStripSeal" placeholder="请输入封条"></el-input>
</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">保存</el-button> <el-button type="primary" @click="onSubmit(1)">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button> <el-button type="success" @click="onSubmit(2)">提交</el-button>
<el-button @click="cancel">关闭</el-button> <el-button @click="cancel">关闭</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { trailer, serviceMsg } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
/** /**
* 拖车 * 拖车
*/ */
export default { export default {
name: "trailer", name: "trailer",
components: { supplierSelect },
data() { data() {
return { return {
// 状态
status: [
{
value: "1",
label: "已派车,待提柜",
},
{
value: "2",
label: "已提柜,待还柜",
},
{
value: "3",
label: "已还柜",
},
],
// 拖车对象 // 拖车对象
trailer: {}, trailerObj: {},
// 校验 // 校验
rules: { rules: {
time: [{ required: true, message: "必填", trigger: "change" }], tlTime: [{ required: true, message: "必填", trigger: "change" }],
}, },
}; };
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["trailerForm"].validate((valid) => { this.$refs["trailerForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); trailer({
...this.trailerObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="到仓时间"> <el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.warehouseTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.warehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="卸柜时间"> <el-form-item label="卸柜时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="unloadingObj.unloadingTime"></el-date-picker> <el-date-picker type="datetime" placeholder="请选择日期" v-model="unloadingObj.unloadingTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<!-- 弹窗 --> <!-- 弹窗 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" :fullscreen="dialogConfig.fullscreen" :close-on-click-modal=false :modal-append-to-body=false append-to-body destroy-on-close> <el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" :fullscreen="dialogConfig.fullscreen" :close-on-click-modal=false :modal-append-to-body=false append-to-body destroy-on-close>
<component v-bind:is="currentComponent" @closeDialog="closeDialog"></component> <component v-bind:is="currentComponent" @closeDialog="closeDialog" v-bind="$attrs" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers"></component>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -43,6 +43,10 @@ import clrDocumentWidget from "./nodePage/clrDocument.vue"; ...@@ -43,6 +43,10 @@ import clrDocumentWidget from "./nodePage/clrDocument.vue";
import arrivalWidget from "./nodePage/arrival.vue"; import arrivalWidget from "./nodePage/arrival.vue";
import cusClearanceWidget from "./nodePage/cusClearance.vue"; import cusClearanceWidget from "./nodePage/cusClearance.vue";
import unloadingWidget from "./nodePage/unloading/index.vue"; import unloadingWidget from "./nodePage/unloading/index.vue";
import settlementWidget from "./nodePage/settlement.vue";
import { getSupplierPage } from "@/api/ecw/supplier";
import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user";
/** /**
* 海运流程图 * 海运流程图
...@@ -65,10 +69,11 @@ export default { ...@@ -65,10 +69,11 @@ export default {
arrivalWidget, arrivalWidget,
cusClearanceWidget, cusClearanceWidget,
unloadingWidget, unloadingWidget,
settlementWidget,
}, },
props: { props: {
shippingType: String, shippingType: String,
boxId: String, shipmentObj: Object,
}, },
data() { data() {
return { return {
...@@ -101,9 +106,9 @@ export default { ...@@ -101,9 +106,9 @@ export default {
type: "trailer", type: "trailer",
}, },
{ {
unNode: true,
type: "agent",
title: "AGENT", title: "AGENT",
imgSrc: require("@/assets/images/shipping/agent-start.png"),
type: "agent",
}, },
], ],
[ [
...@@ -151,13 +156,13 @@ export default { ...@@ -151,13 +156,13 @@ export default {
type: "clearanceDocument", type: "clearanceDocument",
}, */ }, */
{ {
unNode: true,
type: "blCopy",
title: "提单Copy", title: "提单Copy",
imgSrc: require("@/assets/images/shipping/tdcopy-start.png"),
type: "blCopy",
}, },
{ {
unNode: true,
type: "clrDocument", type: "clrDocument",
imgSrc: require("@/assets/images/shipping/qg-start.png"),
title: "清关文件", title: "清关文件",
}, },
], ],
...@@ -193,8 +198,36 @@ export default { ...@@ -193,8 +198,36 @@ export default {
}, },
// 当前组件 // 当前组件
currentComponent: "", currentComponent: "",
// 供应商
allSupplier: [],
// 码头
allDocks: [],
// 用户
allUsers: [],
}; };
}, },
created() {
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list.map((item) => {
if (item.companyType) {
item.companyTypes = item.companyType.split(",");
}
return item;
});
});
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allDocks = data.list;
});
// 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allUsers = data.list ?? [];
});
},
methods: { methods: {
/** 关闭弹窗 */ /** 关闭弹窗 */
closeDialog() { closeDialog() {
...@@ -228,6 +261,11 @@ export default { ...@@ -228,6 +261,11 @@ export default {
this.$set(this.dialogConfig, "dialogVisible", true); this.$set(this.dialogConfig, "dialogVisible", true);
}, },
}, },
watch: {
shipmentObj(val) {
this.shipmentObj = val;
},
},
}; };
</script> </script>
......
...@@ -9,17 +9,23 @@ ...@@ -9,17 +9,23 @@
<!-- 信息 --> <!-- 信息 -->
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
<el-descriptions :column="5" border> <el-descriptions :column="5" border>
<el-descriptions-item label="自编号"></el-descriptions-item> <el-descriptions-item label="自编号">{{shipmentObj.selfNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式"></el-descriptions-item> <el-descriptions-item label="运输方式">
<el-descriptions-item label="始发地"></el-descriptions-item> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" />
<el-descriptions-item label="目的地"></el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="始发地">
{{importCityName(shipmentObj.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{importCityName(shipmentObj.destWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="状态"></el-descriptions-item> <el-descriptions-item label="状态"></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<!-- 海运流程图 --> <!-- 海运流程图 -->
<div class="shipping-flow"> <div class="shipping-flow">
<shippingChart :boxId="boxId" /> <shippingChart :shipmentObj="shipmentObj" />
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -28,6 +34,9 @@ ...@@ -28,6 +34,9 @@
<script> <script>
import shippingChart from "../shippingSea/seaProcess"; import shippingChart from "../shippingSea/seaProcess";
import { getbox } from "@/api/ecw/box";
import { getWarehouseList } from "@/api/ecw/warehouse";
/** /**
* 海运操作主页面 * 海运操作主页面
*/ */
...@@ -37,7 +46,28 @@ export default { ...@@ -37,7 +46,28 @@ export default {
shippingChart, shippingChart,
}, },
props: { props: {
boxId: String, shipmentId: String,
},
data() {
return {
shipmentObj: {},
warehouseList: [],
};
},
created() {
getbox(this.shipmentId).then((res) => {
const { data } = res;
this.shipmentObj = data ?? {};
});
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
},
methods: {
importCityName(id) {
var arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : "";
},
}, },
}; };
</script> </script>
...@@ -48,6 +78,12 @@ export default { ...@@ -48,6 +78,12 @@ export default {
} }
// 海运操作统一弹窗样式 // 海运操作统一弹窗样式
.shipping-dialog { .shipping-dialog {
.el-dialog__body {
height: calc(100% - 54px);
> :first-child {
height: 100%;
}
}
// 页面内元素弹窗form控件宽度设置 // 页面内元素弹窗form控件宽度设置
.el-form-item__content { .el-form-item__content {
> div { > div {
...@@ -57,7 +93,7 @@ export default { ...@@ -57,7 +93,7 @@ export default {
.operate-button { .operate-button {
text-align: center; text-align: center;
} }
.two-element{ .two-element {
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
> :last-child { > :last-child {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-form-item> </el-form-item>
<el-form-item label="付款类型" v-if="form.advanceType == 6"> <el-form-item label="付款类型" v-if="form.advanceType == 6">
<div style="width: 300px;"> <div style="width: 300px;">
<dict-selector v-model="form.payType" :type="DICT_TYPE.PAY_TYPE" ></dict-selector> <dict-selector v-model="form.payType" :type="DICT_TYPE.PAYMENT_TYPE" ></dict-selector>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-form-item label="订单号:"><div class="content"> <el-form-item label="订单号:"><div class="content">
{{orderDetails.orderNo}} {{orderDetails.orderNo}}
</div></el-form-item> </div></el-form-item>
<el-form-item label="发货人:"><div class="content">{{orderDetails.consignorVO.name}}</div></el-form-item> <el-form-item label="发货人:"><div class="content">{{orderDetails.consignorVO ? orderDetails.consignorVO.name :''}}</div></el-form-item>
<el-form-item label="唛头"><div class="content">{{orderDetails.marks}}</div></el-form-item> <el-form-item label="唛头"><div class="content">{{orderDetails.marks}}</div></el-form-item>
<el-form-item> <el-button @click="addCost">添加申请</el-button></el-form-item> <el-form-item> <el-button @click="addCost">添加申请</el-button></el-form-item>
</el-form> </el-form>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-table-column> </el-table-column>
<el-table-column label="付款类型"> <el-table-column label="付款类型">
<template v-slot = {row}> <template v-slot = {row}>
<dict-selector :disabled="isModify[forbidden(row)]" :type="DICT_TYPE.PAY_TYPE" v-model="row.payType" /> <dict-selector :disabled="isModify[forbidden(row)]" :type="DICT_TYPE.PAYMENT_TYPE" v-model="row.payType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注"> <el-table-column label="备注">
...@@ -85,7 +85,9 @@ export default { ...@@ -85,7 +85,9 @@ export default {
}, },
created() { created() {
getOrder(this.orderId).then(r =>{ getOrder(this.orderId).then(r =>{
this.orderDetails = r.data if(r.code === 0){
this.orderDetails = r.data
}
}) })
this.getOrderList() this.getOrderList()
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{ this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
...@@ -128,7 +130,7 @@ export default { ...@@ -128,7 +130,7 @@ export default {
} }
}) })
}else { }else {
if(this.list[this.list.length - 1].status !== 0){ if(this.list[this.list.length - 1].status === 0){
feeApplicationCreate( {...this.list[this.list.length - 1],status:1}).then(r=>{ feeApplicationCreate( {...this.list[this.list.length - 1],status:1}).then(r=>{
if(r.code === 0){ if(r.code === 0){
this.getOrderList(); this.getOrderList();
......
...@@ -236,9 +236,9 @@ export default { ...@@ -236,9 +236,9 @@ export default {
code: [{ required: true, message: "模板编码不能为空", trigger: "blur" }], code: [{ required: true, message: "模板编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "模板名称不能为空", trigger: "blur" }], name: [{ required: true, message: "模板名称不能为空", trigger: "blur" }],
content: [{ required: true, message: "模板内容不能为空", trigger: "blur" }], content: [{ required: true, message: "模板内容不能为空", trigger: "blur" }],
contentEn: [{ required: true, message: "英文模板内容不能为空", trigger: "blur" }], contentEn: [{ required: false, message: "英文模板内容不能为空", trigger: "blur" }],
apiTemplateId: [{ required: true, message: "中文短信API的模板编号不能为空", trigger: "blur" }], apiTemplateId: [{ required: true, message: "中文短信API的模板编号不能为空", trigger: "blur" }],
apiTemplateIdEn: [{ required: true, message: "英文短信API的模板编号不能为空", trigger: "blur" }], apiTemplateIdEn: [{ required: false, message: "英文短信API的模板编号不能为空", trigger: "blur" }],
channelId: [{ required: true, message: "短信渠道编号不能为空", trigger: "change" }], channelId: [{ required: true, message: "短信渠道编号不能为空", trigger: "change" }],
}, },
// 短信渠道 // 短信渠道
......
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