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 = [
meta: {title: '出货详情', icon: '', activeMenu: '/shipment/box'}
}, */
{
path: 'shippingSea/:boxId(\\d+)',
path: 'shippingSea/:shipmentId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shippingSea/shippingSea'),
props: true,
name: 'shippingSea',
......
......@@ -148,12 +148,14 @@ export const DICT_TYPE = {
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'fee_type',
PAY_TYPE:'pay_type',
// PAY_TYPE:'payment_type',
RECEIVE_FLAG:'receive_flag',
COMDINED_VALUE_ADDED_FEE:'combined_value_added_fee',
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>
<div>
<el-form ref="agentForm" :model="agentObj" label-width="120px">
<el-form-item label="代理商Agent">
<el-select v-model="agentObj.agent" placeholder="请选择代理商">
</el-select>
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item label="代理商Agent" prop="agentId">
<supplierSelect v-model="agentObj.agentId" placeholder="请选择代理商" v-bind="$attrs" />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-button>
<el-button @click="cancel">关闭</el-button>
</el-row>
......@@ -15,15 +13,22 @@
</template>
<script>
import { agentSet, serviceMsg } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
/**
* agent
*/
export default {
name: "agent",
components: { supplierSelect },
data() {
return {
// agent对象
agentObj: {},
// 校验
rules: {
agentId: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
methods: {
......@@ -31,7 +36,14 @@ export default {
onSubmit() {
this.$refs["agentForm"].validate((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 @@
<div>
<el-form ref="arrivalForm" :rules="rules" :model="arrivalObj" label-width="120px">
<el-form-item label="预计到港时间">{{arrivalObj.expectedTime}}</el-form-item>
<el-form-item label="实际到港时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.actualTime"></el-date-picker>
<el-form-item label="实际到港时间" prop="apRealTime">
<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 label="确认到港" prop="confirmTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.confirmTime">
<el-form-item label="确认到港">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="arrivalObj.apConfirmTime" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
<p class="message-area" v-show="showMsg">请确认是否有异常,如有异常请进行异常登记</p>
</el-form-item>
<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>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row>
......@@ -32,6 +32,7 @@
<script>
import regError from "./regError";
import dayjs from "dayjs";
import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 到港
......@@ -44,12 +45,10 @@ export default {
data() {
return {
// 到港对象
arrivalObj: {
expectedTime: "2022-07-18",
},
arrivalObj: {},
// 校验
rules: {
actualTime: [{ required: true, message: "必填", trigger: "change" }],
apRealTime: [{ required: true, message: "必填", trigger: "change" }],
},
// 弹窗配置
dialogVisible: false,
......@@ -60,21 +59,21 @@ export default {
watch: {
// 预计到港时间
"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);
},
},
methods: {
// 时间比较
compareDate(expectedTime, confirmTime) {
compareDate(expectedTime, apConfirmTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (expectedTime) date1 = dayjs(expectedTime);
if (confirmTime) date2 = dayjs(confirmTime);
if (apConfirmTime) date2 = dayjs(apConfirmTime);
if (date1 && date2) {
const days = date2.date() - date1.date();
if (days > 5) {
......@@ -87,10 +86,18 @@ export default {
this.dialogVisible = true;
},
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["arrivalForm"].validate((valid) => {
if (valid) {
alert("submit!");
arrivalCreate({
...this.arrivalObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
}
});
},
......
<template>
<div>
<el-form ref="bargeForm" :model="bargeObj" label-width="80px">
<el-form-item label="驳船">
<el-radio-group v-model="bargeObj.status">
<el-form ref="bargeForm" :model="bargeObj" :rules="rules" label-width="80px">
<el-form-item label="驳船" prop="bgExmtStatus">
<el-radio-group v-model="bargeObj.bgExmtStatus">
<el-radio v-for="item in bargeStatus" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<div v-show="bargeObj.status === '2'">
<div v-show="bargeObj.bgExmtStatus === '2'">
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="bargeObj.feedTimePerson" placeholder="请选择通知人">
</el-select>
<userSelect v-model="bargeObj.notifyUser" placeholder="请选择通知人" v-bind="$attrs" />
</el-form-item>
</el-col>
</el-row>
<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>
</div>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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 { bargeCreate, serviceMsg } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
/**
* 驳船
*/
export default {
name: "barge",
components: { userSelect },
data() {
return {
// 驳船对象
......@@ -56,14 +59,26 @@ export default {
label: "有驳船",
},
],
// 校验
rules: {
bgExmtStatus: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["bargeForm"].validate((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 @@
<div>
<el-form ref="blCopyForm" :model="blCopyObj" label-width="120px">
<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-upload>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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 { ladingCopyCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 提单copy
*/
......@@ -24,17 +25,23 @@ export default {
data() {
return {
// 提单copy对象
blCopyObj: {
fileList: [],
},
blCopyObj: {},
};
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["blCopyForm"].validate((valid) => {
if (valid) {
alert("submit!");
ladingCopyCreate({
...this.blCopyObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
}
});
},
......
<template>
<div>
<el-form ref="bookingForm" :rules="rules" :model="booking" label-width="140px">
<el-form-item label="SO NO">
<el-input v-model="booking.soNo" placeholder="请输入SO NO"></el-input>
<el-form ref="bookingForm" :rules="rules" :model="bookingObj" label-width="140px">
<el-form-item label="SO NO.">
<el-input v-model="bookingObj.sono" placeholder="请输入SO NO."></el-input>
</el-form-item>
<el-form-item label="船公司类型">
<el-select v-model="booking.type" placeholder="请选择船公司类型">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
<supplierSelect v-model="bookingObj.shipCompanyType" :companyType="'9'" placeholder="请选择船公司类型" v-bind="$attrs" />
</el-form-item>
<el-form-item label="驳船港">
<el-select v-model="booking.bargePort" placeholder="请选择驳船港">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
<dockSelect v-model="bookingObj.bargePort" placeholder="请选择驳船港" v-bind="$attrs" />
</el-form-item>
<el-form-item label="大船港">
<el-select v-model="booking.bigShipPort" placeholder="请选择大船港">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
<dockSelect v-model="bookingObj.bigPort" placeholder="请选择大船港" v-bind="$attrs" />
</el-form-item>
<el-form-item label="目的港">
<el-select v-model="booking.destination" placeholder="请选择目的港">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
<dockSelect v-model="bookingObj.destPort" placeholder="请选择目的港" v-bind="$attrs" />
</el-form-item>
<el-form-item label="订舱公司">
<el-select v-model="booking.bookingCompany" placeholder="请选择订舱公司">
<el-option v-for="type in types" :key="type" :label="type" :value="type"></el-option>
</el-select>
<supplierSelect v-model="bookingObj.spaceCompany" :companyType="'1'" placeholder="请选择订舱公司" v-bind="$attrs" />
</el-form-item>
<el-form-item label="预计驳船时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.bargeTime"></el-date-picker>
<el-form-item label="预计驳船时间" prop="bargeTime">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.bargeTime"></el-date-picker>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="预计开船时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.departureTime"></el-date-picker>
<el-form-item label="预计开船时间" prop="sailTime">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.sailTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
<userSelect v-model="bookingObj.feedTimePerson1" placeholder="请选择通知人" v-bind="$attrs" />
</el-form-item>
</el-col>
</el-row>
......@@ -50,13 +39,12 @@
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
<userSelect v-model="bookingObj.feedTimePerson2" placeholder="请选择通知人" v-bind="$attrs" />
</el-form-item>
</el-col>
</el-row>
......@@ -64,13 +52,12 @@
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
<userSelect v-model="bookingObj.feedTimePerson3" placeholder="请选择通知人" v-bind="$attrs" />
</el-form-item>
</el-col>
</el-row>
......@@ -78,13 +65,12 @@
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select>
<userSelect v-model="bookingObj.feedTimePerson4" placeholder="请选择通知人" v-bind="$attrs" />
</el-form-item>
</el-col>
</el-row>
......@@ -99,29 +85,49 @@
</template>
<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 {
name: "booking",
components: {
supplierSelect,
dockSelect,
userSelect,
},
props: {
shipmentObj: Object,
},
data() {
return {
// 船公司类型
types: ["PIL", "MSK", "CMA", "COSCO", "ZIM", "ONE", "OOCL", "MSC", "HPL"],
// 订舱对象
booking: {},
bookingObj: {},
// 校验
rules: {
time: [{ required: true, message: "必填", trigger: "change" }],
bargeTime: [{ required: true, message: "必填", trigger: "change" }],
sailTime: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
created() {},
methods: {
/** 提交 */
onSubmit() {
this.$refs["bookingForm"].validate((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 @@
<div>
<el-form ref="cabinetForm" :rules="rules" :model="cabinet" label-width="80px">
<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 label="仓库">
<el-select v-model="cabinet.warehouse" placeholder="请选择仓库">
</el-select>
</el-form-item>
<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 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 label="装柜图片">
<el-upload action="" :limit="1" :file-list="cabinet.fileList">
......
......@@ -102,7 +102,7 @@
</el-select>
</el-form-item>
<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 label="选择柜型" prop="cabinetType">
<el-select v-model="modifyCabinetObj.cabinetType" placeholder="请选择柜型">
......
......@@ -4,72 +4,74 @@
<el-row>
<el-col :span="12">
<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-form-item>
</el-col>
<el-col :span="12">
<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-col>
</el-row>
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<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-col>
</el-row>
<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-upload>
</el-form-item>
<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-group>
</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-upload action="" :file-list="cDocObj.agentFileList">
<el-upload action="" :file-list="cDocObj.cdAgentlistFile">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
<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-group>
</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-upload action="" :file-list="cDocObj.soncapFileList">
<el-upload action="" :file-list="cDocObj.cdSoncapFile">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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 { clearanceDocCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 清关文件
*/
......@@ -78,18 +80,16 @@ export default {
data() {
return {
// 清关文件对象
cDocObj: {
fileList: [],
},
cDocObj: {},
// 出单方式
method: [
{
value: "1",
label: "正本",
label: "电放",
},
{
value: "2",
label: "电放",
label: "正本",
},
],
// 选项
......@@ -107,10 +107,18 @@ export default {
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["cDocForm"].validate((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>
<div>
<el-form ref="cusClearanceForm" :rules="rules" :model="cusClearanceObj" label-width="120px">
<el-form-item label="清关代理">{{cusClearanceObj.agent}}</el-form-item>
<el-form-item label="预计清关时间" prop="expectedTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearanceObj.expectedTime"></el-date-picker>
<el-form-item label="清关代理">{{cusClearanceObj.clAgentId}}</el-form-item>
<el-form-item label="预计清关时间" prop="clEstTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="cusClearanceObj.clEstTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="清关时间" prop="confirmTime">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="cusClearanceObj.confirmTime"></el-date-picker>
<el-form-item label="清关时间" prop="clClearTime">
<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>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row>
......@@ -28,6 +28,7 @@
<script>
import regError from "./regError";
import dayjs from "dayjs";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 清关
......@@ -40,13 +41,11 @@ export default {
data() {
return {
// 清关对象
cusClearanceObj: {
agent: "test111",
},
cusClearanceObj: {},
// 校验
rules: {
expectedTime: [{ required: true, message: "必填", trigger: "change" }],
confirmTime: [{ required: true, message: "必填", trigger: "change" }],
clEstTime: [{ required: true, message: "必填", trigger: "change" }],
clClearTime: [{ required: true, message: "必填", trigger: "change" }],
},
// 弹窗配置
dialogVisible: false,
......@@ -56,22 +55,22 @@ export default {
},
watch: {
// 预计清关时间
"cusClearanceObj.expectedTime"(val) {
this.compareDate(val, this.cusClearanceObj.confirmTime);
"cusClearanceObj.clEstTime"(val) {
this.compareDate(val, this.cusClearanceObj.clClearTime);
},
// 清关时间
"cusClearanceObj.confirmTime"(val) {
this.compareDate(this.cusClearanceObj.expectedTime, val);
"cusClearanceObj.clClearTime"(val) {
this.compareDate(this.cusClearanceObj.clEstTime, val);
},
},
methods: {
// 时间比较
compareDate(expectedTime, confirmTime) {
compareDate(clEstTime, clClearTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (expectedTime) date1 = dayjs(expectedTime);
if (confirmTime) date2 = dayjs(confirmTime);
if (clEstTime) date1 = dayjs(clEstTime);
if (clClearTime) date2 = dayjs(clClearTime);
if (date1 && date2 && date2 !== date1) {
this.showMsg = true;
}
......@@ -81,10 +80,18 @@ export default {
this.dialogVisible = true;
},
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["cusClearanceForm"].validate((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 @@
</el-select>
</el-form-item>
<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 label="状态">
<el-radio-group v-model="cusDeclaration.status">
......@@ -44,7 +44,7 @@
<!-- 退场 -->
<div v-show="cusDeclaration.check === '1' || cusDeclaration.check === '2'">
<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 label="查验前图片">
<el-upload action="" :limit="1" :file-list="cusDeclaration.checkFile">
......@@ -58,7 +58,7 @@
<!-- 放行 -->
<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 label="装箱单">
......
......@@ -4,20 +4,19 @@
<el-form-item label="预计开船时间">
</el-form-item>
<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" v-show="showMsg">实际开船实际与预计时间不符</p>
</el-form-item>
<el-form-item label="预期到港时间" prop="arrivalTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="departureObj.arrivalTime">
</el-date-picker>
<el-form-item label="预期到港时间" prop="dtEstArrivalTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="departureObj.dtEstArrivalTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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-button type="primary" @click="exceptionReg" :disabled="!showMsg">异常登记</el-button>
</el-row>
......@@ -31,6 +30,7 @@
<script>
import regError from "./regError";
import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 起运
......@@ -44,7 +44,9 @@ export default {
departureObj: {},
// 校验
rules: {
arrivalTime: [{ required: true, message: "必填", trigger: "change" }],
dtEstArrivalTime: [
{ required: true, message: "必填", trigger: "change" },
],
},
// 弹窗配置
dialogVisible: false,
......@@ -54,22 +56,22 @@ export default {
},
watch: {
// 实际开船时间
"departureObj.actualTime"(val) {
this.compareDate(val, this.departureObj.arrivalTime);
"departureObj.dtRealShipTime"(val) {
this.compareDate(val, this.departureObj.dtEstArrivalTime);
},
// 预计到港时间
"departureObj.arrivalTime"(val) {
this.compareDate(this.departureObj.actualTime, val);
"departureObj.dtEstArrivalTime"(val) {
this.compareDate(this.departureObj.dtRealShipTime, val);
},
},
methods: {
// 时间比较
compareDate(actualTime, arrivalTime) {
compareDate(dtRealShipTime, dtEstArrivalTime) {
this.showMsg = false;
let date1 = null,
date2 = null;
if (actualTime) date1 = new Date(actualTime);
if (arrivalTime) date2 = new Date(arrivalTime);
if (dtRealShipTime) date1 = new Date(dtRealShipTime);
if (dtEstArrivalTime) date2 = new Date(dtEstArrivalTime);
if (date1 && date2 && date1 > date2) {
this.showMsg = true;
}
......@@ -79,10 +81,18 @@ export default {
this.dialogVisible = true;
},
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["departureForm"].validate((valid) => {
if (valid) {
alert("submit!");
shippingCreate({
...this.departureObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
}
});
},
......
......@@ -13,8 +13,8 @@
<el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
</el-form-item>
<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.errorend"></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" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="是否更新订单状态">
<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>
<div>
<el-form ref="shipForm" :model="shipObj" label-width="80px">
<el-form-item label="状态">
<el-radio-group v-model="shipObj.status">
<el-form ref="shipForm" :model="shipObj" :rules="rules" label-width="80px">
<el-form-item label="状态" prop="saExmtStatus">
<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-group>
</el-form-item>
<el-form-item label="配船时间" v-show="shipObj.status === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="shipObj.shipTime"></el-date-picker>
<el-form-item label="配船时间" v-show="shipObj.saExmtStatus === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="shipObj.shipTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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 { shipConfigure, serviceMsg } from "@/api/ecw/boxSea";
/**
* 配船
*/
export default {
name: "ship",
props: {
shipmentObj: Object,
},
data() {
return {
// 配船对象
......@@ -40,14 +44,26 @@ export default {
label: "已配",
},
],
// 校验
rules: {
saExmtStatus: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["shipForm"].validate((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 @@
<div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<el-form-item label="代理商AGENT">
<el-select v-model="subMaterialObj.agent" placeholder="请选择供应商">
</el-select>
<supplierSelect v-model="subMaterialObj.agentId" placeholder="请选择供应商" v-bind="$attrs" />
</el-form-item>
<el-form-item label="提单号M/BL NO." class="two-element">
<el-input v-model="subMaterialObj.billNo" placeholder="请输入提单号"></el-input>
<el-button type="primary">提单确认</el-button>
<el-input v-model="subMaterialObj.blMblNo" placeholder="请输入提单号"></el-input>
<el-button type="primary">提单确认件</el-button>
</el-form-item>
<el-form-item label="SO NO.">
<el-input v-model="subMaterialObj.soNo" placeholder="请输入SO NO"></el-input>
</el-form-item>
<el-form-item label="装货港">
<el-select v-model="subMaterialObj.loadingPort" placeholder="请选择装货港">
</el-select>
<dockSelect v-model="subMaterialObj.startPortId" placeholder="请选择装货港" v-bind="$attrs" />
</el-form-item>
<el-form-item label="目的港">
<el-select v-model="subMaterialObj.destination" placeholder="请选择目的港">
</el-select>
<dockSelect v-model="subMaterialObj.destPortId" placeholder="请选择目的港" v-bind="$attrs" />
</el-form-item>
<el-form-item label="船公司">
<el-select v-model="subMaterialObj.shippingCompany" placeholder="请选择船公司">
</el-select>
<supplierSelect v-model="subMaterialObj.shipCompanyId" :companyType="'9'" placeholder="请选择船公司" v-bind="$attrs" />
</el-form-item>
<el-form-item label="托运人">
<el-select v-model="subMaterialObj.shipper" placeholder="请选择托运人">
</el-select>
<userSelect v-model="subMaterialObj.shipperId" placeholder="请选择托运人" v-bind="$attrs" />
</el-form-item>
<el-form-item label="收货人">
<el-select v-model="subMaterialObj.consignee" placeholder="请选择收货人">
</el-select>
<userSelect v-model="subMaterialObj.consigneeId" placeholder="请选择收货人" v-bind="$attrs" />
</el-form-item>
<el-form-item label="通知方">
<el-select v-model="subMaterialObj.notifyParty" placeholder="请选择通知方">
</el-select>
<userSelect v-model="subMaterialObj.notifyingId" placeholder="请选择通知方" v-bind="$attrs" />
</el-form-item>
<el-form-item label="Mark & No.">
<el-input v-model="subMaterialObj.markNo"></el-input>
......@@ -42,47 +35,58 @@
<el-form-item label="包装数量与单位" class="two-element">
<el-input v-model="subMaterialObj.quantity" placeholder="请输入包装数量"></el-input>
<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-form-item>
<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 label="立方数(CBM)">
<el-input v-model="subMaterialObj.mesaurement" placeholder="请输入立方数(CBM)"></el-input>
</el-form-item>
<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 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 label="柜型">
111
{{getCabinetName(shipmentObj.cabinetId)}}
</el-form-item>
<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-group>
</el-form-item>
<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>
<el-row class="operate-button">
<el-button type="primary">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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 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 {
name: "subMaterial",
components: { supplierSelect, dockSelect, userSelect },
props: {
shipmentObj: Object,
},
data() {
return {
// 提单补料对象
......@@ -100,14 +104,36 @@ export default {
label: "电放",
},
],
// 单位
units: [],
};
},
created() {
// 获取单位
getUnitList().then((res) => {
const { data } = res;
this.units = data ?? [];
});
// 柜型
getCabinetPage(null).then((response) => {
this.cabinetList = response.data.list;
});
},
computed: {},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["subMaterialForm"].validate((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 {
cancel() {
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>
......
<template>
<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-select v-model="trailer.status" placeholder="请选择状态">
<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select v-model="trailerObj.tlContainerStatus" placeholder="请选择状态">
<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-form-item>
<el-form-item label="拖车公司">
<el-select v-model="trailer.trailerCompany" placeholder="请选择拖车公司">
<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<supplierSelect v-model="trailerObj.tlCompanyId" :companyType="'4'" placeholder="请选择拖车公司" v-bind="$attrs" />
</el-form-item>
<el-form-item label="拖车时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="trailer.trailerTime"></el-date-picker>
<el-form-item label="拖车时间" prop="tlTime">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="trailerObj.tlTime"></el-date-picker>
</el-form-item>
<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 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 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 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 label="封条">
<el-input v-model="trailer.seal" placeholder="请输入封条"></el-input>
<el-input v-model="trailerObj.tlStripSeal" placeholder="请输入封条"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button type="success" @click="onSubmit">提交</el-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 { trailer, serviceMsg } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
/**
* 拖车
*/
export default {
name: "trailer",
components: { supplierSelect },
data() {
return {
// 状态
status: [
{
value: "1",
label: "已派车,待提柜",
},
{
value: "2",
label: "已提柜,待还柜",
},
{
value: "3",
label: "已还柜",
},
],
// 拖车对象
trailer: {},
trailerObj: {},
// 校验
rules: {
time: [{ required: true, message: "必填", trigger: "change" }],
tlTime: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
methods: {
/** 提交 */
onSubmit() {
onSubmit(operateType) {
this.$refs["trailerForm"].validate((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 @@
</el-select>
</el-form-item>
<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 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>
......
......@@ -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>
<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>
</div>
</template>
......@@ -43,6 +43,10 @@ import clrDocumentWidget from "./nodePage/clrDocument.vue";
import arrivalWidget from "./nodePage/arrival.vue";
import cusClearanceWidget from "./nodePage/cusClearance.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 {
arrivalWidget,
cusClearanceWidget,
unloadingWidget,
settlementWidget,
},
props: {
shippingType: String,
boxId: String,
shipmentObj: Object,
},
data() {
return {
......@@ -101,9 +106,9 @@ export default {
type: "trailer",
},
{
unNode: true,
type: "agent",
title: "AGENT",
imgSrc: require("@/assets/images/shipping/agent-start.png"),
type: "agent",
},
],
[
......@@ -151,13 +156,13 @@ export default {
type: "clearanceDocument",
}, */
{
unNode: true,
type: "blCopy",
title: "提单Copy",
imgSrc: require("@/assets/images/shipping/tdcopy-start.png"),
type: "blCopy",
},
{
unNode: true,
type: "clrDocument",
imgSrc: require("@/assets/images/shipping/qg-start.png"),
title: "清关文件",
},
],
......@@ -193,8 +198,36 @@ export default {
},
// 当前组件
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: {
/** 关闭弹窗 */
closeDialog() {
......@@ -228,6 +261,11 @@ export default {
this.$set(this.dialogConfig, "dialogVisible", true);
},
},
watch: {
shipmentObj(val) {
this.shipmentObj = val;
},
},
};
</script>
......
......@@ -9,17 +9,23 @@
<!-- 信息 -->
<el-card style="margin-top: 15px">
<el-descriptions :column="5" border>
<el-descriptions-item label="自编号"></el-descriptions-item>
<el-descriptions-item label="运输方式"></el-descriptions-item>
<el-descriptions-item label="始发地"></el-descriptions-item>
<el-descriptions-item label="目的地"></el-descriptions-item>
<el-descriptions-item label="自编号">{{shipmentObj.selfNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" />
</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>
</el-card>
<!-- 海运流程图 -->
<div class="shipping-flow">
<shippingChart :boxId="boxId" />
<shippingChart :shipmentObj="shipmentObj" />
</div>
</el-col>
</el-row>
......@@ -28,6 +34,9 @@
<script>
import shippingChart from "../shippingSea/seaProcess";
import { getbox } from "@/api/ecw/box";
import { getWarehouseList } from "@/api/ecw/warehouse";
/**
* 海运操作主页面
*/
......@@ -37,7 +46,28 @@ export default {
shippingChart,
},
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>
......@@ -48,6 +78,12 @@ export default {
}
// 海运操作统一弹窗样式
.shipping-dialog {
.el-dialog__body {
height: calc(100% - 54px);
> :first-child {
height: 100%;
}
}
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div {
......@@ -57,7 +93,7 @@ export default {
.operate-button {
text-align: center;
}
.two-element{
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
......
......@@ -18,7 +18,7 @@
</el-form-item>
<el-form-item label="付款类型" v-if="form.advanceType == 6">
<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>
</el-form-item>
</el-form>
......
......@@ -7,7 +7,7 @@
<el-form-item label="订单号:"><div class="content">
{{orderDetails.orderNo}}
</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> <el-button @click="addCost">添加申请</el-button></el-form-item>
</el-form>
......@@ -30,7 +30,7 @@
</el-table-column>
<el-table-column label="付款类型">
<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>
</el-table-column>
<el-table-column label="备注">
......@@ -85,7 +85,9 @@ export default {
},
created() {
getOrder(this.orderId).then(r =>{
this.orderDetails = r.data
if(r.code === 0){
this.orderDetails = r.data
}
})
this.getOrderList()
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach( e =>{
......@@ -128,7 +130,7 @@ export default {
}
})
}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=>{
if(r.code === 0){
this.getOrderList();
......
......@@ -236,9 +236,9 @@ export default {
code: [{ required: true, message: "模板编码不能为空", trigger: "blur" }],
name: [{ 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" }],
apiTemplateIdEn: [{ required: true, message: "英文短信API的模板编号不能为空", trigger: "blur" }],
apiTemplateIdEn: [{ required: false, message: "英文短信API的模板编号不能为空", trigger: "blur" }],
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