diff --git a/public/static/tpl/import_speicalZone_info.xlsx b/public/static/tpl/import_speicalZone_info.xlsx new file mode 100644 index 00000000..e6f7aa6e Binary files /dev/null and b/public/static/tpl/import_speicalZone_info.xlsx differ diff --git a/src/api/emis/emisSpecialZone.js b/src/api/emis/emisSpecialZone.js new file mode 100644 index 00000000..38fd44d3 --- /dev/null +++ b/src/api/emis/emisSpecialZone.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' + +//查询特区地址列表 +export function listEmisSpecialZone(query) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch/list', + method: 'get', + params: query + }) +} +//查询特区地址详情 +export function getEmisSpecialZone(id) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch/' + id, + method: 'get' + }) +} +//新增特区地址 +export function addEmisSpecialZone(data) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch', + method: 'post', + data: data + }) +} +//删除特区地址 +export function delEmisSpecialZone(ids) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch/' + ids, + method: 'delete' + }) +} +//更新特区地址 +export function updateEmisSpecialZone(data) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch', + method: 'put', + data: data + }) +} +//批量导入特区地址 +export function importEmisSpecialZone(data) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch/draftSubmit', + method: 'post', + data: data + }) +} + +//根据地址匹配特区 +export function matchByAddress(data) { + return request({ + url: '/emis/emisSpecialZoneAddressMatch/matchByAddress?address=' + data.address, + method: 'get', + }) +} \ No newline at end of file diff --git a/src/views/emis/emisSpecialZone/emisSpecialZoneForm.vue b/src/views/emis/emisSpecialZone/emisSpecialZoneForm.vue new file mode 100644 index 00000000..fc028bf6 --- /dev/null +++ b/src/views/emis/emisSpecialZone/emisSpecialZoneForm.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/emis/emisSpecialZone/index.vue b/src/views/emis/emisSpecialZone/index.vue new file mode 100644 index 00000000..77042c0f --- /dev/null +++ b/src/views/emis/emisSpecialZone/index.vue @@ -0,0 +1,354 @@ + + + diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index 94b934f3..f3c078b7 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -354,7 +354,7 @@ - + @@ -881,7 +881,7 @@ import { parseTime } from "@/utils/custom"; import { debounce } from 'throttle-debounce' import { getDestSite } from "@/api/emis/emisDestination"; import { getValidExchangeRate } from "@/api/emis/emisExchangeRate"; - +import { matchByAddress } from "@/api/emis/emisSpecialZone"; import DestinationPicker from '@/views/emis/EmisBaseTools/DestinationPicker.vue'; @@ -2752,7 +2752,40 @@ methods: { }, //收件地址失去焦点时 handleRecieverAddressChange() { - this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + setTimeout(()=>{ + this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + },500) + }, + async handleRecieverAddressBlur(){ + //如果目的国是柬埔寨、孟加拉国 匹配特区标签 + if (['0855', '0880'].includes(this.form.destinationCountry)) { + const res = await matchByAddress({ + address: this.form.reciever.address + }); + // if(res.data){ + // this.recieverCountryCode = res.data.countryCode; + // this.form.reciever.country = res.data.countryCode; + // this.form.reciever.province = res.data.provinceCode; + // this.recieverRegionName = res.data.provinceName; + // } + if(res.data && res.data.provinceName !== this.recieverRegionName){ + // 弹出确认框 + this.$confirm(`收件地址在"${res.data.provinceName}",请仔细核对,并将其设为收件省份吗?`, "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: true, + showClose: false + }).then(() => { + this.recieverCountryCode = res.data.countryCode; + this.form.reciever.country = res.data.countryCode; + this.form.reciever.province = res.data.provinceCode; + this.recieverRegionName = res.data.provinceName; + this.handleCalcDestSite(); + }); + } + } }, // 弹出柬埔寨特区提醒 openSpecialZone(countryCode, address, recieverRegionName) { diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index e6195d59..ba8b868a 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -63,7 +63,7 @@ - + @@ -356,7 +356,7 @@ - + @@ -880,6 +880,7 @@ import { parseTime } from "@/utils/custom"; import { debounce } from 'throttle-debounce' import { getDestSite } from "@/api/emis/emisDestination"; import { getValidExchangeRate } from "@/api/emis/emisExchangeRate"; +import { matchByAddress } from "@/api/emis/emisSpecialZone"; import DestinationPicker from '@/views/emis/EmisBaseTools/DestinationPicker.vue'; @@ -2753,7 +2754,39 @@ methods: { }, //收件地址失去焦点时 handleRecieverAddressChange() { - this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + setTimeout(() => { + this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + }, 500); + }, + async handleRecieverAddressBlur(){ + //如果目的国是柬埔寨、孟加拉国 匹配特区标签 + if (['0855', '0880'].includes(this.form.destinationCountry)) { + const res = await matchByAddress({ + address: this.form.reciever.address + }); + // if(res.data){ + // this.recieverCountryCode = res.data.countryCode; + // this.form.reciever.country = res.data.countryCode; + // this.form.reciever.province = res.data.provinceCode; + // this.recieverRegionName = res.data.provinceName; + // } + if(res.data && res.data.provinceName !== this.recieverRegionName){ + this.$confirm(`收件地址在"${res.data.provinceName}",请仔细核对,并将其设为收件省份吗?`, "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: true, + showClose: false + }).then(() => { + this.recieverCountryCode = res.data.countryCode; + this.form.reciever.country = res.data.countryCode; + this.form.reciever.province = res.data.provinceCode; + this.recieverRegionName = res.data.provinceName; + this.handleCalcDestSite(); + }); + } + } }, // 弹出柬埔寨特区提醒 openSpecialZone(countryCode, address, recieverRegionName) { diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index 8139a47e..57eeb7cf 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -357,7 +357,7 @@ - + @@ -879,6 +879,7 @@ import { realMatchWaybill,getTotalAvailablePag } from "@/api/emis/emisCommon"; import { checkWaybillIsExists,getWaybillDetail,realSubmitOrder,calcWaybillFee,calcSetteldWeight,calcVolumeWeight} from "@/api/emis/emisWaybill"; import { listCustomsLevel } from "@/api/emis/emisCustomsLevel"; +import { matchByAddress } from "@/api/emis/emisSpecialZone"; import { parseTime } from "@/utils/custom"; import { debounce } from 'throttle-debounce' import { getDestSite } from "@/api/emis/emisDestination"; @@ -2717,11 +2718,38 @@ methods: { this.recieverRegionName = null; } this.handleCalcDestSite(); - this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); }, - //收件地址失去焦点时 - handleRecieverAddressChange() { - this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + //收件地址值变化 + handleRecieverAddressChange() { + setTimeout(()=>{ + this.openSpecialZone(this.recieverCountryCode, this.form.reciever.address, this.recieverRegionName); + },500) + }, + async handleRecieverAddressBlur(){ + //如果目的国是柬埔寨、孟加拉国 匹配特区标签 + if (['0855', '0880'].includes(this.form.destinationCountry)) { + const res = await matchByAddress({ + address: this.form.reciever.address + }); + if(res.data && res.data.provinceName !== this.recieverRegionName){ + // 弹出确认框 + this.$confirm(`收件地址在"${res.data.provinceName}",请仔细核对,并将其设为收件省份吗?`, "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: true, + showClose: false + }).then(() => { + this.recieverCountryCode = res.data.countryCode; + this.form.reciever.country = res.data.countryCode; + this.form.reciever.province = res.data.provinceCode; + this.recieverRegionName = res.data.provinceName; + this.handleCalcDestSite(); + }); + } + } }, // 弹出柬埔寨特区提醒 diff --git a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue index 21129ecd..e7dce161 100644 --- a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue +++ b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue @@ -736,7 +736,7 @@ - + @@ -1222,6 +1222,7 @@ import { checkWaybillIsExists,getWaybillDetail,realSubmitOrder,calcWaybillFee,calcSetteldWeight,calcVolumeWeight} from "@/api/emis/emisWaybill"; import { listCustomsLevel } from "@/api/emis/emisCustomsLevel"; import { getDestSite } from "@/api/emis/emisDestination"; +import { matchByAddress } from "@/api/emis/emisSpecialZone"; import DestinationPicker from '@/views/emis/EmisBaseTools/DestinationPicker.vue'; @@ -2397,7 +2398,39 @@ export default { this.calcBillFee(); }, handleRecieverAddressChange() { - this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + setTimeout(()=>{ + this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName); + },500) + }, + async handleRecieverAddressBlur(){ + //如果目的国是柬埔寨、孟加拉国 匹配特区标签 + if (['0855', '0880'].includes(this.form.reciever.country)) { + const res = await matchByAddress({ + address: this.form.reciever.address + }); + // if(res.data){ + // this.recieverCountryCode = res.data.countryCode; + // this.form.reciever.country = res.data.countryCode; + // this.form.reciever.province = res.data.provinceCode; + // this.recieverRegionName = res.data.provinceName; + // } + if(res.data && res.data.provinceName !== this.recieverRegionName){ + this.$confirm(`收件地址在"${res.data.provinceName}",请仔细核对,并将其设为收件省份吗?`, "提示", { + confirmButtonText: "确定", + type: "warning", + distinguishCancelAndClose: true, + closeOnClickModal: false, + showCancelButton: true, + showClose: false + }).then(() => { + this.recieverCountryCode = res.data.countryCode; + this.form.reciever.country = res.data.countryCode; + this.form.reciever.province = res.data.provinceCode; + this.recieverRegionName = res.data.provinceName; + this.handleCalcDestSite(); + }); + } + } }, // 弹出柬埔寨特区提醒 openSpecialZone(countryCode, address, recieverRegionName) {