From 4ec4c57b8e650aa458f6007905466b626405e88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 20 Mar 2024 08:39:42 +0800 Subject: [PATCH 01/65] =?UTF-8?q?=E7=BF=BB=E5=8C=85=E8=BF=BD=E6=BA=AF?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/packageoverRetrospect/index.ts | 83 ++++ .../packageoverJobMain.data.ts | 25 +- .../packageoverRetrospect/index.vue | 129 ++++++ .../packageoverRetrospect.data.ts | 409 ++++++++++++++++++ 4 files changed, 636 insertions(+), 10 deletions(-) create mode 100644 src/api/wms/packageoverRetrospect/index.ts create mode 100644 src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue create mode 100644 src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts diff --git a/src/api/wms/packageoverRetrospect/index.ts b/src/api/wms/packageoverRetrospect/index.ts new file mode 100644 index 000000000..9641a1472 --- /dev/null +++ b/src/api/wms/packageoverRetrospect/index.ts @@ -0,0 +1,83 @@ +import request from '@/config/axios' + +export interface PackageoverRetrospectVO { + id: number + number: string + jobNumber: string + warehouseCode: string + areaCode: string + locationGroupCode: string + locationCode: string + itemCode: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + requestTime: Date + dueTime: Date + fromPackingNumber: string + toPackingNumber: string + fromBatch: string + toBatch: string + fromPackUnit: string + toPackUnit: string + fromPackQty: number + toPackQty: number + fromInventoryStatus: string + toInventoryStatus: string + fromContainerNumber: string + toContainerNumber: string + businessType: string + departmentCode: string + outTransactionType: string + inTransactionType: string + executeTime: Date + activeDate: Date + fromOwnerCode: string + toOwnerCode: string + remark: string + available: string +} + +// 查询翻包记录主列表 +export const getPackageoverRetrospectPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/packageover-retrospect/senior', data }) + } else { + return await request.get({ url: `/wms/packageover-retrospect/page`, params }) + } +} + +// 查询翻包记录主详情 +export const getPackageoverRetrospect = async (id: number) => { + return await request.get({ url: `/wms/packageover-retrospect/get?id=` + id }) +} + +// 新增翻包记录主 +export const createPackageoverRetrospect = async (data: PackageoverRetrospectVO) => { + return await request.post({ url: `/wms/packageover-retrospect/create`, data }) +} + +// 修改翻包记录主 +export const updatePackageoverRetrospect = async (data: PackageoverRetrospectVO) => { + return await request.put({ url: `/wms/packageover-retrospect/update`, data }) +} + +// 删除翻包记录主 +export const deletePackageoverRetrospect = async (id: number) => { + return await request.delete({ url: `/wms/packageover-retrospect/delete?id=` + id }) +} + +// 导出翻包记录主 Excel +export const exportPackageoverRetrospect = async (params) => { + return await request.download({ url: `/wms/packageover-retrospect/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/packageover-retrospect/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts index a66d844e0..d9afde219 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/packageoverJobMain.data.ts @@ -193,7 +193,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'autoComplete', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -212,7 +212,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowModifyLocation', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -231,7 +231,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowModifyQty', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -250,7 +250,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowBiggerQty', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 180 @@ -269,7 +269,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowSmallerQty', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 180 @@ -288,7 +288,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowModifyInventoryStatus', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 180 @@ -307,7 +307,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowContinuousScanning', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -326,7 +326,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowPartialComplete', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -345,7 +345,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowModifyBatch', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -364,7 +364,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ field: 'allowModifyPackingNumber', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isTable: true, + isTable: false, sort: 'custom', table: { width: 150 @@ -382,6 +382,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ label: '承接人用户名', field: 'acceptUserId', sort: 'custom', + isTable: false, table: { width: 150 }, @@ -394,6 +395,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', + isTable: false, table: { width: 180 }, @@ -410,6 +412,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ label: '完成人用户名', field: 'completeUserId', sort: 'custom', + isTable: false, table: { width: 150 }, @@ -422,6 +425,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', + isTable: false, table: { width: 180 }, @@ -438,6 +442,7 @@ export const PackageoverJobMain = useCrudSchemas(reactive([ label: '业务类型', field: 'businessType', sort: 'custom', + isTable: false, table: { width: 150 }, diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue new file mode 100644 index 000000000..674d15de0 --- /dev/null +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue @@ -0,0 +1,129 @@ + + + diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts new file mode 100644 index 000000000..725b82081 --- /dev/null +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/packageoverRetrospect.data.ts @@ -0,0 +1,409 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +// 表单校验 +export const PackageoverRetrospectRules = reactive({ +}) + +export const PackageoverRetrospect = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + width: 180 + }, + }, + { + label: '任务单据号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '仓库代码', + field: 'warehouseCode', + sort: 'custom', + table: { + width: 120 + }, + }, + { + label: '库区代码', + field: 'areaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库位组代码', + field: 'locationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库位代码', + field: 'locationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '申请时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '截止时间', + field: 'dueTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '从包装号', + field: 'fromPackingNumber', + sort: 'custom', + isSearch: true, + table: { + width: 200 + }, + }, + { + label: '到包装号', + field: 'toPackingNumber', + sort: 'custom', + isSearch: true, + table: { + width: 200 + }, + }, + { + label: '从批次', + field: 'fromBatch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到批次', + field: 'toBatch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从包装规格', + field: 'fromPackUnit', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到包装规格', + field: 'toPackUnit', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从标包数量', + field: 'fromPackQty', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到标包数量', + field: 'toPackQty', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库存状态', + field: 'fromInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库存状态', + field: 'toInventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isTable:false + }, + { + label: '接口类型', + field: 'interfaceType', + sort: 'custom', + isTable:false + }, + + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isTable:false + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + isTable:false + }, + { + label: '执行时间', + field: 'executeTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '生效日期', + field: 'activeDate', + sort: 'custom', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isTable:false + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '最后更新者', + field: 'update', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + } +])) From ab07a0d626cb44399172acea526609219e78f2e1 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Wed, 20 Mar 2024 09:03:53 +0800 Subject: [PATCH 02/65] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E4=BD=8D=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=B7=A5=E7=BB=84=E3=80=81=E5=B7=A5=E5=BA=8F=E3=80=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AD=89=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/workstationBind/index.ts | 3 + .../workstationBind/src/workstationBind.vue | 642 ++++++++++++++++++ src/utils/disposition/defaultButtons.ts | 26 +- src/views/mes/workstation/index.vue | 15 +- src/views/mes/workstation/workstation.data.ts | 39 +- 5 files changed, 701 insertions(+), 24 deletions(-) create mode 100644 src/components/workstationBind/index.ts create mode 100644 src/components/workstationBind/src/workstationBind.vue diff --git a/src/components/workstationBind/index.ts b/src/components/workstationBind/index.ts new file mode 100644 index 000000000..bbab7d7c3 --- /dev/null +++ b/src/components/workstationBind/index.ts @@ -0,0 +1,3 @@ +import workstationBind from './src/workstationBind.vue' +import detail from './src/Detail.vue' +export { workstationBind,detail } diff --git a/src/components/workstationBind/src/workstationBind.vue b/src/components/workstationBind/src/workstationBind.vue new file mode 100644 index 000000000..df08c7e94 --- /dev/null +++ b/src/components/workstationBind/src/workstationBind.vue @@ -0,0 +1,642 @@ + + + + + diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index b7f8ca791..0b59fdb7b 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -250,7 +250,18 @@ export function mainListDeleteBtn(option:any) { hasPermi: '' }) } - +// 主列表-绑定 +export function mainListBindBtn(option:any) { + return __defaultBtnOption(option,{ + label: '绑定', + name: 'bind', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 主列表-申请流程-关闭按钮 export function mainListCloseBtn(option:any) { return __defaultBtnOption(option,{ @@ -735,18 +746,7 @@ export function mainThawRequesttBtn(option:any) { hasPermi: '' }) } -// 主列表-绑定 -export function mainListBindBtn(option:any) { - return __defaultBtnOption(option,{ - label: '绑定', - name: 'bind', - hide: false, - type: 'primary', - color: '', - link: true, // 文本展现按钮 - hasPermi: '' - }) -} + // 默认按钮规则 function __defaultBtnOption(option:any,specific:any){ return { diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 35f6f2dd1..83f02b07f 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -52,7 +52,8 @@ - + + @@ -65,7 +66,7 @@ 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/src/Detail.vue' - +import BindDetail from '@/components/workstationBind/src/workstationBind.vue' defineOptions({ name: 'Workstation' }) const message = useMessage() // 消息弹窗 @@ -144,11 +145,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 await handleDelete(row.id) - }else if (val == 'bind') { // 删除 - await detailRef.value.openDetail(row, '绑定', row.name, 'mesWorkstation') + }else if (val == 'bind') { // 绑定 + openBindDetail(row,row.name,row.code) } } - /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { @@ -184,6 +184,11 @@ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') } +/** 绑定操作 */ +const bindDetailRef = ref() +const openBindDetail = (row: any, titleName: any, titleValue: any) => { + bindDetailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') +} /** 删除按钮操作 */ const handleDelete = async (id: number) => { diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 611194817..b4e7b8f1a 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -1,11 +1,28 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import type {CrudSchema} from '@/hooks/web/useCrudSchemas' +import {dateFormatter} from '@/utils/formatTime' // 表单校验 export const WorkstationRules = reactive({ code: [required] }) +export const TabsList = [{ + label: "工组", + prop: 'Team', +}, + { + label: "设备", + prop: 'Equipment', + }, + { + label: "工序", + prop: 'Process', + }, + { + label: "产品", + prop: 'Production', + } +] export const Workstation = useCrudSchemas(reactive([ { @@ -46,26 +63,36 @@ export const Workstation = useCrudSchemas(reactive([ field: 'activeTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { + style: {width: '100%'}, type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '失效时间', field: 'expireTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { + style: {width: '100%'}, type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '操作', From fbbc3fe5700df428da88135a3f0bcd64cc153920 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 20 Mar 2024 13:01:30 +0800 Subject: [PATCH 03/65] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/supplierdeliverRequestMain/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 94e827a47..e1ef80cea 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -157,7 +157,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => let beginTime = val[0]['endTime'] let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD') planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00" - setV['planArriveTime']= new Date(planArriveTimeStr.value) + setV['planArriveTime']= new Date(planArriveTimeStr.value).valueOf(); // 清空子表数据 tableData.value = [] } From 3aae780a565f2fef313d6daddd651eaddebeb036 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 20 Mar 2024 13:55:10 +0800 Subject: [PATCH 04/65] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E6=A0=A1=E9=AA=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/purchaseMain/purchaseMain.data.ts | 1 + .../supplierdeliverRequestMain.data.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index a608952a1..2bb831a34 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -449,6 +449,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ width: 150 }, tableForm: { + disabled:true, type: 'Select' } }, diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 5f20f3fee..a858281dd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -506,7 +506,7 @@ export const SupplierdeliverRequestMainRules = reactive({ ], contactEmail: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { validator: validateEmail, message: '请输入正确的手机号', trigger: 'blur' } + { validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' } ], carrierCode: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } From d8b612f21bd04f6b0f0fbd4365e58017cb4b7f47 Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 20 Mar 2024 13:59:21 +0800 Subject: [PATCH 05/65] =?UTF-8?q?=E5=A4=87=E8=B4=A7=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E8=AE=B0=E5=BD=95=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockup/stockupMainRequest/index.vue | 2 + .../stockupMainRequest.data.ts | 244 ++++++++++-------- 2 files changed, 140 insertions(+), 106 deletions(-) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index df54d6c80..a0d1bca2c 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -90,6 +90,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' +import {DeliverRequestDetail} from '../../deliver/deliverRequestMain/deliverRequestMain.data' + // 备货申请 defineOptions({ name: 'StockupMainRequest' }) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts index 156c1f1df..d0241eb88 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts @@ -7,6 +7,9 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' +import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data' + import * as locationApi from '@/api/wms/location' import { Location } from '../../../basicDataManage/factoryModeling/location/location.data' @@ -48,6 +51,35 @@ export const StockupMainRequest = useCrudSchemas(reactive([ }, isForm: false, }, + { + label: '发货计划单号', + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '发货计划信息', // 查询弹窗标题 + searchAllSchemas: DeliverPlanMain.allSchemas, // 查询弹窗所需类 + searchPage: DeliverPlanMainApi.getDeliverPlanMainPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '6', + isMainValue: false + }] + } + } + }, { label: '从仓库代码', field: 'fromWarehouseCode', @@ -318,26 +350,26 @@ export const StockupMainRequest = useCrudSchemas(reactive([ } } }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - 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', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.directCreateRecord, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true + // } + // } + // }, { label: '到库区类型范围', @@ -443,92 +475,92 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ width: 100 }, }, - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装号', - searchField: 'packingNumber', - searchTitle: '库存余额信息', - searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage, - searchCondition: [ - // { - // key:'customerCode', // 查询列表中字段 - // value:'customerCode', // 指主表某字段 - // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 - // isMainValue: true // 表示查询条件是主表的字段的值 - // } - ] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装号', - searchField: 'packingNumber', - searchTitle: '库存余额信息', - searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage, - searchCondition: [ - // { - // key:'customerCode', // 查询列表中字段 - // value:'customerCode', // 指主表某字段 - // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 - // isMainValue: true // 表示查询条件是主表的字段的值 - // } - ] - } - } - }, - { - label: '器具号', - field: 'containerNumber', - sort: 'custom', - table: { - width: 100 - }, - isSearch: true, - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true, - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 120 - }, - tableForm: { - disabled: true, - type: 'Select' - }, - form: { - componentProps: { - disabled: true - } - } - }, + // { + // label: '包装号', + // field: 'packingNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择包装号', + // searchField: 'packingNumber', + // searchTitle: '库存余额信息', + // searchAllSchemas: Balance.allSchemas, + // searchPage: BalanceApi.getBalanceItemPage, + // searchCondition: [ + // // { + // // key:'customerCode', // 查询列表中字段 + // // value:'customerCode', // 指主表某字段 + // // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 + // // isMainValue: true // 表示查询条件是主表的字段的值 + // // } + // ] + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择包装号', + // searchField: 'packingNumber', + // searchTitle: '库存余额信息', + // searchAllSchemas: Balance.allSchemas, + // searchPage: BalanceApi.getBalanceItemPage, + // searchCondition: [ + // // { + // // key:'customerCode', // 查询列表中字段 + // // value:'customerCode', // 指主表某字段 + // // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 + // // isMainValue: true // 表示查询条件是主表的字段的值 + // // } + // ] + // } + // } + // }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 100 + // }, + // isSearch: true, + // }, + // { + // label: '批次', + // field: 'batch', + // sort: 'custom', + // isSearch: true, + // tableForm: { + // disabled: true, + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, + // { + // label: '库存状态', + // field: 'inventoryStatus', + // dictType: DICT_TYPE.INVENTORY_STATUS, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 120 + // }, + // tableForm: { + // disabled: true, + // type: 'Select' + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, { label: '物品代码', field: 'itemCode', From 051330940e8dbeb973c62b47a9e4d1b95562e14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 20 Mar 2024 14:05:52 +0800 Subject: [PATCH 06/65] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=A1=A8=E5=8D=95=20?= =?UTF-8?q?=E9=81=AE=E7=BD=A9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 3a5aa7429..4c96ef8e5 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -4,12 +4,12 @@ v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false" + v-loading="formLoading" >
Date: Wed, 20 Mar 2024 14:56:32 +0800 Subject: [PATCH 07/65] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/purchasePlanMain/index.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index 157816868..8d4556556 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -441,6 +441,7 @@ // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = [] + let flag = false for (let item of tableData.value) { await PurchaseDetailApi.getPurchaseDetailPageCheckData({ number: item.poNumber, @@ -449,13 +450,20 @@ console.log("【要货计划】-每条数据结果",item) if(res.list[0].type == 'DISCRETE'){//只有离散单需要这个校验 if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) { + flag = true; message.error('要货计划数量不得大于订单数量-已计划数量') return + }else{ + data.subList.push(item) // 拼接子表数据参数 } + }else{ + data.subList.push(item) // 拼接子表数据参数 } - data.subList.push(item) // 拼接子表数据参数 }) } + if(flag){ + return; + } if (data.subList.length == tableData.value.length) { try { if (formType === 'create') { From ee9a4a9506a87b2928ca04fa6560151ca3b83f76 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 20 Mar 2024 16:09:28 +0800 Subject: [PATCH 08/65] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierManage/supplieritem/supplieritem.data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts index 2395499b8..1e891afbf 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts @@ -319,7 +319,7 @@ export const SupplieritemRules = reactive({ ], supplierItemCode: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { validator:validateYS, message: '请输入正确的代码', trigger: 'blur'} + // { validator:validateYS, message: '请输入正确的代码', trigger: 'blur'} ], // packUnit: [ // { required: true, message: '请选择供应商包装单位', trigger: 'change' } From cf1ea7f3930c1e7c042b38bcd535fe1fa516c5e2 Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 20 Mar 2024 16:12:24 +0800 Subject: [PATCH 09/65] =?UTF-8?q?=E5=A4=87=E8=B4=A7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=9B=E5=BB=BA=E8=80=85=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/itembasic/index.ts | 2 +- src/api/wms/itempackage/index.ts | 2 +- .../stockup/stockupMainJob/stockupMainJob.data.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/api/wms/itembasic/index.ts b/src/api/wms/itembasic/index.ts index 52a8dec1b..20f58f85c 100644 --- a/src/api/wms/itembasic/index.ts +++ b/src/api/wms/itembasic/index.ts @@ -34,7 +34,7 @@ export const getItembasicPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return request.post({ url: '/wms/itembasic/senior', data }) + return await request.post({ url: '/wms/itembasic/senior', data }) } else { return await request.get({ url: `/wms/itembasic/page`, params }) } diff --git a/src/api/wms/itempackage/index.ts b/src/api/wms/itempackage/index.ts index 5d4a850fa..5270dbc2f 100644 --- a/src/api/wms/itempackage/index.ts +++ b/src/api/wms/itempackage/index.ts @@ -24,7 +24,7 @@ export const getItempackagingPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return request.post({ url: '/wms/itempackage/senior', data }) + return await request.post({ url: '/wms/itempackage/senior', data }) } else { return await request.get({ url: `/wms/itempackage/page`, params }) } diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainJob/stockupMainJob.data.ts b/src/views/wms/deliversettlementManage/stockup/stockupMainJob/stockupMainJob.data.ts index 2ef94ee4b..c8aca1d29 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainJob/stockupMainJob.data.ts +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainJob/stockupMainJob.data.ts @@ -284,6 +284,11 @@ export const StockupMainJob = useCrudSchemas(reactive([ field: 'outInventoryStatuses', sort: 'custom', }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + }, { label: '创建时间', field: 'createTime', From 78a11a28687a5c7f79b84072a308e36fc4604fee Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 20 Mar 2024 16:24:14 +0800 Subject: [PATCH 10/65] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=B0=83=E7=94=A8api=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicDataManage/itemManage/itempackage/itempackage.data.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts b/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts index 87c40736f..f1ca43fe7 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts @@ -32,8 +32,6 @@ export const Itempackaging = useCrudSchemas(reactive([ searchCondition: [{ key: 'available', value: 'TRUE', - action: '==', - isSearch: true, isMainValue: false }] } From 11fc5a4261bbcbcf8efe4b2dff4d2e79e0bffe97 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Wed, 20 Mar 2024 17:08:13 +0800 Subject: [PATCH 11/65] =?UTF-8?q?1=E3=80=81=E7=BB=91=E5=AE=9A=E8=AE=BE?= =?UTF-8?q?=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workstation/index.ts | 12 ++- src/components/workstationBind/index.ts | 3 +- .../src/{workstationBind.vue => Detail.vue} | 81 +++++++++++-------- src/views/mes/workstation/index.vue | 61 ++++++++++---- src/views/mes/workstation/workstation.data.ts | 16 ++++ 5 files changed, 119 insertions(+), 54 deletions(-) rename src/components/workstationBind/src/{workstationBind.vue => Detail.vue} (89%) diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index 1e8e44a8f..d426cd3f4 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -46,4 +46,14 @@ export const exportWorkstation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/mes/workstation/get-import-template' }) -} \ No newline at end of file +} +// 查询班组列表 +export const getTeamPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/team/senior', data }) + } else { + return await request.get({ url: `/wms/team/page`, params }) + } +} diff --git a/src/components/workstationBind/index.ts b/src/components/workstationBind/index.ts index bbab7d7c3..e7d199c89 100644 --- a/src/components/workstationBind/index.ts +++ b/src/components/workstationBind/index.ts @@ -1,3 +1,2 @@ -import workstationBind from './src/workstationBind.vue' import detail from './src/Detail.vue' -export { workstationBind,detail } +export {detail } diff --git a/src/components/workstationBind/src/workstationBind.vue b/src/components/workstationBind/src/Detail.vue similarity index 89% rename from src/components/workstationBind/src/workstationBind.vue rename to src/components/workstationBind/src/Detail.vue index df08c7e94..5b39f255b 100644 --- a/src/components/workstationBind/src/workstationBind.vue +++ b/src/components/workstationBind/src/Detail.vue @@ -15,7 +15,6 @@ diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue index a1eb550c8..69aba1b11 100644 --- a/src/components/Dialog/src/Dialog.vue +++ b/src/components/Dialog/src/Dialog.vue @@ -11,7 +11,8 @@ const props = defineProps({ fullscreen: propTypes.bool.def(true), width: propTypes.oneOfType([String, Number]).def('40%'), scroll: propTypes.bool.def(false), // 是否开启滚动条。如果是的话,按照 maxHeight 设置最大高度 - maxHeight: propTypes.oneOfType([String, Number]).def('400px') + maxHeight: propTypes.oneOfType([String, Number]).def('400px'), + vLoading:propTypes.bool.def(false) }) const getBindValue = computed(() => { @@ -50,11 +51,38 @@ watch( } ) +const demo = ref() +watch( + () => props.vLoading, + async (val: boolean) => { + await nextTick() + if (val) { + initDialog() + } else { + demo.close() + } + }, + { + immediate: true + } +) + const dialogStyle = computed(() => { return { height: unref(dialogHeight) } }) + + +const initDialog = () => { + // 用服务生成一个el-loading实例,包括了自定义svg的指令如何在服务中使用 + demo.value = ElLoading.service({ target: '.loading', text: '加载中...', background: 'rgba(246, 246, 246, 0.8)' }) + // setTimeout(() => { + // // 延时执行关闭,对应dom清除,如要再使用loading,需重新生成新实例 + // demo.close() + // }, 5000) +} + diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts new file mode 100644 index 000000000..e71496ba3 --- /dev/null +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/productreceiptAssembleJobMain.data.ts @@ -0,0 +1,917 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 制品收货任务主表 + */ +export const ProductreceiptJobMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, + { + label: '生产线代码', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '收货类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + isForm: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '申请时间', + field: 'requestTime', + 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', + } + }, + }, + { + label: '要求截止时间', + field: 'requestDueTime', + 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', + } + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '过期时间', + field: 'expiredTime', + 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', + } + }, + }, + { + 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', + } + }, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '状态', + // field: 'jobStageStatus', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '优先级增量', + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '承接人', + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '承接时间', + field: 'acceptTime', + 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', + } + }, + }, + { + label: '完成人', + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '完成时间', + field: 'completeTime', + 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', + } + }, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '自动完成', + field: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改批次', + field: 'allowModifyBatch', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 120, + // fixed: 'right' + // }, + // } +])) + +//表单校验 +export const ProductreceiptJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + // jobStageStatus: [ + // { required: true, message: '请选择阶段状态', trigger: 'change' } + // ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货任务子表 + */ +export const ProductreceiptJobDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +export const ProductreceiptJobDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue new file mode 100644 index 000000000..f0b49ad0f --- /dev/null +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -0,0 +1,230 @@ + + + diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts new file mode 100644 index 000000000..17a217872 --- /dev/null +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts @@ -0,0 +1,959 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 制品收货记录主表 + */ +export const ProductreceiptRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '收货类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + isForm: false + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '执行时间', + field: 'executeTime', + 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', + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '申请时间', + field: 'requestTime', + 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', + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + 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', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, +])) + +//表单校验 +export const ProductreceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货记录子表 + */ +export const ProductreceiptRecordDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionlineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const ProductreceiptRecordDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货记录子表 + */ +export const BackflushRecordDetailb = useCrudSchemas(reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: 'BOM版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +export const BackflushRecordDetailbRules = reactive({ + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue new file mode 100644 index 000000000..394e6041c --- /dev/null +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -0,0 +1,670 @@ + + + diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts new file mode 100644 index 000000000..e5926c672 --- /dev/null +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -0,0 +1,1774 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' + +import * as ShiftApi from '@/api/wms/shift' +import { Shift } from '@/views/wms/basicDataManage/orderManage/shift/shift.data' + +import * as TeamApi from '@/api/wms/team' +import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data' + +import * as WorkstationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' + +import * as ProcessApi from '@/api/wms/process' +import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' + +import * as ProductionlineitemApi from '@/api/wms/productionlineitem' +import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' + +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' + +import * as BomApi from '@/api/wms/bom' +import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' + +import * as SupplieritemApi from '@/api/wms/supplieritem' +import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' + +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ProductReceiptRequest' +} + 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 ProductreceiptRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + isForm: false, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择车间', + searchField: 'code', + searchTitle: '车间信息', + searchAllSchemas: Workshop.allSchemas, + searchPage: WorkshopApi.getWorkshopPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择班组', + searchField: 'code', + searchTitle: '班组信息', + searchAllSchemas: Team.allSchemas, + searchPage: TeamApi.getTeamPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择班次', + searchField: 'code', + searchTitle: '班次信息', + searchAllSchemas: Shift.allSchemas, + searchPage: ShiftApi.getShiftPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '收货类型', + field: 'type', + dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ProductReceipt', + componentProps: { + disabled: true + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + 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', + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '申请时间', + field: 'requestTime', + 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', + } + }, + isForm: false + }, + { + label: '截止时间', + field: 'dueTime', + 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', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + 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: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + 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: true, + 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: true, + 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: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + } +])) + +//表单校验 +export const ProductreceiptRequestMainRules = reactive({ + workshopCode: [ + { required: true, message: '请选择车间代码', trigger: 'change' } + ], + team: [ + { required: true, message: '请选择班组代码', trigger: 'change' } + ], + shift: [ + { required: true, message: '请选择班次代码', trigger: 'change' } + ], + // departmentCode: [ + // { required: true, message: '请输入部门', trigger: 'blur' } + // ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货申请子表 + */ +export const ProductreceiptRequestDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + 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 + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + 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 + }] + } + } + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', + searchField: 'code', + searchTitle: '工位信息', + searchAllSchemas: Workstation.allSchemas, + searchPage: WorkstationApi.getWorkstationPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择工位代码', + searchField: 'code', + searchTitle: '工位信息', + searchAllSchemas: Workstation.allSchemas, + searchPage: WorkstationApi.getWorkstationPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + } + } + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择物料代码', + searchField: 'itemCode', + searchTitle: '生产线物料关系信息', + searchAllSchemas: Productionlineitem.allSchemas, + searchPage: ProductionlineitemApi.getProductionlineitemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择物料代码', + searchField: 'itemCode', + searchTitle: '生产线物料关系信息', + searchAllSchemas: Productionlineitem.allSchemas, + searchPage: ProductionlineitemApi.getProductionlineitemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + } + } + }, + { + label: 'Bom版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 + searchField: 'version', // 查询弹窗赋值字段 + searchTitle: '物料清单信息', // 查询弹窗标题 + searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 + searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'productItemCode', + value:'itemCode', + message: '请填写物料代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 + searchField: 'version', // 查询弹窗赋值字段 + searchTitle: '物料清单信息', // 查询弹窗标题 + searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 + searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'productItemCode', + value:'itemCode', + message: '请填写物料代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + 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: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDate', + valueFormat: 'x', + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDate', + valueFormat: 'x', + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + 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: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const ProductreceiptRequestDetailRules = reactive({ + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请选择过期日期', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + bomVersion: [ + { required: true, message: '请选择Bom版本', trigger: 'change' } + ], + workStationCode: [ + { required: true, message: '请选择工位代码', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货申请子表 + */ +export const BackflushRequestDetailb = useCrudSchemas(reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + } +])) + +//表单校验 +export const BackflushRequestDetailbRules = reactive({ + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + +}) + + + + + +/** + * @returns {Array} 制品收货申请子表二子表 + */ +export const BackflushDetailRequest = useCrudSchemas(reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: 'BOM版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, +])) + + +/** + * @returns {Array} 制品收货申请创建标签 + */ +export const ProductreceiptRequestLabel = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCodePackage', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + // isInpuFocusShow: true, + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // searchField: 'productionLineCode', // 查询弹窗赋值字段 + // searchTitle: '生产线物料关系信息', // 查询弹窗标题 + // searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 + // searchCondition:[{ + // key: 'itemCode', + // value: 'itemCode', + // isMainValue: true + // }] + } + }, + { + label: '供应商代码', + field: 'supplierItemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装规格1', + field: 'packUnit', + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + disabled: true + }, + }, + { + label: '包装数量1', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '包装规格2', + field: 'secondPackUnit', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packUnit', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageByProductreceipt, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packUnit', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageByProductreceipt, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + { + label: '包装数量2', + field: 'secondPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, +])) + +//表单校验 +export const ProductreceiptRequestLabelRules = reactive({ + supplierItemCode: [ + { required: true, message: '请选择供应商', trigger: 'change' } + ], + productionLineCodePackage: [ + { required: true, message: '请选择生产线', trigger: 'change' } + ] +}) + From fedf2b6cd360fc803a06f67c5dadfc72d357a08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Mon, 25 Mar 2024 18:31:48 +0800 Subject: [PATCH 53/65] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5=20=E5=AD=90=E8=A1=A8?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=8F=8A=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionMain/productionMain.data.ts | 22 +++++++++++++++++-- .../productionMainAssemble.data.ts | 20 ++++++++++++++++- .../productionMainAssembleSparePart.data.ts | 20 ++++++++++++++++- .../productionMainPredictSparePart.data.ts | 22 +++++++++++++++++-- 4 files changed, 78 insertions(+), 6 deletions(-) diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index 3b552367b..0f0444c03 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -77,7 +77,7 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, { - label: '车间', + label: '机台', field: 'workshop', sort: 'custom', table: { @@ -177,6 +177,25 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, + { + label: '物料代码', + field: 'detailItemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + isForm: false + }, + { + label: '计划数量', + field: 'detailPlanQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, { label: '计划日期', field: 'planDate', @@ -287,7 +306,6 @@ export const ProductionMain = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, isTable: true, sort: 'custom', table: { diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index 585255287..d7d82f5b9 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -177,6 +177,25 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, + { + label: '物料代码', + field: 'detailItemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + isForm: false + }, + { + label: '计划数量', + field: 'detailPlanQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, { label: '计划日期', field: 'planDate', @@ -287,7 +306,6 @@ export const ProductionMain = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, isTable: true, sort: 'custom', table: { diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index 75a66d8d8..d7bb6a6b6 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -177,6 +177,25 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, + { + label: '物料代码', + field: 'detailItemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + isForm: false + }, + { + label: '计划数量', + field: 'detailPlanQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, { label: '计划日期', field: 'planDate', @@ -287,7 +306,6 @@ export const ProductionMain = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, isTable: true, sort: 'custom', table: { diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index 1e21d37e5..7ab3206c9 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -77,7 +77,7 @@ export const ProductionMain = useCrudSchemas(reactive([ } }, { - label: '车间', + label: '机台', field: 'workshop', sort: 'custom', table: { @@ -177,6 +177,25 @@ export const ProductionMain = useCrudSchemas(reactive([ } } }, + { + label: '物料代码', + field: 'detailItemCode', + sort: 'custom', + isSearch: true, + table: { + width: 150 + }, + isForm: false + }, + { + label: '计划数量', + field: 'detailPlanQty', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, { label: '计划日期', field: 'planDate', @@ -287,7 +306,6 @@ export const ProductionMain = useCrudSchemas(reactive([ field: 'available', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, isTable: true, sort: 'custom', table: { From 64b682900b2f7a8a86d4151b7256fa29a0192a3d Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 26 Mar 2024 11:15:00 +0800 Subject: [PATCH 54/65] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=A5=E5=BA=9F?= =?UTF-8?q?=E6=94=B6=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptscrapJobMain/index.vue | 301 +++ .../productreceiptJobMain.data.ts | 903 +++++++++ .../productreceiptscrapRecordMain/index.vue | 229 +++ .../productreceiptRecordMain.data.ts | 945 +++++++++ .../productreceiptscrapRequestMain/index.vue | 670 +++++++ .../productreceiptRequestMain.data.ts | 1763 +++++++++++++++++ 6 files changed, 4811 insertions(+) create mode 100644 src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue create mode 100644 src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptJobMain.data.ts create mode 100644 src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue create mode 100644 src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptRecordMain.data.ts create mode 100644 src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue create mode 100644 src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue new file mode 100644 index 000000000..77a975dbc --- /dev/null +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue @@ -0,0 +1,301 @@ + + + diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptJobMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptJobMain.data.ts new file mode 100644 index 000000000..d88c730ec --- /dev/null +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/productreceiptJobMain.data.ts @@ -0,0 +1,903 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 制品收货任务主表 + */ +export const ProductreceiptJobMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + }, + { + label: '生产线代码', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '申请时间', + field: 'requestTime', + 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', + } + }, + }, + { + label: '要求截止时间', + field: 'requestDueTime', + 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', + } + }, + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '过期时间', + field: 'expiredTime', + 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', + } + }, + }, + { + 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', + } + }, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '状态', + // field: 'jobStageStatus', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '优先级增量', + field: 'priorityIncrement', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '承接人', + field: 'acceptUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '承接时间', + field: 'acceptTime', + 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', + } + }, + }, + { + label: '完成人', + field: 'completeUserId', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '完成时间', + field: 'completeTime', + 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', + } + }, + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '自动完成', + field: 'autoComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改批次', + field: 'allowModifyBatch', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 120, + // fixed: 'right' + // }, + // } +])) + +//表单校验 +export const ProductreceiptJobMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + requestTime: [ + { required: true, message: '请输入申请时间', trigger: 'change' } + ], + requestDueTime: [ + { required: true, message: '请输入要求截止时间', trigger: 'change' } + ], + status: [ + { required: true, message: '请选择状态', trigger: 'change' } + ], + // jobStageStatus: [ + // { required: true, message: '请选择阶段状态', trigger: 'change' } + // ], + priority: [ + { required: true, message: '请输入优先级', trigger: 'blur' } + ], + priorityIncrement: [ + { required: true, message: '请输入优先级增量', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + userPositionCode: [ + { required: true, message: '请输入岗位', trigger: 'blur' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货任务子表 + */ +export const ProductreceiptJobDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +export const ProductreceiptJobDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入过期日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue new file mode 100644 index 000000000..fbdb61db4 --- /dev/null +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue @@ -0,0 +1,229 @@ + + + diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptRecordMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptRecordMain.data.ts new file mode 100644 index 000000000..6c3fc3bcf --- /dev/null +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/productreceiptRecordMain.data.ts @@ -0,0 +1,945 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' + +/** + * @returns {Array} 制品收货记录主表 + */ +export const ProductreceiptRecordMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isSearch: true + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '执行时间', + field: 'executeTime', + 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', + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '申请时间', + field: 'requestTime', + 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', + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + 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', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, +])) + +//表单校验 +export const ProductreceiptRecordMainRules = reactive({ + requestNumber: [ + { required: true, message: '请选择申请单号', trigger: 'change' } + ], + toWarehouseCode: [ + { required: true, message: '请选择到仓库代码', trigger: 'change' } + ], + toAreaTypes: [ + { required: true, message: '请选择到库区类型范围', trigger: 'change' } + ], + toAreaCodes: [ + { required: true, message: '请选择到库区代码范围', trigger: 'change' } + ], + outTransaction: [ + { required: true, message: '请输入出库事务类型', trigger: 'blur' } + ], + inTransaction: [ + { required: true, message: '请输入入库事务类型', trigger: 'blur' } + ], + executeTime: [ + { required: true, message: '请输入执行时间', trigger: 'change' } + ], + activeDate: [ + { required: true, message: '请输入生效日期', trigger: 'change' } + ], + available: [ + { required: true, message: '请输入是否可用', trigger: 'blur' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + interfaceType: [ + { required: true, message: '请选择接口类型', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货记录子表 + */ +export const ProductreceiptRecordDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionlineCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const ProductreceiptRecordDetailRules = reactive({ + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + packingNumber: [ + { required: true, message: '请选择包装号', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + produceDate: [ + { required: true, message: '请输入生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请输入到货日期', trigger: 'change' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + toLocationGroupCode: [ + { required: true, message: '请选择到库位组代码', trigger: 'change' } + ], + toAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + woNumber: [ + { required: true, message: '请选择订单号', trigger: 'change' } + ], + woLine: [ + { required: true, message: '请输入订单行', trigger: 'blur' } + ], + packQty: [ + { required: true, message: '请输入包装数量', trigger: 'blur' } + ], + packUnit: [ + { required: true, message: '请选择包装规格', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货记录子表 + */ +export const BackflushRecordDetailb = useCrudSchemas(reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: 'BOM版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库位组代码', + field: 'fromLocationGroupCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '从库区代码', + field: 'fromAreaCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '代码', + // field: 'code', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + { + label: '接口类型', + field: 'interfaceType', + dictType: DICT_TYPE.INTERFACE_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, +])) + +//表单校验 +export const BackflushRecordDetailbRules = reactive({ + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' } + ], + inventoryStatus: [ + { required: true, message: '请选择库存状态', trigger: 'change' } + ], + fromLocationCode: [ + { required: true, message: '请选择从库位代码', trigger: 'change' } + ], + fromLocationGroupCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], + fromAreaCode: [ + { required: true, message: '请选择到库区代码', trigger: 'change' } + ], + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], +}) \ No newline at end of file diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue new file mode 100644 index 000000000..69bb3cd76 --- /dev/null +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -0,0 +1,670 @@ + + + diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts new file mode 100644 index 000000000..ee5f02722 --- /dev/null +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts @@ -0,0 +1,1763 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' + +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' + +import * as ShiftApi from '@/api/wms/shift' +import { Shift } from '@/views/wms/basicDataManage/orderManage/shift/shift.data' + +import * as TeamApi from '@/api/wms/team' +import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data' + +import * as WorkstationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' + +import * as ProcessApi from '@/api/wms/process' +import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' + +import * as ProductionlineitemApi from '@/api/wms/productionlineitem' +import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' + +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' + +import * as BomApi from '@/api/wms/bom' +import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' + +import * as SupplieritemApi from '@/api/wms/supplieritem' +import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' + +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ProductReceiptRequest' +} + 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 ProductreceiptRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + isSearch: true, + isForm: false, + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择车间', + searchField: 'code', + searchTitle: '车间信息', + searchAllSchemas: Workshop.allSchemas, + searchPage: WorkshopApi.getWorkshopPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '班组', + field: 'team', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择班组', + searchField: 'code', + searchTitle: '班组信息', + searchAllSchemas: Team.allSchemas, + searchPage: TeamApi.getTeamPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择班次', + searchField: 'code', + searchTitle: '班次信息', + searchAllSchemas: Shift.allSchemas, + searchPage: ShiftApi.getShiftPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'ProductReceipt', + componentProps: { + disabled: true + } + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + 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', + } + }, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '申请时间', + field: 'requestTime', + 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', + } + }, + isForm: false + }, + { + label: '截止时间', + field: 'dueTime', + 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', + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + 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: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + 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: true, + 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: true, + 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: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, + } +])) + +//表单校验 +export const ProductreceiptRequestMainRules = reactive({ + workshopCode: [ + { required: true, message: '请选择车间代码', trigger: 'change' } + ], + team: [ + { required: true, message: '请选择班组代码', trigger: 'change' } + ], + shift: [ + { required: true, message: '请选择班次代码', trigger: 'change' } + ], + // departmentCode: [ + // { required: true, message: '请输入部门', trigger: 'blur' } + // ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货申请子表 + */ +export const ProductreceiptRequestDetail = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + 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 + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + 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 + }] + } + } + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', + searchField: 'code', + searchTitle: '工位信息', + searchAllSchemas: Workstation.allSchemas, + searchPage: WorkstationApi.getWorkstationPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择工位代码', + searchField: 'code', + searchTitle: '工位信息', + searchAllSchemas: Workstation.allSchemas, + searchPage: WorkstationApi.getWorkstationPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + } + } + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + isTableForm: false, + isForm: false + }, + { + label: '包装规格', + field: 'packUnit', + // dictType: DICT_TYPE.PACK_UNIT, + // dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择物料代码', + searchField: 'itemCode', + searchTitle: '生产线物料关系信息', + searchAllSchemas: Productionlineitem.allSchemas, + searchPage: ProductionlineitemApi.getProductionlineitemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择物料代码', + searchField: 'itemCode', + searchTitle: '生产线物料关系信息', + searchAllSchemas: Productionlineitem.allSchemas, + searchPage: ProductionlineitemApi.getProductionlineitemPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'productionLineCode', + value: 'productionLineCode', + message: '请填写生产线代码!', + isMainValue: true + }] + } + } + }, + { + label: 'Bom版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 + searchField: 'version', // 查询弹窗赋值字段 + searchTitle: '物料清单信息', // 查询弹窗标题 + searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 + searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'productItemCode', + value:'itemCode', + message: '请填写物料代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 + searchField: 'version', // 查询弹窗赋值字段 + searchTitle: '物料清单信息', // 查询弹窗标题 + searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 + searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'productItemCode', + value:'itemCode', + message: '请填写物料代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + 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: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDate', + valueFormat: 'x', + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + type: 'FormDate', + valueFormat: 'x', + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + 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: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:false, + } +])) + +//表单校验 +export const ProductreceiptRequestDetailRules = reactive({ + produceDate: [ + { required: true, message: '请选择生产日期', trigger: 'change' } + ], + expireDate: [ + { required: true, message: '请选择过期日期', trigger: 'change' } + ], + batch: [ + { required: true, message: '请输入批次', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + bomVersion: [ + { required: true, message: '请选择Bom版本', trigger: 'change' } + ], + workStationCode: [ + { required: true, message: '请选择工位代码', trigger: 'change' } + ], + uom: [ + { required: true, message: '请选择计量单位', trigger: 'change' } + ], + productionLineCode: [ + { required: true, message: '请选择生产线代码', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 制品收货申请子表 + */ +export const BackflushRequestDetailb = useCrudSchemas(reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + }, + { + 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', + } + }, + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + } +])) + +//表单校验 +export const BackflushRequestDetailbRules = reactive({ + number: [ + { required: true, message: '请输入单据号', trigger: 'blur' } + ], + itemCode: [ + { required: true, message: '请选择物料代码', trigger: 'change' } + ], + createTime: [ + { required: true, message: '请输入创建时间', trigger: 'blur' } + ], + creator: [ + { required: true, message: '请输入创建者', trigger: 'blur' } + ], + +}) + + + + + +/** + * @returns {Array} 制品收货申请子表二子表 + */ +export const BackflushDetailRequest = useCrudSchemas(reactive([ + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: 'BOM版本', + field: 'bomVersion', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isTableForm: false, + isForm: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + isForm: false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, +])) + + +/** + * @returns {Array} 制品收货申请创建标签 + */ +export const ProductreceiptRequestLabel = useCrudSchemas(reactive([ + { + label: '生产线代码', + field: 'productionLineCodePackage', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + // isInpuFocusShow: true, + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // searchField: 'productionLineCode', // 查询弹窗赋值字段 + // searchTitle: '生产线物料关系信息', // 查询弹窗标题 + // searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 + // searchCondition:[{ + // key: 'itemCode', + // value: 'itemCode', + // isMainValue: true + // }] + } + }, + { + label: '供应商代码', + field: 'supplierItemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true + }] + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true, + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源生产线代码', + field: 'productionLineCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源工位代码', + field: 'workStationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '来源库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + isTableForm: false, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装规格1', + field: 'packUnit', + sort: 'custom', + table: { + width: 180 + }, + tableForm: { + disabled: true + }, + }, + { + label: '包装数量1', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true, + } + }, + { + label: '包装规格2', + field: 'secondPackUnit', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packUnit', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageByProductreceipt, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] + + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packUnit', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageByProductreceipt, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + { + label: '包装数量2', + field: 'secondPackQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled:true + } + }, + tableForm: { + disabled: true, + } + }, +])) + +//表单校验 +export const ProductreceiptRequestLabelRules = reactive({ + supplierItemCode: [ + { required: true, message: '请选择供应商', trigger: 'change' } + ], + productionLineCodePackage: [ + { required: true, message: '请选择生产线', trigger: 'change' } + ] +}) + From beb1f6234aeb7f55123ebf9785b831fbdad36af1 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 26 Mar 2024 13:10:06 +0800 Subject: [PATCH 55/65] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productreceiptJobMain/index.ts | 13 +++++++++++++ src/api/wms/productreceiptRecordMain/index.ts | 12 ++++++++++++ src/api/wms/productreceiptRequestMain/index.ts | 13 +++++++++++++ .../productreceiptscrapJobMain/index.vue | 4 ++-- ...ta.ts => productreceiptscrapJobMain.data.ts} | 0 .../productreceiptscrapRecordMain/index.vue | 4 ++-- ...ts => productreceiptscrapRecordMain.data.ts} | 0 .../productreceiptscrapRequestMain/index.vue | 6 +++--- ...s => productreceiptscrapRequestMain.data.ts} | 17 +++++++++++++++++ 9 files changed, 62 insertions(+), 7 deletions(-) rename src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/{productreceiptJobMain.data.ts => productreceiptscrapJobMain.data.ts} (100%) rename src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/{productreceiptRecordMain.data.ts => productreceiptscrapRecordMain.data.ts} (100%) rename src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/{productreceiptRequestMain.data.ts => productreceiptscrapRequestMain.data.ts} (99%) diff --git a/src/api/wms/productreceiptJobMain/index.ts b/src/api/wms/productreceiptJobMain/index.ts index d52d825bb..8f06b62f8 100644 --- a/src/api/wms/productreceiptJobMain/index.ts +++ b/src/api/wms/productreceiptJobMain/index.ts @@ -66,6 +66,19 @@ export const getProductreceiptJobMainAssemblePage = async (params) => { } } +// 查询报废收货货任务主列表 +export const getProductreceiptscapJobMainPage = async (params) => { + params.type = 'scrap' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-job-main/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-job-main/page`, params }) + } +} + + // 查询制品收货任务主详情 export const getProductreceiptJobMain = async (id: number) => { return await request.get({ url: `/wms/productreceipt-job-main/get?id=` + id }) diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index 1d71bfbd1..79b5699c9 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -51,6 +51,18 @@ export const getProductreceiptRecordMainAssemblePage = async (params) => { } } +// 查询报废收货记录主列表 +export const getProductreceiptRecordMainScrapPage = async (params) => { + params.type = 'scrap' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-record-main/page`, params }) + } +} + // 查询制品收货记录主详情 export const getProductreceiptRecordMain = async (id: number) => { return await request.get({ url: `/wms/productreceipt-record-main/get?id=` + id }) diff --git a/src/api/wms/productreceiptRequestMain/index.ts b/src/api/wms/productreceiptRequestMain/index.ts index d244cb3b5..0d337b177 100644 --- a/src/api/wms/productreceiptRequestMain/index.ts +++ b/src/api/wms/productreceiptRequestMain/index.ts @@ -49,6 +49,19 @@ export const getProductreceiptRequestMainAssemblePage = async (params) => { } } +// 查询报废收货申请主列表 +export const getProductreceiptRequestMainScrapPage = async (params) => { + params.type = 'scrap' + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productreceipt-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productreceipt-request-main/page`, params }) + } +} + + // 查询制品收货申请主详情 export const getProductreceiptRequestMain = async (id: number) => { return await request.get({ url: `/wms/productreceipt-request-main/get?id=` + id }) diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue index 77a975dbc..d99b2eb65 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue @@ -67,7 +67,7 @@ + \ No newline at end of file diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts similarity index 99% rename from src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts rename to src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts index ee5f02722..f53d8bba2 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts @@ -431,6 +431,23 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '收货类型', + field: 'type', + dictType: DICT_TYPE.PLAN_PRODUCTION_TYPE, + dictClass: 'string', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'scrap', + componentProps: { + disabled: true + } + }, + isForm: false + }, { label: '操作', field: 'action', From 0d308ca27c132775dd21464e5cc8fe8b1b0d96e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Tue, 26 Mar 2024 14:34:49 +0800 Subject: [PATCH 56/65] =?UTF-8?q?=E9=80=80=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionreturnRequestMain/index.vue | 36 ++++- .../productionreturnRequestMain.data.ts | 124 ++++++++++++++---- .../productionreturnRequestMainNo/index.vue | 8 +- .../productionreturnRequestMainNo.data.ts | 122 +++++++++++++---- 4 files changed, 235 insertions(+), 55 deletions(-) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index c636538eb..582f72410 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -175,6 +175,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['uom'] = val[0]['uom'] row['inventoryStatus'] = val[0]['inventoryStatus'] row['qty'] = val[0]['qty'] + // 如果有批次 赋值库存余额批次 无批次 赋值 000000 + if (val[0]['batch'] !== '') { + row['batch'] = val[0]['batch'] + } else { + row['batch'] = '000000' + } // 修改 tableform 属性 数量最大值设置为库存余额中数量 // TODO: tableFormColumns 修改属性目前只限于整个列 并不满足行要求 例如: 第一条数据最大10 第二条数据最大20 那么第一条数据会变成最大20限制 ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { @@ -186,6 +192,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else if(formField == 'workStationCode') { row['workStationCode'] = val[0]['code'] row['fromLocationCode'] = val[0]['rawLocationCode'] + } else if(formField == 'packUnit') { + row['packUnit'] = val[0]['packUnit'] + row['packQty'] = val[0]['packQty'] } else { row[formField] = val[0][searchField] } @@ -210,6 +219,12 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['uom'] = val[0]['uom'] setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['qty'] = val[0]['qty'] + // 如果有批次 赋值库存余额批次 无批次 赋值 000000 + if (val[0]['batch'] !== '') { + setV['batch'] = val[0]['batch'] + } else { + setV['batch'] = '000000' + } // 修改 tableform 属性 数量最大值设置为库存余额中数量 ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { if(item.field == 'qty' && val[0]['qty'] > 0) { @@ -220,6 +235,9 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { } else if(formField == 'workStationCode') { setV['workStationCode'] = val[0]['code'] setV['fromLocationCode'] = val[0]['rawLocationCode'] + } else if(formField == 'packUnit') { + setV['packUnit'] = val[0]['packUnit'] + setV['packQty'] = val[0]['packQty'] } else { setV[formField] = val[0][searchField] } @@ -381,7 +399,7 @@ const buttonTableClick = async (val, row) => { // dialogVisible.value = true formLabelRef.value.open('create', row) detatableData.tableList.map((item) => { - item.batch = '000000' + // item.batch = '000000' // 查询物料类型 原料 只能选择 供应商代码 半成品成品其他 只能选择 生产线 ItembasicApi.getItembasicPage({ pageSize: 10, @@ -498,7 +516,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { /** 详情操作——子表表单 */ const detailOpenForm = (type, row) => { nextTick(()=>{ - detailRef.value.formRef.formRef.formModel.batch = '000000' + // detailRef.value.formRef.formRef.formModel.batch = '000000' }) } @@ -545,7 +563,7 @@ const tableData = ref([]) // 添加明细 const handleAddTable = () => { let tfk = JSON.parse(JSON.stringify(tableFormKeys)) - tfk.batch = '000000' + // tfk.batch = '000000' tableData.value.push(tfk) } // 删除明细 @@ -556,6 +574,17 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + let isZC = true // 数量和标包数量 是否整除 + data.subList.forEach(item => { + if (item.qty % item.packQty !== 0) { + isZC = false + } + }) + if(!isZC) { + formRef.value.formLoading = false + await message.confirm('含有不整箱情况,是否继续?') + formRef.value.formLoading = true + } // 合格退料 添加参数 isOK data.isOK = true try { @@ -583,6 +612,7 @@ const submitForm = async (formType, data) => { const submitFormLabel = async (formType, data) => { try { detatableData.tableList.forEach(async (item) => { + item.toLocationCode = item.fromLocationCode await PackageApi.createPackageLabel(item).then(() => { isCreateLabel.value = true message.success('创建标签成功') diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index b52acb497..ae283b571 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -17,6 +17,9 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.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 { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' @@ -533,22 +536,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive - @@ -190,6 +190,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else if(formField == 'workStationCode') { row['workStationCode'] = val[0]['code'] row['fromLocationCode'] = val[0]['rawLocationCode'] + } else if(formField == 'packUnit') { + row['packUnit'] = val[0]['packUnit'] + row['packQty'] = val[0]['packQty'] } else { row[formField] = val[0][searchField] } @@ -225,6 +228,9 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { } else if(formField == 'workStationCode') { setV['workStationCode'] = val[0]['code'] setV['fromLocationCode'] = val[0]['rawLocationCode'] + } else if(formField == 'packUnit') { + setV['packUnit'] = val[0]['packUnit'] + setV['packQty'] = val[0]['packQty'] } else { setV[formField] = val[0][searchField] } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts index 0fd27bd5c..c43b49670 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts @@ -13,6 +13,9 @@ import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/worksta 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' + const { t } = useI18n() // 国际化 /** @@ -123,22 +126,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive Date: Tue, 26 Mar 2024 14:50:05 +0800 Subject: [PATCH 57/65] =?UTF-8?q?=E7=BF=BB=E5=8C=85=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A0=87=E7=AD=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packageoverRecordMain/index.vue | 35 ++++++++++++++++++- .../packageoverRecordMain.data.ts | 10 ++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue index a7421c788..9774d78d0 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue @@ -66,6 +66,8 @@ import { PackageoverMain,PackageoverMainRules, PackageoverDetail, PackageoverDet import * as PackageoverRecordMainApi from '@/api/wms/packageoverRecordMain' import * as PackageoverRecordDetailApi from '@/api/wms/packageoverRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import * as PackageApi from '@/api/wms/package' +import { getAccessToken } from '@/utils/auth' // 翻包记录 defineOptions({ name: 'PackageoverMain' }) @@ -118,11 +120,42 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { - return [] + return [defaultButtons.mainListPointBtn(null)] // 标签打印 } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { + if (val == 'point') { // 标签打印 + handlePoint(row) + } +} + +const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL +const labelType = ref('') // 标签类别 采购还是制造等 +// 标签打印 +const handlePoint = async (row) => { + // 查询是否已创建过标签 + await PackageApi.getPackagePage({ + requestNumber: row.number + }).then((res) => { + if(res.list.length > 0) { + if (res.list[0].productionLineCode != null) { + labelType.value = 'zz' + } else { + labelType.value = 'cg' + } + } + }).catch(err => { + console.log(err) + }) + // 判断是采购还是制造 + if (labelType.value == 'cg') { + const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) + window.open(src.value+'&request_number='+row.number) + } else { + const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) + window.open(src.value+'&request_number='+row.number) + } } /** 详情操作 */ diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts index 5d6693780..0cdb5f1f4 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts @@ -232,6 +232,16 @@ export const PackageoverMain = useCrudSchemas(reactive([ } }, }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + } + } ])) From 84322760ab07c4f2bcb6c9d4efd9e54ff936a2fc Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 26 Mar 2024 16:07:42 +0800 Subject: [PATCH 58/65] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptscrapRequestMain/index.vue | 4 ++-- .../productreceiptscrapRequestMain.data.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index ff70c327f..3541ec885 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -585,8 +585,8 @@ const submitFormLabel = async (formType, data) => { try { detatableData.tableList.forEach(async (item) => { // 创建标签 要物料库区配置表中 入库包装规格 - item.packUnit = null - item.inOfOut = 'in' + // item.packUnit = null + // item.inOfOut = 'in' await PackageApi.createPackageLabel(item).then(res => { isCreateLabel.value = true message.success('创建标签成功') diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts index f53d8bba2..535b4adc7 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts @@ -446,7 +446,6 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ disabled: true } }, - isForm: false }, { label: '操作', From 4bc2afd82ae0e670d824077b1062acf33344d74d Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 26 Mar 2024 17:41:08 +0800 Subject: [PATCH 59/65] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 3 +- .../deliverJobMain/deliverJobMain.data.ts | 8 + .../deliver/deliverJobMain/index.vue | 191 +++++++++--------- .../deliverRecordMain.data.ts | 8 + .../deliverRequestMain.data.ts | 71 ++++++- .../deliverPlanMain/deliverPlanMain.data.ts | 77 ++++++- 6 files changed, 256 insertions(+), 102 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index a55244551..c2a9ff9f1 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -276,5 +276,6 @@ export enum DICT_TYPE { PACK_UNIT_TYPE = 'pack_unit_type', // 包装规格类型 TRANSFER_REASON = 'transfer_reason', // 调拨出入库原因 PURCHASERECEIPT_SOURCE_TYPE="purchasereceipt_source_type",//采购收货数据来源 - PLAN_PRODUCTION_TYPE = "plan_production_type" // 生产计划类型 + PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型 + DELIVER_TYPE="deliver_type",//发货类型 } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts index db84960d1..3e307ff01 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts @@ -761,6 +761,14 @@ export const DeliverJobDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '在途库库位', + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '从库位代码', field: 'fromLocationCode', diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index 8d5aeea6c..93cdffaa4 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -180,112 +180,109 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 - // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 - // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 - // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 + defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 + defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => {  if (val == 'mainJobExe') { // 执行 -    let aaa = { - "id": "1809190002130023685", - "requestNumber": "REQ1720231222-0004", - "deliverPlanNumber": "DP20231222-0004", - "customerDeliverNumber": "CUST20231222-00000005", - "customerCode": "CF", - "customerDockCode": "CFCKYT", - "deliverDock": null, - "carrierCode": null, - "transferMode": null, - "vehiclePlateNumber": null, - "fromWarehouseCode": null, - "toWarehouseCode": "CFCK", - "requestTime": 1703207798000, - "requestDueTime": 1703952000000, - "status": "2", - "expiredTime": null, - "updateTime": 1703207917000, - "updater": "超级管理员", - "jobStageStatus": null, - "priority": null, - "priorityincrement": null, - "departmentCode": "100", - "acceptUserId": "1", - "acceptTime": 1703207934000, - "completeUserId": null, - "completeTime": null, - "fromAreaTypes": "FG", - "toAreaTypes": "CUST", - "number": "JOB2420231222-0006", - "businessType": "DeliverJob", - "remark": "", - "createTime": 1703207917000, - "creator": "超级管理员", - "ruleUserId": null, - "fromAreaCodes": "采购在途库", - "toAreaCodes": "采购在途库", - "fromDockCode": null, - "autoComplete": "FALSE", - "allowModifyLocation": "FALSE", - "allowModifyQty": "TRUE", - "allowBiggerQty": "TRUE", - "allowSmallerQty": "TRUE", - "allowModifyInventoryStatus": "TRUE", - "allowContinuousScanning": "TRUE", - "allowPartialComplete": "TRUE", - "allowModifyBatch": "FALSE", - "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", - "concurrencyStamp": 1, - "subList": [{ - "id": "1809190001245559379", - "soNumber": null, - "soLine": null, - "packingNumber": null, - "batch": "20230808", - "inventoryStatus": "OK", - "ownerCode": null, - "containerNumber": null, - "fromLocationCode": "L-R-001-001-1-01", - "toLocationCode": "CUST", - "itemCode": "testCF", - "itemName": "陈放测试物料", - "itemDesc1": "测试用", - "itemDesc2": "测试用", - "projectCode": "5", - "qty": 5, - "uom": "EA", - "number": "JOB2420231222-0006", - "remark": "", - "createTime": 1703207917000, - "creator": "超级管理员", - "toPackingNumber": null, - "toContainerNumber": null, - "toBatch": null, - "handleQty": null, - "toInventoryStatus": null, - recordList: [{ - handleQty: 10, - toPackingNumber: '12', - toContainerNumber: '001', - toBatch: '21', + let aaa = { + "id": 3, + "requestNumber": "REQ1720240326-0012", + "deliverPlanNumber": "", + "customerDeliverNumber": "CUST20240326-00000012", + "customerCode": "KHV", + "customerDockCode": "YTV4", + "deliverDock": null, + "carrierCode": "", + "transferMode": "", + "vehiclePlateNumber": "", + "fromWarehouseCode": null, + "toWarehouseCode": "CKV", + "requestTime": 1711443936000, + "requestDueTime": null, + "status": "2", + "expiredTime": null, + "updateTime": 1711443936000, + "updater": "超级管理员", + "jobStageStatus": null, + "priority": null, + "priorityincrement": null, + "departmentCode": "100", + "acceptUserId": "1", + "acceptTime": 1711443941000, + "completeUserId": null, + "completeTime": null, + "fromAreaTypes": "FG,STOCK_UP", + "toAreaTypes": "CUST,THIRD_PARTY", + "number": "JOB2420240326-0013", + "businessType": "Deliver", + "remark": "", + "createTime": 1711443936000, + "creator": "超级管理员", + "ruleUserId": null, + "fromAreaCodes": "FG", + "toAreaCodes": "CUST,ZTQ", + "fromDockCode": null, + "autoComplete": "FALSE", + "allowModifyLocation": "FALSE", + "allowModifyQty": "TRUE", + "allowBiggerQty": "TRUE", + "allowSmallerQty": "TRUE", + "allowModifyInventoryStatus": "TRUE", + "allowContinuousScanning": "TRUE", + "allowPartialComplete": "TRUE", + "allowModifyBatch": "FALSE", + "allowModifyPackingNumber": "FALSE", + "inInventoryStatuses": "OK", + "outInventoryStatuses": "OK", + "concurrencyStamp": 1, + "useOnTheWayLocation": null, + "subList": [{ + "id": 3, + "soNumber": null, + "soLine": null, + "packingNumber": null, + "batch": "2024021801", + "inventoryStatus": "OK", + "ownerCode": null, + "containerNumber": null, + "fromLocationCode": "FG", + "toLocationCode": "SFK", + "itemCode": "vvcs-zhj1", + "itemName": "测试物件", + "itemDesc1": "水冷系-散热器", + "itemDesc2": "水冷系-散热器", + "projectCode": "PJ001", + "qty": 11, + "uom": "PC", + "number": "JOB2420240326-0013", + "remark": "", + "createTime": 1711443936000, + "creator": "超级管理员", + "toPackingNumber": null, + "toContainerNumber": null, + "toBatch": null, + "handleQty": null, + "toInventoryStatus": null, + "updateTime": 1711443936000, + "updater": "超级管理员", + "onTheWayLocationCode": "FHZTK", + recordList: [{ + handleQty: 11, + toPackingNumber: null, + toContainerNumber: null, + toBatch: '2024021801', toInventoryStatus: 'OK', - toLocationCode: 'H03', - supplierCode: '31213', - },{ - handleQty: 22, - toPackingNumber: 'M20230421000005', - toContainerNumber: '001', - toBatch: '20230808', - toInventoryStatus: 'OK', - toLocationCode: 'SFG', + toLocationCode: "SFK", supplierCode: '31213', }] - }] + } + ] } handleHandle(aaa) console.log('列表-操作按钮事件-执行') diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts index a11a3c3f1..a3ca68a6e 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts @@ -516,6 +516,14 @@ export const DeliverRecordDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '在途库库位', + field: 'onTheWayLocationCode', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '从库位代码', field: 'fromLocationCode', diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index ae7805bab..fcb7b4b31 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -19,6 +19,9 @@ import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/cu import * as CarrierApi from '@/api/wms/carrier' import { Carrier } from '@/views/wms/basicDataManage/orderManage/carrier/carrier.data' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as WorkstationApi from '@/api/wms/workstation' const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -166,6 +169,16 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ } } }, + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + }, { label: '承运商', field: 'carrierCode', @@ -200,6 +213,15 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '发货库区类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + table: { + width: 150 + }, + }, { label: '车牌号', field: 'vehiclePlateNumber', @@ -527,6 +549,9 @@ export const DeliverRequestMainRules = reactive({ customerCode: [ { required: true, message: '请选择客户代码', trigger: 'change' } ], + deliverType: [ + { required: true, message: '发货库区类型不能为空', trigger: 'change' } + ], customerDockCode: [ { required: true, message: '请选择客户月台代码', trigger: 'change' } ], @@ -783,7 +808,8 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ width: 150 }, tableForm: { - type: 'Select' + type: 'Select', + disabled: true }, form: { componentProps: { @@ -798,8 +824,44 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, - isTableForm: false, - isForm: false, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: true + }] + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: false + }] + } + }, }, { label: '库存状态', @@ -966,4 +1028,7 @@ export const DeliverRequestDetailRules = reactive({ remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], }) \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index c7bea610a..0ab9228ad 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -10,8 +10,15 @@ import { Customerdock } from '@/views/wms/basicDataManage/customerManage/custome import * as CustomerItemApi from '@/api/wms/customeritem' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' + +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +import * as WorkstationApi from '@/api/wms/workstation' + import * as getPlansettingApi from '@/api/wms/plansetting/index' +import * as getBusinessTypeApi from '@/api/wms/businesstype/index' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -23,6 +30,13 @@ const queryParams = { const data = await getPlansettingApi.getPlansettingPage(queryParams) const plansettingData =data?.list[0]||{} + const businessTypeQueryParams = { + pageSize:10, + pageNo:1, + code:'Deliver' +} +const data1 = await getBusinessTypeApi.getBusinesstypePage(businessTypeQueryParams) +const businessTypeData =data1?.list[0]||{} /** * @returns {Array} 发货计划主表 */ @@ -63,6 +77,16 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ } } }, + { + label: '发货类型', + field: 'deliverType', + sort: 'custom', + dictType: DICT_TYPE.DELIVER_TYPE, + dictClass: 'string', + table: { + width: 150 + }, + }, { label: '计划日期', field: 'planDate', @@ -317,6 +341,9 @@ export const DeliverPlanMainRules = reactive({ customerCode: [ { required: true, message: '请选择客户代码', trigger: 'change' } ], + deliverType: [ + { required: true, message: '发货库区类型不能为空', trigger: 'change' } + ], planDate: [ { required: true, message: '计划日期不能为空', trigger: 'change' } ], @@ -405,7 +432,6 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false },{ key: 'customerCode', value: 'customerCode', @@ -500,6 +526,52 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ } } }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: true + }] + }, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择到库位代码', + searchField: 'code', + searchTitle: '库位基础信息', + searchAllSchemas: Location.allSchemas, + searchPage: WorkstationApi.selectAreaTypeToLocation, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'areaType', + value: "deliverType", + message:"请选择发货类型", + isMainValue: false + }] + } + }, + }, { label: '备注', field: 'remark', @@ -657,6 +729,9 @@ export const DeliverPlanDetailRules = reactive({ itemCode: [ { required: true, message: '请选择物料代码', trigger: 'change' } ], + toLocationCode: [ + { required: true, message: '请选择到库位代码', trigger: 'change' } + ], available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ], From 3c9a4bbc3aec2ff83ef0e807b60b416311727da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9C=E9=98=B3?= <1301318913@qq.com> Date: Wed, 27 Mar 2024 11:07:57 +0800 Subject: [PATCH 60/65] =?UTF-8?q?=E5=A2=9E=E5=8A=A0mes=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=8E=86=E6=8E=92=E4=BA=A7=E8=AE=A1=E5=88=92=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/productionPlan/index.ts | 61 +++++ src/views/mes/productionPlan/index.vue | 244 ++++++++++++++++++ .../mes/productionPlan/productionPlan.data.ts | 182 +++++++++++++ 3 files changed, 487 insertions(+) create mode 100644 src/api/mes/productionPlan/index.ts create mode 100644 src/views/mes/productionPlan/index.vue create mode 100644 src/views/mes/productionPlan/productionPlan.data.ts diff --git a/src/api/mes/productionPlan/index.ts b/src/api/mes/productionPlan/index.ts new file mode 100644 index 000000000..de60663ba --- /dev/null +++ b/src/api/mes/productionPlan/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' + +export interface ProductionPlanVO { + id: number + planCode: string + planName: string + teamType: string + endTime: Date + shiftMode: string + billState: number + deleteTime: Date + status: string + concurrencyStamp: number + remark: string + deleter: string + siteId: number + textOne: string + textTwo: string + textThree: string +} + +// 查询生产排产计划列表 +export const getProductionPlanPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/productionPlan/senior', data }) + } else { + return await request.get({ url: `/mes/productionPlan/page`, params }) + } +} + +// 查询生产排产计划详情 +export const getProductionPlan = async (id: number) => { + return await request.get({ url: `/mes/productionPlan/get?id=` + id }) +} + +// 新增生产排产计划 +export const createProductionPlan = async (data: ProductionPlanVO) => { + return await request.post({ url: `/mes/productionPlan/create`, data }) +} + +// 修改生产排产计划 +export const updateProductionPlan = async (data: ProductionPlanVO) => { + return await request.put({ url: `/mes/productionPlan/update`, data }) +} + +// 删除生产排产计划 +export const deleteProductionPlan = async (id: number) => { + return await request.delete({ url: `/mes/productionPlan/delete?id=` + id }) +} + +// 导出生产排产计划 Excel +export const exportProductionPlan = async (params) => { + return await request.download({ url: `/mes/productionPlan/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/productionPlan/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/mes/productionPlan/index.vue b/src/views/mes/productionPlan/index.vue new file mode 100644 index 000000000..1c9271bea --- /dev/null +++ b/src/views/mes/productionPlan/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/mes/productionPlan/productionPlan.data.ts b/src/views/mes/productionPlan/productionPlan.data.ts new file mode 100644 index 000000000..539264c0e --- /dev/null +++ b/src/views/mes/productionPlan/productionPlan.data.ts @@ -0,0 +1,182 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ProductionPlanRules = reactive({ + endTime: [required], + concurrencyStamp: [required], +}) + +export const ProductionPlan = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '计划编号', + field: 'planCode', + sort: 'custom', + isSearch: true, + }, + { + label: '计划名称', + field: 'planName', + sort: 'custom', + isSearch: true, + }, + { + label: '班组类型', + field: 'teamType', + sort: 'custom', + isSearch: true, + // form: { + // component: 'SelectV2' + // }, + }, + { + label: '结束时间', + field: 'endTime', + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '轮班方式', + field: 'shiftMode', + sort: 'custom', + isSearch: true, + }, + { + label: '单据状态', + field: 'billState', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '删除时间', + field: 'deleteTime', + 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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '备注', + field: 'remark', + 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: 'deleter', + sort: 'custom', + isSearch: true, + }, + { + label: '位置ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '备用字段一', + field: 'textOne', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段二', + field: 'textTwo', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段三', + field: 'textThree', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) From 027d879a425945625c2534d111d447204b5ae1c0 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 27 Mar 2024 11:11:08 +0800 Subject: [PATCH 61/65] test --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a28b719c2..554ca3d62 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ form: { ] } } + + **tableForm明细列表查询弹窗配置** tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 【**与form表单中唯一不同属性**】 From e3bcb7d1bca307e961cf43672ee826418bf0d54b Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 27 Mar 2024 11:32:47 +0800 Subject: [PATCH 62/65] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/supplierdeliverRecordMain/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index 5e1b2a07e..9119693f4 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -175,7 +175,8 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => { // 单据打印 const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL -const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) +//const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) +const documentSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()) const handleDocumentPrint = async (id) => { window.open(documentSrc.value + '&id=' + id) } From 2d0630ebd10a930f0a19ec3bbe557fae937c7dce Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 27 Mar 2024 11:33:43 +0800 Subject: [PATCH 63/65] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/supplierdeliverRequestMain/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 35dd36a73..13a635690 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -601,7 +601,8 @@ const print = async () => { } // 单据打印 -const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) +// const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) +const documentSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()) const handleDocumentPrint = async (id) => { window.open(documentSrc.value + '&id=' + id) } From 511129542f1dee0823a529b8123a3a615b40af64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 27 Mar 2024 13:15:55 +0800 Subject: [PATCH 64/65] =?UTF-8?q?=E5=88=B6=E5=93=81=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productredressJobDetail/index.ts | 71 +++ src/api/wms/productredressJobMain/index.ts | 87 +++ .../wms/productredressRecordDetail/index.ts | 77 +++ src/api/wms/productredressRecordMain/index.ts | 70 +++ .../wms/productredressRequestDetail/index.ts | 73 +++ .../wms/productredressRequestMain/index.ts | 100 +++ src/components/SearchHigh/src/SearchHigh.vue | 8 +- .../productredressJobMain/index.vue | 244 +++++++ .../productredressJobMain.data.ts | 523 +++++++++++++++ .../productredressRecordMain/index.vue | 244 +++++++ .../productredressRecordMain.data.ts | 446 +++++++++++++ .../productredressRequestMain/index.vue | 501 +++++++++++++++ .../productredressRequestMain.data.ts | 595 ++++++++++++++++++ 13 files changed, 3038 insertions(+), 1 deletion(-) create mode 100644 src/api/wms/productredressJobDetail/index.ts create mode 100644 src/api/wms/productredressJobMain/index.ts create mode 100644 src/api/wms/productredressRecordDetail/index.ts create mode 100644 src/api/wms/productredressRecordMain/index.ts create mode 100644 src/api/wms/productredressRequestDetail/index.ts create mode 100644 src/api/wms/productredressRequestMain/index.ts create mode 100644 src/views/wms/productionManage/productredress/productredressJobMain/index.vue create mode 100644 src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts create mode 100644 src/views/wms/productionManage/productredress/productredressRecordMain/index.vue create mode 100644 src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts create mode 100644 src/views/wms/productionManage/productredress/productredressRequestMain/index.vue create mode 100644 src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts diff --git a/src/api/wms/productredressJobDetail/index.ts b/src/api/wms/productredressJobDetail/index.ts new file mode 100644 index 000000000..27dd360fe --- /dev/null +++ b/src/api/wms/productredressJobDetail/index.ts @@ -0,0 +1,71 @@ +import request from '@/config/axios' + +export interface ProductredressJobDetailVO { + id: number + productionLineCode: string + workStationCode: string + processCode: string + packingNumber: string + containerNumber: string + batch: string + produceDate: Date + expireDate: Date + inventoryStatus: string + toLocationCode: string + woNumber: string + woLine: string + packQty: number + packUnit: string + itemCode: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + masterId: number + number: string + remark: string + toOwnerCode: string +} + +// 查询制品回收任务子列表 +export const getProductredressJobDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productredress-job-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productredress-job-detail/page`, params }) + } +} + +// 查询制品回收任务子详情 +export const getProductredressJobDetail = async (id: number) => { + return await request.get({ url: `/wms/productredress-job-detail/get?id=` + id }) +} + +// 新增制品回收任务子 +export const createProductredressJobDetail = async (data: ProductredressJobDetailVO) => { + return await request.post({ url: `/wms/productredress-job-detail/create`, data }) +} + +// 修改制品回收任务子 +export const updateProductredressJobDetail = async (data: ProductredressJobDetailVO) => { + return await request.put({ url: `/wms/productredress-job-detail/update`, data }) +} + +// 删除制品回收任务子 +export const deleteProductredressJobDetail = async (id: number) => { + return await request.delete({ url: `/wms/productredress-job-detail/delete?id=` + id }) +} + +// 导出制品回收任务子 Excel +export const exportProductredressJobDetail = async (params) => { + return await request.download({ url: `/wms/productredress-job-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productredress-job-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productredressJobMain/index.ts b/src/api/wms/productredressJobMain/index.ts new file mode 100644 index 000000000..40311c5c8 --- /dev/null +++ b/src/api/wms/productredressJobMain/index.ts @@ -0,0 +1,87 @@ +import request from '@/config/axios' + +export interface ProductredressJobMainVO { + id: number + requestNumber: string + productionPlanNumber: string + workShopCode: string + team: string + shift: string + details: string + requestTime: Date + requestDueTime: Date + status: string + expiredTime: Date + jobStageStatus: string + priority: number + priorityIncrement: number + departmentCode: string + userGroupCode: string + acceptUserId: string + acceptUserName: string + acceptTime: Date + completeUserId: string + completeUserName: string + completeTime: Date + toWarehouseCode: string + toAreaCodes: string + fromAreaTypes: string + toAreaTypes: string + number: string + type: string + businessType: string + remark: string + autoComplete: string + allowModifyLocation: string + allowModifyQty: string + allowBiggerQty: string + allowSmallerQty: string + allowModifyInventoryStatus: string + allowContinuousScanning: string + allowPartialComplete: string + allowModifyBatch: string + allowModifyPackingNumber: string + inInventoryStatuses: string + outInventoryStatuses: string +} + +// 查询制品回收任务主列表 +export const getProductredressJobMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productredress-job-main/senior', data }) + } else { + return await request.get({ url: `/wms/productredress-job-main/page`, params }) + } +} + +// 查询制品回收任务主详情 +export const getProductredressJobMain = async (id: number) => { + return await request.get({ url: `/wms/productredress-job-main/get?id=` + id }) +} + +// 新增制品回收任务主 +export const createProductredressJobMain = async (data: ProductredressJobMainVO) => { + return await request.post({ url: `/wms/productredress-job-main/create`, data }) +} + +// 修改制品回收任务主 +export const updateProductredressJobMain = async (data: ProductredressJobMainVO) => { + return await request.put({ url: `/wms/productredress-job-main/update`, data }) +} + +// 删除制品回收任务主 +export const deleteProductredressJobMain = async (id: number) => { + return await request.delete({ url: `/wms/productredress-job-main/delete?id=` + id }) +} + +// 导出制品回收任务主 Excel +export const exportProductredressJobMain = async (params) => { + return await request.download({ url: `/wms/productredress-job-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productredress-job-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productredressRecordDetail/index.ts b/src/api/wms/productredressRecordDetail/index.ts new file mode 100644 index 000000000..860b7d8a3 --- /dev/null +++ b/src/api/wms/productredressRecordDetail/index.ts @@ -0,0 +1,77 @@ +import request from '@/config/axios' + +export interface ProductredressRecordDetailVO { + id: number + productionlineCode: string + workStationCode: string + processCode: string + packingNumber: string + containerNumber: string + batch: string + produceDate: Date + expireDate: Date + inventoryStatus: string + toLocationCode: string + toLocationGroupCode: string + toAreaCode: string + toOwnerCode: string + woNumber: string + woLine: string + packQty: number + packUnit: string + bomVersion: string + backFlushDetails: string + masterId: number + number: string + itemCode: string + remark: string + siteId: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + interfaceType: string +} + +// 查询制品回收记录子列表 +export const getProductredressRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productredress-record-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productredress-record-detail/page`, params }) + } +} + +// 查询制品回收记录子详情 +export const getProductredressRecordDetail = async (id: number) => { + return await request.get({ url: `/wms/productredress-record-detail/get?id=` + id }) +} + +// 新增制品回收记录子 +export const createProductredressRecordDetail = async (data: ProductredressRecordDetailVO) => { + return await request.post({ url: `/wms/productredress-record-detail/create`, data }) +} + +// 修改制品回收记录子 +export const updateProductredressRecordDetail = async (data: ProductredressRecordDetailVO) => { + return await request.put({ url: `/wms/productredress-record-detail/update`, data }) +} + +// 删除制品回收记录子 +export const deleteProductredressRecordDetail = async (id: number) => { + return await request.delete({ url: `/wms/productredress-record-detail/delete?id=` + id }) +} + +// 导出制品回收记录子 Excel +export const exportProductredressRecordDetail = async (params) => { + return await request.download({ url: `/wms/productredress-record-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productredress-record-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productredressRecordMain/index.ts b/src/api/wms/productredressRecordMain/index.ts new file mode 100644 index 000000000..e935de9c9 --- /dev/null +++ b/src/api/wms/productredressRecordMain/index.ts @@ -0,0 +1,70 @@ +import request from '@/config/axios' + +export interface ProductredressRecordMainVO { + id: number + requestNumber: string + jobNumber: string + productionPlanNumber: string + workshopCode: string + team: string + shift: string + details: string + outTransactionType: string + inTransactionType: string + executeTime: Date + activeDate: Date + available: string + requestTime: Date + dueTime: Date + departmentCode: string + interfaceType: string + number: string + type: string + businessType: string + remark: string + code: string + toWarehouseCode: string + toAreaTypes: string + toAreaCodes: string +} + +// 查询制品回收记录主列表 +export const getProductredressRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productredress-record-main/senior', data }) + } else { + return await request.get({ url: `/wms/productredress-record-main/page`, params }) + } +} + +// 查询制品回收记录主详情 +export const getProductredressRecordMain = async (id: number) => { + return await request.get({ url: `/wms/productredress-record-main/get?id=` + id }) +} + +// 新增制品回收记录主 +export const createProductredressRecordMain = async (data: ProductredressRecordMainVO) => { + return await request.post({ url: `/wms/productredress-record-main/create`, data }) +} + +// 修改制品回收记录主 +export const updateProductredressRecordMain = async (data: ProductredressRecordMainVO) => { + return await request.put({ url: `/wms/productredress-record-main/update`, data }) +} + +// 删除制品回收记录主 +export const deleteProductredressRecordMain = async (id: number) => { + return await request.delete({ url: `/wms/productredress-record-main/delete?id=` + id }) +} + +// 导出制品回收记录主 Excel +export const exportProductredressRecordMain = async (params) => { + return await request.download({ url: `/wms/productredress-record-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productredress-record-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productredressRequestDetail/index.ts b/src/api/wms/productredressRequestDetail/index.ts new file mode 100644 index 000000000..150891c58 --- /dev/null +++ b/src/api/wms/productredressRequestDetail/index.ts @@ -0,0 +1,73 @@ +import request from '@/config/axios' + +export interface ProductredressRequestDetailVO { + id: number + productionLineCode: string + workStationCode: string + toLocationCode: string + processCode: string + packingNumber: string + containerNumber: string + batch: string + produceDate: Date + expireDate: Date + inventoryStatus: string + woNumber: string + woLine: string + packQty: number + packUnit: string + bomVersion: string + backFlushDetails: string + masterId: number + number: string + itemCode: string + remark: string + itemName: string + itemDesc1: string + itemDesc2: string + projectCode: string + qty: number + uom: string + toOwnerCode: string +} + +// 查询制品回收申请子列表 +export const getProductredressRequestDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productredress-request-detail/senior', data }) + } else { + return await request.get({ url: `/wms/productredress-request-detail/page`, params }) + } +} + +// 查询制品回收申请子详情 +export const getProductredressRequestDetail = async (id: number) => { + return await request.get({ url: `/wms/productredress-request-detail/get?id=` + id }) +} + +// 新增制品回收申请子 +export const createProductredressRequestDetail = async (data: ProductredressRequestDetailVO) => { + return await request.post({ url: `/wms/productredress-request-detail/create`, data }) +} + +// 修改制品回收申请子 +export const updateProductredressRequestDetail = async (data: ProductredressRequestDetailVO) => { + return await request.put({ url: `/wms/productredress-request-detail/update`, data }) +} + +// 删除制品回收申请子 +export const deleteProductredressRequestDetail = async (id: number) => { + return await request.delete({ url: `/wms/productredress-request-detail/delete?id=` + id }) +} + +// 导出制品回收申请子 Excel +export const exportProductredressRequestDetail = async (params) => { + return await request.download({ url: `/wms/productredress-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productredress-request-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/productredressRequestMain/index.ts b/src/api/wms/productredressRequestMain/index.ts new file mode 100644 index 000000000..933a72def --- /dev/null +++ b/src/api/wms/productredressRequestMain/index.ts @@ -0,0 +1,100 @@ +import request from '@/config/axios' + +export interface ProductredressRequestMainVO { + id: number + productionPlanNumber: string + workshopCode: string + team: string + shift: string + toWarehouseCode: string + toAreaTypes: string + toAreaCodes: string + number: string + type: string + businessType: string + remark: string + extraProperties: string + siteId: string + requestTime: Date + dueTime: Date + departmentCode: string + status: string + autoCommit: string + autoAgree: string + autoExecute: string + directCreateRecord: string + inInventoryStatuses: string + outInventoryStatuses: string +} + +// 查询制品回收申请主列表 +export const getProductredressRequestMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/productredress-request-main/senior', data }) + } else { + return await request.get({ url: `/wms/productredress-request-main/page`, params }) + } +} + +// 查询制品回收申请主详情 +export const getProductredressRequestMain = async (id: number) => { + return await request.get({ url: `/wms/productredress-request-main/get?id=` + id }) +} + +// 新增制品回收申请主 +export const createProductredressRequestMain = async (data: ProductredressRequestMainVO) => { + return await request.post({ url: `/wms/productredress-request-main/create`, data }) +} + +// 修改制品回收申请主 +export const updateProductredressRequestMain = async (data: ProductredressRequestMainVO) => { + return await request.put({ url: `/wms/productredress-request-main/update`, data }) +} + +// 删除制品回收申请主 +export const deleteProductredressRequestMain = async (id: number) => { + return await request.delete({ url: `/wms/productredress-request-main/delete?id=` + id }) +} + +// 导出制品回收申请主 Excel +export const exportProductredressRequestMain = async (params) => { + return await request.download({ url: `/wms/productredress-request-main/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/productredress-request-main/get-import-template' }) +} + + +// 关闭 +export const close = (id) => { + return request.put({ url: '/wms/productredress-request-main/close?id=' + id }) +} + +// 重新添加 +export const reAdd = (id) => { + return request.put({ url: '/wms/productredress-request-main/reAdd?id=' + id }) +} + +// 提交审批 +export const submit = (id) => { + return request.put({ url: '/wms/productredress-request-main/submit?id=' + id }) +} + +// 驳回 +export const refused = (id) => { + return request.put({ url: '/wms/productredress-request-main/refused?id=' + id }) +} + +// 审批通过 +export const agree = (id) => { + return request.put({ url: '/wms/productredress-request-main/agree?id=' + id }) +} + +// 处理 +export const handle = (id) => { + return request.put({ url: '/wms/productredress-request-main/handle?id=' + id }) +} \ No newline at end of file diff --git a/src/components/SearchHigh/src/SearchHigh.vue b/src/components/SearchHigh/src/SearchHigh.vue index be0dba4a3..0c3ab7a0c 100644 --- a/src/components/SearchHigh/src/SearchHigh.vue +++ b/src/components/SearchHigh/src/SearchHigh.vue @@ -126,6 +126,12 @@ const moreListOptions = ref({ }, { value: 'isNotNull', label: '不是空' + }, { + value: 'isStr', + label: '是空字符串' + }, { + value: 'isNotStr', + label: '不是空字符串' } ] }) @@ -205,7 +211,7 @@ const resetSelect = (val) => { } // 范围改变 const actionSelect = (val)=>{ - if(val.action=='isNull'|| val.action == 'isNotNull'){ + if(val.action=='isNull'|| val.action == 'isNotNull'|| val.action == 'isStr'|| val.action == 'isNotStr'){ val.disabled = true }else{ val.disabled = false diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue new file mode 100644 index 000000000..0f5b83f11 --- /dev/null +++ b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts b/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts new file mode 100644 index 000000000..1bd45da80 --- /dev/null +++ b/src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts @@ -0,0 +1,523 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ProductredressJobMainRules = reactive({ +}) + +export const ProductredressJobMain = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '车间代码', + field: 'workShopCode', + sort: 'custom', + }, + { + label: '班组', + field: 'team', + sort: 'custom', + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + }, + { + label: '明细', + field: 'details', + sort: 'custom', + }, + { + label: '申请时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '要求截止时间', + field: 'requestDueTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + form: { + component: 'Radio' + }, + }, + { + label: '过期时间', + field: 'expiredTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '最后更新者Id', + field: 'updater', + sort: 'custom', + isForm: false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isForm: false, + }, + { + label: '状态', + field: 'jobStageStatus', + sort: 'custom', + form: { + component: 'Radio' + }, + }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '优先级增量', + field: 'priorityIncrement', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + }, + { + label: '用户组', + field: 'userGroupCode', + sort: 'custom', + }, + { + label: '承接人用户ID', + field: 'acceptUserId', + sort: 'custom', + }, + { + label: '承接人用户名', + field: 'acceptUserName', + sort: 'custom', + }, + { + label: '承接时间', + field: 'acceptTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '完成人用户ID', + field: 'completeUserId', + sort: 'custom', + }, + { + label: '完成人用户名', + field: 'completeUserName', + sort: 'custom', + }, + { + label: '完成时间', + field: 'completeTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + sort: 'custom', + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + sort: 'custom', + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + }, + { + label: '收货类型', + field: 'type', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '创建者id', + field: 'creator', + sort: 'custom', + isForm: false, + }, + { + label: '自动完成', + field: 'autoComplete', + sort: 'custom', + }, + { + label: '允许修改库位', + field: 'allowModifyLocation', + sort: 'custom', + }, + { + label: '允许修改数量', + field: 'allowModifyQty', + sort: 'custom', + }, + { + label: '允许大于推荐数量', + field: 'allowBiggerQty', + sort: 'custom', + }, + { + label: '允许小于推荐数量', + field: 'allowSmallerQty', + sort: 'custom', + }, + { + label: '允许修改库存状态', + field: 'allowModifyInventoryStatus', + sort: 'custom', + form: { + component: 'Radio' + }, + }, + { + label: '允许连续扫描', + field: 'allowContinuousScanning', + sort: 'custom', + }, + { + label: '允许部分完成', + field: 'allowPartialComplete', + sort: 'custom', + }, + { + label: '允许修改批次', + field: 'allowModifyBatch', + sort: 'custom', + }, + { + label: '允许修改箱码', + field: 'allowModifyPackingNumber', + sort: 'custom', + }, + { + label: '入库库存状态范围', + field: 'inInventoryStatuses', + sort: 'custom', + }, + { + label: '出库库存状态范围', + field: 'outInventoryStatuses', + sort: 'custom', + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ProductredressJobDetailRules = reactive({ +}) + +export const ProductredressJobDetail = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '生产线代码', + field: 'productionLineCode', + sort: 'custom', + isSearch: true, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + }, + { + label: '生产日期', + field: 'produceDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + sort: 'custom', + form: { + component: 'Radio' + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '创建者Id', + field: 'creator', + sort: 'custom', + isForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '最后更新者Id', + field: 'updater', + sort: 'custom', + isForm: false, + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue b/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue new file mode 100644 index 000000000..753878fa1 --- /dev/null +++ b/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts new file mode 100644 index 000000000..47e4fad1c --- /dev/null +++ b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts @@ -0,0 +1,446 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const ProductredressRecordMainRules = reactive({ +}) + +export const ProductredressRecordMain = useCrudSchemas(reactive([ + { + label: '申请单号', + field: 'requestNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '任务单号', + field: 'jobNumber', + sort: 'custom', + }, + { + label: '生产计划单号', + field: 'productionPlanNumber', + sort: 'custom', + }, + { + label: '车间代码', + field: 'workshopCode', + sort: 'custom', + }, + { + label: '班组', + field: 'team', + sort: 'custom', + }, + { + label: '班次', + field: 'shift', + sort: 'custom', + }, + { + label: '明细', + field: 'details', + sort: 'custom', + }, + { + label: '出库事务类型', + field: 'outTransactionType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '入库事务类型', + field: 'inTransactionType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '执行时间', + field: 'executeTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '生效日期', + field: 'activeDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '申请时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '截止时间', + field: 'dueTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + }, + { + label: '接口类型', + field: 'interfaceType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + }, + { + label: '收货类型', + field: 'type', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '创建者Id', + field: 'creator', + sort: 'custom', + isForm: false, + }, + { + label: '代码', + field: 'code', + sort: 'custom', + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + sort: 'custom', + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '最后更新者用户名', + field: 'updater', + sort: 'custom', + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + + +// 表单校验 +export const ProductredressRecordDetailRules = reactive({ + productionlineCode: [required], + masterId: [required], +}) + +export const ProductredressRecordDetail = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '生产线代码', + field: 'productionlineCode', + sort: 'custom', + isSearch: true, + }, + { + label: '工位代码', + field: 'workStationCode', + sort: 'custom', + }, + { + label: '工序代码', + field: 'processCode', + sort: 'custom', + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + }, + { + label: '器具号', + field: 'containerNumber', + sort: 'custom', + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + }, + { + label: '生产日期', + field: 'produceDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '过期日期', + field: 'expireDate', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + sort: 'custom', + form: { + component: 'Radio' + }, + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + }, + { + label: '到库位组代码', + field: 'toLocationGroupCode', + sort: 'custom', + }, + { + label: '到库区代码', + field: 'toAreaCode', + sort: 'custom', + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + }, + { + label: '订单号', + field: 'woNumber', + sort: 'custom', + }, + { + label: '订单行', + field: 'woLine', + sort: 'custom', + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + }, + { + label: 'BOM版本', + field: 'bomVersion', + sort: 'custom', + }, + { + label: '明细', + field: 'backFlushDetails', + sort: 'custom', + }, + { + label: '主表ID', + field: 'masterId', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '创建者Id', + field: 'creator', + sort: 'custom', + isForm: false, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + }, + { + label: '接口类型', + field: 'interfaceType', + sort: 'custom', + form: { + component: 'SelectV2' + }, + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '最后更新者用户名', + field: 'updater', + sort: 'custom', + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue new file mode 100644 index 000000000..f00d7de53 --- /dev/null +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -0,0 +1,501 @@ + + diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts new file mode 100644 index 000000000..c49fca4f8 --- /dev/null +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts @@ -0,0 +1,595 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +// 表单校验 +export const ProductredressRequestMainRules = reactive({ + autoCommit: [required], + autoAgree: [required], + autoExecute: [required], + directCreateRecord: [required], +}) + +export const ProductredressRequestMain = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true, + }, + // { + // label: '生产计划单号', + // field: 'productionPlanNumber', + // sort: 'custom', + // }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + // { + // label: '车间代码', + // field: 'workshopCode', + // sort: 'custom', + // isSearch: true, + // }, + // { + // label: '班组', + // field: 'team', + // sort: 'custom', + // }, + // { + // label: '班次', + // field: 'shift', + // sort: 'custom', + // }, + { + label: '申请时间', + field: 'requestTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '截止时间', + field: 'dueTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + isForm:false, + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm:false, + }, + { + label: '自动提交', + field: 'autoCommit', + sort: 'custom', + isForm:false, + }, + { + label: '自动通过', + field: 'autoAgree', + sort: 'custom', + isForm:false, + }, + { + label: '自动执行', + field: 'autoExecute', + sort: 'custom', + isForm:false, + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + sort: 'custom', + isForm:false, + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isForm:false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + sort: 'custom', + isForm:false, + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + isForm:false, + }, + { + label: '入库库存状态范围', + field: 'inInventoryStatuses', + sort: 'custom', + isForm:false, + }, + { + label: '出库库存状态范围', + field: 'outInventoryStatuses', + sort: 'custom', + isForm:false, + }, + { + label: '创建者用户名', + field: 'creator', + sort: 'custom', + isForm: false, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + 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', + isForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const ProductredressRequestDetailRules = reactive({ +}) + +export const ProductredressRequestDetail = useCrudSchemas(reactive([ + // { + // label: '生产线代码', + // field: 'productionLineCode', + // sort: 'custom', + // isSearch: true, + // }, + // { + // label: '工位代码', + // field: 'workStationCode', + // sort: 'custom', + // }, + // { + // label: '目标库位', + // field: 'toLocationCode', + // sort: 'custom', + // }, + // { + // label: '工序代码', + // field: 'processCode', + // sort: 'custom', + // }, + + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // }, + + // { + // label: '生产日期', + // field: 'produceDate', + // sort: 'custom', + // formatter: dateFormatter, + // detail: { + // dateFormat: 'YYYY-MM-DD HH:mm:ss' + // }, + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'datetime', + // dateFormat: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'x', + // } + // }, + // isForm: false + // }, + // { + // label: '过期日期', + // field: 'expireDate', + // 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', + // } + // }, + // isForm: false + // }, + + // { + // label: '订单号', + // field: 'woNumber', + // sort: 'custom', + // }, + // { + // label: '订单行', + // field: 'woLine', + // sort: 'custom', + // }, + + // { + // label: 'BOM版本', + // field: 'bomVersion', + // sort: 'custom', + // }, + { + label: '单据号', + field: 'number', + sort: 'custom', + isForm: false, + isTableForm: false, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 + searchCondition:[ + { + key: 'inventoryStatus', + value: 'OK', + isMainValue: false + },{ + key: 'packingNumber', // 查询列表中字段 + value: '', // 指查询具体值 + action: '!=', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }] + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法 + searchCondition:[ + { + key: 'inventoryStatus', + value: 'OK', + isMainValue: false + },{ + key: 'packingNumber', // 查询列表中字段 + value: '', // 指查询具体值 + action: '!=', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }] + }, + }, + { + label: '物品名称', + field: 'itemName', + sort: 'custom', + isForm: false, + isTableForm: false, + }, + { + label: '物品描述1', + field: 'itemDesc1', + sort: 'custom', + isForm: false, + isTableForm: false, + }, + { + label: '物品描述2', + field: 'itemDesc2', + sort: 'custom', + isForm: false, + isTableForm: false, + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + isForm: false, + isTableForm: false, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + isSearch: true, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '包装规格', + field: 'packUnit', + sort: 'custom', + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + sort: 'custom', + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建者用户名', + field: 'creator', + sort: 'custom', + 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: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '最后更新者用户名', + field: 'updater', + sort: 'custom', + isForm: false, + isTableForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + 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', + } + }, + isTableForm: false, + isForm: false + }, + { + label: '操作', + field: 'action', + isForm: false, + isTableForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) From f7d9e9a6919178c5232ba0040ab4ce6d16ae0103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9C=E9=98=B3?= <1301318913@qq.com> Date: Wed, 27 Mar 2024 16:22:16 +0800 Subject: [PATCH 65/65] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=8F=AD=E7=BB=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/teamSetting/index.ts | 61 +++++ .../mes/productionPlan/productionPlan.data.ts | 8 +- src/views/mes/teamSetting/index.vue | 244 ++++++++++++++++++ src/views/mes/teamSetting/teamSetting.data.ts | 178 +++++++++++++ 4 files changed, 487 insertions(+), 4 deletions(-) create mode 100644 src/api/mes/teamSetting/index.ts create mode 100644 src/views/mes/teamSetting/index.vue create mode 100644 src/views/mes/teamSetting/teamSetting.data.ts diff --git a/src/api/mes/teamSetting/index.ts b/src/api/mes/teamSetting/index.ts new file mode 100644 index 000000000..61224bc56 --- /dev/null +++ b/src/api/mes/teamSetting/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' + +export interface TeamSettingVO { + id: number + teamCode: string + teamName: string + teamType: string + endTime: Date + textOne: string + textTwo: string + textThree: string + textFour: string + textFive: string + deleteTime: Date + status: string + concurrencyStamp: number + remark: string + deleter: string + siteId: number +} + +// 查询班组人员管理列表 +export const getTeamSettingPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/teamSetting/senior', data }) + } else { + return await request.get({ url: `/mes/teamSetting/page`, params }) + } +} + +// 查询班组人员管理详情 +export const getTeamSetting = async (id: number) => { + return await request.get({ url: `/mes/teamSetting/get?id=` + id }) +} + +// 新增班组人员管理 +export const createTeamSetting = async (data: TeamSettingVO) => { + return await request.post({ url: `/mes/teamSetting/create`, data }) +} + +// 修改班组人员管理 +export const updateTeamSetting = async (data: TeamSettingVO) => { + return await request.put({ url: `/mes/teamSetting/update`, data }) +} + +// 删除班组人员管理 +export const deleteTeamSetting = async (id: number) => { + return await request.delete({ url: `/mes/teamSetting/delete?id=` + id }) +} + +// 导出班组人员管理 Excel +export const exportTeamSetting = async (params) => { + return await request.download({ url: `/mes/teamSetting/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/teamSetting/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/mes/productionPlan/productionPlan.data.ts b/src/views/mes/productionPlan/productionPlan.data.ts index 539264c0e..f6f8f68ec 100644 --- a/src/views/mes/productionPlan/productionPlan.data.ts +++ b/src/views/mes/productionPlan/productionPlan.data.ts @@ -78,7 +78,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ field: 'deleteTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -99,7 +99,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ label: '状态', field: 'status', sort: 'custom', - isSearch: true, + isSearch: false, form: { component: 'Radio' }, @@ -118,7 +118,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '创建时间', @@ -140,7 +140,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ label: '删除用户名', field: 'deleter', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '位置ID', diff --git a/src/views/mes/teamSetting/index.vue b/src/views/mes/teamSetting/index.vue new file mode 100644 index 000000000..135bba85f --- /dev/null +++ b/src/views/mes/teamSetting/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/mes/teamSetting/teamSetting.data.ts b/src/views/mes/teamSetting/teamSetting.data.ts new file mode 100644 index 000000000..a24d17006 --- /dev/null +++ b/src/views/mes/teamSetting/teamSetting.data.ts @@ -0,0 +1,178 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const TeamSettingRules = reactive({ + endTime: [required], + concurrencyStamp: [required], +}) + +export const TeamSetting = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '班组编号', + field: 'teamCode', + sort: 'custom', + isSearch: true, + }, + { + label: '班组名称', + field: 'teamName', + sort: 'custom', + isSearch: true, + }, + { + label: '班组类型', + field: 'teamType', + sort: 'custom', + isSearch: true, + // form: { + // component: 'SelectV2' + // }, + }, + { + label: '结束时间', + field: 'endTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + 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: 'textOne', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段二', + field: 'textTwo', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段三', + field: 'textThree', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段四', + field: 'textFour', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段五', + field: 'textFive', + sort: 'custom', + isSearch: false, + }, + { + label: '删除时间', + field: 'deleteTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + 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: 'status', + sort: 'custom', + isSearch: false, + form: { + component: 'Radio' + }, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + 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: 'deleter', + sort: 'custom', + isSearch: false, + }, + { + label: '位置ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))