特区弹窗提醒调整

This commit is contained in:
wuteng 2025-10-11 13:10:05 +08:00
parent da12522c2e
commit c019283670
4 changed files with 189 additions and 14 deletions

View File

@ -315,7 +315,7 @@
<el-form-item :label="$t('国家地区')" prop="reciever.province"> <el-form-item :label="$t('国家地区')" prop="reciever.province">
<div style="display:inline-flex"> <div style="display:inline-flex">
<country-picker2 v-model="form.reciever.country" ></country-picker2> <country-picker2 v-model="form.reciever.country" ></country-picker2>
<ProvincePicker2 v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px" @onChange="handleCalcDestSite" ></ProvincePicker2> <ProvincePicker2 v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px" @onChange="onChangeRecieverProvince" ></ProvincePicker2>
<city-picker2 v-model="form.reciever.city" :parentCode="form.reciever.province" style="margin-left:5px" @onChange="handleCalcDestSite" ></city-picker2> <city-picker2 v-model="form.reciever.city" :parentCode="form.reciever.province" style="margin-left:5px" @onChange="handleCalcDestSite" ></city-picker2>
<district-picker2 v-model="form.reciever.county" :parentCode="form.reciever.city" style="margin-left:5px" @onChange="handleCalcDestSite" ></district-picker2> <district-picker2 v-model="form.reciever.county" :parentCode="form.reciever.city" style="margin-left:5px" @onChange="handleCalcDestSite" ></district-picker2>
</div> </div>
@ -323,7 +323,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('收件地址')" prop="reciever.address"> <el-form-item :label="$t('收件地址')" prop="reciever.address">
<el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" /> <el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" @blur="handleRecieverAddressBlur"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -981,6 +981,8 @@ data() {
mainHasCnt:0, mainHasCnt:0,
subHasCnt:0 subHasCnt:0
}, },
//收件人地区名称
recieverRegionName:null,
// 选中的寄件人企业名称 // 选中的寄件人企业名称
selectedSenderEnterpriseName:null, selectedSenderEnterpriseName:null,
// 选中的寄件人企业税号 // 选中的寄件人企业税号
@ -1705,6 +1707,7 @@ methods: {
this.startTimer(); this.startTimer();
} }
this.recieverRegionName = this.form.reciever.provinceName;
// if (['2', '4', '5'].includes(this.form.paymentType)) { //月结 // if (['2', '4', '5'].includes(this.form.paymentType)) { //月结
// this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName; // this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName;
// this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId; // this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId;
@ -2106,6 +2109,12 @@ methods: {
} }
}, },
onChangeSelectReceiver(value){ 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.name=value.name;
this.form.reciever.phone=value.phone; this.form.reciever.phone=value.phone;
this.form.reciever.country=value.country; this.form.reciever.country=value.country;
@ -2116,6 +2125,7 @@ methods: {
this.form.reciever.address=value.address; this.form.reciever.address=value.address;
this.form.reciever.company=value.company; this.form.reciever.company=value.company;
this.form.sender.id = value.id; this.form.sender.id = value.id;
this.recieverRegionName = value.provinceName;
// 选中的寄件人企业名称 // 选中的寄件人企业名称
this.selectedSenderEnterpriseName=value.enterpriseName; this.selectedSenderEnterpriseName=value.enterpriseName;
// 选中的寄件人企业税号 // 选中的寄件人企业税号
@ -2625,6 +2635,42 @@ methods: {
this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); 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
});
} }
} }
}; };

View File

@ -325,7 +325,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('收件地址')" prop="reciever.address"> <el-form-item :label="$t('收件地址')" prop="reciever.address">
<el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" /> <el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" @blur="handleRecieverAddressBlur"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -1006,6 +1006,8 @@ data() {
//寄件人省份的国家 //寄件人省份的国家
senderCountryCode:null, senderCountryCode:null,
recieverCountryCode:null, recieverCountryCode:null,
//收件人地区名称
recieverRegionName:null,
// 选中的寄件人企业名称 // 选中的寄件人企业名称
selectedSenderEnterpriseName:null, selectedSenderEnterpriseName:null,
// 选中的寄件人企业税号 // 选中的寄件人企业税号
@ -1720,6 +1722,7 @@ methods: {
} }
this.senderCountryCode = this.form.sender.country; this.senderCountryCode = this.form.sender.country;
this.recieverCountryCode = this.form.reciever.country; this.recieverCountryCode = this.form.reciever.country;
this.recieverRegionName = this.form.reciever.provinceName;
if(['2','4','5'].includes(this.form.paymentType)){ //月结 if(['2','4','5'].includes(this.form.paymentType)){ //月结
this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName; this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName;
this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId; this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId;
@ -2096,6 +2099,13 @@ methods: {
} }
}, },
onChangeSelectReceiver(value){ 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.name=value.name;
this.form.reciever.phone=value.phone; this.form.reciever.phone=value.phone;
this.form.reciever.country=value.country; this.form.reciever.country=value.country;
@ -2106,6 +2116,7 @@ methods: {
this.form.reciever.address=value.address; this.form.reciever.address=value.address;
this.form.reciever.company=value.company; this.form.reciever.company=value.company;
this.recieverCountryCode=value.country; this.recieverCountryCode=value.country;
this.recieverRegionName = value.provinceName;
this.handleCalcDestSite(); this.handleCalcDestSite();
}, },
@ -2622,10 +2633,41 @@ methods: {
}, },
//收件省份变化 //收件省份变化
onChangeRecieverProvince(val){ 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){ if(val){
this.recieverCountryCode = val.countryCode; this.recieverCountryCode = val.countryCode;
this.recieverRegionName = val.regionName;
}else{
this.recieverRegionName = null;
} }
this.handleCalcDestSite(); 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
});
} }
} }
}; };

