|
|
@@ -330,15 +330,14 @@ import { getBcorpsattnList } from "@/api/iosBasicData/bcorpsattn";
|
|
|
import { getWorkDicts } from "@/api/system/dictbiz";
|
|
|
import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
|
|
|
import {
|
|
|
- billsBeforeApplyBills, billsCheckBills,
|
|
|
- billsCopyBills,
|
|
|
+ billsCheckBills, billsCopyBills,
|
|
|
billsDetail,
|
|
|
billsGetBillNo, removeHblNo,
|
|
|
billsListAll, billsRevokeCheckBills, editypesSendingEdi,
|
|
|
billsSubmit,
|
|
|
billsAdd,
|
|
|
deptGetDetailPol, postSelectByUser, documentVerification,
|
|
|
- agreementpriceList, createAndAdd,
|
|
|
+ agreementpriceList, createAndAdd
|
|
|
} from '@/api/iosBasicData/bills'
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
@@ -897,9 +896,6 @@ export default {
|
|
|
this.editypesListfun()
|
|
|
// 获取所属团队数据
|
|
|
this.postSelectByUserfun()
|
|
|
-
|
|
|
- // console.log("sysitemData", localStorage.getItem('sysitemData'))
|
|
|
- // console.log("created", "form", this.form)
|
|
|
},
|
|
|
methods: {
|
|
|
applyUnlock() {
|
|
|
@@ -1236,30 +1232,6 @@ export default {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- if (checkFullWidthSymbols(this.form.mmarks).hasFullWidth) {
|
|
|
- let msg = []
|
|
|
- for (let item of checkFullWidthSymbols(this.form.mmarks).positions) {
|
|
|
- msg.push(`第${item.row}行的"${item.symbol}"`)
|
|
|
- }
|
|
|
- this.$message({
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- message: `M/BL 唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
- if (checkFullWidthSymbols(this.form.mcommodityDescr).hasFullWidth) {
|
|
|
- let msg = []
|
|
|
- for (let item of checkFullWidthSymbols(this.form.mcommodityDescr).positions) {
|
|
|
- msg.push(`第${item.row}行的"${item.symbol}"`)
|
|
|
- }
|
|
|
- this.$message({
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- message: `M/BL 货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,请确认`,
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
|
|
|
let msg = []
|
|
|
for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
|
|
|
@@ -1297,12 +1269,6 @@ export default {
|
|
|
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')
|
|
|
}
|
|
|
@@ -1371,7 +1337,6 @@ export default {
|
|
|
},
|
|
|
// 获取用户管理数据
|
|
|
userGetListfun(account = undefined, type = false,) {
|
|
|
- console.log("userGetListfun", "account", account, "type", type)
|
|
|
userGetList(1, 10, { account }, this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
|
|
|
this.columnforfun('operatorName').dicData = res.data.data.records
|
|
|
if (type) {
|
|
|
@@ -1410,34 +1375,6 @@ export default {
|
|
|
getLazylistfun() {
|
|
|
getDeptTree().then(res => {
|
|
|
this.columnforfun('accDeptName').dicData = res.data.data
|
|
|
- // console.log("accDept list", res.data.data)
|
|
|
- if(!this.form.id){
|
|
|
- let rootDept = null
|
|
|
- function traverseDFS(node, id) {
|
|
|
- if (node == null) return null;
|
|
|
- if(node.id == id){
|
|
|
- return node;
|
|
|
- }
|
|
|
- if (node.children) {
|
|
|
- node.children.forEach(child => {
|
|
|
- return traverseDFS(child, id);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- res.data.data.forEach(d=>{
|
|
|
- var dept = traverseDFS(d, this.form.accDept);
|
|
|
- if(dept){
|
|
|
- rootDept = dept;
|
|
|
- }
|
|
|
- })
|
|
|
- console.log("rootDept", rootDept)
|
|
|
- if(rootDept && Array.isArray(rootDept.children) && rootDept.children.length>0){
|
|
|
- rootDept = rootDept.children[0]
|
|
|
- this.$set(this.form, "accDept", rootDept.value)
|
|
|
- this.$set(this.form, "accDeptName", rootDept.title)
|
|
|
- }
|
|
|
- }
|
|
|
})
|
|
|
},
|
|
|
// 获取客户名称数据 往来单位数据
|
|
|
@@ -2041,157 +1978,19 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
this.pageLoading = true
|
|
|
- billsBeforeApplyBills({
|
|
|
+ billsCheckBills({
|
|
|
id: this.form.id,
|
|
|
- }).then(d => {
|
|
|
- console.log(d)
|
|
|
- if(d.status==200) {
|
|
|
- let r = d.data.data
|
|
|
- if (r.error === true) {
|
|
|
- // 显示错误后退出
|
|
|
- this.$alert(r.errorMessage.replaceAll("\n", "<br>"),{
|
|
|
- cancelButtonText: "取消",
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- this.pageLoading = false
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
- // 显示提示信息
|
|
|
- if (r.info === true) {
|
|
|
- alert(r.infoMessage);
|
|
|
- }
|
|
|
- // 显示确认信息
|
|
|
- if (r.confirm) {
|
|
|
- this.$confirm(r.confirmMessage + '<br />请您确认是否继续!', '确认',{
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- if(r.need_mail){
|
|
|
- var title = '请输入情况说明';
|
|
|
- if(r.ProfitDescr){
|
|
|
- title += "<br />" + r.ProfitDescr.replaceAll('\n', '<br />');
|
|
|
- }
|
|
|
- this.$prompt(title, '情况说明',{
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- inputType: "textArea",
|
|
|
- type: "warning",
|
|
|
- inputErrorMessage: '请输入情况说明!',
|
|
|
- inputValidator: (value) => {
|
|
|
- console.log('请输入情况说明.inputValidator', value)
|
|
|
- if (!value) {
|
|
|
- return '请输入情况说明!';
|
|
|
- }
|
|
|
- },
|
|
|
- }).then((value) => {
|
|
|
- console.log('请输入情况说明.value', value)
|
|
|
- billsCheckBills({
|
|
|
- reserve1: value.value,
|
|
|
- id: this.form.id,
|
|
|
- url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
|
|
|
- pageStatus: "this.$store.getters.approvalDetails",
|
|
|
- pageLabel: "审批详情(F)",
|
|
|
- }).then(res => {
|
|
|
- this.pageLoading = false
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- // 详情
|
|
|
- this.billsDetailfun(this.form.id)
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- }else {
|
|
|
- billsCheckBills({
|
|
|
- id: this.form.id,
|
|
|
- url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
|
|
|
- pageStatus: "this.$store.getters.approvalDetails",
|
|
|
- pageLabel: "审批详情(F)",
|
|
|
- }).then(res => {
|
|
|
- this.pageLoading = false
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- // 详情
|
|
|
- this.billsDetailfun(this.form.id)
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- }
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- if(r.need_mail){
|
|
|
- var title = '请输入情况说明';
|
|
|
- if(r.ProfitDescr){
|
|
|
- title += "<br />" + r.ProfitDescr.replaceAll('\n', '<br />');
|
|
|
- }
|
|
|
- this.$prompt(title, '情况说明', {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- inputType: "textArea",
|
|
|
- type: "warning",
|
|
|
- inputErrorMessage: '请输入情况说明!',
|
|
|
- inputValidator: (value) => {
|
|
|
- console.log('请输入情况说明.inputValidator', value)
|
|
|
- if (!value) {
|
|
|
- return '请输入情况说明!';
|
|
|
- }
|
|
|
- },
|
|
|
- }).then((value) => {
|
|
|
- console.log('请输入情况说明.value', value)
|
|
|
- billsCheckBills({
|
|
|
- reserve1: value.value,
|
|
|
- id: this.form.id,
|
|
|
- url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
|
|
|
- pageStatus: "this.$store.getters.approvalDetails",
|
|
|
- pageLabel: "审批详情(F)",
|
|
|
- }).then(res => {
|
|
|
- this.pageLoading = false
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- // 详情
|
|
|
- this.billsDetailfun(this.form.id)
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- }else {
|
|
|
- billsCheckBills({
|
|
|
- id: this.form.id,
|
|
|
- url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
|
|
|
- pageStatus: "this.$store.getters.approvalDetails",
|
|
|
- pageLabel: "审批详情(F)",
|
|
|
- }).then(res => {
|
|
|
- this.pageLoading = false
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- // 详情
|
|
|
- this.billsDetailfun(this.form.id)
|
|
|
- }).catch(() => {
|
|
|
- this.pageLoading = false
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.pageLoading = false
|
|
|
- }
|
|
|
+ url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
|
|
|
+ pageStatus: "this.$store.getters.approvalDetails",
|
|
|
+ pageLabel: "审批详情(F)",
|
|
|
+ }).then(res => {
|
|
|
+ this.pageLoading = false
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ // 详情
|
|
|
+ this.billsDetailfun(this.form.id)
|
|
|
}).catch(() => {
|
|
|
this.pageLoading = false
|
|
|
})
|
|
|
@@ -2483,8 +2282,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- fldNames = 'marks,commodityDescr,mmarks,mcommodityDescr,forwarding,siRemarks,bookingRemarks'.split(",");
|
|
|
- fldDescs = '唛头,货描,M/BL 唛头,M/BL 货描,FORWARDING,SI 备注,订舱备注'.split(",");
|
|
|
+ fldNames = 'marks,commodityDescr,forwarding,siRemarks,bookingRemarks'.split(",");
|
|
|
+ fldDescs = '唛头,货描,FORWARDING,SI 备注,订舱备注'.split(",");
|
|
|
fldNames.forEach((fld, idx) => {
|
|
|
const cfs = checkFullWidthSymbols(this.form[fld]);
|
|
|
console.log(fldDescs[idx], cfs)
|
|
|
@@ -2544,12 +2343,6 @@ export default {
|
|
|
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')
|
|
|
}
|
|
|
@@ -2564,8 +2357,6 @@ export default {
|
|
|
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 // 单据日期
|