|
|
@ -1,486 +1,548 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
|
|
|
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
|
|
|
|
|
|
|
import * as WorkshopApi from '@/api/wms/workshop' |
|
|
|
import * as WorkshopApi from '@/api/wms/workshop' |
|
|
|
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' |
|
|
|
|
|
|
|
import * as ProductionlineApi from '@/api/wms/productionline' |
|
|
|
import * as ProductionlineApi from '@/api/wms/productionline' |
|
|
|
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' |
|
|
|
|
|
|
|
import * as WorkstationApi from '@/api/wms/workstation' |
|
|
|
import * as WorkstationApi from '@/api/wms/workstation' |
|
|
|
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' |
|
|
|
|
|
|
|
import * as BalanceApi from '@/api/wms/balance' |
|
|
|
import * as BalanceApi from '@/api/wms/balance' |
|
|
|
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
|
|
|
|
|
|
|
import * as ItempackagingApi from '@/api/wms/itempackage' |
|
|
|
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' |
|
|
|
|
|
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
import * as SupplieritemApi from '@/api/wms/supplieritem' |
|
|
|
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' |
|
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
import { TableColumn } from '@/types/table' |
|
|
|
|
|
|
|
import * as InspectionQ3Api from '@/api/qms/inspectionQ3' |
|
|
|
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data' |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
|
|
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
|
|
|
const queryParams = { |
|
|
|
pageSize:10, |
|
|
|
pageNo:1, |
|
|
|
code:'MaterialReturnRequest' |
|
|
|
pageSize: 10, |
|
|
|
pageNo: 1, |
|
|
|
code: 'MaterialReturnRequest' |
|
|
|
} |
|
|
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) |
|
|
|
const requestsettingData =data?.list[0]||{} |
|
|
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) |
|
|
|
const requestsettingData = data?.list[0] || {} |
|
|
|
|
|
|
|
//console.log(34, requestsettingData)
|
|
|
|
const userStore = useUserStore() |
|
|
|
const userDept = userStore.userSelfInfo.dept |
|
|
|
// id 转str 否则form回显匹配不到
|
|
|
|
userDept.id = userDept.id.toString() |
|
|
|
const userDeptArray:any = [userDept] |
|
|
|
//console.log(34, requestsettingData)
|
|
|
|
const userStore = useUserStore() |
|
|
|
const userDept = userStore.userSelfInfo.dept |
|
|
|
// id 转str 否则form回显匹配不到
|
|
|
|
userDept.id = userDept.id.toString() |
|
|
|
const userDeptArray: any = [userDept] |
|
|
|
|
|
|
|
/** |
|
|
|
* @returns {Array} 生产退料申请主表 |
|
|
|
*/ |
|
|
|
export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '单据号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180, |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '状态', |
|
|
|
field: 'status', |
|
|
|
dictType: DICT_TYPE.REQUEST_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: true, |
|
|
|
isForm:false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
value: '1', |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
export const ProductionscrapRequestMain = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '单据号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180, |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isSearch: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'Q3通知单号', |
|
|
|
field: 'q3Number', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isDetail: true, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
// multiple: true,
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
searchTitle: 'Q3通知单号', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'status', |
|
|
|
value: '0', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
], |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'number', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true |
|
|
|
} |
|
|
|
] // 失去焦点校验参数
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '车间', |
|
|
|
field: 'workshopCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '车间信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition:[{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}], |
|
|
|
verificationParams: [{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true, |
|
|
|
}], // 失去焦点校验参数
|
|
|
|
{ |
|
|
|
label: '状态', |
|
|
|
field: 'status', |
|
|
|
dictType: DICT_TYPE.REQUEST_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: true, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
value: '1', |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '生产线代码', |
|
|
|
field: 'productionLineCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
{ |
|
|
|
label: '车间', |
|
|
|
field: 'workshopCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '车间信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
], |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true |
|
|
|
} |
|
|
|
] // 失去焦点校验参数
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
{ |
|
|
|
label: '生产线代码', |
|
|
|
field: 'productionLineCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '生产线信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'workshopCode', |
|
|
|
value: 'workshopCode', |
|
|
|
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
|
|
|
|
isMainValue: true |
|
|
|
} |
|
|
|
], |
|
|
|
verificationParams: [ |
|
|
|
{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true |
|
|
|
} |
|
|
|
] // 失去焦点校验参数
|
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '生产线信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition:[{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'workshopCode', |
|
|
|
value: 'workshopCode', |
|
|
|
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
|
|
|
|
isMainValue: true |
|
|
|
}], |
|
|
|
verificationParams: [{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true, |
|
|
|
}], // 失去焦点校验参数
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'workshopCode', |
|
|
|
value: 'workshopCode', |
|
|
|
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
|
|
|
|
isMainValue: true |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '生产线信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition:[{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'workshopCode', |
|
|
|
value: 'workshopCode', |
|
|
|
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
|
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申请时间', |
|
|
|
field: 'requestTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
{ |
|
|
|
label: '申请时间', |
|
|
|
field: 'requestTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '截止时间', |
|
|
|
field: 'dueTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '截止时间', |
|
|
|
field: 'dueTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
{ |
|
|
|
label: '从库区类型范围', |
|
|
|
field: 'fromAreaTypes', |
|
|
|
dictType: DICT_TYPE.AREA_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
{ |
|
|
|
label: '到库区类型范围', |
|
|
|
field: 'toAreaTypes', |
|
|
|
dictType: DICT_TYPE.AREA_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从库区代码范围', |
|
|
|
field: 'fromAreaCodes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到库区代码范围', |
|
|
|
field: 'toAreaCodes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从仓库代码', |
|
|
|
field: 'fromWarehouseCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到仓库代码', |
|
|
|
field: 'toWarehouseCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '业务类型', |
|
|
|
field: 'businessType', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '部门', |
|
|
|
field: 'departmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
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: 'fromAreaTypes', |
|
|
|
dictType: DICT_TYPE.AREA_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到库区类型范围', |
|
|
|
field: 'toAreaTypes', |
|
|
|
dictType: DICT_TYPE.AREA_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从库区代码范围', |
|
|
|
field: 'fromAreaCodes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到库区代码范围', |
|
|
|
field: 'toAreaCodes', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '从仓库代码', |
|
|
|
field: 'fromWarehouseCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '到仓库代码', |
|
|
|
field: 'toWarehouseCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '业务类型', |
|
|
|
field: 'businessType', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '部门', |
|
|
|
field: 'departmentCode', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
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: 'autoCommit', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.autoCommit, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自动提交', |
|
|
|
field: 'autoCommit', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.autoCommit, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true, |
|
|
|
{ |
|
|
|
label: '自动通过', |
|
|
|
field: 'autoAgree', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.autoAgree, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自动通过', |
|
|
|
field: 'autoAgree', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.autoAgree, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true, |
|
|
|
{ |
|
|
|
label: '自动执行', |
|
|
|
field: 'autoExecute', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.autoExecute, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '自动执行', |
|
|
|
field: 'autoExecute', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.autoExecute, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true, |
|
|
|
{ |
|
|
|
label: '直接生成记录', |
|
|
|
field: 'directCreateRecord', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.directCreateRecord, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '直接生成记录', |
|
|
|
field: 'directCreateRecord', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isForm: false, |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: requestsettingData.directCreateRecord, |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE', |
|
|
|
disabled: true, |
|
|
|
} |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建者', |
|
|
|
field: 'creator', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '最后更新时间', |
|
|
|
field: 'updateTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: { width: '100%' }, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x' |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '最后更新者', |
|
|
|
field: 'updater', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|
field: 'action', |
|
|
|
isDetail: false, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isTable: false |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建者', |
|
|
|
field: 'creator', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '最后更新时间', |
|
|
|
field: 'updateTime', |
|
|
|
formatter: dateFormatter, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
}, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '最后更新者', |
|
|
|
field: 'updater', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
isForm: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|
field: 'action', |
|
|
|
isDetail: false, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isTable: false, |
|
|
|
} |
|
|
|
])) |
|
|
|
]) |
|
|
|
) |
|
|
|
|
|
|
|
//表单校验
|
|
|
|
export const ProductionscrapRequestMainRules = reactive({ |
|
|
|