Browse Source

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

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

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

@ -10,292 +10,362 @@ const typeList = await QadProjectApi.getProjectType()
export const SubjectAccountRules = reactive({ export const SubjectAccountRules = reactive({
code: [required], code: [required],
accountingAccount: [required], accountingAccount: [required],
costcentreType:[required], costcentreType: [required],
accountingName: [required], accountingName: [required],
usageDescription: [required], usageDescription: [required],
costecentreCode: [required], costecentreCode: [required],
projectId: [required], projectId: [required],
projectCode: [required], projectCode: [required],
available: [required], available: [required],
isFromPlMstr:[required] isFromPlMstr: [required]
}) })
export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([ export const SubjectAccount = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: 'id', {
field: 'id', label: 'id',
sort: 'custom', field: 'id',
isForm: false, sort: 'custom',
isTable:false, isForm: false,
}, isTable: false
{ },
label: '代码', {
field: 'code', label: '代码',
sort: 'custom', field: 'code',
isSearch: true, sort: 'custom',
}, isSearch: true
{ },
label: '领用描述', {
field: 'usageDescription', label: '领用描述',
sort: 'custom', field: 'usageDescription',
isSearch: false, sort: 'custom',
isTable:false, isSearch: false,
isForm:false, isTable: false,
}, isForm: false
{ },
label: '成本中心ID', {
field: 'costcentreId', label: '成本中心ID',
sort: 'custom', field: 'costcentreId',
isSearch: false, sort: 'custom',
isTable:false, isSearch: false,
isForm: false, isTable: false,
form:{ isForm: false,
componentProps:{ form: {
disabled:true componentProps: {
} disabled: true
} }
},
{
label: '成本中心代码',
field: 'costcentreCode',
sort: 'custom',
isSearch: false,
isTable:false,
isForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '类型',
field: 'costcentreType',
sort: 'custom',
isSearch: true,
form:{
show:true,
component: 'Select',
componentProps: {
// isSearchList: true,
placeholder:'请选择库位代码',
searchField: 'costcentreType',
// searchTitle: '生产线信息',
// searchAllSchemas: Productionline.allSchemas,
// searchPage: ProductionLineCodeApi.getProductionlinePage
options:typeList.map(item=>({
label:item.labelKey,
value:item.labelValue
}))
} }
} },
{
}, label: '成本中心代码',
{ field: 'costcentreCode',
label: '项目ID', sort: 'custom',
field: 'projectId', isSearch: false,
sort: 'custom', isTable: false,
isSearch: false, isForm: false,
isTable:false, form: {
isForm:false, // labelMessage: '信息提示说明!!!',
disabled:true, componentProps: {
form:{ isSearchList: true, // 开启查询弹窗
componentProps:{ searchListPlaceholder: '请选择物料代码', // 输入框占位文本
disabled:true searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
} }
} },
}, {
{ label: '类型',
label: '项目代码', field: 'costcentreType',
field: 'projectCode', sort: 'custom',
sort: 'custom', isSearch: true,
isSearch: false, form: {
isForm:false, show: true,
isTable:false, component: 'Select',
form: { componentProps: {
// labelMessage: '信息提示说明!!!', // isSearchList: true,
componentProps: { placeholder: '请选择库位代码',
isSearchList: true, // 开启查询弹窗 searchField: 'costcentreType',
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 // searchTitle: '生产线信息',
searchField: 'projectCode', // 查询弹窗赋值字段 // searchAllSchemas: Productionline.allSchemas,
searchTitle: '物料基础信息', // 查询弹窗标题 // searchPage: ProductionLineCodeApi.getProductionlinePage
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 options: typeList.map((item) => ({
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 label: item.labelKey,
searchCondition: [{ value: item.labelValue
key: 'available', }))
value: 'TRUE', }
isMainValue: false
}]
} }
} },
}, {
{ label: '项目ID',
label: '会计账户', field: 'projectId',
field: 'accountingAccount', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isTable: false,
form:{ isForm: false,
componentProps:{ disabled: true,
disabled:false form: {
componentProps: {
disabled: true
}
} }
} },
}, {
{ label: '项目代码',
label: '名称', field: 'projectCode',
field: 'accountingName', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
form:{ isTable: false,
componentProps:{ form: {
disabled:false // labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
} }
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 120
}, },
form: { {
component: 'Switch', label: '会计账户',
value: 'TRUE', field: 'accountingAccount',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', isSearch: false,
activeValue: 'TRUE' table: {
width: 120
},
form: {
componentProps: {
disabled: false
}
} }
}, },
}, {
{ label: '名称',
label: '是否来自产品类', field: 'accountingName',
field: 'isFromPlMstr', sort: 'custom',
sort: 'custom', isSearch: false,
dictType: DICT_TYPE.TRUE_FALSE, form: {
dictClass: 'string', componentProps: {
isTable: true, disabled: false
table: { }
width: 140 }
}, },
form: { {
component: 'Switch', label: '是否可用',
value: 'TRUE', field: 'available',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', dictType: DICT_TYPE.TRUE_FALSE,
activeValue: 'TRUE' dictClass: 'string',
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
} }
}, },
}, {
{ label: '是否来自产品类',
label: '产品类类型', field: 'isFromPlMstr',
field: 'plMstrType', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE,
isSearch: false, dictClass: 'string',
dictType: DICT_TYPE.PL_MSTR_TYPE, isTable: true,
dictClass: 'string', table: {
isTable: true, width: 140
table: { },
width: 120 form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
}, },
form:{ {
componentProps:{ label: '产品类类型',
disabled:false field: 'plMstrType',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.PL_MSTR_TYPE,
dictClass: 'string',
isTable: true,
table: {
width: 120
},
form: {
componentProps: {
disabled: false
}
} }
} },
}, {
{ label: '项目是否必填',
label: '备注', field: 'isProject',
field: 'remark', sort: 'custom',
sort: 'custom', dictType: DICT_TYPE.TRUE_FALSE,
}, dictClass: 'string',
{ isTable: true,
label: '创建时间', table: {
field: 'createTime', width: 140
sort: 'custom', },
formatter: dateFormatter, form: {
search: { component: 'Switch',
component: 'DatePicker', value: 'FALSE',
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', inactiveValue: 'FALSE',
type: 'daterange', activeValue: 'TRUE'
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] }
} }
}, },
form: { {
component: 'DatePicker', label: '成本中心默认值',
componentProps: { field: 'costDefault',
style: {width:'100%'}, sort: 'custom',
type: 'datetime', isSearch: false,
dateFormat: 'YYYY-MM-DD HH:mm:ss', isTable: true,
valueFormat: 'x', 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
}
] // 失去焦点校验参数
}
} }
}, },
isForm: false, {
}, label: '备注',
{ field: 'remark',
label: '创建者', sort: 'custom'
field: 'creator',
table: {
width: 130
}, },
isForm: false, {
isTable: true label: '创建时间',
}, field: 'createTime',
{ sort: 'custom',
label: '最后更新时间', formatter: dateFormatter,
field: 'updateTime', table: {
sort: 'custom', width: 180
isDetail: true, },
isForm: false, search: {
isTable: true, component: 'DatePicker',
formatter: dateFormatter, componentProps: {
detail: { valueFormat: 'YYYY-MM-DD HH:mm:ss',
dateFormat: 'YYYY-MM-DD HH:mm:ss' type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isForm: false
}, },
table: { {
width: 180 label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
}, },
form: { {
component: 'DatePicker', label: '最后更新时间',
componentProps: { field: 'updateTime',
style: {width:'100%'}, sort: 'custom',
type: 'datetime', isDetail: true,
dateFormat: 'YYYY-MM-DD HH:mm:ss', isForm: false,
valueFormat: 'x', isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: true,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
} }
} }
}, ])
{ )
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: true,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

Loading…
Cancel
Save