|
|
@@ -1056,6 +1056,7 @@ import _ from "lodash";
|
|
|
import { Header } from "element-ui";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
+import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
@@ -1659,11 +1660,11 @@ export default {
|
|
|
}
|
|
|
deptGetDetailPol(this.saberUserInfo.dept_pid.split(",")[0]).then(res => {
|
|
|
// 装货港
|
|
|
- this.form.polCnName = res.data.data.polCnName
|
|
|
- this.form.polEnName = res.data.data.polEnName
|
|
|
- this.form.polId = res.data.data.polId
|
|
|
- this.form.polCode = res.data.data.polCode
|
|
|
- this.form.polNamePrint = res.data.data.polEnName
|
|
|
+ this.form.polCnName = res.data.data.polCnName;
|
|
|
+ this.form.polEnName = res.data.data.polEnName;
|
|
|
+ this.form.polId = res.data.data.polId;
|
|
|
+ this.form.polCode = res.data.data.polCode;
|
|
|
+ this.form.polNamePrint = res.data.data.polEnName;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -2383,6 +2384,66 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
if (name == "提交订舱") {
|
|
|
+ if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.marks).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (!this.form.preContainersList.length) {
|
|
|
return this.$message.error("集装箱明细不能为空");
|
|
|
}
|
|
|
@@ -2484,25 +2545,25 @@ export default {
|
|
|
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();
|
|
|
+ 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();
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
if (name == "模板保存") {
|
|
|
@@ -2597,6 +2658,66 @@ export default {
|
|
|
if (!this.form.detail.hnotifyDetails) {
|
|
|
return this.$message.error("请输入通知人提单描述");
|
|
|
}
|
|
|
+ if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.marks).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
|
|
|
+ let msg = [];
|
|
|
+ for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
|
|
|
+ msg.push(`第${item.row}行的"${item.symbol}"`);
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
for (let row of this.form.preContainersList) {
|
|
|
if (!row.cntrTypeCode || !row.quantity) {
|
|
|
this.$refs.crud.rowCell(row, row.$index);
|