优化配送订单合同气瓶候选显示
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
v-model="model[field.key]"
|
||||
:disabled="disabledSet.has(field.key) || relationRequiresParent(field)"
|
||||
:multiple="field.type === 'identity-list'"
|
||||
:placeholder="field.placeholder"
|
||||
:placeholder="relationPlaceholder(field)"
|
||||
:loading="relationLoading[field.relation ?? '']"
|
||||
allow-clear
|
||||
allow-search
|
||||
@@ -203,6 +203,14 @@ function relationRequiresParent(field: ResourceField) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 父级未选择时直接在控件内提示操作顺序,选择后恢复字段搜索提示。 */
|
||||
function relationPlaceholder(field: ResourceField) {
|
||||
if (!relationRequiresParent(field)) return field.placeholder;
|
||||
return field.relationLinkage?.parentKey === 'gasorder_contract_identity'
|
||||
? '请先选择配送合同'
|
||||
: '请先选择上级数据';
|
||||
}
|
||||
|
||||
/** 根据父级和候选状态给出明确的关联选择引导。 */
|
||||
function relationEmptyText(field: ResourceField) {
|
||||
if (relationRequiresParent(field)) {
|
||||
|
||||
Reference in New Issue
Block a user