diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index 4e8e2a39..aec06317 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -315,7 +315,7 @@
- +
@@ -323,7 +323,7 @@ - + @@ -981,6 +981,8 @@ data() { mainHasCnt:0, subHasCnt:0 }, + //收件人地区名称 + recieverRegionName:null, // 选中的寄件人企业名称 selectedSenderEnterpriseName:null, // 选中的寄件人企业税号 @@ -1705,6 +1707,7 @@ methods: { this.startTimer(); } + this.recieverRegionName = this.form.reciever.provinceName; // if (['2', '4', '5'].includes(this.form.paymentType)) { //月结 // this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName; // this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId; @@ -2106,6 +2109,12 @@ methods: { } }, onChangeSelectReceiver(value){ + // 柬埔寨特区提醒 + if (value.country === '0855' && value.address) { + if( value.address.includes('Special Economic Zone') || value.provinceName.includes('特区') || value.provinceName === '中柬金属材料产业园' ){ + this.openSpecialZone(); + } + } this.form.reciever.name=value.name; this.form.reciever.phone=value.phone; this.form.reciever.country=value.country; @@ -2116,6 +2125,7 @@ methods: { this.form.reciever.address=value.address; this.form.reciever.company=value.company; this.form.sender.id = value.id; + this.recieverRegionName = value.provinceName; // 选中的寄件人企业名称 this.selectedSenderEnterpriseName=value.enterpriseName; // 选中的寄件人企业税号 @@ -2625,6 +2635,42 @@ methods: { this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } } + }, + //收件省份变化 + onChangeRecieverProvince(val){ + // 柬埔寨特区提醒 + if (val && val.countryCode === '0855' && this.form.reciever.address) { + if (val.regionName.includes('特区') || val.regionName === '中柬金属材料产业园' || this.form.reciever.address.includes('Special Economic Zone')) { + this.openSpecialZone(); + } + } + if(val){ + this.recieverCountryCode = val.countryCode; + this.recieverRegionName = val.regionName; + }else{ + this.recieverRegionName = null; + } + this.handleCalcDestSite(); + }, + //收件地址失去焦点时 + handleRecieverAddressBlur() { + // 目的国是柬埔寨 + if (this.form.reciever.country === '0855' && this.form.reciever.address && this.recieverRegionName) { + if( this.form.reciever.address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'){ + this.openSpecialZone(); + } + } + }, + // 弹出柬埔寨特区提醒 + openSpecialZone(){ + this.$confirm("该地区是特区!", "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: false, + showClose: false + }); } } }; diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 093d9135..67f80efd 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -325,7 +325,7 @@ - + @@ -1006,6 +1006,8 @@ data() { //寄件人省份的国家 senderCountryCode:null, recieverCountryCode:null, + //收件人地区名称 + recieverRegionName:null, // 选中的寄件人企业名称 selectedSenderEnterpriseName:null, // 选中的寄件人企业税号 @@ -1720,6 +1722,7 @@ methods: { } this.senderCountryCode = this.form.sender.country; this.recieverCountryCode = this.form.reciever.country; + this.recieverRegionName = this.form.reciever.provinceName; if(['2','4','5'].includes(this.form.paymentType)){ //月结 this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName; this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId; @@ -2096,6 +2099,13 @@ methods: { } }, onChangeSelectReceiver(value){ + // 柬埔寨特区提醒 + if (value.country === '0855' && value.address) { + if( value.address.includes('Special Economic Zone') || value.provinceName.includes('特区') || value.provinceName === '中柬金属材料产业园' ){ + //弹窗提醒 + this.openSpecialZone(); + } + } this.form.reciever.name=value.name; this.form.reciever.phone=value.phone; this.form.reciever.country=value.country; @@ -2106,6 +2116,7 @@ methods: { this.form.reciever.address=value.address; this.form.reciever.company=value.company; this.recieverCountryCode=value.country; + this.recieverRegionName = value.provinceName; this.handleCalcDestSite(); }, @@ -2622,10 +2633,41 @@ methods: { }, //收件省份变化 onChangeRecieverProvince(val){ + // 柬埔寨特区提醒 + if (val && val.countryCode === '0855' && this.form.reciever.address) { + if (val.regionName.includes('特区') || val.regionName === '中柬金属材料产业园' || this.form.reciever.address.includes('Special Economic Zone')) { + //如果值变了 弹窗提醒 + this.openSpecialZone(); + } + } if(val){ this.recieverCountryCode = val.countryCode; + this.recieverRegionName = val.regionName; + }else{ + this.recieverRegionName = null; } this.handleCalcDestSite(); + }, + //收件地址失去焦点时 + handleRecieverAddressBlur() { + // 目的国是柬埔寨 + if (this.form.reciever.country === '0855' && this.form.reciever.address && this.recieverRegionName) { + if( this.form.reciever.address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'){ + //如果值变了 弹窗提醒 + this.openSpecialZone(); + } + } + }, + // 弹出柬埔寨特区提醒 + openSpecialZone(){ + this.$confirm("该地区是特区!", "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: false, + showClose: false + }); } } }; diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index 393cc403..65639e4f 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -316,7 +316,7 @@
- +
@@ -324,7 +324,7 @@ - + @@ -1007,6 +1007,8 @@ data() { //寄件人省份的国家 senderCountryCode:null, recieverCountryCode:null, + //收件人地区名称 + recieverRegionName:null, // 选中的寄件人企业名称 selectedSenderEnterpriseName:null, // 选中的寄件人企业税号 @@ -2083,6 +2085,13 @@ methods: { } }, onChangeSelectReceiver(value){ + // 柬埔寨特区提醒 + if (value.country === '0855' && value.address) { + if( value.address.includes('Special Economic Zone') || value.provinceName.includes('特区') || value.provinceName === '中柬金属材料产业园' ){ + //弹窗提醒 + this.openSpecialZone(); + } + } this.form.reciever.name=value.name; this.form.reciever.phone=value.phone; this.form.reciever.country=value.country; @@ -2093,7 +2102,7 @@ methods: { this.form.reciever.address=value.address; this.form.reciever.company=value.company; this.recieverCountryCode = value.country; - + this.recieverRegionName = value.provinceName; this.handleCalcDestSite(); }, @@ -2597,11 +2606,50 @@ methods: { } }, //收件省份变化 - onChangeRecieverProvince(val){ - if(val){ - this.recieverCountryCode = val.countryCode; + onChangeRecieverProvince(val) { + // 柬埔寨特区提醒 + // if (val && val.countryCode === '0855' && this.form.reciever.address) { + // if (val.regionName.includes('特区') || val.regionName === '中柬金属材料产业园' || this.form.reciever.address.includes('Special Economic Zone')) { + // // 弹窗是异步的,必须在弹窗关闭后再更新状态 + // this.openSpecialZone(); + // } + // } + // 非特区情况:直接更新状态 + if (val) { + this.recieverCountryCode = val.countryCode; + this.recieverRegionName = val.regionName; + } else { + this.recieverRegionName = null; + } + this.handleCalcDestSite(); + // 目的国是柬埔寨 + if (this.form.reciever.country === '0855' && this.form.reciever.address && this.recieverRegionName) { + if( this.form.reciever.address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'){ + //如果值变了 弹窗提醒 + this.openSpecialZone(); } - this.handleCalcDestSite(); + } +}, + //收件地址失去焦点时 + handleRecieverAddressBlur() { + // 目的国是柬埔寨 + if (this.form.reciever.country === '0855' && this.form.reciever.address && this.recieverRegionName) { + if( this.form.reciever.address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'){ + //如果值变了 弹窗提醒 + this.openSpecialZone(); + } + } + }, + // 弹出柬埔寨特区提醒 + openSpecialZone(){ + this.$confirm("该地区是特区!", "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: false, + showClose: false + }); } } }; diff --git a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue index 0fd8f8b6..0e162d23 100644 --- a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue +++ b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue @@ -714,7 +714,7 @@ - + @@ -1356,6 +1356,8 @@ export default { //寄件人省份的国家 senderCountryCode:null, recieverCountryCode:null, + //收件人地区名称 + recieverRegionName:null, // 选中的寄件人企业名称 selectedSenderEnterpriseName:null, // 选中的寄件人企业税号 @@ -1536,6 +1538,7 @@ export default { } this.senderCountryCode = this.billDetail.sender.country; this.recieverCountryCode = this.billDetail.reciever.country; + this.recieverRegionName = this.billDetail.reciever.provinceName; }, deep: true }, @@ -1823,8 +1826,15 @@ export default { this.form.sender.enterpriseName=this.selectedMonthUserEnterpriseName; this.form.sender.enterpriseTaxId=this.selectedMonthUserEnterpriseTaxId; } - }, + }, onChangeSelectReceiver(value){ + // 柬埔寨特区提醒 + if (value.country === '0855' && value.address) { + if( value.address.includes('Special Economic Zone') || value.provinceName.includes('特区') || value.provinceName === '中柬金属材料产业园' ){ + //弹窗提醒 + this.openSpecialZone(); + } + } this.form.reciever.name=value.name; this.form.reciever.phone=value.phone; this.form.reciever.country=value.country; @@ -1834,7 +1844,7 @@ export default { // this.form.receiveTown=value.town; this.form.reciever.address=value.address; this.form.reciever.company=value.company; - + this.recieverRegionName = value.provinceName; this.handleCalcDestSite(); }, @@ -2248,8 +2258,17 @@ export default { //收件省份变化 onChangeRecieverProvince(val){ console.log('val++++++',val) + // 柬埔寨特区提醒 + if (val && val.countryCode === '0855' && this.form.reciever.address) { + if (val.regionName.includes('特区') || val.regionName === '中柬金属材料产业园' || this.form.reciever.address.includes('Special Economic Zone')) { + this.openSpecialZone(); + } + } if(val){ this.recieverCountryCode = val.countryCode; + this.recieverRegionName = val.regionName; + }else{ + this.recieverRegionName = null; } this.handleCalcDestSite(); }, @@ -2283,7 +2302,27 @@ export default { this.form.productType = val.productType; } this.calcBillFee(); - } + }, + //收件地址失去焦点时 + handleRecieverAddressBlur() { + // 目的国是柬埔寨 + if (this.form.reciever.country === '0855' && this.form.reciever.address && this.recieverRegionName) { + if( this.form.reciever.address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园'){ + this.openSpecialZone(); + } + } + }, + // 弹出柬埔寨特区提醒 + openSpecialZone(){ + this.$confirm("该地区是特区!", "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: false, + showClose: false + }); + } } };