diff --git a/src/api/ecss/ecss.js b/src/api/ecss/ecss.js
index 788d201..6875f48 100644
--- a/src/api/ecss/ecss.js
+++ b/src/api/ecss/ecss.js
@@ -102,6 +102,7 @@ export const saveOneClickPacking = data => createAPI(`/ecss/coDel/saveOneClickPa
export const savePalletMaintenance = data => createAPI(`/ecss/coDel/savePalletMaintenance`,'post',data)
export const getCustomerInfo = data => createAPI(`/ecss/coDel/getCustomerInfo`,'post',data)
+export const getEcssContactsList = data => createAPI(`/select/ecssMapper/getEcssContacts/list`,'post',data)
export const searchEcssTemplateData = data => createAPI(`/ecss/coDel/searchEcssTemplateData`,'post',data)
diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue
index 8fb9f02..cbbacd7 100644
--- a/src/views/modules/ecss/declaration.vue
+++ b/src/views/modules/ecss/declaration.vue
@@ -338,6 +338,28 @@
+
+
+
+
+
{{ item.company }}
+
{{ item.address }}
+
+
+
+
+
+
@@ -941,6 +963,28 @@
+
+
+
+
+
+
{{ item.company }}
+
{{ item.address }}
+
+
+
+
+
text && text.trim()).join(' / ')
+ },
+ handlePickupAddressChange(value) {
+ const selected = this.pickupAddressList.find(item => item.valueKey === value)
+ if (selected) {
+ this.exportGoods.pickupCompany = selected.company
+ this.exportGoods.pickupAddress = selected.address
+ } else {
+ this.exportGoods.pickupCompany = ''
+ this.exportGoods.pickupAddress = ''
+ }
+ },
+ loadPickupAddressList(buNo) {
+ this.pickupAddressList = []
+ this.exportGoods.pickupAddressValue = ''
+ this.exportGoods.pickupCompany = ''
+ this.exportGoods.pickupAddress = ''
+ if (!buNo) {
+ return Promise.resolve()
+ }
+ return getEcssContactsList({buNo: buNo}).then(({data}) => {
+ if (data && data.code === 0) {
+ const rows = Array.isArray(data.rows) ? data.rows : []
+ const uniqMap = {}
+ rows.forEach(item => {
+ const company = item && item.company ? String(item.company).trim() : ''
+ const address = item && item.address ? String(item.address).trim() : ''
+ const defaultOption = item && item.defaultOption ? String(item.defaultOption).trim().toUpperCase() : ''
+ if (!company && !address) {
+ return
+ }
+ const valueKey = company + '||' + address
+ if (!uniqMap[valueKey]) {
+ uniqMap[valueKey] = {
+ company: company,
+ address: address,
+ valueKey: valueKey,
+ defaultOption: defaultOption
+ }
+ } else if (defaultOption === 'Y') {
+ uniqMap[valueKey].defaultOption = 'Y'
+ }
+ })
+ this.pickupAddressList = Object.keys(uniqMap).map(key => uniqMap[key])
+ const defaultItem = this.pickupAddressList.find(item => item.defaultOption === 'Y')
+ if (defaultItem) {
+ this.exportGoods.pickupAddressValue = defaultItem.valueKey
+ this.handlePickupAddressChange(defaultItem.valueKey)
+ }
+ } else {
+ this.pickupAddressList = []
+ }
+ }).catch(() => {
+ this.pickupAddressList = []
+ })
+ },
exportInvoiceList() {
if (!this.currentRow || !this.currentRow.buNo) {
this.$message.warning('请选择报关单!')
@@ -2275,6 +2383,7 @@
this.exportGoods.deliveryGoodsDate = ''
this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:''
this.exportGoods.shippingDate = ''
+ this.loadPickupAddressList(this.currentRow.buNo)
this.exportGoodsFlag = true
},
// 导出
@@ -2426,6 +2535,9 @@
exportParam.shippingDate=this.exportGoods.shippingDate
exportParam.hsCodeDescType=this.exportGoods.hsCodeDescType
exportParam.shipper=this.exportGoods.shipper
+ exportParam.pickupCompany=this.exportGoods.pickupCompany
+ exportParam.pickupAddress=this.exportGoods.pickupAddress
+ exportParam.pickupAddressValue=this.exportGoods.pickupAddressValue
exportParam.brandType = this.brandType
exportParam.hsCodeDescType=this.hsCodeDescType
@@ -2614,6 +2726,7 @@
this.exportGoods.deliveryGoodsDate = ''
this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:''
this.exportGoods.shippingDate = '';
+ await this.loadPickupAddressList(this.currentRow.buNo)
//this.templateData.type='出口货物委托书'
//await this.searchTemplateOne();
if (this.currentRow.buNo==='03-RFID') {
@@ -2660,6 +2773,9 @@
exportParam.shippingDate=this.exportGoods.shippingDate
exportParam.hsCodeDescType=this.exportGoods.hsCodeDescType
exportParam.shipper=this.exportGoods.shipper
+ exportParam.pickupCompany=this.exportGoods.pickupCompany
+ exportParam.pickupAddress=this.exportGoods.pickupAddress
+ exportParam.pickupAddressValue=this.exportGoods.pickupAddressValue
exportParam.brandType = this.brandType
exportParam.hsCodeDescType=this.hsCodeDescType