You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1332 lines
34 KiB
1332 lines
34 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
|
|
|
|
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 { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
|
|
|
|
import * as WorkshopApi from '@/api/wms/workshop'
|
|
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
|
|
import * as ItempackagingApi from '@/api/wms/itempackage'
|
|
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
|
|
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
|
|
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
|
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic'
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
|
|
|
|
import * as WarehouseApi from '@/api/wms/warehouse'
|
|
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
|
const queryParams = {
|
|
pageSize: 10,
|
|
pageNo: 1,
|
|
code: 'IssueRequest'
|
|
}
|
|
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
|
|
const requestsettingData = data?.list[0] || {}
|
|
|
|
// 获取当前操作人的部门
|
|
import { useUserStore } from '@/store/modules/user'
|
|
import { TableColumn } from '@/types/table'
|
|
const userStore = useUserStore()
|
|
const userDept = userStore.userSelfInfo.dept
|
|
// id 转str 否则form回显匹配不到
|
|
userDept.id = userDept.id.toString()
|
|
const userDeptArray: any = [userDept]
|
|
|
|
/**
|
|
* @returns {Array} 发料申请主表
|
|
*/
|
|
export const IssueRequestMain = useCrudSchemas(
|
|
reactive<CrudSchema[]>([
|
|
{
|
|
label: '单据号',
|
|
field: 'number',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180,
|
|
fixed: 'left'
|
|
},
|
|
isForm: false,
|
|
isSearch: true,
|
|
sortSearchDefault: 1
|
|
},
|
|
{
|
|
label: '车间代码',
|
|
field: 'workshopCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
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: 'productionLineCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
hiddenInMain: true,
|
|
tableForm: {
|
|
enterSearch:true,
|
|
isInpuFocusShow: true,
|
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '生产线信息', // 查询弹窗标题
|
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'workshopCode',
|
|
value: 'workshopCode',
|
|
message: '请填写车间代码!',
|
|
isMainValue: true
|
|
},
|
|
{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
},
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch:true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '生产线信息', // 查询弹窗标题
|
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'workshopCode',
|
|
value: 'workshopCode',
|
|
message: '请填写车间代码!',
|
|
isMainValue: true
|
|
},
|
|
{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '工位代码',
|
|
field: 'workStationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
hiddenInMain: true,
|
|
tableForm: {
|
|
isInpuFocusShow: true,
|
|
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '工位信息', // 查询弹窗标题
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'productionLineCode',
|
|
value: 'productionLineCode',
|
|
message: '请填写生产线代码!',
|
|
isMainValue: true
|
|
},
|
|
{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
}
|
|
],
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
},
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch: true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '工位信息', // 查询弹窗标题
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'productionLineCode',
|
|
value: 'productionLineCode',
|
|
message: '请填写生产线代码!',
|
|
isMainValue: true
|
|
},
|
|
{
|
|
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',
|
|
isForm: false,
|
|
isTable: true,
|
|
isSearch: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 1,
|
|
form: {
|
|
value: '1',
|
|
componentProps: {
|
|
disabled: 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: {
|
|
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'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '优先级',
|
|
field: 'priority',
|
|
dictType: DICT_TYPE.PRIORITY,
|
|
dictClass: 'string',
|
|
isSearch: false,
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'Select',
|
|
value: '1'
|
|
}
|
|
},
|
|
{
|
|
label: '备料计划单号',
|
|
field: 'preparetoissuePlanNumber',
|
|
isSearch: false,
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
},
|
|
{
|
|
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',
|
|
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,
|
|
// form: {
|
|
// // labelMessage: '信息提示说明!!!',
|
|
// componentProps: {
|
|
// isSearchList: true, // 开启查询弹窗
|
|
// searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
|
|
// searchField: 'code', // 查询弹窗赋值字段
|
|
// searchTitle: '仓库信息', // 查询弹窗标题
|
|
// searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
|
|
// searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// }
|
|
// },
|
|
// {
|
|
// label: '到仓库代码',
|
|
// field: 'toWarehouseCode',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// isTable:false,
|
|
// form: {
|
|
// componentProps: {
|
|
// disabled: true
|
|
// }
|
|
// }
|
|
// },
|
|
{
|
|
label: '业务类型',
|
|
field: 'businessType',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
form: {
|
|
value: 'Issue',
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
},
|
|
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: 'remark',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isForm: false,
|
|
isTable: true,
|
|
isDetail: true
|
|
},
|
|
// {
|
|
// label: '使用在途库',
|
|
// field: 'useOnTheWayLocation',
|
|
// dictType: DICT_TYPE.TRUE_FALSE,
|
|
// dictClass: 'string',
|
|
// isTable:false,
|
|
// isForm:false,
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// form: {
|
|
// component: 'Switch',
|
|
// value: 'TRUE',
|
|
// componentProps: {
|
|
// inactiveValue: 'FALSE',
|
|
// activeValue: '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',
|
|
isForm: false,
|
|
isTable: 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',
|
|
isForm: false,
|
|
isTable: 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: 'createTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: true,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
isForm: false,
|
|
isSearch: true,
|
|
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: 'creator',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: true,
|
|
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: {
|
|
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: 230,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
])
|
|
)
|
|
|
|
export const IssueRequestMainRules = reactive({
|
|
workshopCode: [{ required: true, message: '请选择车间代码', trigger: 'change' }],
|
|
productionLineCode: [{ required: true, message: '请选择生产线代码', trigger: 'change' }],
|
|
// fromWarehouseCode: [
|
|
// { required: true, message: '请选择从仓库代码', trigger: 'change' }
|
|
// ],
|
|
// dueTime: [
|
|
// { required: true, message: '请选择截止时间', trigger: 'change' }
|
|
// ],
|
|
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
|
|
})
|
|
|
|
/**
|
|
* @returns {Array} 发料申请子表
|
|
*/
|
|
export const IssueRequestDetail = useCrudSchemas(
|
|
reactive<CrudSchema[]>([
|
|
// {
|
|
// label: '生产线代码',
|
|
// field: 'productionLineCode',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// isTable:false,
|
|
// hiddenInMain:true,
|
|
// tableForm:{
|
|
// isInpuFocusShow: true,
|
|
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
// searchField: 'code', // 查询弹窗赋值字段
|
|
// searchTitle: '生产线信息', // 查询弹窗标题
|
|
// searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
// searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key:'workshopCode',
|
|
// value:'workshopCode',
|
|
// message: '请填写车间代码!',
|
|
// isMainValue: true
|
|
// },{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// },
|
|
// form: {
|
|
// // labelMessage: '信息提示说明!!!',
|
|
// componentProps: {
|
|
// isSearchList: true, // 开启查询弹窗
|
|
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
|
|
// searchField: 'code', // 查询弹窗赋值字段
|
|
// searchTitle: '生产线信息', // 查询弹窗标题
|
|
// searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
// searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key:'workshopCode',
|
|
// value:'workshopCode',
|
|
// message: '请填写车间代码!',
|
|
// isMainValue: true
|
|
// },{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// }
|
|
// },
|
|
// {
|
|
// label: '工位代码',
|
|
// field: 'workStationCode',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// isTable:false,
|
|
// hiddenInMain:true,
|
|
// tableForm:{
|
|
// isInpuFocusShow: true,
|
|
// searchListPlaceholder: '请选择工位代码', // 输入框占位文本
|
|
// searchField: 'code', // 查询弹窗赋值字段
|
|
// searchTitle: '工位信息', // 查询弹窗标题
|
|
// searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
// searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key:'productionLineCode',
|
|
// value:'productionLineCode',
|
|
// message: '请填写生产线代码!',
|
|
// isMainValue: true
|
|
// },{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// },
|
|
// form: {
|
|
// // labelMessage: '信息提示说明!!!',
|
|
// componentProps: {
|
|
// isSearchList: true, // 开启查询弹窗
|
|
// searchListPlaceholder: '请选择工位代码', // 输入框占位文本
|
|
// searchField: 'code', // 查询弹窗赋值字段
|
|
// searchTitle: '工位信息', // 查询弹窗标题
|
|
// searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
// searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key:'productionLineCode',
|
|
// value:'productionLineCode',
|
|
// message: '请填写生产线代码!',
|
|
// isMainValue: true
|
|
// },{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// }
|
|
// },
|
|
{
|
|
label: '包装号',
|
|
field: 'packingNumber',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTable: false,
|
|
isSearch: false,
|
|
sortSearchDefault: 4,
|
|
sortTableDefault: 6,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
// {
|
|
// label: '器具号',
|
|
// field: 'containerNumber',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// hiddenInMain: true,
|
|
// isTableForm: false,
|
|
// isForm: false,
|
|
// isTable: false
|
|
// },
|
|
{
|
|
label: '批次',
|
|
field: 'batch',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
isSearch: false,
|
|
sortTableDefault: 5,
|
|
sortSearchDefault: 3,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
|
|
// {
|
|
// label: '从库位代码',
|
|
// field: 'fromLocationCode',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// isSearch: true,
|
|
// hiddenInMain:true,
|
|
// sortSearchDefault:6,
|
|
// },
|
|
{
|
|
label: '到库位代码',
|
|
field: 'toLocationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isSearch: false,
|
|
isTable: false,
|
|
sortSearchDefault: 6,
|
|
sortTableDefault: 1100,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '物料代码',
|
|
field: 'itemCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 250
|
|
},
|
|
isSearch: true,
|
|
sortSearchDefault: 2,
|
|
sortTableDefault: 3,
|
|
tableForm: {
|
|
multiple: true,
|
|
// enterSearch: true,
|
|
disabled:true,
|
|
// isInpuFocusShow: true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '物料信息', // 查询弹窗标题
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
},
|
|
{
|
|
key:'workshopCode',
|
|
value:'workshopCode',
|
|
message: '请填写车间代码!',
|
|
isMainValue: true,
|
|
isRemoveParams: true // 仅用于前端校验,不传参
|
|
},
|
|
{
|
|
key:'productionLineCode',
|
|
value:'productionLineCode',
|
|
message: '请填写生产线代码!',
|
|
isMainValue: true,
|
|
isRemoveParams: true // 仅用于前端校验,不传参
|
|
|
|
},
|
|
{
|
|
key: 'businessTypeCode',
|
|
value: 'Issue',
|
|
isMainValue: false
|
|
}
|
|
],
|
|
|
|
verificationPage: ItembasicApi.getItemListByCodes, // 校验数去焦点输入是否正确的方法
|
|
isShowTableFormSearch: true,
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
},
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '物料信息', // 查询弹窗标题
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
searchCondition: [
|
|
{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '物料名称',
|
|
field: 'itemName',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 300
|
|
},
|
|
sortTableDefault: 4,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '包装规格',
|
|
field: 'packUnit',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
isInpuFocusShow: true,
|
|
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
|
|
searchField: 'packUnit', // 查询弹窗赋值字段
|
|
searchTitle: '物料包装信息', // 查询弹窗标题
|
|
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
|
|
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
},{
|
|
key: 'itemCode',
|
|
value: 'itemCode',
|
|
message: '请填写物料代码!',
|
|
isMainValue: true
|
|
}]
|
|
}
|
|
// form: {
|
|
// // labelMessage: '信息提示说明!!!',
|
|
// componentProps: {
|
|
// enterSearch:true,
|
|
// isSearch:true,
|
|
// isSearchList: true, // 开启查询弹窗
|
|
// searchListPlaceholder: '请选择包装规格', // 输入框占位文本
|
|
// searchField: 'itemCode', // 查询弹窗赋值字段
|
|
// searchTitle: '物料包装信息', // 查询弹窗标题
|
|
// searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
|
|
// searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// },{
|
|
// key: 'itemCode',
|
|
// value: 'itemCode',
|
|
// message: '请填写物料代码!',
|
|
// isMainValue: true
|
|
// }],
|
|
// verificationParams: [{
|
|
// key: 'packUnit',
|
|
// action: '==',
|
|
// value: '',
|
|
// isMainValue: false,
|
|
// isSearch: true,
|
|
// isFormModel: true,
|
|
// }], // 失去焦点校验参数
|
|
// }
|
|
// }
|
|
},
|
|
{
|
|
label: '标包数',
|
|
field: 'packQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled:true,
|
|
type: 'InputNumber',
|
|
min: 0,
|
|
precision: 0
|
|
},
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 0,
|
|
precision: 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '包装数',
|
|
field: 'countQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
tableForm: {
|
|
type: 'InputNumber',
|
|
min: 1,
|
|
precision: 0
|
|
},
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 1,
|
|
precision: 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
tableForm: {
|
|
type: 'slot'
|
|
},
|
|
// form: {
|
|
// component: 'InputNumber',
|
|
// componentProps: {
|
|
// min: 0,
|
|
// precision: 6
|
|
// }
|
|
// }
|
|
},
|
|
|
|
{
|
|
label: '计量单位',
|
|
field: 'uom',
|
|
dictType: DICT_TYPE.UOM,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
sortTableDefault: 6,
|
|
tableForm: {
|
|
type: 'Select',
|
|
disabled: true
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '库存状态',
|
|
field: 'inventoryStatus',
|
|
dictType: DICT_TYPE.INVENTORY_STATUS,
|
|
dictClass: 'string',
|
|
sortTableDefault: 7,
|
|
isTable: true,
|
|
isDetail: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '物料描述1',
|
|
field: 'itemDesc1',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '物料描述2',
|
|
field: 'itemDesc2',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
// {
|
|
// label: '采购订单号',
|
|
// field: 'poNumber',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// hiddenInMain:true,
|
|
// sortTableDefault:1,
|
|
// },
|
|
// {
|
|
// label: '订单行',
|
|
// field: 'poLine',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// hiddenInMain:true,
|
|
// sortTableDefault:2,
|
|
// },
|
|
{
|
|
label: '单据号',
|
|
field: 'number',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
isTableForm: false,
|
|
hiddenInMain: true,
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 300
|
|
},
|
|
sortTableDefault: 5,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '未执行任务数量',
|
|
field: 'unexecutedQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
component: 'InputNumber'
|
|
},
|
|
isTableForm: false,
|
|
hiddenInMain: true
|
|
},
|
|
// {
|
|
// label: '备注',
|
|
// field: 'remark',
|
|
// sort: 'custom',
|
|
// table: {
|
|
// width: 150
|
|
// },
|
|
// hiddenInMain: true
|
|
// },
|
|
{
|
|
label: '创建者',
|
|
field: 'creator',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '项目代码',
|
|
field: 'projectCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
|
|
{
|
|
label: '从货主',
|
|
field: 'fromOwnerCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '到货主',
|
|
field: 'toOwnerCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '最后更新时间',
|
|
field: 'updateTime',
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
sort: 'custom',
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x'
|
|
}
|
|
},
|
|
isTable: false,
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
{
|
|
label: '最后更新者',
|
|
field: 'updater',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isTable: false,
|
|
hiddenInMain: true,
|
|
isTableForm: false,
|
|
isForm: false
|
|
},
|
|
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
hiddenInMain: true,
|
|
isDetail: false,
|
|
isForm: false,
|
|
table: {
|
|
width: 200,
|
|
fixed: 'right'
|
|
},
|
|
isTableForm: false
|
|
}
|
|
])
|
|
)
|
|
|
|
//表单校验
|
|
export const IssueRequestDetailRules = reactive({
|
|
// productionLineCode: [
|
|
// { required: true, message: '请选择生产线代码', trigger: 'change' }
|
|
// ],
|
|
// workStationCode: [
|
|
// { required: true, message: '请选择工位代码', trigger: 'change' }
|
|
// ],
|
|
itemCode: [
|
|
{ required: true, message: '请选择物料代码', trigger: 'change' }
|
|
],
|
|
packingNumber: [
|
|
{ required: true, message: '请输入包装号', trigger: 'blur' }
|
|
],
|
|
batch: [
|
|
{ required: true, message: '请输入批次', trigger: 'blur' }
|
|
],
|
|
inventoryStatus: [
|
|
{ required: true, message: '请选择库存状态', trigger: 'change' }
|
|
],
|
|
toLocationCode: [
|
|
{ required: true, message: '请输入到库位代码', trigger: 'blur' }
|
|
],
|
|
countQty: [
|
|
{ required: true, message: '请输入包装数量', trigger: 'change' },
|
|
// { min: 0, message: '包装数量不能小于1', trigger: 'blur' }
|
|
],
|
|
qty: [
|
|
{ required: true, message: '请输入数量', trigger: 'blur' }
|
|
],
|
|
uom: [
|
|
{ required: true, message: '请选择单位', trigger: 'change' }
|
|
],
|
|
remark: [
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
|
|
],
|
|
packUnit: [
|
|
{ required: true, message: '请选择包装规格', trigger: 'change' }
|
|
]
|
|
})
|
|
|