diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index 037807b0..f0a2c3b0 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -2725,35 +2725,32 @@ methods: { return true; } this.categorySender = data.category; - let msg = ''; - let color = ''; - if (this.categorySender === '2' ) { - msg = `该公司为特区货物报关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categorySender === '3') { - msg = `该公司报关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categorySender === '4') { - msg = `该公司报关有问题无法报关,禁止走货。`; - color = 'black' - } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const msgMap = { + '2': `该公司为特区货物报关比较麻烦,请注意跟进。`, + '3': `该公司报关资料不配合存在过异常,请及时跟进。`, + '4': `该公司报关有问题无法报关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; + const dynamicHtml=` +
+
+
  • + ${msgMap[this.categorySender]} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('sender.enterpriseName'); }); @@ -2795,39 +2792,44 @@ methods: { this.categoryReciever = data.category; let msg = ''; let color = ''; + const msgMap = { + '2': `该公司为特区货物清关比较麻烦,请注意跟进。`, + '3': `该公司清关资料不配合存在过异常,请及时跟进。`, + '4': `该公司清关有问题无法清关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; // 判断是否是特区 let SpecialZone =false; if(address){ SpecialZone = address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'; } - console.log('---checkRecieverCompany1111' ,this.categoryReciever,SpecialZone); if ((this.categoryReciever === '2' || (SpecialZone && this.categoryReciever !=='4'))) { - msg = `该公司为特区货物清关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categoryReciever === '3') { - msg = `该公司清关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categoryReciever === '4') { - msg = `该公司清关有问题无法清关,禁止走货。`; - color = 'black' + msg = msgMap['2']; + color = colorMap['2']; + } else { + msg = msgMap[this.categoryReciever]; + color = colorMap[this.categoryReciever]; } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const dynamicHtml=` +
    +
    +
  • + ${msg} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('reciever.company'); }); diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 1e2ad74c..8fd606e4 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -2702,7 +2702,7 @@ methods: { } }, - // 校验寄件企业等级 + // 校验寄件企业等级 checkEnterprise(enterpriseName) { if(!enterpriseName || this.form.sender.country !== '0086' ){ this.categorySender = null; @@ -2729,35 +2729,32 @@ methods: { return true; } this.categorySender = data.category; - let msg = ''; - let color = ''; - if (this.categorySender === '2' ) { - msg = `该公司为特区货物报关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categorySender === '3') { - msg = `该公司报关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categorySender === '4') { - msg = `该公司报关有问题无法报关,禁止走货。`; - color = 'black' - } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const msgMap = { + '2': `该公司为特区货物报关比较麻烦,请注意跟进。`, + '3': `该公司报关资料不配合存在过异常,请及时跟进。`, + '4': `该公司报关有问题无法报关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; + const dynamicHtml=` +
    +
    +
  • + ${msgMap[this.categorySender]} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('sender.enterpriseName'); }); @@ -2799,38 +2796,44 @@ methods: { this.categoryReciever = data.category; let msg = ''; let color = ''; + const msgMap = { + '2': `该公司为特区货物清关比较麻烦,请注意跟进。`, + '3': `该公司清关资料不配合存在过异常,请及时跟进。`, + '4': `该公司清关有问题无法清关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; // 判断是否是特区 let SpecialZone =false; if(address){ SpecialZone = address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'; } if ((this.categoryReciever === '2' || (SpecialZone && this.categoryReciever !=='4'))) { - msg = `该公司为特区货物清关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categoryReciever === '3') { - msg = `该公司清关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categoryReciever === '4') { - msg = `该公司清关有问题无法清关,禁止走货。`; - color = 'black' + msg = msgMap['2']; + color = colorMap['2']; + } else { + msg = msgMap[this.categoryReciever]; + color = colorMap[this.categoryReciever]; } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const dynamicHtml=` +
    +
    +
  • + ${msg} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('reciever.company'); }); diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index 0711a0c3..e0d33ba9 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -2694,35 +2694,32 @@ methods: { return true; } this.categorySender = data.category; - let msg = ''; - let color = ''; - if (this.categorySender === '2' ) { - msg = `该公司为特区货物报关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categorySender === '3') { - msg = `该公司报关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categorySender === '4') { - msg = `该公司报关有问题无法报关,禁止走货。`; - color = 'black' - } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const msgMap = { + '2': `该公司为特区货物报关比较麻烦,请注意跟进。`, + '3': `该公司报关资料不配合存在过异常,请及时跟进。`, + '4': `该公司报关有问题无法报关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; + const dynamicHtml=` +
    +
    +
  • + ${msgMap[this.categorySender]} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('sender.enterpriseName'); }); @@ -2764,38 +2761,44 @@ methods: { this.categoryReciever = data.category; let msg = ''; let color = ''; + const msgMap = { + '2': `该公司为特区货物清关比较麻烦,请注意跟进。`, + '3': `该公司清关资料不配合存在过异常,请及时跟进。`, + '4': `该公司清关有问题无法清关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; // 判断是否是特区 let SpecialZone =false; if(address){ SpecialZone = address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'; } if ((this.categoryReciever === '2' || (SpecialZone && this.categoryReciever !=='4'))) { - msg = `该公司为特区货物清关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categoryReciever === '3') { - msg = `该公司清关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categoryReciever === '4') { - msg = `该公司清关有问题无法清关,禁止走货。`; - color = 'black' + msg = msgMap['2']; + color = colorMap['2']; + } else { + msg = msgMap[this.categoryReciever]; + color = colorMap[this.categoryReciever]; } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const dynamicHtml=` +
    +
    +
  • + ${msg} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('reciever.company'); }); diff --git a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue index b8928863..cb53d004 100644 --- a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue +++ b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue @@ -2384,35 +2384,32 @@ export default { return true; } this.categorySender = data.category; - let msg = ''; - let color = ''; - if (this.categorySender === '2' ) { - msg = `该公司为特区货物报关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categorySender === '3') { - msg = `该公司报关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categorySender === '4') { - msg = `该公司报关有问题无法报关,禁止走货。`; - color = 'black' - } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const msgMap = { + '2': `该公司为特区货物报关比较麻烦,请注意跟进。`, + '3': `该公司报关资料不配合存在过异常,请及时跟进。`, + '4': `该公司报关有问题无法报关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; + const dynamicHtml=` +
    +
    +
  • + ${msgMap[this.categorySender]} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('sender.enterpriseName'); }); @@ -2454,38 +2451,44 @@ export default { this.categoryReciever = data.category; let msg = ''; let color = ''; + const msgMap = { + '2': `该公司为特区货物清关比较麻烦,请注意跟进。`, + '3': `该公司清关资料不配合存在过异常,请及时跟进。`, + '4': `该公司清关有问题无法清关,禁止走货。` + }; + const colorMap = { + '2': '#fccc0c', + '3': 'red', + '4': 'black' + }; // 判断是否是特区 let SpecialZone =false; if(address){ SpecialZone = address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'; } if ((this.categoryReciever === '2' || (SpecialZone && this.categoryReciever !=='4'))) { - msg = `该公司为特区货物清关比较麻烦,请注意跟进。`; - color = '#fccc0c'; - } else if (this.categoryReciever === '3') { - msg = `该公司清关资料不配合存在过异常,请及时跟进。`; - color = 'red'; - } else if (this.categoryReciever === '4') { - msg = `该公司清关有问题无法清关,禁止走货。`; - color = 'black' + msg = msgMap['2']; + color = colorMap['2']; + } else { + msg = msgMap[this.categoryReciever]; + color = colorMap[this.categoryReciever]; } - const h = this.$createElement; - this.$msgbox({ - title: '提示', - message: h('p', { - style: { - color: color, - // fontSize: '18px' - } - }, [ - h('li', { class: 'el-icon-warning' }, ''), - h('span', null, msg), - ]), - showCancelButton: false, - confirmButtonText: '确定', - closeOnClickModal: false, - closeOnPressEscape: false, - showClose: false + const dynamicHtml=` +
    +
    +
  • + ${msg} +
    +
    +

    绿色 :无弹窗

    +

    黄色 :${msgMap['2']}

    +

    红色 :${msgMap['3']}

    +

    黑色 :${msgMap['4']}

    +
    +
    + `; + this.$alert(dynamicHtml, '提示',{ + dangerouslyUseHTMLString: true }).then(() => { this.$refs.form.validateField('reciever.company'); });