|
|
@@ -17,12 +17,21 @@
|
|
|
<span v-if="auditStatus == 'B'" style="margin-right: 1em; color: red;">{{ levelName }}驳回:{{ auditMsg }}</span>
|
|
|
<el-button size="small" type="primary" @click="addEdit">新 建 </el-button>
|
|
|
<el-button type="success" size="small" style="margin-right: 8px" @click="CopyDocumentsfun">复制单据 </el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 8px"
|
|
|
+ :disabled="detailData.seeDisabled || showLock"
|
|
|
+ :loading="saveLoading"
|
|
|
+ @click="verificationSFT"
|
|
|
+ >一键校验收发通
|
|
|
+ </el-button>
|
|
|
<el-dropdown style="line-height: 0" v-if="importTemplate == 1">
|
|
|
<el-button size="small" type="warning" style="margin-right: 8px" :disabled="form.status > 0 || showLock || !form.id">
|
|
|
导入模板<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item v-for="item in imporiData" :key="item.id" @click.native="importData(item)">{{ item.name }} </el-dropdown-item>
|
|
|
+ <el-dropdown-item v-for="item in importData" :key="item.id" @click.native="doImportData(item)">{{ item.name }} </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
<el-dropdown v-if="ediData_SO.length > 0" style="line-height: 0">
|
|
|
@@ -513,6 +522,7 @@ import {
|
|
|
billsAdd,
|
|
|
deptGetDetailPol,
|
|
|
postSelectByUser,
|
|
|
+ verificationDetails,
|
|
|
documentVerification,
|
|
|
agreementpriceList,
|
|
|
createAndAdd,
|
|
|
@@ -997,11 +1007,14 @@ export default {
|
|
|
value: "cyCnName"
|
|
|
}
|
|
|
],
|
|
|
- imporiData: [
|
|
|
+ importData: [
|
|
|
{ id: 0, name: "导入 ONE 模板", key: "ONE", showCoverDlg: true, document: "importOne" },
|
|
|
{ id: 1, name: "导入 PIL 订舱模板", key: "PIL-BOOKING", showCoverDlg: true, document: "importPilBooking" },
|
|
|
{ id: 2, name: "导入 PIL 截单格式", key: "PIL-CUTDOC", showCoverDlg: true, document: "importPilCutOffOrders" },
|
|
|
- { id: 3, name: "导入海信提单", key: "HISENSE-BILL", showCoverDlg: false, document: "importHisenseBill" }
|
|
|
+ { id: 3, name: "导入海信提单", key: "HISENSE-BILL", showCoverDlg: false, document: "importHisenseBill" },
|
|
|
+ { id: 4, name: "导入报关总票", key: "CUSTOM-BILL", showCoverDlg: true, document: "importCustomBill" },
|
|
|
+ { id: 5, name: "导入托书(WORD)", key: "BILLOFLADING-WORD", showCoverDlg: true, document: "importBillOfLandingWord" },
|
|
|
+ { id: 6, name: "导入托书(PDF)", key: "BILLOFLADING-PDF", showCoverDlg: true, document: "importBillOfLandingPdf" }
|
|
|
],
|
|
|
currentImportDataRow: null,
|
|
|
excelForm: {},
|
|
|
@@ -1217,6 +1230,171 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ async verificationSFT() {
|
|
|
+ if (this.verifySymbolStatus == 1 && this.business == 1) {
|
|
|
+ let fldNames = "hshipperDetails,hconsigneeDetails,hnotifyDetails,mshipperDetails,mconsigneeDetails,mnotifyDetails".split(",");
|
|
|
+ let fldDescs = "发货人,收货人,通知人,MBL 发货人,MBL 收货人,MBL 通知人".split(",");
|
|
|
+ let msgsList = [];
|
|
|
+ fldNames.forEach((fld, idx) => {
|
|
|
+ const cfs = checkFullWidthSymbols(this.form.detail[fld]);
|
|
|
+ if (cfs.hasFullWidth) {
|
|
|
+ if (cfs.isResetText) {
|
|
|
+ this.$set(this.form.detail, fld, cfs.resetText);
|
|
|
+ }
|
|
|
+ msgsList.push(fldDescs[idx] + ": " + cfs.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // carrierCnName: "森罗商船青岛代表处"
|
|
|
+ // carrierEnName: "SM LINE CORPORATION QINGDAO OFFICE"
|
|
|
+ // carrierId: 10741
|
|
|
+ // carrierShortName: "森罗商船"
|
|
|
+ // 森罗商船 允许订舱备注输中文
|
|
|
+
|
|
|
+ fldNames = "marks,commodityDescr,mmarks,mcommodityDescr,forwarding,siRemarks".split(",");
|
|
|
+ fldDescs = "唛头,货描,M/BL 唛头,M/BL 货描,FORWARDING,SI 备注".split(",");
|
|
|
+ if (this.form.carrierId !== 10741) {
|
|
|
+ fldNames.push("bookingRemarks");
|
|
|
+ fldDescs.push("订舱备注");
|
|
|
+ }
|
|
|
+ fldNames.forEach((fld, idx) => {
|
|
|
+ const cfs = checkFullWidthSymbols(this.form[fld]);
|
|
|
+ if (cfs.isResetText === true) {
|
|
|
+ this.$set(this.form, fld, cfs.resetText);
|
|
|
+ }
|
|
|
+ if (cfs.hasFullWidth) {
|
|
|
+ msgsList.push(fldDescs[idx] + ": " + cfs.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ fldNames = "placeReceiptNamePrint,polNamePrint,podNamePrint,destinationNamePrint,placeDeliveryNamePrint,potNamePrint".split(",");
|
|
|
+ fldDescs = "收货地,装货港,卸货港,目的地,交货地,中转港".split(",");
|
|
|
+ fldNames.forEach((fld, idx) => {
|
|
|
+ const cfs = checkFullWidthSymbols(this.form[fld]);
|
|
|
+ if (cfs.hasFullWidth) {
|
|
|
+ if (cfs.isResetText) {
|
|
|
+ this.$set(this.form, fld, cfs.resetText);
|
|
|
+ }
|
|
|
+ msgsList.push(fldDescs[idx] + ": " + cfs.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if (msgsList.length > 0) {
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: `${msgsList.join("<br/><br/>")}`,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ msgsList = [];
|
|
|
+ if (!verifyEnglish(this.form.detail.hshipperDetails)) {
|
|
|
+ msgsList.push("发货人");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
|
|
|
+ msgsList.push("收货人");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
|
|
|
+ msgsList.push("通知人");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.detail.mshipperDetails)) {
|
|
|
+ msgsList.push("MBL 发货人");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
|
|
|
+ msgsList.push("MBL 收货人");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
|
|
|
+ msgsList.push("MBL 通知人");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.marks)) {
|
|
|
+ msgsList.push("唛头");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.commodityDescr)) {
|
|
|
+ msgsList.push("货描");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.mmarks)) {
|
|
|
+ msgsList.push("M/BL 唛头");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.mcommodityDescr)) {
|
|
|
+ msgsList.push("M/BL 货描");
|
|
|
+ }
|
|
|
+ if (!verifyEnglish(this.form.forwarding)) {
|
|
|
+ msgsList.push("FORWARDING");
|
|
|
+ }
|
|
|
+ if (msgsList.length > 0) {
|
|
|
+ // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
|
|
|
+ this.$message.error(`${msgsList.join(",")}存在非英文字符,如汉字等,请修正后再保存!`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.form.detail.hshipperDetails = this.getTextTirim(this.form.detail.hshipperDetails);
|
|
|
+ this.form.detail.hconsigneeDetails = this.getTextTirim(this.form.detail.hconsigneeDetails);
|
|
|
+ this.form.detail.hnotifyDetails = this.getTextTirim(this.form.detail.hnotifyDetails);
|
|
|
+ this.form.detail.marks = this.getTextTirim(this.form.detail.marks);
|
|
|
+ this.form.detail.commodityDescr = this.getTextTirim(this.form.detail.commodityDescr);
|
|
|
+ this.form.detail.mmarks = this.getTextTirim(this.form.detail.mmarks);
|
|
|
+ this.form.detail.mcommodityDescr = this.getTextTirim(this.form.detail.mcommodityDescr);
|
|
|
+ this.form.forwarding = this.getTextTirim(this.form.forwarding);
|
|
|
+ // 赋值 ETD 日期
|
|
|
+ this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + " 00:00:00" : null; // 单据日期
|
|
|
+ // 调用保存接口
|
|
|
+ await verificationDetails(this.form).then(async res => {
|
|
|
+ let rb = res.data;
|
|
|
+ if (rb.status == 0) {
|
|
|
+ return this.$message.success("收发通无需调整!");
|
|
|
+ }
|
|
|
+ if (rb.status == 2) {
|
|
|
+ return this.$message.warning(rb.remark);
|
|
|
+ }
|
|
|
+ // 3 用户选择保存,收发通校验
|
|
|
+ if (rb.status == 3) {
|
|
|
+ this.sftVerifyData = {
|
|
|
+ status: status,
|
|
|
+ remark: rb.remark, // .replaceAll("<br />", "\n"),
|
|
|
+ hshipperId: rb.hshipperId == 1,
|
|
|
+ hshipperDetails: rb.hshipperDetails,
|
|
|
+ hconsigneeId: rb.hconsigneeId == 1,
|
|
|
+ hconsigneeDetails: rb.hconsigneeDetails,
|
|
|
+ hnotifyId: rb.hnotifyId == 1,
|
|
|
+ hnotifyDetails: rb.hnotifyDetails,
|
|
|
+ reserve1: rb.reserve1 == "1",
|
|
|
+ marks: rb.marks,
|
|
|
+ reserve2: rb.reserve2 == "1",
|
|
|
+ commodityDescr: rb.commodityDescr
|
|
|
+ };
|
|
|
+ console.log(this.sftVerifyData);
|
|
|
+ if (this.sftVerifyData.hshipperId === true) {
|
|
|
+ this.form.detail.hshipperDetails = this.sftVerifyData.hshipperDetails;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.mshipperId === true) {
|
|
|
+ this.form.detail.mshipperDetails = this.sftVerifyData.mshipperDetails;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.hconsigneeId === true) {
|
|
|
+ this.form.detail.hconsigneeDetails = this.sftVerifyData.hconsigneeDetails;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.mconsigneeId === true) {
|
|
|
+ this.form.detail.mconsigneeDetails = this.sftVerifyData.mconsigneeDetails;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.hnotifyId === true) {
|
|
|
+ this.form.detail.hnotifyDetails = this.sftVerifyData.hnotifyDetails;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.mnotifyId === true) {
|
|
|
+ this.form.detail.mnotifyDetails = this.sftVerifyData.mnotifyDetails;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.reserve1 === true) {
|
|
|
+ this.form.marks = this.sftVerifyData.marks;
|
|
|
+ }
|
|
|
+ if (this.sftVerifyData.reserve2 === true) {
|
|
|
+ this.form.commodityDescr = this.sftVerifyData.commodityDescr;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.form.id) {
|
|
|
+ await this.billsSubmitfun();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
CopyDocumentsfun() {
|
|
|
if (!this.form.id) {
|
|
|
return this.$message.error("请保存数据");
|
|
|
@@ -1268,7 +1446,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//文档导入
|
|
|
- importData(row) {
|
|
|
+ doImportData(row) {
|
|
|
if (!row) return;
|
|
|
|
|
|
this.excelOption.column[0].action = `/api/blade-los/templateImport/${row.document}?billId=${this.form.id}`;
|
|
|
@@ -1332,11 +1510,11 @@ export default {
|
|
|
// this.form = res;
|
|
|
Object.keys(res).forEach(key => {
|
|
|
if (res[key]) {
|
|
|
- if (key != "detail") {
|
|
|
+ if (key !== "detail") {
|
|
|
// this.form[key] = res[key]
|
|
|
this.$set(this.form, key, res[key]);
|
|
|
}
|
|
|
- if (key == "detail") {
|
|
|
+ if (key === "detail") {
|
|
|
Object.keys(res.detail).forEach(key => {
|
|
|
if (res.detail[key]) {
|
|
|
// this.form.detail[key] = res.detail[key]
|
|
|
@@ -3405,10 +3583,10 @@ export default {
|
|
|
// console.log("bills.billsDetailfun", id, status);
|
|
|
const res = await billsDetail(id);
|
|
|
|
|
|
- if(status==="containersList"){
|
|
|
+ if (status === "containersList") {
|
|
|
this.$set(this.form, "containersList", res.data.data.containersList);
|
|
|
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
// this.form = res.data.data;
|