From 87c4d9f2efbfbba8b9d2ce9587790115b07393c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=83=9C=E6=A5=A0?= <2792649152@qq.com> Date: Thu, 9 Nov 2023 15:49:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E7=9B=B8=E5=85=B3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productputawayRequestMain/index.vue | 35 +--- .../productputawayRequestMain.data.ts | 118 +++++++++--- .../productrepairRequestMain/index.vue | 36 ++-- .../productrepairRequestMain.data.ts | 171 +++++++++++++++++- .../productscrapRequestMain/index.vue | 36 ++-- .../productscrapRequestMain.data.ts | 64 ++++++- 6 files changed, 357 insertions(+), 103 deletions(-) diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index b765d8aee..3318bfac0 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="ProductputawayRequestMainRules" :formAllSchemas="ProductputawayRequestMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="ProductputawayRequestDetail.allSchemas" :tableFormRules="ProductputawayRequestDetailRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="ProductputawayRequestMain.allSchemas" :detailAllSchemas="ProductputawayRequestDetail.allSchemas" :detailAllSchemasRules="ProductputawayRequestDetailRules" - :searchTableParams="searchTableParams" :apiCreate="ProductputawayRequestDetailApi.createProductputawayRequestDetail" :apiUpdate="ProductputawayRequestDetailApi.updateProductputawayRequestDetail" :apiPage="ProductputawayRequestDetailApi.getProductputawayRequestDetailPage" :apiDelete="ProductputawayRequestDetailApi.deleteProductputawayRequestDetail" :Echo="Echo" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -99,41 +98,27 @@ const updataTableColumns = (val) => { tableColumns.value = val } -// 查询列表页面参数设置 -const searchTableParams = ref([ -//{ -// formField: 'productItemCode', -// searchTableTitle: '物料信息', -// searchTableAllSchemas: Itembasic.allSchemas, -// searchTablePage: ItembasicApi.getItembasicPage -//} -]) - // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - //row[formField] = val[0][searchField] - //row['poLine'] = val[0]['poLine'] - //row['batch'] = val[0]['toBatch'] - //row['altBatch'] = val[0]['altBatch'] - //row['itemCode'] = val[0]['itemCode'] - //row['itemName'] = val[0]['itemName'] - //row['itemDesc1'] = val[0]['itemDesc1'] - //row['itemDesc2'] = val[0]['itemDesc2'] - //row['projectCode'] = val[0]['projectCode'] - //row['qty'] = val[0]['qty'] - //row['uom'] = val[0]['uom'] + row[formField] = val[0][searchField] } else { const setV = {} setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) } }) } +// 查询页面返回——详情 +const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { + nextTick(() => { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + }) +} // 子表新增的时候选择表格之后需要会显得字段 // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] const Echo = [] diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts index 77e0779c5..705ef32f5 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts @@ -1,8 +1,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -29,6 +33,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + isForm: false, }, { label: '从仓库代码', @@ -37,6 +42,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库位类型范围', @@ -48,6 +54,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库区代码范围', @@ -56,6 +63,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '单据号', @@ -80,7 +88,8 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ componentProps: { disabled: true } - } + }, + isForm: false, }, { label: '备注', @@ -140,6 +149,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -230,6 +240,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '到库位类型范围', @@ -242,6 +253,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '到库区代码范围', @@ -250,6 +262,7 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '自动提交', @@ -345,18 +358,18 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ //表单校验 export const ProductputawayRequestMainRules = reactive({ - fromWarehouseCode: [ - { required: true, message: '请输入从仓库代码', trigger: 'blur' } - ], - fromLocationTypes: [ - { required: true, message: '请选择从库位类型范围', trigger: 'change' } - ], - toWarehouseCode: [ - { required: true, message: '请输入到仓库代码', trigger: 'blur' } - ], - toLocationTypes: [ - { required: true, message: '请选择到库位类型范围', trigger: 'change' } - ], + // fromWarehouseCode: [ + // { required: true, message: '请输入从仓库代码', trigger: 'blur' } + // ], + // fromLocationTypes: [ + // { required: true, message: '请选择从库位类型范围', trigger: 'change' } + // ], + // toWarehouseCode: [ + // { required: true, message: '请输入到仓库代码', trigger: 'blur' } + // ], + // toLocationTypes: [ + // { required: true, message: '请选择到库位类型范围', trigger: 'change' } + // ], departmentCode: [ { required: true, message: '请输入部门', trigger: 'blur' } ], @@ -388,6 +401,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '器具号', @@ -396,6 +411,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '批次', @@ -404,6 +421,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '库存状态', @@ -415,6 +434,9 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '订单号', @@ -423,6 +445,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '订单行', @@ -431,6 +455,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '从库位代码', @@ -461,6 +487,26 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + } + } }, { label: '备注', @@ -509,6 +555,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false }, { label: '物品描述1', @@ -517,6 +565,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false }, { label: '物品描述2', @@ -525,6 +575,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false }, { label: '项目代码', @@ -533,6 +585,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false }, { label: '数量', @@ -543,6 +597,15 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm:{ + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -555,6 +618,9 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + tableForm:{ + type: 'Select' + } }, { label: '从货主代码', @@ -563,6 +629,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false }, { label: '到货主代码', @@ -571,6 +639,8 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false }, { label: '最后更新时间', @@ -619,19 +689,19 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive //表单校验 export const ProductputawayRequestDetailRules = reactive({ - packingNumber: [ - { required: true, message: '请输入包装号', trigger: 'blur' } - ], + // packingNumber: [ + // { required: true, message: '请输入包装号', trigger: 'blur' } + // ], batch: [ { required: true, message: '请输入批次', trigger: 'blur' } ], - inventoryStatus: [ - { required: true, message: '请选择库存状态', trigger: 'change' } - ], - fromLocationCode: [ - { required: true, message: '请输入从库位代码', trigger: 'blur' } - ], + // inventoryStatus: [ + // { required: true, message: '请选择库存状态', trigger: 'change' } + // ], + // fromLocationCode: [ + // { required: true, message: '请输入从库位代码', trigger: 'blur' } + // ], itemCode: [ - { required: true, message: '请输入物品代码', trigger: 'blur' } + { required: true, message: '请选择物品代码', trigger: 'change' } ], }) \ No newline at end of file diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index 9862d92f7..09226e211 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="ProductrepairRequestMainRules" :formAllSchemas="ProductrepairRequestMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="ProductrepairRequestDetaila.allSchemas" :tableFormRules="ProductrepairRequestDetailaRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="ProductrepairRequestMain.allSchemas" :detailAllSchemas="ProductrepairRequestDetaila.allSchemas" :detailAllSchemasRules="ProductrepairRequestDetailaRules" - :searchTableParams="searchTableParams" :apiCreate="ProductrepairRequestDetailApi.createProductrepairRequestDetaila" :apiUpdate="ProductrepairRequestDetailApi.updateProductrepairRequestDetaila" :apiPage="ProductrepairRequestDetailApi.getProductrepairRequestDetailaPage" :apiDelete="ProductrepairRequestDetailApi.deleteProductrepairRequestDetaila" :Echo="Echo" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -99,41 +98,28 @@ const updataTableColumns = (val) => { tableColumns.value = val } -// 查询列表页面参数设置 -const searchTableParams = ref([ -//{ -// formField: 'productItemCode', -// searchTableTitle: '物料信息', -// searchTableAllSchemas: Itembasic.allSchemas, -// searchTablePage: ItembasicApi.getItembasicPage -//} -]) - // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - //row[formField] = val[0][searchField] - //row['poLine'] = val[0]['poLine'] - //row['batch'] = val[0]['toBatch'] - //row['altBatch'] = val[0]['altBatch'] - //row['itemCode'] = val[0]['itemCode'] - //row['itemName'] = val[0]['itemName'] - //row['itemDesc1'] = val[0]['itemDesc1'] - //row['itemDesc2'] = val[0]['itemDesc2'] - //row['projectCode'] = val[0]['projectCode'] - //row['qty'] = val[0]['qty'] - //row['uom'] = val[0]['uom'] + row[formField] = val[0][searchField] } else { const setV = {} setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) } }) } +// 查询页面返回——详情 +const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { + nextTick(() => { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + }) +} + // 子表新增的时候选择表格之后需要会显得字段 // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] const Echo = [] diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index eb4db198d..17b24c777 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -1,8 +1,30 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 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 ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' + +import * as WorkstationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' + +import * as ProcessApi from '@/api/wms/process' +import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' + +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -29,6 +51,17 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择车间', + searchField: 'code', + searchTitle: '车间信息', + searchAllSchemas: Workshop.allSchemas, + searchPage: WorkshopApi.getWorkshopPage + } + } }, { label: '班组', @@ -37,6 +70,17 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择班组', + searchField: 'code', + searchTitle: '班组信息', + searchAllSchemas: Team.allSchemas, + searchPage: TeamApi.getTeamPage + } + } }, { label: '班次', @@ -45,6 +89,17 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择班次', + searchField: 'code', + searchTitle: '班次信息', + searchAllSchemas: Shift.allSchemas, + searchPage: ShiftApi.getShiftPage + } + } }, { label: '从仓库代码', @@ -53,6 +108,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库位类型范围', @@ -64,6 +120,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库区代码范围', @@ -72,6 +129,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '单据号', @@ -96,7 +154,8 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ componentProps: { disabled: true } - } + }, + isForm: false, }, { label: '备注', @@ -156,6 +215,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -373,6 +433,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '生产线代码', @@ -381,6 +443,25 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage // 查询弹窗所需分页方法 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage // 查询弹窗所需分页方法 + } + } }, { label: '工位代码', @@ -389,6 +470,25 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage // 查询弹窗所需分页方法 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工位信息', // 查询弹窗标题 + searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + searchPage: WorkstationApi.getWorkstationPage // 查询弹窗所需分页方法 + } + } }, { label: '工序代码', @@ -397,6 +497,25 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择工序代码', + searchField: 'code', + searchTitle: '工序信息', + searchAllSchemas: Process.allSchemas, + searchPage: ProcessApi.getProcessPage + } + } }, { label: '包装号', @@ -405,6 +524,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '器具号', @@ -413,6 +534,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '批次', @@ -429,6 +552,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '库存状态', @@ -440,6 +565,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '单据号', @@ -462,6 +589,26 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + } + } }, { label: '备注', @@ -510,6 +657,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '物品描述1', @@ -518,6 +667,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '物品描述2', @@ -526,6 +677,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '项目代码', @@ -534,6 +687,8 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '数量', @@ -544,6 +699,15 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -556,6 +720,9 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '最后更新时间', diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index cf3c56e14..77b14ddcb 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="ProductscrapRequestMainRules" :formAllSchemas="ProductscrapRequestMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="ProductscrapRequestDetail.allSchemas" :tableFormRules="ProductscrapRequestDetailRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="ProductscrapRequestMain.allSchemas" :detailAllSchemas="ProductscrapRequestDetail.allSchemas" :detailAllSchemasRules="ProductscrapRequestDetailRules" - :searchTableParams="searchTableParams" :apiCreate="ProductscrapRequestDetailApi.createProductscrapRequestDetail" :apiUpdate="ProductscrapRequestDetailApi.updateProductscrapRequestDetail" :apiPage="ProductscrapRequestDetailApi.getProductscrapRequestDetailPage" :apiDelete="ProductscrapRequestDetailApi.deleteProductscrapRequestDetail" :Echo="Echo" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -99,41 +98,28 @@ const updataTableColumns = (val) => { tableColumns.value = val } -// 查询列表页面参数设置 -const searchTableParams = ref([ -//{ -// formField: 'productItemCode', -// searchTableTitle: '物料信息', -// searchTableAllSchemas: Itembasic.allSchemas, -// searchTablePage: ItembasicApi.getItembasicPage -//} -]) - // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - //row[formField] = val[0][searchField] - //row['poLine'] = val[0]['poLine'] - //row['batch'] = val[0]['toBatch'] - //row['altBatch'] = val[0]['altBatch'] - //row['itemCode'] = val[0]['itemCode'] - //row['itemName'] = val[0]['itemName'] - //row['itemDesc1'] = val[0]['itemDesc1'] - //row['itemDesc2'] = val[0]['itemDesc2'] - //row['projectCode'] = val[0]['projectCode'] - //row['qty'] = val[0]['qty'] - //row['uom'] = val[0]['uom'] + row[formField] = val[0][searchField] } else { const setV = {} setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) } }) } +// 查询页面返回——详情 +const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { + nextTick(() => { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + }) +} + // 子表新增的时候选择表格之后需要会显得字段 // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] const Echo = [] diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index 66f616850..a7f8272da 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -1,8 +1,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -28,6 +32,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库位类型范围', @@ -39,6 +44,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库区代码范围', @@ -48,6 +54,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + isForm: false, }, { label: '单据号', @@ -72,7 +79,8 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ componentProps: { disabled: true } - } + }, + isForm: false, }, { label: '备注', @@ -132,6 +140,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -352,6 +361,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '包装号', @@ -360,6 +371,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '器具号', @@ -368,6 +381,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '批次', @@ -384,6 +399,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '库存状态', @@ -395,6 +412,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '原因', @@ -406,6 +425,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '物品名称', @@ -414,6 +435,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '物品描述1', @@ -422,6 +445,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '物品描述2', @@ -430,6 +455,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '数量', @@ -440,6 +467,15 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + }, + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -449,6 +485,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '计量单位', @@ -460,6 +498,9 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '最后更新时间', @@ -514,6 +555,25 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择物品代码', + searchField: 'code', + searchTitle: '物品基础信息信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择物品代码', + searchField: 'code', + searchTitle: '物品基础信息信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage + } + } }, { label: '备注',