|
|
@ -461,6 +461,7 @@ import ComPoOrderDynamicFieldRenderer from './com_poOrder_DynamicFieldRenderer.v |
|
|
const ADD_CHOOSER_FIELD_CODES = new Set(['supplier_name', 'part_no', 'departure', 'destination', 'ship_via']) |
|
|
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', 'crd_ori']) |
|
|
const ADD_DISPLAY_ONLY_FIELD_CODES = new Set(['short_office', 'short_npc', 'item', 'category_name', 'sku', 'value', 'status', 'crd_ori']) |
|
|
const ADD_TEXTAREA_FIELD_CODES = new Set(['remark']) |
|
|
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']) |
|
|
const ADD_NUMBER_FIELD_CODES = new Set(['price', 'qty', 'ship_qty', 'sum_price']) |
|
|
const ADD_FILTERABLE_SELECT_FIELD_CODES = new Set(['customer', 'buyer']) |
|
|
const ADD_FILTERABLE_SELECT_FIELD_CODES = new Set(['customer', 'buyer']) |
|
|
const ADD_SELECT_OPTIONS_FIELD_CODE_MAP = { |
|
|
const ADD_SELECT_OPTIONS_FIELD_CODE_MAP = { |
|
|
@ -1595,7 +1596,7 @@ export default { |
|
|
if (!Array.isArray(this.addFormSchemaFields)) { |
|
|
if (!Array.isArray(this.addFormSchemaFields)) { |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return this.addFormSchemaFields |
|
|
|
|
|
|
|
|
const sortedFields = this.addFormSchemaFields |
|
|
.filter(f => f && f.visibleFlag === 'Y' && !this.isExtSchemaField(f)) |
|
|
.filter(f => f && f.visibleFlag === 'Y' && !this.isExtSchemaField(f)) |
|
|
.slice() |
|
|
.slice() |
|
|
.sort((a, b) => { |
|
|
.sort((a, b) => { |
|
|
@ -1605,6 +1606,16 @@ export default { |
|
|
const right = Number.isFinite(sb) ? sb : Number.MAX_SAFE_INTEGER |
|
|
const right = Number.isFinite(sb) ? sb : Number.MAX_SAFE_INTEGER |
|
|
return left - right |
|
|
return left - right |
|
|
}) |
|
|
}) |
|
|
|
|
|
const tailFields = [] |
|
|
|
|
|
const normalFields = [] |
|
|
|
|
|
sortedFields.forEach(field => { |
|
|
|
|
|
if (ADD_FULL_ROW_FIELD_CODES.has(this.getAddFieldCode(field))) { |
|
|
|
|
|
tailFields.push(field) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
normalFields.push(field) |
|
|
|
|
|
}) |
|
|
|
|
|
return [...normalFields, ...tailFields] |
|
|
}, |
|
|
}, |
|
|
uploadColumnMappingEntries () { |
|
|
uploadColumnMappingEntries () { |
|
|
if (!this.uploadColumnMapping || typeof this.uploadColumnMapping !== 'object') { |
|
|
if (!this.uploadColumnMapping || typeof this.uploadColumnMapping !== 'object') { |
|
|
@ -1828,6 +1839,9 @@ export default { |
|
|
return editorType === 'readonly' |
|
|
return editorType === 'readonly' |
|
|
}, |
|
|
}, |
|
|
getAddFieldSpan (field) { |
|
|
getAddFieldSpan (field) { |
|
|
|
|
|
if (ADD_FULL_ROW_FIELD_CODES.has(this.getAddFieldCode(field))) { |
|
|
|
|
|
return 24 |
|
|
|
|
|
} |
|
|
return this.isAddTextareaField(field) ? 12 : 6 |
|
|
return this.isAddTextareaField(field) ? 12 : 6 |
|
|
}, |
|
|
}, |
|
|
onAddFieldInput (field) { |
|
|
onAddFieldInput (field) { |
|
|
@ -3235,10 +3249,23 @@ export default { |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.po-add-form-wrap { |
|
|
.po-add-form-wrap { |
|
|
max-height: 65vh; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
|
|
|
max-height: calc(100vh - 210px); |
|
|
|
|
|
overflow-y: scroll; |
|
|
overflow-x: hidden; |
|
|
overflow-x: hidden; |
|
|
padding: 0 12px; |
|
|
|
|
|
|
|
|
padding: 0 12px 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 预留滚动槽位,避免滚动条出现/消失导致表单宽度抖动 */ |
|
|
|
|
|
@supports (scrollbar-gutter: stable) { |
|
|
|
|
|
.po-add-form-wrap { |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
scrollbar-gutter: stable both-edges; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 防止滚动条切换时标签换行,进一步降低布局抖动 */ |
|
|
|
|
|
.po-add-form-wrap /deep/ .el-form--label-top .el-form-item__label { |
|
|
|
|
|
white-space: nowrap; |
|
|
} |
|
|
} |
|
|
.el-table /deep/ .cell { |
|
|
.el-table /deep/ .cell { |
|
|
height: auto; |
|
|
height: auto; |
|
|
|