|
|
@ -1,5 +1,12 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' |
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
const userDept = userStore.userSelfInfo.dept |
|
|
|
// id 转str 否则form回显匹配不到
|
|
|
|
userDept.id = userDept.id.toString() |
|
|
|
const userDeptArray:any = [userDept] |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const PackagetuomergeMainRules = reactive({ |
|
|
@ -114,6 +121,9 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'executeTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -125,8 +135,10 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
isTable:false |
|
|
@ -136,6 +148,9 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'activeDate', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -147,8 +162,10 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
isTable:false |
|
|
@ -157,13 +174,18 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申请时间', |
|
|
|
field: 'requestTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -175,11 +197,15 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
isTable:false |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '截止时间', |
|
|
@ -201,19 +227,38 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
isTable:false |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '部门', |
|
|
|
field: 'departmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false |
|
|
|
isTable:false, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
return userDeptArray.find((account) => account.id == cellValue)?.name |
|
|
|
}, |
|
|
|
form: { |
|
|
|
value: userDept.id, |
|
|
|
component: 'Select', |
|
|
|
api: () => userDeptArray, |
|
|
|
componentProps: { |
|
|
|
disabled: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '用户组', |
|
|
|
field: 'userGroupCode', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '接口类型', |
|
|
@ -250,6 +295,9 @@ export const PackagetuomergeMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 200 |
|
|
|
}, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '扩展属性', |
|
|
@ -334,6 +382,8 @@ export const PackagetuomergeDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '计量单位', |
|
|
|
field: 'uom', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.UOM, |
|
|
|
dictClass: 'string', |
|
|
|
table: { |
|
|
|
width: 120 |
|
|
|
}, |
|
|
@ -450,6 +500,8 @@ export const PackagetuomergeDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '从库存状态', |
|
|
|
field: 'fromInventoryStatus', |
|
|
|
dictType: DICT_TYPE.INVENTORY_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 120 |
|
|
@ -458,6 +510,8 @@ export const PackagetuomergeDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '到库存状态', |
|
|
|
field: 'toInventoryStatus', |
|
|
|
dictType: DICT_TYPE.INVENTORY_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 120 |
|
|
|