diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index 7fe301a2d..37694b15d 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -48,8 +48,7 @@ export const exportWorkstation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/mes/workstation/get-import-template' }) -} -// 查询班组列表 +}// 查询班组列表 export const getTeamPage = async (params) => { console.log(goalParams.workstationCode) params.workstationCode = goalParams.workstationCode @@ -61,6 +60,35 @@ export const getTeamPage = async (params) => { return await request.get({ url: `/mes/team/pageListByWorkstationCode`, params }) } } +// 查询选择班组列表 +export const checkTeamPageList = async (params) => { + console.log(goalParams.workstationCode) + params.workstationCode = goalParams.workstationCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/team/senior', data }) + } else { + return await request.get({ url: `/mes/team/pageCheckListByWorkstationCode`, params }) + } +} +// 添加班组关联 +export const createTeamRelation = async (workstationCode,teamCodes:string[]) => { + const data = { + workstationCode : workstationCode, + teamCodes : teamCodes + } + return await request.post({ url: `/mes/team/createRelation`, data }) +} + +// 删除班组关联 +export const deleteTeamRelation = async (workstationCode,teamCodes:string[]) => { + const data = { + workstationCode : workstationCode, + teamCodes : teamCodes + } + return await request.post({ url: `/mes/team/deleteRelation`, data }) +} export const getEquipmentPage = async (params) => { console.log(goalParams.workstationCode) params.workstationCode = goalParams.workstationCode @@ -72,6 +100,35 @@ export const getEquipmentPage = async (params) => { return await request.get({ url: `/mes/equipment/pageListByWorkstationCode`, params }) } } +// 查询选择设备列表 +export const checkEquipmentPageList = async (params) => { + console.log(goalParams.workstationCode) + params.workstationCode = goalParams.workstationCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/equipment/senior', data }) + } else { + return await request.get({ url: `/mes/equipment/pageCheckListByWorkstationCode`, params }) + } +} +// 添加设备关联 +export const createEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => { + const data = { + workstationCode : workstationCode, + equipmentCodes : equipmentCodes + } + return await request.post({ url: `/mes/team/createRelation`, data }) +} + +// 删除设备关联 +export const deleteEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => { + const data = { + workstationCode : workstationCode, + equipmentCodes : equipmentCodes + } + return await request.post({ url: `/mes/team/deleteRelation`, data }) +} export const getProcessPage = async (params) => { if (params.isSearch) { delete params.isSearch @@ -81,6 +138,32 @@ export const getProcessPage = async (params) => { return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params }) } } +export const checkProcessPageList = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/production-process/senior', data }) + } else { + return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params }) + } +} +// 添加工序关联 +export const createProcessRelation = async (workstationCode,processCodes:string[]) => { + const data = { + workstationCode : workstationCode, + processCodes : processCodes + } + return await request.post({ url: `/mes/production-process/createRelation`, data }) +} + +// 删除工序关联 +export const deleteProcessRelation = async (workstationCode,processCodes:string[]) => { + const data = { + workstationCode : workstationCode, + processCodes : processCodes + } + return await request.post({ url: `/mes/production-process/deleteRelation`, data }) +} export const getProductionPage = async (params) => { if (params.isSearch) { delete params.isSearch @@ -90,3 +173,29 @@ export const getProductionPage = async (params) => { return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params }) } } +export const checkProductionPageList = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/production-process/senior', data }) + } else { + return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params }) + } +} +// 添加产品关联 +export const createProductionRelation = async (workstationCode,productionCodes:string[]) => { + const data = { + workstationCode : workstationCode, + productionCodes : productionCodes + } + return await request.post({ url: `/mes/production-process/createRelation`, data }) +} + +// 删除产品关联 +export const deleteProductionRelation = async (workstationCode,productionCodes:string[]) => { + const data = { + workstationCode : workstationCode, + productionCodes : productionCodes + } + return await request.post({ url: `/mes/production-process/deleteRelation`, data }) +} diff --git a/src/api/wms/agvLocationrelation/index.ts b/src/api/wms/agvLocationrelation/index.ts new file mode 100644 index 000000000..5422aac82 --- /dev/null +++ b/src/api/wms/agvLocationrelation/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface AgvLocationrelationVO { + id: number + reqCode: string + positionCode: string + positionArea: string + wmsArea: string + wmsPosition: string + available: string + remark: string +} + +// 查询AGV库位转换列表 +export const getAgvLocationrelationPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/agv-locationrelation/senior', data }) + } else { + return await request.get({ url: `/wms/agv-locationrelation/page`, params }) + } +} + +// 查询AGV库位转换详情 +export const getAgvLocationrelation = async (id: number) => { + return await request.get({ url: `/wms/agv-locationrelation/get?id=` + id }) +} + +// 新增AGV库位转换 +export const createAgvLocationrelation = async (data: AgvLocationrelationVO) => { + return await request.post({ url: `/wms/agv-locationrelation/create`, data }) +} + +// 修改AGV库位转换 +export const updateAgvLocationrelation = async (data: AgvLocationrelationVO) => { + return await request.put({ url: `/wms/agv-locationrelation/update`, data }) +} + +// 删除AGV库位转换 +export const deleteAgvLocationrelation = async (id: number) => { + return await request.delete({ url: `/wms/agv-locationrelation/delete?id=` + id }) +} + +// 导出AGV库位转换 Excel +export const exportAgvLocationrelation = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/agv-locationrelation/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/agv-locationrelation/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/agv-locationrelation/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/mesBarCode/index.ts b/src/api/wms/mesBarCode/index.ts new file mode 100644 index 000000000..ba37485d6 --- /dev/null +++ b/src/api/wms/mesBarCode/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +export interface MesBarCodeVO { + id: number + plat: number + counter: string + sign: string + option: string + lowerLim: string + upperLimit: string + itac: string + type: string + lengthBc: number + posMat: string + lengthMat: number + posRevlv: string + partNumber: string + packLabel: string + oesLabel: string + checkRvl: string + days: number + available: string + remark: string +} + +// 查询生产条码清单列表 +export const getMesBarCodePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/mes-bar-code/senior', data }) + } else { + return await request.get({ url: `/wms/mes-bar-code/page`, params }) + } +} + +// 查询生产条码清单详情 +export const getMesBarCode = async (id: number) => { + return await request.get({ url: `/wms/mes-bar-code/get?id=` + id }) +} + +// 新增生产条码清单 +export const createMesBarCode = async (data: MesBarCodeVO) => { + return await request.post({ url: `/wms/mes-bar-code/create`, data }) +} + +// 修改生产条码清单 +export const updateMesBarCode = async (data: MesBarCodeVO) => { + return await request.put({ url: `/wms/mes-bar-code/update`, data }) +} + +// 删除生产条码清单 +export const deleteMesBarCode = async (id: number) => { + return await request.delete({ url: `/wms/mes-bar-code/delete?id=` + id }) +} + +// 导出生产条码清单 Excel +export const exportMesBarCode = async (params) => { + return await request.download({ url: `/wms/mes-bar-code/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/mes-bar-code/get-import-template' }) +} \ No newline at end of file diff --git a/src/utils/validator.ts b/src/utils/validator.ts index 60671f771..cafde51c7 100644 --- a/src/utils/validator.ts +++ b/src/utils/validator.ts @@ -729,7 +729,7 @@ function trim(str) { //校验只可输入大小写字母及数字 export function validateYS(rule, value, callback) { if (value) { - const regs = /^[a-zA-Z0-9-_]+$/ + const regs = /^[a-zA-Z0-9-_.]+$/ if(regs.test(value)){ callback() } else { diff --git a/src/views/mes/workstation/components/Detail.vue b/src/views/mes/workstation/components/Detail.vue new file mode 100644 index 000000000..443256baf --- /dev/null +++ b/src/views/mes/workstation/components/Detail.vue @@ -0,0 +1,681 @@ + + + + + diff --git a/src/views/mes/workstation/components/TableHead.vue b/src/views/mes/workstation/components/TableHead.vue new file mode 100644 index 000000000..507ba8de4 --- /dev/null +++ b/src/views/mes/workstation/components/TableHead.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 1aa880115..96b18035e 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -58,9 +58,50 @@ :detailAllSchemasRules="WorkstationRules" :apiPage="apiPage" :tabs="TabsList" - :detailButtonIsShowAdd = "true" - :detailButtonIsShowDelete="true" @changeTabs="changeTabs" + :buttondataTable="buttondataTable" + @tableFormButton="tableFormButton" + /> + + + + + @@ -81,18 +122,15 @@ import * as WorkstationApi from '@/api/mes/workstation' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' +import Detail from './components/Detail.vue' import { - getEquipmentPage, - getProcessPage, - getProductionPage, goalParams, - params } from "@/api/mes/workstation"; defineOptions({ name: 'Workstation' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 - +const teamRef = ref() const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name @@ -283,4 +321,65 @@ const changeTabs = (data) =>{ detailAllSchemas.value = Production.allSchemas } } +const buttondataTable = ref([{ + label: '取消关联', + name: 'viewParentPickingNumber', + hide: false, + type: 'primary', + icon: '', + color: '', + hasPermi: '', + link: true, // 文本展现按钮 +}]) +const teamListRef = ref() +const { tableObject: selectTeamListTableData, tableMethods: selectTeamListTableMethods } = useTable({ + getListApi: WorkstationApi.checkTeamPageList +}) +const { getList:selectTeamList } = selectTeamListTableMethods + +const equipmentListRef = ref() +const { tableObject: selectEquipmentListTableData, tableMethods: selectEquipmentListTableMethods } = useTable({ + getListApi: WorkstationApi.checkEquipmentPageList +}) +const { getList:selectEquipmentList } = selectEquipmentListTableMethods + +const processListRef = ref() +const { tableObject: selectProcessListTableData, tableMethods: processListTableMethods } = useTable({ + getListApi: WorkstationApi.checkProcessPageList +}) +const { getList:selectProcessListList } = processListTableMethods + +const productionListRef = ref() +const { tableObject: selectProductionListTableData, tableMethods: productionListTableMethods } = useTable({ + getListApi: WorkstationApi.checkProductionPageList +}) +const { getList:selectProductionList } = productionListTableMethods + +const tableFormButton = async (val , row) => { + if(val == 'Team'){ + selectTeamListTableData.params = { + workstationCode:row.workstationCode + } + await selectTeamList() + teamListRef.value.open('create', row, null,'viewDetail')//查看明细数据 + }else if(val == 'Equipment'){ + selectEquipmentListTableData.params = { + workstationCode:row.workstationCode + } + await selectEquipmentList() + equipmentListRef.value.open('create', row, null,'viewDetail')//查看明细数据 + }else if(val == 'Process'){ + selectProcessListTableData.params = { + workstationCode:row.workstationCode + } + await selectProcessListList() + processListRef.value.open('create', row, null,'viewDetail')//查看明细数据 + }else if(val == 'Production'){ + selectProductionListTableData.params = { + workstationCode:row.workstationCode + } + await selectProductionList() + productionListRef.value.open('create', row, null,'viewDetail')//查看明细数据 + } +} diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index baf468591..fe87fb777 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -105,6 +105,33 @@ export const Workstation = useCrudSchemas(reactive([ } ])) export const Team = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) +export const TeamSelect = useCrudSchemas(reactive([ { label: '代码', field: 'code', @@ -134,6 +161,17 @@ export const Equipment = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true } ])) export const Process = useCrudSchemas(reactive([ @@ -150,6 +188,17 @@ export const Process = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, } ])) export const Production = useCrudSchemas(reactive([ @@ -166,5 +215,16 @@ export const Production = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, } ])) diff --git a/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts b/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts new file mode 100644 index 000000000..656e96bf8 --- /dev/null +++ b/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts @@ -0,0 +1,151 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as AreaApi from '@/api/wms/areabasic' +import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +// 表单校验 +export const AgvLocationrelationRules = reactive({ + positionCode: [ + { required: true, message: '请填写AGV点位', trigger: 'change' } + ], + positionArea: [ + { required: true, message: '请填写AGV库区', trigger: 'change' } + ], + wmsArea: [ + { required: true, message: '请填写WMS库区', trigger: 'change' } + ], + wmsPosition: [ + { required: true, message: '请填写WMS库位', trigger: 'change' } + ] +}) + +export const AgvLocationrelation = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'reqCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: 'AGV点位', + field: 'positionCode', + sort: 'custom', + isSearch: false, + }, + { + label: 'AGV库区', + field: 'positionArea', + sort: 'custom', + isSearch: false, + }, + { + label: 'WMS库区', + field: 'wmsArea', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库区代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库区信息', // 查询弹窗标题 + searchAllSchemas: Area.allSchemas, // 查询弹窗所需类 + searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: 'WMS库位', + field: 'wmsPosition', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'areaCode', + value: "wmsArea", + message: '请选择库区代码!', + isMainValue: true + }] + } + } + }, + { + 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: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + isDetail: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/agvManage/agvLocationrelation/index.vue b/src/views/wms/agvManage/agvLocationrelation/index.vue new file mode 100644 index 000000000..0431f7339 --- /dev/null +++ b/src/views/wms/agvManage/agvLocationrelation/index.vue @@ -0,0 +1,267 @@ + + + diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts index 3b96a657c..4e3b6a855 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts @@ -109,7 +109,6 @@ export const Workstation = useCrudSchemas(reactive([ } } }, - { label: '原料库位', field: 'rawLocationCode', diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index 0a4c6c080..fafb01a6f 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -130,9 +130,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['areaCode'] = val[0]['code'] setV['areaType'] = val[0]['type'] }else if(formField == 'inPackUnit') { - setV['inPackUnit'] = val[0]['code'] + setV['inPackUnit'] = val[0]['packUnit'] }else if(formField == 'outPackUnit') { - setV['outPackUnit'] = val[0]['code'] + setV['outPackUnit'] = val[0]['packUnit'] }else if(formField == 'itemCode') { setV['itemCode'] = val[0]['code'] }else{ @@ -229,7 +229,7 @@ const butttondata = (row) => { row.status = "1" return [ defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:itemarea:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hasPermi:'wms:itemarea:delete'}), // 删除 + defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:itemarea:delete'}), // 删除 ] } @@ -252,12 +252,19 @@ const openForm =async (type: string, row?: number) => { if (item.field == 'areaCode') { item.componentProps.isSearchList = false, item.componentProps.disabled = true + } + if (item.field == 'itemCode') { + item.componentProps.isSearchList = false, + item.componentProps.disabled = true }}) }else { Itemarea.allSchemas.formSchema.forEach((item) => { if (item.field == 'areaCode') { item.componentProps.isSearchList = true } + if (item.field == 'itemCode') { + item.componentProps.isSearchList = true + } }) } tableData.value = [] // 重置明细数据 diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 2a0e3bb84..dedc4b9b2 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -7,14 +7,12 @@ import { Itembasic } from '../itembasic/itembasic.data' import * as AreaApi from '@/api/wms/areabasic' import { Area } from '../../factoryModeling/areabasic/areabasic.data' -import * as LocationgroupApi from '@/api/wms/locationgroup' -import { Locationgroup } from '../../factoryModeling/locationgroup/locationgroup.data' - import * as LocationApi from '@/api/wms/location' import { Location } from '../../factoryModeling/location/location.data' -import * as PackageunitApi from '@/api/wms/packageunit' -import { Packageunit } from '../packageunit/packageunit.data' +import * as ItempackageApi from '@/api/wms/itempackage' +import { Itempackaging } from '../itempackage/itempackage.data' +import { t } from '@/hooks/web/useI18n' export const Itemarea = useCrudSchemas(reactive([ { @@ -97,15 +95,19 @@ export const Itemarea = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格基础信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 + searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: "请选择物料代码", + isMainValue: true }] } } @@ -122,15 +124,19 @@ export const Itemarea = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格基础信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 + searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本 + searchField: 'packUnit', // 查询弹窗赋值字段 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: "请选择物料代码", + isMainValue: true }] } } @@ -206,7 +212,7 @@ export const Itemarea = useCrudSchemas(reactive([ }, form: { component: 'Switch', - value: 'TRUE', + value: 'FALSE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' @@ -309,7 +315,7 @@ export const Itemarea = useCrudSchemas(reactive([ }, form: { component: 'Switch', - value: 'TRUE', + value: 'FALSE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' @@ -361,7 +367,7 @@ export const Itemarea = useCrudSchemas(reactive([ dictClass: 'string', form: { component: 'Switch', - value: 'FALSE', + value: 'TRUE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' @@ -377,10 +383,10 @@ export const Itemarea = useCrudSchemas(reactive([ dictClass: 'string', form: { component: 'Switch', - value: 'FALSE', + value: 'TRUE', componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE' + activeValue: 'TRUE', } }, }, @@ -395,7 +401,8 @@ export const Itemarea = useCrudSchemas(reactive([ value: 'FALSE', componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE' + activeValue: 'TRUE', + disabled: true } }, }, @@ -422,7 +429,7 @@ export const Itemarea = useCrudSchemas(reactive([ dictClass: 'string', form: { component: 'Switch', - value: 'TRUE', + value: 'FALSE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' @@ -641,12 +648,6 @@ export const ItemareaRules = reactive({ outPackUnit: [ { required: true, message: '请选择出库包装规格', trigger: 'change' } ], - needReceive: [ - { required: true, message: '请选择需要接受确认', trigger: 'change' } - ], - available: [ - { required: true, message: '请选择是否可用', trigger: 'change' } - ], manageMode: [ { required: true, message: '请选择管理精度', trigger: 'change' } ], diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 5775eec34..398fba678 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -4,8 +4,7 @@ import { fa } from 'element-plus/es/locale' import * as PackageunitApi from '@/api/wms/packageunit' import { Select } from '@element-plus/icons-vue/dist/types' -//新增时针对父包装代码copy出的实体 -export const PackageunitCopy = useCrudSchemas(reactive([ +export const Packageunit = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -21,7 +20,7 @@ export const PackageunitCopy = useCrudSchemas(reactive([ sort: 'custom', table: { width: 150 - } + }, }, { label: '包装名称', @@ -85,7 +84,7 @@ export const PackageunitCopy = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', - isSearch: true, + isSearch: false, table: { width: 150 }, @@ -278,7 +277,25 @@ export const PackageunitCopy = useCrudSchemas(reactive([ } ])) -export const Packageunit = useCrudSchemas(reactive([ +// 表单校验 +export const PackageunitRules = reactive({ + code: [ + { required: true, message: '请输入包装代码', trigger: 'change' } + ], + name: [ + { required: true, message: '请输入包装名称', trigger: 'change' } + ], + type: [ + { required: true, message: '请选择包装类型', trigger: 'change' } + ], + desc: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + { required: true, message: '请输入包装描述', trigger: 'change' } + ], +}) + +//新增时针对父包装代码copy出的实体 +export const PackageunitCopy = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -294,21 +311,6 @@ export const Packageunit = useCrudSchemas(reactive([ sort: 'custom', table: { width: 150 - }, - form: { - componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择父包装代码', - searchField: 'code', - searchTitle: '包装规格信息', - searchAllSchemas: PackageunitCopy.allSchemas, - searchPage: PackageunitApi.getPackageunitPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } } }, { @@ -373,7 +375,7 @@ export const Packageunit = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', - isSearch: false, + isSearch: true, table: { width: 150 }, @@ -564,22 +566,4 @@ export const Packageunit = useCrudSchemas(reactive([ fixed: 'right' } } -])) - -// 表单校验 -export const PackageunitRules = reactive({ - code: [ - { required: true, message: '请输入包装代码', trigger: 'change' } - ], - name: [ - { required: true, message: '请输入包装名称', trigger: 'change' } - ], - type: [ - { required: true, message: '请选择包装类型', trigger: 'change' } - ], - desc: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { required: true, message: '请输入包装描述', trigger: 'change' } - ], -}) - +])) \ No newline at end of file diff --git a/src/views/wms/inventoryManage/balance/balance.data.ts b/src/views/wms/inventoryManage/balance/balance.data.ts index 4f6b192ac..8aaf79117 100644 --- a/src/views/wms/inventoryManage/balance/balance.data.ts +++ b/src/views/wms/inventoryManage/balance/balance.data.ts @@ -39,6 +39,7 @@ export const Balance = useCrudSchemas(reactive([ table: { width: 150 }, + isTable:false }, { label: '数量', @@ -63,55 +64,55 @@ export const Balance = useCrudSchemas(reactive([ }, }, { - label: '库区类型', - field: 'areaType', + label: '库位代码', + field: 'locationCode', sort: 'custom', - dictType: DICT_TYPE.AREA_TYPE, - dictClass: 'string', - isTable: true, table: { width: 150 }, + isSearch: true, }, { - label: '包装规格', - field: 'packUnit', + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, sort: 'custom', table: { width: 150 }, }, { - label: '包装数量', - field: 'packQty', + label: '库区类型', + field: 'areaType', sort: 'custom', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, table: { width: 150 }, }, { - label: '库位代码', - field: 'locationCode', + label: '包装规格', + field: 'packUnit', sort: 'custom', table: { width: 150 }, - isSearch: true, }, { - label: '仓库代码', - field: 'warehouseCode', + label: '包装数量', + field: 'packQty', sort: 'custom', table: { width: 150 }, }, { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, + label: '仓库代码', + field: 'warehouseCode', sort: 'custom', table: { width: 150 diff --git a/src/views/wms/mes/mesBarCode/index.vue b/src/views/wms/mes/mesBarCode/index.vue new file mode 100644 index 000000000..b24a20fa1 --- /dev/null +++ b/src/views/wms/mes/mesBarCode/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/mes/mesBarCode/mesBarCode.data.ts b/src/views/wms/mes/mesBarCode/mesBarCode.data.ts new file mode 100644 index 000000000..39b4c5a7a --- /dev/null +++ b/src/views/wms/mes/mesBarCode/mesBarCode.data.ts @@ -0,0 +1,174 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const MesBarCodeRules = reactive({ + available: [required], +}) + +export const MesBarCode = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: 'Plnt', + field: 'plat', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: 'Counter', + field: 'counter', + sort: 'custom', + isSearch: true, + }, + { + label: 'SIGN', + field: 'sign', + sort: 'custom', + isSearch: true, + }, + { + label: 'Option', + field: 'option', + sort: 'custom', + isSearch: true, + }, + { + label: 'Lower Lim.', + field: 'lowerLim', + sort: 'custom', + isSearch: true, + }, + { + label: 'UpperLimit', + field: 'upperLimit', + sort: 'custom', + isSearch: true, + }, + { + label: 'ITAC', + field: 'itac', + sort: 'custom', + isSearch: true, + }, + { + label: 'Type', + field: 'type', + sort: 'custom', + isSearch: true, + form: { + component: 'SelectV2' + }, + }, + { + label: 'Length BC', + field: 'lengthBc', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: 'Pos. mat', + field: 'posMat', + sort: 'custom', + isSearch: true, + }, + { + label: 'Length mat', + field: 'lengthMat', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: 'Pos. revlv', + field: 'posRevlv', + sort: 'custom', + isSearch: true, + }, + { + label: 'Part number', + field: 'partNumber', + sort: 'custom', + isSearch: true, + }, + { + label: 'Pack Label', + field: 'packLabel', + sort: 'custom', + isSearch: true, + }, + { + label: 'OES-Label', + field: 'oesLabel', + sort: 'custom', + isSearch: true, + }, + { + label: 'Check Rvl', + field: 'checkRvl', + sort: 'custom', + isSearch: true, + }, + { + label: 'Days', + field: 'days', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + 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')] + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue index 0f5b83f11..5f6a7d630 100644 --- a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue @@ -27,9 +27,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -