|
|
|
@ -659,7 +659,7 @@ import ComPoOrderCustomerPicker from './com_poOrder_CustomerPicker.vue' |
|
|
|
import ComPoOrderDynamicFieldRenderer from './com_poOrder_DynamicFieldRenderer.vue' |
|
|
|
|
|
|
|
const ADD_CHOOSER_FIELD_CODES = new Set(['supplier_name', 'part_no', 'departure', 'destination', 'ship_via']) |
|
|
|
const ADD_DISPLAY_ONLY_FIELD_CODES = new Set(['short_office', 'short_npc', 'item', 'category_name', 'sku', 'value', 'status', 'planner', 'crd_ori']) |
|
|
|
const ADD_DISPLAY_ONLY_FIELD_CODES = new Set(['short_office', 'short_npc', 'item', 'category_name', 'sku', 'value', 'status', 'planner', 'crd_ori', 'base_price']) |
|
|
|
const ADD_TEXTAREA_FIELD_CODES = new Set(['remark']) |
|
|
|
const ADD_FULL_ROW_FIELD_CODES = new Set(['remark']) |
|
|
|
const ADD_NUMBER_FIELD_CODES = new Set(['price', 'qty', 'ship_qty', 'sum_price']) |
|
|
|
@ -717,7 +717,7 @@ const ADD_SELECT_OPTIONS_FIELD_CODE_MAP = { |
|
|
|
* - onWindowResize, updateTableHeight, refreshTableLayout |
|
|
|
* |
|
|
|
* B. 列渲染与编辑权限 |
|
|
|
* - formatColumnCell, isChooserEditColumn, canEditCell |
|
|
|
* - formatColumnCell, formatNumberDisplay, isChooserEditColumn, canEditCell |
|
|
|
* - getSelectOptionsForColumn, getSchemaDictType, preloadDictSelectOptions |
|
|
|
* |
|
|
|
* C. 新增弹窗schema与字段能力 |
|
|
|
@ -734,6 +734,7 @@ const ADD_SELECT_OPTIONS_FIELD_CODE_MAP = { |
|
|
|
* D. 价格/金额联动与分段价 |
|
|
|
* - scheduleAutoFillAddPriceByTierPrice, autoFillAddPriceByTierPrice, findCurrentTierPriceByQty |
|
|
|
* - normalizeAddNumericValue, calcPoValue, recalcAddFormValue, validatePriceAndQty |
|
|
|
* - 标准价格(basePrice)由后端创建时按价格表写入,新增弹窗不展示,列表只读 |
|
|
|
* |
|
|
|
* E. 查询、分页、高级查询 |
|
|
|
* - buildQueryRequest, handleSearch, loadFieldSchema, buildBatchUpdateRow |
|
|
|
@ -815,7 +816,7 @@ export default { |
|
|
|
/** Chooselist 弹窗选择列(editAble 可为 false,如供应商/物料) */ |
|
|
|
chooserEditColumnProps: ['supplierName', 'partNo', 'departure', 'destination', 'shipVia'], |
|
|
|
/** 联表展示、不写入 PO 的列 */ |
|
|
|
displayOnlyColumnProps: ['shortOffice', 'shortNpc', 'item', 'categoryName', 'sku', 'planner'], |
|
|
|
displayOnlyColumnProps: ['shortOffice', 'shortNpc', 'item', 'categoryName', 'sku', 'planner', 'basePrice'], |
|
|
|
customEditColumnProps: [], |
|
|
|
|
|
|
|
// ===== 导入弹窗状态(新导入:模板下载 + 直接执行)===== |
|
|
|
@ -1194,6 +1195,29 @@ export default { |
|
|
|
selectOptionsKey: '', |
|
|
|
selectOptions: null |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 812003, |
|
|
|
serialNumber: '812003Table1BasePrice', |
|
|
|
tableId: '812003Table1', |
|
|
|
tableName: 'PO Order', |
|
|
|
columnProp: 'basePrice', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '标准价格', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
showOverflowTooltip: true, |
|
|
|
editAble: false, |
|
|
|
editType: 'num', |
|
|
|
selectOptionsKey: '', |
|
|
|
selectOptions: null |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 812003, |
|
|
|
@ -1932,7 +1956,7 @@ export default { |
|
|
|
return [] |
|
|
|
} |
|
|
|
const sortedFields = this.addFormSchemaFields |
|
|
|
.filter(f => f && f.visibleFlag === 'Y' && !this.isExtSchemaField(f) && this.getAddFieldCode(f) !== 'crd_ori') |
|
|
|
.filter(f => f && f.visibleFlag === 'Y' && !this.isExtSchemaField(f) && this.getAddFieldCode(f) !== 'crd_ori' && this.getAddFieldCode(f) !== 'base_price') |
|
|
|
.slice() |
|
|
|
.sort((a, b) => { |
|
|
|
const sa = Number(a && a.sortNo) |
|
|
|
@ -2085,14 +2109,36 @@ export default { |
|
|
|
if (!prop || !row) { |
|
|
|
return '' |
|
|
|
} |
|
|
|
let value |
|
|
|
if (row[prop] !== undefined && row[prop] !== null) { |
|
|
|
return row[prop] |
|
|
|
} |
|
|
|
if (row.extValues && typeof row.extValues === 'object' && |
|
|
|
value = row[prop] |
|
|
|
} else if (row.extValues && typeof row.extValues === 'object' && |
|
|
|
Object.prototype.hasOwnProperty.call(row.extValues, prop)) { |
|
|
|
return row.extValues[prop] |
|
|
|
value = row.extValues[prop] |
|
|
|
} else { |
|
|
|
return '' |
|
|
|
} |
|
|
|
return '' |
|
|
|
// 标准价格等数值列去尾零,空值保持空白 |
|
|
|
if (prop === 'basePrice') { |
|
|
|
return this.formatNumberDisplay(value) |
|
|
|
} |
|
|
|
return value |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 数值展示去尾零。空值返回空字符串,避免把 null 显示成 0。 |
|
|
|
*/ |
|
|
|
formatNumberDisplay (value) { |
|
|
|
if (value === null || value === undefined || value === '') { |
|
|
|
return '' |
|
|
|
} |
|
|
|
const num = Number(value) |
|
|
|
if (Number.isNaN(num)) { |
|
|
|
return value |
|
|
|
} |
|
|
|
if (Number.isInteger(num)) { |
|
|
|
return String(num) |
|
|
|
} |
|
|
|
return String(num).replace(/(\.\d*?[1-9])0+$/, '$1').replace(/\.0+$/, '') |
|
|
|
}, |
|
|
|
|
|
|
|
/** Chooselist 选择列 */ |
|
|
|
|