From c2566a8226893dc4866c91169b5e7d63fa274003 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 13:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E6=8B=86=E8=A7=A3=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productdismantleRequestMain/index.vue | 36 +-- .../productdismantleRequestMain.data.ts | 248 +++++++++++++++--- 2 files changed, 227 insertions(+), 57 deletions(-) diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index 02ab1d00c..c3383b6b4 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="ProductdismantleRequestMainRules" :formAllSchemas="ProductdismantleRequestMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="ProductdismantleRequestDetaila.allSchemas" :tableFormRules="ProductdismantleRequestDetailaRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="ProductdismantleRequestMain.allSchemas" :detailAllSchemas="ProductdismantleRequestDetaila.allSchemas" :detailAllSchemasRules="ProductdismantleRequestDetailaRules" - :searchTableParams="searchTableParams" :apiCreate="ProductdismantleRequestDetailApi.createProductdismantleRequestDetaila" :apiUpdate="ProductdismantleRequestDetailApi.updateProductdismantleRequestDetaila" :apiPage="ProductdismantleRequestDetailApi.getProductdismantleRequestDetailaPage" :apiDelete="ProductdismantleRequestDetailApi.deleteProductdismantleRequestDetaila" :Echo="Echo" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -100,41 +99,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/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index 542e6d644..b501f87e8 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.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 ProcessApi from '@/api/wms/process' +import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.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 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 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 ProductdismantleRequestMain = 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 ProductdismantleRequestMain = 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 ProductdismantleRequestMain = 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 ProductdismantleRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false }, { label: '从库位类型范围', @@ -64,6 +120,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false }, { label: '从库区代码范围', @@ -72,6 +129,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false }, { label: '单据号', @@ -96,7 +154,8 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive componentProps: { disabled: true } - } + }, + isForm: false }, { label: '备注', @@ -121,6 +180,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style:{width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -151,11 +211,13 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style:{width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, + isForm: false }, { label: '截止时间', @@ -171,6 +233,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style:{width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -223,6 +286,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style:{width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -333,15 +397,15 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive //表单校验 export const ProductdismantleRequestMainRules = reactive({ - fromWarehouseCode: [ - { required: true, message: '请选择从仓库代码', trigger: 'change' } - ], - fromLocationTypes: [ - { required: true, message: '请选择从库位类型范围', trigger: 'change' } - ], - fromAreaCodes: [ - { required: true, message: '请选择从库区代码范围', trigger: 'change' } - ], + // fromWarehouseCode: [ + // { required: true, message: '请选择从仓库代码', trigger: 'change' } + // ], + // fromLocationTypes: [ + // { required: true, message: '请选择从库位类型范围', trigger: 'change' } + // ], + // fromAreaCodes: [ + // { required: true, message: '请选择从库区代码范围', trigger: 'change' } + // ], departmentCode: [ { required: true, message: '请输入部门', trigger: 'blur' } ], @@ -357,9 +421,9 @@ export const ProductdismantleRequestMainRules = reactive({ directCreateRecord: [ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], - businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } - ], + // businessType: [ + // { required: true, message: '请输入业务类型', trigger: 'blur' } + // ], }) /** @@ -373,6 +437,25 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive