Browse Source

标签匹配规则

master
常熟吴彦祖 3 weeks ago
parent
commit
f7f7ffdcf3
  1. 29
      src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue
  2. 31
      src/views/modules/haianWarehouse/poOrder/searchPoIssureNotify54.vue
  3. 31
      src/views/modules/haianWarehouse/shipment/shipmentNotification54.vue
  4. 31
      src/views/modules/haianWarehouse/shopOrderIssueNotify/searchIssureNotify54.vue

29
src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue

@ -610,6 +610,7 @@ import {
haiAnDeleteUnpushedNotify haiAnDeleteUnpushedNotify
} from '@/api/haianWarehouse/noOrderIssueNotify.js' } from '@/api/haianWarehouse/noOrderIssueNotify.js'
import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult' import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult'
import { haiAnGetAreaList } from '@/api/haianWarehouse/warehousePallet.js'
import { import {
getTableDefaultListLanguage, getTableDefaultListLanguage,
getTableUserListLanguage, getTableUserListLanguage,
@ -1665,6 +1666,8 @@ export default {
} }
// 海安页面补充subSite列:已申请物料与预定标签清单在序号后展示子站点 - rqrq // 海安页面补充subSite列:已申请物料与预定标签清单在序号后展示子站点 - rqrq
this.haiAnEnsureSubSiteColumns() this.haiAnEnsureSubSiteColumns()
// 推送弹窗单据目的地按haian_area名称展示,进入页面先加载区域清单 - rqrq
this.loadHaianAreaOptions(this.$store.state.user.site)
}, },
computed: { computed: {
@ -2674,6 +2677,8 @@ export default {
this.currentNotifyRow = JSON.parse(JSON.stringify(row)) this.currentNotifyRow = JSON.parse(JSON.stringify(row))
this.currentProductionArea = row.productionArea || '' this.currentProductionArea = row.productionArea || ''
this.originalProductionArea = this.currentProductionArea this.originalProductionArea = this.currentProductionArea
// 打开推送预览时按单据site再拉一次区域,避免名称映射为空回退成A10编码 - rqrq
this.loadHaianAreaOptions(row.site || this.$store.state.user.site)
this.currentOrderType = row.orderType || 'noorder' this.currentOrderType = row.orderType || 'noorder'
this.isDestinationEditable = false this.isDestinationEditable = false
this.previewData = [] this.previewData = []
@ -2749,11 +2754,31 @@ export default {
*/ */
getAreaDisplayText(areaId) { getAreaDisplayText(areaId) {
if (!areaId) return '未设置' if (!areaId) return '未设置'
const area = this.areaOptions.find(item => item.areaId === areaId)
const code = String(areaId).trim()
const area = (this.areaOptions || []).find(item => String(item.areaId || '').trim() === code)
if (area && area.areaDesc) { if (area && area.areaDesc) {
return area.areaDesc return area.areaDesc
} }
return areaId
return code
},
/**
* 按工厂加载haian_area,目的地下拉和推送展示共用名称;保存仍提交areaId - rqrq
*/
loadHaianAreaOptions(site) {
const querySite = site || this.$store.state.user.site
if (!querySite) {
this.areaOptions = []
return
}
haiAnGetAreaList({ site: querySite }).then(({ data }) => {
if (data && data.code === 0) {
this.areaOptions = data.rows || []
return
}
this.areaOptions = []
}).catch(() => {
this.areaOptions = []
})
}, },
/** /**

31
src/views/modules/haianWarehouse/poOrder/searchPoIssureNotify54.vue

@ -698,6 +698,7 @@ import {
getNoOrderMaterialAllocListByNotifyNo getNoOrderMaterialAllocListByNotifyNo
} from '@/api/haianWarehouse/poOrderIssueNotify.js' } from '@/api/haianWarehouse/poOrderIssueNotify.js'
import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult' import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult'
import { haiAnGetAreaList } from '@/api/haianWarehouse/warehousePallet.js'
export default { export default {
name: 'searchPoIssureNotify54', name: 'searchPoIssureNotify54',
@ -1658,6 +1659,8 @@ export default {
this.searchTable() this.searchTable()
// 补充海安标签扩展列,确保预定标签页签能展示海安增强字段 - rqrq // 补充海安标签扩展列,确保预定标签页签能展示海安增强字段 - rqrq
this.haiAnEnsureLabelColumns() this.haiAnEnsureLabelColumns()
// 推送弹窗单据目的地按haian_area名称展示,进入页面先加载区域清单 - rqrq
this.loadHaianAreaOptions(this.$store.state.user.site)
}, },
computed: { computed: {
/** /**
@ -2458,6 +2461,8 @@ export default {
this.currentRow = row this.currentRow = row
this.currentNotifyRow = JSON.parse(JSON.stringify(row)) this.currentNotifyRow = JSON.parse(JSON.stringify(row))
this.currentProductionArea = row.productionArea || '' this.currentProductionArea = row.productionArea || ''
// 打开推送预览时按单据site再拉一次区域,避免名称映射为空回退成A10编码 - rqrq
this.loadHaianAreaOptions(row.site || this.$store.state.user.site)
this.previewData = [] this.previewData = []
this.previewSummary = { this.previewSummary = {
totalOrderCount: 0, totalOrderCount: 0,
@ -2523,15 +2528,35 @@ export default {
} }
}, },
/** /**
* 目的地只展示haian_area名称,没有名称时回退编码,避免页面露出A01这类编码 - rqrq
* 目的地只展示haian_area名称,没有名称时回退编码,避免页面露出A10这类编码 - rqrq
*/ */
getAreaDisplayText(areaId) { getAreaDisplayText(areaId) {
if (!areaId) return '未设置' if (!areaId) return '未设置'
const area = (this.areaOptions || []).find(item => item.areaId === areaId)
const code = String(areaId).trim()
const area = (this.areaOptions || []).find(item => String(item.areaId || '').trim() === code)
if (area && area.areaDesc) { if (area && area.areaDesc) {
return area.areaDesc return area.areaDesc
} }
return areaId
return code
},
/**
* 按工厂加载haian_area,推送目的地展示用名称;提交值仍是areaId - rqrq
*/
loadHaianAreaOptions(site) {
const querySite = site || this.$store.state.user.site
if (!querySite) {
this.areaOptions = []
return
}
haiAnGetAreaList({ site: querySite }).then(({ data }) => {
if (data && data.code === 0) {
this.areaOptions = data.rows || []
return
}
this.areaOptions = []
}).catch(() => {
this.areaOptions = []
})
}, },
/** /**
* 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红 - rqrq * 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红 - rqrq

31
src/views/modules/haianWarehouse/shipment/shipmentNotification54.vue

@ -698,6 +698,7 @@ import {
getNoOrderMaterialAllocListByNotifyNo getNoOrderMaterialAllocListByNotifyNo
} from '@/api/haianWarehouse/shipmentIssue.js' } from '@/api/haianWarehouse/shipmentIssue.js'
import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult' import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult'
import { haiAnGetAreaList } from '@/api/haianWarehouse/warehousePallet.js'
export default { export default {
name: 'shipmentNotification54', name: 'shipmentNotification54',
@ -1658,6 +1659,8 @@ export default {
this.searchTable() this.searchTable()
// 补充海安标签扩展列,确保预定标签页签能展示海安增强字段 - rqrq // 补充海安标签扩展列,确保预定标签页签能展示海安增强字段 - rqrq
this.haiAnEnsureLabelColumns() this.haiAnEnsureLabelColumns()
// 推送弹窗单据目的地按haian_area名称展示,进入页面先加载区域清单 - rqrq
this.loadHaianAreaOptions(this.$store.state.user.site)
}, },
computed: { computed: {
/** /**
@ -2458,6 +2461,8 @@ export default {
this.currentRow = row this.currentRow = row
this.currentNotifyRow = JSON.parse(JSON.stringify(row)) this.currentNotifyRow = JSON.parse(JSON.stringify(row))
this.currentProductionArea = row.productionArea || '' this.currentProductionArea = row.productionArea || ''
// 打开推送预览时按单据site再拉一次区域,避免名称映射为空回退成A10编码 - rqrq
this.loadHaianAreaOptions(row.site || this.$store.state.user.site)
this.previewData = [] this.previewData = []
this.previewSummary = { this.previewSummary = {
totalOrderCount: 0, totalOrderCount: 0,
@ -2523,15 +2528,35 @@ export default {
} }
}, },
/** /**
* 目的地只展示haian_area名称,没有名称时回退编码,避免页面露出A01这类编码 - rqrq
* 目的地只展示haian_area名称,没有名称时回退编码,避免页面露出A10这类编码 - rqrq
*/ */
getAreaDisplayText(areaId) { getAreaDisplayText(areaId) {
if (!areaId) return '未设置' if (!areaId) return '未设置'
const area = (this.areaOptions || []).find(item => item.areaId === areaId)
const code = String(areaId).trim()
const area = (this.areaOptions || []).find(item => String(item.areaId || '').trim() === code)
if (area && area.areaDesc) { if (area && area.areaDesc) {
return area.areaDesc return area.areaDesc
} }
return areaId
return code
},
/**
* 按工厂加载haian_area,推送目的地展示用名称;提交值仍是areaId - rqrq
*/
loadHaianAreaOptions(site) {
const querySite = site || this.$store.state.user.site
if (!querySite) {
this.areaOptions = []
return
}
haiAnGetAreaList({ site: querySite }).then(({ data }) => {
if (data && data.code === 0) {
this.areaOptions = data.rows || []
return
}
this.areaOptions = []
}).catch(() => {
this.areaOptions = []
})
}, },
/** /**
* 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红 - rqrq * 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红 - rqrq

31
src/views/modules/haianWarehouse/shopOrderIssueNotify/searchIssureNotify54.vue

@ -698,6 +698,7 @@ import {
getNoOrderMaterialAllocListByNotifyNo getNoOrderMaterialAllocListByNotifyNo
} from '@/api/haianWarehouse/searchIssureNotify.js' } from '@/api/haianWarehouse/searchIssureNotify.js'
import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult' import { showHaianWcsPushResult } from '@/utils/haianWcsPushResult'
import { haiAnGetAreaList } from '@/api/haianWarehouse/warehousePallet.js'
export default { export default {
name: 'searchIssureNotify54', name: 'searchIssureNotify54',
@ -1658,6 +1659,8 @@ export default {
this.searchTable() this.searchTable()
// 补充海安标签扩展列,确保预定标签页签能展示海安增强字段 - rqrq // 补充海安标签扩展列,确保预定标签页签能展示海安增强字段 - rqrq
this.haiAnEnsureLabelColumns() this.haiAnEnsureLabelColumns()
// 推送弹窗单据目的地按haian_area名称展示,进入页面先加载区域清单 - rqrq
this.loadHaianAreaOptions(this.$store.state.user.site)
}, },
computed: { computed: {
/** /**
@ -2458,6 +2461,8 @@ export default {
this.currentRow = row this.currentRow = row
this.currentNotifyRow = JSON.parse(JSON.stringify(row)) this.currentNotifyRow = JSON.parse(JSON.stringify(row))
this.currentProductionArea = row.productionArea || '' this.currentProductionArea = row.productionArea || ''
// 打开推送预览时按单据site再拉一次区域,避免名称映射为空回退成A10编码 - rqrq
this.loadHaianAreaOptions(row.site || this.$store.state.user.site)
this.previewData = [] this.previewData = []
this.previewSummary = { this.previewSummary = {
totalOrderCount: 0, totalOrderCount: 0,
@ -2523,15 +2528,35 @@ export default {
} }
}, },
/** /**
* 目的地只展示haian_area名称,没有名称时回退编码,避免页面露出A01这类编码 - rqrq
* 目的地只展示haian_area名称,没有名称时回退编码,避免页面露出A10这类编码 - rqrq
*/ */
getAreaDisplayText(areaId) { getAreaDisplayText(areaId) {
if (!areaId) return '未设置' if (!areaId) return '未设置'
const area = (this.areaOptions || []).find(item => item.areaId === areaId)
const code = String(areaId).trim()
const area = (this.areaOptions || []).find(item => String(item.areaId || '').trim() === code)
if (area && area.areaDesc) { if (area && area.areaDesc) {
return area.areaDesc return area.areaDesc
} }
return areaId
return code
},
/**
* 按工厂加载haian_area,下拉和推送目的地展示共用;提交值仍是areaId - rqrq
*/
loadHaianAreaOptions(site) {
const querySite = site || this.$store.state.user.site
if (!querySite) {
this.areaOptions = []
return
}
haiAnGetAreaList({ site: querySite }).then(({ data }) => {
if (data && data.code === 0) {
this.areaOptions = data.rows || []
return
}
this.areaOptions = []
}).catch(() => {
this.areaOptions = []
})
}, },
/** /**
* 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红 - rqrq * 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红 - rqrq

Loading…
Cancel
Save