Browse Source

科目账户配置增加两个字段名称为项目是否必填(类型为逻辑值,默认为否)/成本中心默认值(字符型,选填),成本中心取现有成本中心搜索帮助 HL-5743

hella_online_20240829
parent
commit
cc22ad2b33
  1. 104
      src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

104
src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

@ -20,19 +20,20 @@ export const SubjectAccountRules = reactive({
isFromPlMstr: [required] isFromPlMstr: [required]
}) })
export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([ export const SubjectAccount = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: 'id', label: 'id',
field: 'id', field: 'id',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable:false, isTable: false
}, },
{ {
label: '代码', label: '代码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '领用描述', label: '领用描述',
@ -40,7 +41,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm:false, isForm: false
}, },
{ {
label: '成本中心ID', label: '成本中心ID',
@ -71,11 +72,13 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '成本中心信息', // 查询弹窗标题 searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -94,13 +97,12 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
// searchTitle: '生产线信息', // searchTitle: '生产线信息',
// searchAllSchemas: Productionline.allSchemas, // searchAllSchemas: Productionline.allSchemas,
// searchPage: ProductionLineCodeApi.getProductionlinePage // searchPage: ProductionLineCodeApi.getProductionlinePage
options:typeList.map(item=>({ options: typeList.map((item) => ({
label: item.labelKey, label: item.labelKey,
value: item.labelValue value: item.labelValue
})) }))
} }
} }
}, },
{ {
label: '项目ID', label: '项目ID',
@ -132,11 +134,13 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '物料基础信息', // 查询弹窗标题 searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
]
} }
} }
}, },
@ -145,6 +149,9 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
field: 'accountingAccount', field: 'accountingAccount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: {
width: 120
},
form: { form: {
componentProps: { componentProps: {
disabled: false disabled: false
@ -179,7 +186,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' activeValue: 'TRUE'
} }
}, }
}, },
{ {
label: '是否来自产品类', label: '是否来自产品类',
@ -198,7 +205,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' activeValue: 'TRUE'
} }
}, }
}, },
{ {
label: '产品类类型', label: '产品类类型',
@ -217,16 +224,78 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '项目是否必填',
field: 'isProject',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 140
},
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '成本中心默认值',
field: 'costDefault',
sort: 'custom',
isSearch: false,
isTable: true,
isForm: true,
table: {
width: 130
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom'
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
table: {
width: 180
},
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -241,10 +310,10 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '创建者', label: '创建者',
@ -275,7 +344,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
} }
}, },
@ -298,4 +367,5 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ])
)

Loading…
Cancel
Save