View File

@ -316,7 +316,7 @@
<el-form-item :label="$t('国家地区')" prop="reciever.province"> <el-form-item :label="$t('国家地区')" prop="reciever.province">
<div style="display:inline-flex"> <div style="display:inline-flex">
<country-picker2 v-model="form.reciever.country" ></country-picker2> <country-picker2 v-model="form.reciever.country" ></country-picker2>
<ProvincePicker2 v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px" @onChange="onChangeRecieverProvince" ></ProvincePicker2> <ProvincePicker2 ref="regionSelect" v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px" @onChange="onChangeRecieverProvince" ></ProvincePicker2>
<city-picker2 v-model="form.reciever.city" :parentCode="form.reciever.province" style="margin-left:5px" @onChange="handleCalcDestSite" ></city-picker2> <city-picker2 v-model="form.reciever.city" :parentCode="form.reciever.province" style="margin-left:5px" @onChange="handleCalcDestSite" ></city-picker2>
<district-picker2 v-model="form.reciever.county" :parentCode="form.reciever.city" style="margin-left:5px" @onChange="handleCalcDestSite" ></district-picker2> <district-picker2 v-model="form.reciever.county" :parentCode="form.reciever.city" style="margin-left:5px" @onChange="handleCalcDestSite" ></district-picker2>
</div> </div>
@ -324,7 +324,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('收件地址')" prop="reciever.address"> <el-form-item :label="$t('收件地址')" prop="reciever.address">
<el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" /> <el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" @blur="handleRecieverAddressBlur"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -1007,6 +1007,8 @@ data() {
//寄件人省份的国家 //寄件人省份的国家
senderCountryCode:null, senderCountryCode:null,
recieverCountryCode:null, recieverCountryCode:null,
//收件人地区名称
recieverRegionName:null,
// 选中的寄件人企业名称 // 选中的寄件人企业名称
selectedSenderEnterpriseName:null, selectedSenderEnterpriseName:null,
// 选中的寄件人企业税号 // 选中的寄件人企业税号
@ -2083,6 +2085,13 @@ methods: {
} }
}, },
onChangeSelectReceiver(value){ 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.name=value.name;
this.form.reciever.phone=value.phone; this.form.reciever.phone=value.phone;
this.form.reciever.country=value.country; this.form.reciever.country=value.country;
@ -2093,7 +2102,7 @@ methods: {
this.form.reciever.address=value.address; this.form.reciever.address=value.address;
this.form.reciever.company=value.company; this.form.reciever.company=value.company;
this.recieverCountryCode = value.country; this.recieverCountryCode = value.country;
this.recieverRegionName = value.provinceName;
this.handleCalcDestSite(); this.handleCalcDestSite();
}, },
@ -2597,11 +2606,50 @@ methods: {
} }
}, },
//收件省份变化 //收件省份变化
onChangeRecieverProvince(val){ onChangeRecieverProvince(val) {
if(val){ // 柬埔寨特区提醒
this.recieverCountryCode = val.countryCode; // 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
});
} }
} }
}; };

View File

@ -714,7 +714,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="$t('收件地址')" prop="reciever.address"> <el-form-item :label="$t('收件地址')" prop="reciever.address">
<el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" /> <el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" @blur="handleRecieverAddressBlur"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -1356,6 +1356,8 @@ export default {
//寄件人省份的国家 //寄件人省份的国家
senderCountryCode:null, senderCountryCode:null,
recieverCountryCode:null, recieverCountryCode:null,
//收件人地区名称
recieverRegionName:null,
// 选中的寄件人企业名称 // 选中的寄件人企业名称
selectedSenderEnterpriseName:null, selectedSenderEnterpriseName:null,
// 选中的寄件人企业税号 // 选中的寄件人企业税号
@ -1536,6 +1538,7 @@ export default {
} }
this.senderCountryCode = this.billDetail.sender.country; this.senderCountryCode = this.billDetail.sender.country;
this.recieverCountryCode = this.billDetail.reciever.country; this.recieverCountryCode = this.billDetail.reciever.country;
this.recieverRegionName = this.billDetail.reciever.provinceName;
}, },
deep: true deep: true
}, },
@ -1825,6 +1828,13 @@ export default {
} }
}, },
onChangeSelectReceiver(value){ 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.name=value.name;
this.form.reciever.phone=value.phone; this.form.reciever.phone=value.phone;
this.form.reciever.country=value.country; this.form.reciever.country=value.country;
@ -1834,7 +1844,7 @@ export default {
// this.form.receiveTown=value.town; // this.form.receiveTown=value.town;
this.form.reciever.address=value.address; this.form.reciever.address=value.address;
this.form.reciever.company=value.company; this.form.reciever.company=value.company;
this.recieverRegionName = value.provinceName;
this.handleCalcDestSite(); this.handleCalcDestSite();
}, },
@ -2248,8 +2258,17 @@ export default {
//收件省份变化 //收件省份变化
onChangeRecieverProvince(val){ onChangeRecieverProvince(val){
console.log('val++++++',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){ if(val){
this.recieverCountryCode = val.countryCode; this.recieverCountryCode = val.countryCode;
this.recieverRegionName = val.regionName;
}else{
this.recieverRegionName = null;
} }
this.handleCalcDestSite(); this.handleCalcDestSite();
}, },
@ -2283,7 +2302,27 @@ export default {
this.form.productType = val.productType; this.form.productType = val.productType;
} }
this.calcBillFee(); 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
});
}
} }
}; };