From 654e96cf23e3159bbda9a37d8c22adee0ec3d226 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, 1 Apr 2024 16:06:59 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E5=9B=9E=E6=94=B6=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../productredressJobMain/index.vue | 5 +
.../productredressJobMain.data.ts | 4 +
.../productredressRecordMain/index.vue | 133 +----
.../productredressRecordMain.data.ts | 555 +++++++++++-------
.../productredressRequestMain.data.ts | 5 +
5 files changed, 379 insertions(+), 323 deletions(-)
diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue
index 5f6a7d630..2a74d12e2 100644
--- a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue
+++ b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue
@@ -54,6 +54,7 @@
diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
index 47e4fad1c..7ad1d9b66 100644
--- a/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
+++ b/src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
@@ -1,213 +1,316 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
+ // 获取当前操作人的部门
+ import { TableColumn } from '@/types/table'
+ import { useUserStore } from '@/store/modules/user'
+ const userStore = useUserStore()
+ const userDept = userStore.userSelfInfo.dept
+ // id 转str 否则form回显匹配不到
+ userDept.id = userDept.id.toString()
+ const userDeptArray:any = [userDept]
+
// 表单校验
export const ProductredressRecordMainRules = reactive({
})
export const ProductredressRecordMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isForm: false,
+ isSearch: true,
+ },
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
+ table: {
+ width: 180,
+ },
},
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
+ table: {
+ width: 180,
+ },
},
- {
- 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: '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'
- },
+ isForm:false,
+ isTable:false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
- form: {
- component: 'SelectV2'
- },
+ isForm:false,
+ 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',
- valueFormat: 'x'
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
+ isForm: false
},
{
label: '生效日期',
field: 'activeDate',
sort: 'custom',
formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ table: {
+ width: 180
+ },
form: {
component: 'DatePicker',
componentProps: {
+ style: {width: '100%'},
type: 'datetime',
- valueFormat: 'x'
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
+ isForm: false
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
+ isForm:false,
+ isTable:false
},
{
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',
- valueFormat: 'x'
+ 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',
- valueFormat: 'x'
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
+ isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return userDeptArray.find((account) => account.id == cellValue)?.name
+ },
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
label: '接口类型',
field: 'interfaceType',
sort: 'custom',
- form: {
- component: 'SelectV2'
- },
- },
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- },
- {
- label: '收货类型',
- field: 'type',
- sort: 'custom',
- form: {
- component: 'SelectV2'
- },
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
- form: {
- component: 'SelectV2'
- },
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
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',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
},
{
- label: '最后更新时间',
- field: 'updateTime',
+ label: '创建者',
+ field: 'creator',
sort: 'custom',
- formatter: dateFormatter,
isForm: false,
+ table: {
+ width: 150
+ },
},
{
- label: '最后更新者用户名',
+ 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,
+ table: {
+ width: 150
+ },
},
{
- label: '操作',
- field: 'action',
- isForm: false,
+ label: '最后更新时间',
+ field: 'updateTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
table: {
- width: 150,
- fixed: 'right'
- }
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false
}
]))
@@ -220,227 +323,259 @@ export const ProductredressRecordDetailRules = reactive({
export const ProductredressRecordDetail = useCrudSchemas(reactive([
{
- label: 'id',
- field: 'id',
+ label: '包装号',
+ field: 'packingNumber',
sort: 'custom',
+ table: {
+ width: 180
+ },
isForm: false,
},
{
- label: '生产线代码',
- field: 'productionlineCode',
+ label: '批次',
+ field: 'batch',
sort: 'custom',
- isSearch: true,
+ table: {
+ width: 150
+ },
+ isForm: false,
},
{
- label: '工位代码',
- field: 'workStationCode',
+ label: '物品代码',
+ field: 'itemCode',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
{
- label: '工序代码',
- field: 'processCode',
+ label: '物品名称',
+ field: 'itemName',
sort: 'custom',
+ table: {
+ width: 150
+ },
},
{
- label: '包装号',
- field: 'packingNumber',
+ label: '物品描述1',
+ field: 'itemDesc1',
sort: 'custom',
+ table: {
+ width: 150
+ },
},
{
- label: '器具号',
- field: 'containerNumber',
+ label: '物品描述2',
+ field: 'itemDesc2',
sort: 'custom',
+ table: {
+ width: 150
+ },
},
{
- label: '批次',
- field: 'batch',
+ label: '项目代码',
+ field: 'projectCode',
sort: 'custom',
- isSearch: true,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
},
{
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',
- valueFormat: 'x'
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
}
},
+ isForm: false
},
{
label: '过期日期',
field: 'expireDate',
sort: 'custom',
formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ table: {
+ width: 180
+ },
form: {
component: 'DatePicker',
componentProps: {
+ style: {width: '100%'},
type: 'datetime',
- valueFormat: 'x'
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ 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',
+ isForm: false
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
{
label: '包装规格',
field: 'packUnit',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
{
label: 'BOM版本',
field: 'bomVersion',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
{
- label: '明细',
- field: 'backFlushDetails',
+ label: '库存状态',
+ field: 'inventoryStatus',
sort: 'custom',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ table: {
+ width: 150
+ }
},
{
- label: '主表ID',
- field: 'masterId',
+ label: '到库位代码',
+ field: 'toLocationCode',
sort: 'custom',
- form: {
- component: 'InputNumber',
- value: 0
- },
+ table: {
+ width: 150
+ }
},
{
- label: '单据号',
- field: 'number',
+ label: '到库位组代码',
+ field: 'toLocationGroupCode',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
{
- label: '物品代码',
- field: 'itemCode',
+ label: '到库区代码',
+ field: 'toAreaCode',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
+ // {
+ // label: '到货主代码',
+ // field: 'toOwnerCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // }
+ // },
{
label: '备注',
field: 'remark',
sort: 'custom',
+ table: {
+ width: 150
+ }
},
{
- label: '创建时间',
- field: 'createTime',
- sort: 'custom',
- formatter: dateFormatter,
- isForm: false,
- },
- {
- label: '创建者Id',
+ label: '创建者',
field: 'creator',
sort: 'custom',
isForm: false,
+ table: {
+ width: 150
+ },
},
{
- 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',
+ 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: 'interfaceType',
+ label: '最后更新者',
+ field: 'updater',
sort: 'custom',
- form: {
- component: 'SelectV2'
- },
+ isForm: false,
+ table: {
+ width: 150
+ },
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
- isForm: false,
- },
- {
- label: '最后更新者用户名',
- field: 'updater',
- sort: 'custom',
- isForm: false,
- },
- {
- label: '操作',
- field: 'action',
- isForm: false,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
table: {
- width: 150,
- fixed: 'right'
- }
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false
}
]))
diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
index 974240ab1..633782a63 100644
--- a/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
+++ b/src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
@@ -112,6 +112,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive([
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
+ isTable:false,
table: {
width: 150
},
@@ -121,6 +122,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive([
field: 'departmentCode',
sort: 'custom',
isForm:false,
+ isTable:false,
table: {
width: 150
},
@@ -172,6 +174,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive([
label: '备注',
field: 'remark',
sort: 'custom',
+ isTable:false,
},
{
label: '到库区类型范围',
@@ -410,6 +413,8 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive
{
label: '计量单位',
field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
sort: 'custom',
table: {
width: 150