From 4817e346246aed2adf232ea1235fdb56e0d01285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=83=9C=E6=A5=A0?= <2792649152@qq.com> Date: Fri, 10 Nov 2023 14:10:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=91=E6=96=99=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionreturnRequestMain/index.vue | 52 ++--- .../productionreturnRequestMain.data.ts | 188 ++++++++++++++++-- .../repleinsh/repleinshRequestMain/index.vue | 24 +-- .../repleinshRequestMain.data.ts | 89 ++++++++- 4 files changed, 293 insertions(+), 60 deletions(-) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 9e276435d..cbc9cd705 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="ProductionreturnRequestMainRules" :formAllSchemas="ProductionreturnRequestMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="ProductionreturnRequestDetail.allSchemas" :tableFormRules="ProductionreturnRequestDetailRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="ProductionreturnRequestMain.allSchemas" :detailAllSchemas="ProductionreturnRequestDetail.allSchemas" :detailAllSchemasRules="ProductionreturnRequestDetailRules" - :searchTableParams="searchTableParams" :apiCreate="ProductionreturnRequestDetailApi.createProductionreturnRequestDetail" :apiUpdate="ProductionreturnRequestDetailApi.updateProductionreturnRequestDetail" :apiPage="ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage" :apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail" :Echo="Echo" + @searchTableSuccessDetail="searchTableSuccessDetail" /> @@ -99,41 +98,44 @@ 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'] + if(formField == 'packingNumber') { + row['packingNumber'] = val[0]['packingNumber'] + row['containerNumber'] = val[0]['containerNumber'] + row['batch'] = val[0]['batch'] + row['itemCode'] = val[0]['itemCode'] + row['uom'] = val[0]['uom'] + } else { + 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 = {} + if(formField == 'packingNumber') { + setV['packingNumber'] = val[0]['packingNumber'] + setV['containerNumber'] = val[0]['containerNumber'] + setV['batch'] = val[0]['batch'] + setV['itemCode'] = val[0]['itemCode'] + setV['uom'] = val[0]['uom'] + } else { + 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/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 0f80f6b24..7ffa95fe4 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -1,8 +1,21 @@ 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 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 BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -29,6 +42,17 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive width: 150 }, isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage // 查询弹窗所需分页方法 + } + }, }, { label: '从仓库代码', @@ -37,6 +61,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '从库位类型范围', @@ -48,6 +73,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '从库区代码范围', @@ -56,6 +82,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '单据号', @@ -75,6 +102,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '备注', @@ -99,6 +127,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -129,11 +158,13 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -149,6 +180,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -201,6 +233,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive form: { component: 'DatePicker', componentProps: { + style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -224,6 +257,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '到库位类型范围', @@ -236,6 +270,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '到库区代码范围', @@ -244,6 +279,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm: false, }, { label: '自动提交', @@ -339,18 +375,18 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive //表单校验 export const ProductionreturnRequestMainRules = 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' } ], @@ -366,9 +402,9 @@ export const ProductionreturnRequestMainRules = reactive({ directCreateRecord: [ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], - businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } - ], + // businessType: [ + // { required: true, message: '请输入业务类型', trigger: 'blur' } + // ], }) /** @@ -382,6 +418,25 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive @@ -99,22 +98,12 @@ 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[formField] = val[0][searchField] //row['poLine'] = val[0]['poLine'] //row['batch'] = val[0]['toBatch'] //row['altBatch'] = val[0]['altBatch'] @@ -134,6 +123,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } }) } +// 查询页面返回——详情 +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/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts index aa82e2bfc..5e5086577 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts @@ -1,8 +1,15 @@ 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' + +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +const { t } = useI18n() // 国际化 + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize:10, @@ -28,6 +35,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '从库位类型范围', @@ -40,6 +48,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + isForm: false, }, { label: '从库区代码范围', @@ -48,6 +57,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '到仓库代码', @@ -56,6 +66,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false }, { label: '到库位类型范围', @@ -67,6 +78,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '到库区代码范围', @@ -75,6 +87,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, }, { label: '单据号', @@ -99,7 +112,8 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ componentProps: { disabled: true } - } + }, + isForm: false, }, { label: '备注', @@ -154,11 +168,13 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, + isForm: false, }, { label: '截止时间', @@ -174,6 +190,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -226,6 +243,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -382,6 +400,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '到库位代码', @@ -390,6 +411,25 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择到库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法 + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择到库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage // 查询弹窗所需分页方法 + }, }, { label: '单据号', @@ -412,6 +452,25 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + } + }, + tableForm:{ + isInpuFocusShow: true, + searchListPlaceholder: '请选择物品代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物品基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + }, }, { label: '备注', @@ -435,6 +494,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -460,6 +520,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '物品描述1', @@ -468,6 +530,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '物品描述2', @@ -476,6 +540,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '项目代码', @@ -484,6 +550,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '数量', @@ -494,6 +562,15 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -506,6 +583,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '从货主代码', @@ -514,6 +594,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '到货主代码', @@ -522,6 +604,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '最后更新时间', @@ -537,6 +621,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { + style: { width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', From fc569c17f181be95ccad52df12edd4da7db6c0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=83=9C=E6=A5=A0?= <2792649152@qq.com> Date: Fri, 10 Nov 2023 15:28:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E3=80=81=E5=8F=91=E8=B4=A7=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deliverPlanMain/deliverPlanMain.data.ts | 103 ++++++++++++- .../deliverplan/deliverPlanMain/index.vue | 36 ++--- .../deliverplan/saleMain/index.vue | 36 ++--- .../deliverplan/saleMain/saleMain.data.ts | 140 +++++++++++++++++- 4 files changed, 258 insertions(+), 57 deletions(-) diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index d49322c5b..cdbdb7a4c 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -1,7 +1,17 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 +import * as CustomerApi from '@/api/wms/customer' +import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' + +import * as SaleMainApi from '@/api/wms/saleMain' +import * as SaleDetailApi from '@/api/wms/saleDetail' +import { SaleDetail, SaleMain } from '../saleMain/saleMain.data' + +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +const { t } = useI18n() // 国际化 /** * @returns {Array} 发货计划主表 @@ -14,7 +24,18 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch: true + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage // 查询弹窗所需分页方法 + } + } }, { label: '计划日期', @@ -51,7 +72,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ label: '业务类型', field: 'businessType', sort: 'custom', - isForm:false, + isForm: false, table: { width: 150 }, @@ -241,6 +262,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择销售订单号', + searchField: 'number', + searchTitle: '销售订单信息', + searchAllSchemas: SaleMain.allSchemas, + searchPage: SaleMainApi.getSaleMainPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择销售订单号', + searchField: 'number', + searchTitle: '销售订单信息', + searchAllSchemas: SaleMain.allSchemas, + searchPage: SaleMainApi.getSaleMainPage + } + } }, { label: '销售订单行', @@ -249,6 +289,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择销售订单行', + searchField: 'lineNumber', + searchTitle: '销售订单信息', + searchAllSchemas: SaleDetail.allSchemas, + searchPage: SaleDetailApi.getSaleDetailPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择销售订单行', + searchField: 'lineNumber', + searchTitle: '销售订单信息', + searchAllSchemas: SaleDetail.allSchemas, + searchPage: SaleDetailApi.getSaleDetailPage + } + } }, { label: '客户月台', @@ -257,6 +316,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '项目', @@ -265,6 +326,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isTableForm: false, + isForm: false, }, { label: '单据号', @@ -287,6 +350,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物品代码', + searchField: 'code', + searchTitle: '物品基础信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择物品代码', + searchField: 'code', + searchTitle: '物品基础信息', + searchAllSchemas: Itembasic.allSchemas, + searchPage: ItembasicApi.getItembasicPage + } + } }, { label: '备注', @@ -337,6 +419,15 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -349,6 +440,9 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '最后更新时间', @@ -399,7 +493,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ inactiveValue: 'FALSE', activeValue: 'TRUE' } - } + }, + isTableForm: false }, { label: '操作', diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 30083602a..f41654672 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="DeliverPlanMainRules" :formAllSchemas="DeliverPlanMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="DeliverPlanDetail.allSchemas" :tableFormRules="DeliverPlanDetailRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="DeliverPlanMain.allSchemas" :detailAllSchemas="DeliverPlanDetail.allSchemas" :detailAllSchemasRules="DeliverPlanDetailRules" - :searchTableParams="searchTableParams" :apiCreate="DeliverPlanDetailApi.createDeliverPlanDetail" :apiUpdate="DeliverPlanDetailApi.updateDeliverPlanDetail" :apiPage="DeliverPlanDetailApi.getDeliverPlanDetailPage" :apiDelete="DeliverPlanDetailApi.deleteDeliverPlanDetail" :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/deliversettlementManage/deliverplan/saleMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue index 246f7a3b8..207b87993 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue @@ -44,7 +44,6 @@ @success="getList" :rules="SaleMainRules" :formAllSchemas="SaleMain.allSchemas" - :searchTableParams="searchTableParams" :tableAllSchemas="SaleDetail.allSchemas" :tableFormRules="SaleDetailRules" :tableData="tableData" @@ -64,12 +63,12 @@ :allSchemas="SaleMain.allSchemas" :detailAllSchemas="SaleDetail.allSchemas" :detailAllSchemasRules="SaleDetailRules" - :searchTableParams="searchTableParams" :apiCreate="SaleDetailApi.createSaleDetail" :apiUpdate="SaleDetailApi.updateSaleDetail" :apiPage="SaleDetailApi.getSaleDetailPage" :apiDelete="SaleDetailApi.deleteSaleDetail" :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/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts index 205bb60de..4f54f6f7d 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts @@ -1,5 +1,12 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' + +import * as CustomerApi from '@/api/wms/customer' +import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' + +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + const { t } = useI18n() // 国际化 /** @@ -14,6 +21,17 @@ export const SaleMain = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage // 查询弹窗所需分页方法 + } + } }, { label: '订单类型', @@ -84,6 +102,9 @@ export const SaleMain = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 0 + } } }, { @@ -133,7 +154,8 @@ export const SaleMain = useCrudSchemas(reactive([ componentProps: { disabled: true } - } + }, + isForm: false }, { label: '备注', @@ -288,6 +310,8 @@ export const SaleDetail = useCrudSchemas(reactive([ table: { width: 150 }, + isForm: false, + isTableForm: false, }, { label: '标包数量', @@ -298,6 +322,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -310,6 +343,9 @@ export const SaleDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '客户计量数量', @@ -320,6 +356,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -332,6 +377,9 @@ export const SaleDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '转换率', @@ -342,6 +390,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -353,6 +410,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -364,6 +430,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -375,6 +450,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -386,6 +470,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -397,6 +490,15 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 } }, { @@ -420,6 +522,25 @@ export const SaleDetail = 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: '备注', @@ -470,7 +591,16 @@ export const SaleDetail = useCrudSchemas(reactive([ }, form: { component: 'InputNumber', - } + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', + min: 1, + precision: 6 + } }, { label: '计量单位', @@ -482,6 +612,9 @@ export const SaleDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm: { + type: 'Select' + } }, { label: '最后更新时间', @@ -532,7 +665,8 @@ export const SaleDetail = useCrudSchemas(reactive([ inactiveValue: 'FALSE', activeValue: 'TRUE' } - } + }, + isTableForm: false }, { label: '操作',