Browse Source

物料降级记录页面修改

master_hella_20240701
chenfang 6 months ago
parent
commit
8a3b6a903e
  1. 142
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts

142
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts

@ -1,5 +1,11 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
const deptList = ref<Tree[]>([]) // 树形结构
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
// 表单校验
export const RelegateRecordMainRules = reactive({
@ -15,12 +21,18 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
},
{
label: '执行时间',
@ -34,11 +46,28 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
table: {
width: 200
},
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '申请时间',
@ -52,16 +81,35 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
table: {
width: 200
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isTable: false,
isDetail: false,
isSearch: false,
isTableForm: false,
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
// multiple: true,
}
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作',
@ -73,8 +121,6 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
]))
// 表单校验
export const RelegateRecordDetailRules = reactive({
itemCode: [required],
@ -93,91 +139,175 @@ export const RelegateRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
},
{
label: '降级后物料代码',
field: 'downItemCode',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
form: {
component: 'Radio'
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select'
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
table: {
width: 180
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 180
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable:false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
table: {
width: 180
},
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 180
},
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 180
},
},
{
label: '到库区类型',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable:false,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作',
field: 'action',
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'

Loading…
Cancel
Save