|
@@ -15,7 +15,9 @@
|
|
|
<!-- <div>-->
|
|
|
|
|
|
<!-- </div>-->
|
|
|
- <el-button size="small" type="primary" style="margin-right: 8px" @click="addEdit">新 建
|
|
|
+ <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-dropdown style="line-height: 0" v-if="saberTenantId == '409341'">
|
|
|
<el-button size="small" type="warning" style="margin-right: 8px"
|
|
@@ -330,7 +332,7 @@ import businessReports from "@/views/iosBasicData/SeafreightExportF/bills/assemb
|
|
|
import { popupReminder } from "@/util/messageReminder";
|
|
|
import editypes from "@/views/iosBasicData/editypes/index.vue";
|
|
|
import { editypesList } from "@/api/iosBasicData/editypes";
|
|
|
-import { verifyEnglish } from "@/util/date";
|
|
|
+import { verifyEnglish, verifySymbol } from "@/util/date";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import { selectListLos } from "@/api/approval/processConfig";
|
|
|
import _ from "lodash";
|
|
@@ -379,7 +381,7 @@ export default {
|
|
|
operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
|
|
|
operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
|
|
|
businessType: 'SE', // 业务类型 默认 海运出口
|
|
|
- businessTypes:'海运',
|
|
|
+ businessTypes: '海运',
|
|
|
billType: 'DD', // 单据类型 默认 直单
|
|
|
accDeptName: '',// 核算部门 默认登录人的部门
|
|
|
issueType: "ORI", // 签单方式 默认 正本提单
|
|
@@ -418,7 +420,7 @@ export default {
|
|
|
operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
|
|
|
operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // OP 默认登录人
|
|
|
businessType: 'SE', // 业务类型 默认 海运出口
|
|
|
- businessTypes:'海运',
|
|
|
+ businessTypes: '海运',
|
|
|
billType: 'DD', // 单据类型 默认 直单
|
|
|
accDeptName: '',// 核算部门 默认登录人的部门
|
|
|
issueType: "ORI", // 签单方式 默认 正本提单
|
|
@@ -893,6 +895,44 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ CopyDocumentsfun() {
|
|
|
+ if (!this.form.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: '复制单据',
|
|
|
+ width: '300px',
|
|
|
+ menuPosition: 'right',
|
|
|
+ data: { checkbox: '复制费用,复制箱型箱量' },
|
|
|
+ option: {
|
|
|
+ submitText: '确认',
|
|
|
+ emptyText: '取消',
|
|
|
+ span: 24,
|
|
|
+ column: [{
|
|
|
+ label: "复制类型",
|
|
|
+ prop: "checkbox",
|
|
|
+ type: 'checkbox',
|
|
|
+ dicData: [{
|
|
|
+ label: '复制费用',
|
|
|
+ value: '复制费用',
|
|
|
+ }, {
|
|
|
+ label: '复制箱型箱量',
|
|
|
+ value: '复制箱型箱量'
|
|
|
+ }],
|
|
|
+ dataType: 'string',
|
|
|
+ span: 24,
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ beforeClose: (done) => {
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ callback: (res) => {
|
|
|
+ res.done()
|
|
|
+ this.billsCopyBillsfun(this.form.id,res.data.checkbox)
|
|
|
+ res.close()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//文档导入
|
|
|
importData(row) {
|
|
|
if (row == 0) {
|
|
@@ -952,13 +992,13 @@ export default {
|
|
|
editypesSendingEdifun(row) {
|
|
|
row.billId = this.form.id
|
|
|
let msgsList = []
|
|
|
- if (!verifyEnglish(this.form.hshipperDetails)) {
|
|
|
+ if (!verifyEnglish(this.form.detail.hshipperDetails)) {
|
|
|
msgsList.push('发货人')
|
|
|
}
|
|
|
- if (!verifyEnglish(this.form.hconsigneeDetails)) {
|
|
|
+ if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
|
|
|
msgsList.push('收货人')
|
|
|
}
|
|
|
- if (!verifyEnglish(this.form.hnotifyDetails)) {
|
|
|
+ if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
|
|
|
msgsList.push('通知人')
|
|
|
}
|
|
|
if (!verifyEnglish(this.form.marks)) {
|
|
@@ -971,7 +1011,29 @@ export default {
|
|
|
msgsList.push('FORWARDING')
|
|
|
}
|
|
|
if (msgsList.length > 0) {
|
|
|
- this.$message.error(`请正确输入${msgsList.join(",")}的英文和英文符号`);
|
|
|
+ this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!verifySymbol(this.form.detail.hshipperDetails)) {
|
|
|
+ msgsList.push('发货人')
|
|
|
+ }
|
|
|
+ if (!verifySymbol(this.form.detail.hconsigneeDetails)) {
|
|
|
+ msgsList.push('收货人')
|
|
|
+ }
|
|
|
+ if (!verifySymbol(this.form.detail.hnotifyDetails)) {
|
|
|
+ msgsList.push('通知人')
|
|
|
+ }
|
|
|
+ if (!verifySymbol(this.form.marks)) {
|
|
|
+ msgsList.push('唛头')
|
|
|
+ }
|
|
|
+ if (!verifySymbol(this.form.commodityDescr)) {
|
|
|
+ msgsList.push('货描')
|
|
|
+ }
|
|
|
+ if (!verifySymbol(this.form.forwarding)) {
|
|
|
+ msgsList.push('FORWARDING')
|
|
|
+ }
|
|
|
+ if (msgsList.length > 0) {
|
|
|
+ this.$message.error(`请正确输入${msgsList.join(",")}的英文符号`);
|
|
|
return;
|
|
|
}
|
|
|
this.saveLoading = true
|
|
@@ -984,7 +1046,7 @@ export default {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
- message:text,
|
|
|
+ message: text,
|
|
|
// message: `<p>${text.slice(text.indexOf('非空'), text.indexOf('特殊字符'))}</p><p>${text.slice(text.indexOf('特殊字符'), text.indexOf('长度超长'))}</p><p>${text.slice(text.indexOf('长度超长'), text.indexOf('其他'))}</p><p>${text.slice(text.indexOf('其他'))}</p>`,
|
|
|
duration: 5000
|
|
|
});
|
|
@@ -1893,8 +1955,21 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 复制单据接口
|
|
|
- billsCopyBillsfun(id) {
|
|
|
+ billsCopyBillsfun(id,type) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
billsCopyBills({ id }).then(res => {
|
|
|
+ if (type == '复制费用'||type == '') {
|
|
|
+ res.data.data.preContainersList=[]
|
|
|
+ }
|
|
|
+ if (type == '复制箱型箱量'||type == '') {
|
|
|
+ res.data.data.feeCenterListD=[]
|
|
|
+ res.data.data.feeCenterListC=[]
|
|
|
+ }
|
|
|
this.form = res.data.data;
|
|
|
this.pageLoading = false
|
|
|
// this.searchMontage() // 下拉 中文名称和编号拼接
|
|
@@ -1956,6 +2031,8 @@ export default {
|
|
|
for (let item of this.form.filesList) {
|
|
|
this.$set(item, 'edit', false)
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
})
|
|
|
},
|
|
|
// 详情接口
|