|
|
@ -1,6 +1,7 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
|
// 表单校验
|
|
|
|
export const SupplierCycleRules = reactive({ |
|
|
|
available: [required], |
|
|
@ -20,173 +21,130 @@ export const SupplierCycle = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'supplierCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
enterSearch:true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
}, |
|
|
|
search: { |
|
|
|
componentProps: { |
|
|
|
enterSearch:true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: true, |
|
|
|
isSearch: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: 'TRUE', |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期一', |
|
|
|
field: 'monday', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期二', |
|
|
|
field: 'tuesday', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期三', |
|
|
|
field: 'wednesday', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期四', |
|
|
|
field: 'thursday', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期五', |
|
|
|
field: 'friday', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期六', |
|
|
|
field: 'saturday', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '星期日', |
|
|
|
field: 'sunday', |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '版本号', |
|
|
|
field: 'version', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
formatter: dateFormatter, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
type: 'daterange', |
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '扩展属性', |
|
|
|
field: 'extraProperties', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '地点ID', |
|
|
|
field: 'siteId', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '开始时间', |
|
|
|
field: 'beginTime', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
formatter: dateFormatter, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: '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: { |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '结束时间', |
|
|
|
field: 'endTime', |
|
|
|
label: '同步周期', |
|
|
|
field: 'cycle', |
|
|
|
isForm:true, |
|
|
|
isDetail: false, |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
formatter: dateFormatter, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
type: 'daterange', |
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
value:[], |
|
|
|
component:'Checkbox', |
|
|
|
componentProps: { |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
form: { |
|
|
|
component: 'Radio' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '并发乐观锁', |
|
|
|
field: 'concurrencyStamp', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '权限所属人员id', |
|
|
|
field: 'ruleUserId', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '部门', |
|
|
|
field: 'departmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isTable:false, |
|
|
|
isForm:false, |
|
|
|
options: [ |
|
|
|
{label:'星期一',value:'monday'}, |
|
|
|
{label:'星期二',value:'tuesday'}, |
|
|
|
{label:'星期三',value:'wednesday'}, |
|
|
|
{label:'星期四',value:'thursday'}, |
|
|
|
{label:'星期五',value:'friday'}, |
|
|
|
{label:'星期六',value:'saturday'}, |
|
|
|
{label:'星期日',value:'sunday'} |
|
|
|
] |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|