Commit 30c229b1 authored by huhaiqing's avatar huhaiqing

海运操作接口联调

parent a7d59736
...@@ -77,6 +77,111 @@ export function billCreate(data) { ...@@ -77,6 +77,111 @@ export function billCreate(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 **********************************/ /***************************** 预装 start **********************************/
/** /**
......
...@@ -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();
});
});
} }
}); });
}, },
......
...@@ -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> <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();
});
});
} }
}); });
}, },
......
...@@ -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">
......
...@@ -2,22 +2,23 @@ ...@@ -2,22 +2,23 @@
<div> <div>
<el-form ref="settlementForm" :model="settlementObj" label-width="80px"> <el-form ref="settlementForm" :model="settlementObj" label-width="80px">
<el-form-item label="可结算"> <el-form-item label="可结算">
<el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.billable"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.slSettlementTime" 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="settlementObj.settled"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="settlementObj.slSettledTime" 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 { settlementCreate, serviceMsg } from "@/api/ecw/boxSea";
/** /**
* 结算 * 结算
*/ */
...@@ -31,10 +32,18 @@ export default { ...@@ -31,10 +32,18 @@ export default {
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit() { onSubmit(operateType) {
this.$refs["settlementForm"].validate((valid) => { this.$refs["settlementForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); settlementCreate({
...this.settlementObj,
shipmentId: this.$attrs.shipmentObj.id,
operateType,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
} }
}); });
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="配船时间" v-show="shipObj.saExmtStatus === '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>
......
...@@ -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>
......
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