|
|
@@ -506,7 +506,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col span="12">
|
|
|
+ <el-col span="8">
|
|
|
<el-form-item
|
|
|
label="ETD"
|
|
|
prop="etd"
|
|
|
@@ -532,7 +532,22 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col span="12">
|
|
|
+ <el-col span="8">
|
|
|
+ <el-form-item label="ATD" prop="actualEtd">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.actualEtd"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择 ATD"
|
|
|
+ :disabled="true"
|
|
|
+ size="small"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ style="width: 100%;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col span="8">
|
|
|
<el-form-item label="订舱日期" prop="bookingDate">
|
|
|
<el-date-picker
|
|
|
v-model="form.bookingDate"
|
|
|
@@ -2704,6 +2719,126 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
if (name == "提交订舱") {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
|
|
|
+ return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
|
|
|
+ }
|
|
|
+ if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
|
|
|
+ return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
|
|
|
+ }
|
|
|
+ if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
|
|
|
+ return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
|
|
|
+ }
|
|
|
+ if (!this.form.preContainersList.length) {
|
|
|
+ return this.$message.error("集装箱明细不能为空");
|
|
|
+ }
|
|
|
+ let htmlText = [];
|
|
|
+ for (let item of this.form.preContainersList) {
|
|
|
+ if (!item.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
+ if (!item.cntrTypeCode || !item.quantity) {
|
|
|
+ this.$refs.crud.rowCell(item, item.$index);
|
|
|
+ return this.$message.error("请完善明细信息");
|
|
|
+ }
|
|
|
+ htmlText.push(item.cntrTypeCode + "*" + item.quantity);
|
|
|
+ }
|
|
|
+ for (let item of this.form.containersList) {
|
|
|
+ if (!item.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
+ let textList = [];
|
|
|
+ if (!item.cntrTypeCode) {
|
|
|
+ textList.push("箱型");
|
|
|
+ }
|
|
|
+ if (!item.cntrNo) {
|
|
|
+ textList.push("箱号");
|
|
|
+ }
|
|
|
+ if (!item.sealNo) {
|
|
|
+ textList.push("封号");
|
|
|
+ }
|
|
|
+ if (!item.quantity || Number(item.quantity) == 0) {
|
|
|
+ textList.push("件数");
|
|
|
+ }
|
|
|
+ if (!item.grossWeight || Number(item.grossWeight) == 0) {
|
|
|
+ textList.push("毛重");
|
|
|
+ }
|
|
|
+ if (!item.measurement || Number(item.measurement) == 0) {
|
|
|
+ textList.push("尺码/体积");
|
|
|
+ }
|
|
|
+ if (textList.length) {
|
|
|
+ return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let qtySUM = 0;
|
|
|
+ let gwtSUM = 0;
|
|
|
+ let mrtSUM = 0;
|
|
|
+ for (let item of this.form.containersList) {
|
|
|
+ qtySUM += Number(item.quantity ? item.quantity : 0);
|
|
|
+ gwtSUM += Number(item.grossWeight ? item.grossWeight : 0);
|
|
|
+ mrtSUM += Number(item.measurement ? item.measurement : 0);
|
|
|
+ }
|
|
|
+ if (qtySUM != this.form.quantity || gwtSUM != this.form.grossWeight || mrtSUM != this.form.measurement) {
|
|
|
+ this.$alert(
|
|
|
+ `<table border="1" align="center" style="width:100%;color:#F56C6C">
|
|
|
+ <tr>
|
|
|
+ <th align="center">合计名称</th>
|
|
|
+ <th align="center">件数</th>
|
|
|
+ <th align="center">毛重</th>
|
|
|
+ <th align="center">尺码</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td align="center">提单合计</td>
|
|
|
+ <td align="center">${Number(this.form.quantity)}</td>
|
|
|
+ <td align="center">${Number(this.form.grossWeight)}</td>
|
|
|
+ <td align="center">${Number(this.form.measurement)}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td align="center">分箱合计</td>
|
|
|
+ <td align="center">${qtySUM}</td>
|
|
|
+ <td align="center">${gwtSUM}</td>
|
|
|
+ <td align="center">${mrtSUM}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <span style="color:#F56C6C">校验不相等,请检查!</span>`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ }
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ submit(this.form).then(res => {
|
|
|
+ this.$confirm(`预定集装箱:${htmlText.join(",")}<br/>是否提交订舱?`, {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.form.businessType = "KHTS";
|
|
|
+ this.form.billNoFormat = "KHTS";
|
|
|
+ this.form.businessTypeCode = "KHTS";
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ submitCustomerBooking(this.form)
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
// if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
|
|
|
// let msg = [];
|
|
|
// for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
|
|
|
@@ -2764,83 +2899,6 @@ export default {
|
|
|
// });
|
|
|
// return;
|
|
|
// }
|
|
|
- if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
|
|
|
- return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
|
|
|
- }
|
|
|
- if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
|
|
|
- return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
|
|
|
- }
|
|
|
- if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
|
|
|
- return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
|
|
|
- }
|
|
|
-
|
|
|
- if (!this.form.preContainersList.length) {
|
|
|
- return this.$message.error("集装箱明细不能为空");
|
|
|
- }
|
|
|
- let htmlText = [];
|
|
|
- for (let item of this.form.preContainersList) {
|
|
|
- if (!item.id) {
|
|
|
- return this.$message.error("请保存数据");
|
|
|
- }
|
|
|
- if (!item.cntrTypeCode || !item.quantity) {
|
|
|
- this.$refs.crud.rowCell(item, item.$index);
|
|
|
- return this.$message.error("请完善明细信息");
|
|
|
- }
|
|
|
- htmlText.push(item.cntrTypeCode + "*" + item.quantity);
|
|
|
- }
|
|
|
- for (let item of this.form.containersList) {
|
|
|
- if (!item.id) {
|
|
|
- return this.$message.error("请保存数据");
|
|
|
- }
|
|
|
- let textList = [];
|
|
|
- if (!item.cntrTypeCode) {
|
|
|
- textList.push("箱型");
|
|
|
- }
|
|
|
- if (!item.cntrNo) {
|
|
|
- textList.push("箱号");
|
|
|
- }
|
|
|
- if (!item.sealNo) {
|
|
|
- textList.push("封号");
|
|
|
- }
|
|
|
- if (!item.quantity || Number(item.quantity) == 0) {
|
|
|
- textList.push("件数");
|
|
|
- }
|
|
|
- if (!item.grossWeight || Number(item.grossWeight) == 0) {
|
|
|
- textList.push("毛重");
|
|
|
- }
|
|
|
- if (!item.measurement || Number(item.measurement) == 0) {
|
|
|
- textList.push("尺码/体积");
|
|
|
- }
|
|
|
- if (textList.length) {
|
|
|
- return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
|
|
|
- }
|
|
|
- }
|
|
|
- submit(this.form).then(res => {
|
|
|
- this.$confirm(`预定集装箱:${htmlText.join(",")}<br/>是否提交订舱?`, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.form.businessType = "KHTS";
|
|
|
- this.form.billNoFormat = "KHTS";
|
|
|
- this.form.businessTypeCode = "KHTS";
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "加载中",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(255,255,255,0.7)"
|
|
|
- });
|
|
|
- submitCustomerBooking(this.form)
|
|
|
- .then(res => {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.getDetails(this.form.id);
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- loading.close();
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
}
|
|
|
if (name == "撤销订舱") {
|
|
|
this.$confirm("是否撤销订舱?", {
|
|
|
@@ -2866,7 +2924,7 @@ export default {
|
|
|
}
|
|
|
if (name == "提单修改") {
|
|
|
if (this.overTime) {
|
|
|
- return this.$message.error("已超过截单日期,请联系客服!");;
|
|
|
+ return this.$message.error("已超过截单日期,请联系客服!");
|
|
|
}
|
|
|
this.flxDisabled = false;
|
|
|
this.isSaveBtn = false;
|
|
|
@@ -2874,55 +2932,99 @@ export default {
|
|
|
this.optionForm.disabled = false;
|
|
|
}
|
|
|
if (name == "提单确认") {
|
|
|
- if (this.form.containersList.length == 0) {
|
|
|
- return this.$message.error("配箱信息不能为空");
|
|
|
- }
|
|
|
- for (let item of this.form.containersList) {
|
|
|
- let textList = [];
|
|
|
- if (!item.cntrTypeCode) {
|
|
|
- textList.push("箱型");
|
|
|
- }
|
|
|
- if (!item.cntrNo) {
|
|
|
- textList.push("箱号");
|
|
|
- }
|
|
|
- if (!item.sealNo) {
|
|
|
- textList.push("封号");
|
|
|
- }
|
|
|
- if (!item.quantity || Number(item.quantity) == 0) {
|
|
|
- textList.push("件数");
|
|
|
- }
|
|
|
- if (!item.grossWeight || Number(item.grossWeight) == 0) {
|
|
|
- textList.push("毛重");
|
|
|
- }
|
|
|
- if (!item.measurement || Number(item.measurement) == 0) {
|
|
|
- textList.push("尺码/体积");
|
|
|
- }
|
|
|
- if (textList.length) {
|
|
|
- return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
|
|
|
- }
|
|
|
- }
|
|
|
- submit(this.form).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.$confirm("是否提单确认?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "加载中",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(255,255,255,0.7)"
|
|
|
- });
|
|
|
- submitConfirm(this.form)
|
|
|
- .then(res => {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.getDetails(this.form.id);
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- loading.close();
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.containersList.length == 0) {
|
|
|
+ return this.$message.error("配箱信息不能为空");
|
|
|
+ }
|
|
|
+ for (let item of this.form.containersList) {
|
|
|
+ let textList = [];
|
|
|
+ if (!item.cntrTypeCode) {
|
|
|
+ textList.push("箱型");
|
|
|
+ }
|
|
|
+ if (!item.cntrNo) {
|
|
|
+ textList.push("箱号");
|
|
|
+ }
|
|
|
+ if (!item.sealNo) {
|
|
|
+ textList.push("封号");
|
|
|
+ }
|
|
|
+ if (!item.quantity || Number(item.quantity) == 0) {
|
|
|
+ textList.push("件数");
|
|
|
+ }
|
|
|
+ if (!item.grossWeight || Number(item.grossWeight) == 0) {
|
|
|
+ textList.push("毛重");
|
|
|
+ }
|
|
|
+ if (!item.measurement || Number(item.measurement) == 0) {
|
|
|
+ textList.push("尺码/体积");
|
|
|
+ }
|
|
|
+ if (textList.length) {
|
|
|
+ return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let qtySUM = 0;
|
|
|
+ let gwtSUM = 0;
|
|
|
+ let mrtSUM = 0;
|
|
|
+ for (let item of this.form.containersList) {
|
|
|
+ qtySUM += Number(item.quantity ? item.quantity : 0);
|
|
|
+ gwtSUM += Number(item.grossWeight ? item.grossWeight : 0);
|
|
|
+ mrtSUM += Number(item.measurement ? item.measurement : 0);
|
|
|
+ }
|
|
|
+ if (qtySUM != this.form.quantity || gwtSUM != this.form.grossWeight || mrtSUM != this.form.measurement) {
|
|
|
+ this.$alert(
|
|
|
+ `<table border="1" align="center" style="width:100%;color:#F56C6C">
|
|
|
+ <tr>
|
|
|
+ <th align="center">合计名称</th>
|
|
|
+ <th align="center">件数</th>
|
|
|
+ <th align="center">毛重</th>
|
|
|
+ <th align="center">尺码</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td align="center">提单合计</td>
|
|
|
+ <td align="center">${Number(this.form.quantity)}</td>
|
|
|
+ <td align="center">${Number(this.form.grossWeight)}</td>
|
|
|
+ <td align="center">${Number(this.form.measurement)}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td align="center">分箱合计</td>
|
|
|
+ <td align="center">${qtySUM}</td>
|
|
|
+ <td align="center">${gwtSUM}</td>
|
|
|
+ <td align="center">${mrtSUM}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <span style="color:#F56C6C">校验不相等,请检查!</span>`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ }
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ submit(this.form).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.$confirm("是否提单确认?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ submitConfirm(this.form)
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
if (name == "模板保存") {
|
|
|
@@ -2983,8 +3085,8 @@ export default {
|
|
|
this.$refs.importTemp.openDialog();
|
|
|
}
|
|
|
if (name == "退舱") {
|
|
|
- if(this.form.hblno){
|
|
|
- return this.$message.error("已出号,退仓请联系客服!");
|
|
|
+ if (this.form.hblno) {
|
|
|
+ return this.$message.error("已出号,退仓请联系客服!");
|
|
|
}
|
|
|
this.$confirm("是否退舱?", {
|
|
|
confirmButtonText: "确定",
|