From f2682488459e225ee9f72ad87eaba3096954eed1 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 13 Jun 2024 15:19:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=BA=BF=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=85=B3=E7=B3=BB=E7=AE=A1=E7=90=86=EF=BC=9A=E4=BA=A7?= =?UTF-8?q?=E7=BA=BF=E4=BB=A3=E7=A0=81---SearchTable---SelectV2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + src/components/Form/src/Form.vue | 3 +++ src/components/Form/src/helper.ts | 2 +- .../itemManage/productionlineitem/index.vue | 24 +++++++++---------- .../productionlineitem.data.ts | 22 ++++++++++++----- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 6966b07c3..648fbf09c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ form: { labelMessage: '信息提示说明!!!', componentProps: { + value:'undefined',//默认值,设置为'undefined'-->实际是undefined(解决SelectV2不显示占位符placeholder) enterSearch: true, //可输入回车 对应绑定事件:@onEnter="onEnter" isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择物料代码', // 输入框占位文本 diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index d9e8fc919..aa85fc5f5 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -464,4 +464,7 @@ export default defineComponent({ margin-right: 0 !important; margin-left: 0 !important; } +::v-deep(.el-select-v2 .el-icon) { + display: inline-flex; +} diff --git a/src/components/Form/src/helper.ts b/src/components/Form/src/helper.ts index 6f0ddafc5..ac3540f4d 100644 --- a/src/components/Form/src/helper.ts +++ b/src/components/Form/src/helper.ts @@ -127,7 +127,7 @@ export const initModel = (schema: FormSchema[], formModel: Recordable) => { } else if (v.component && v.component !== 'Divider') { const hasField = Reflect.has(model, v.field) // 如果先前已经有值存在,则不进行重新赋值,而是采用现有的值 - model[v.field] = hasField ? model[v.field] : v.value !== void 0 ? v.value : '' + model[v.field] = hasField ? model[v.field] : v.value === 'undefined' ? undefined : v.value !== void 0 ? v.value : '' } }) return model diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue index 3ca414730..4599b7d87 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue @@ -152,25 +152,25 @@ const openForm = (type: string, row?: any) => { if(type == "update"){ Productionlineitem.allSchemas.formSchema.forEach((item) => { if (item.field == 'productionLineCode') { - item.componentProps.disabled = true - item.componentProps.isSearchList = false - } - if (item.field == 'itemCode') { - item.componentProps.disabled = true - item.componentProps.isSearchList = false - } - }) + item.componentProps.disabled = true + // item.componentProps.isSearchList = false + } + if (item.field == 'itemCode') { + item.componentProps.disabled = true + item.componentProps.isSearchList = false + } + }) }else { Productionlineitem.allSchemas.formSchema.forEach((item) => { if (item.field == 'productionLineCode') { item.componentProps.disabled = false - item.componentProps.isSearchList = true + // item.componentProps.isSearchList = true } if (item.field == 'itemCode') { - item.componentProps.disabled = false - item.componentProps.isSearchList = true - } + item.componentProps.disabled = false + item.componentProps.isSearchList = true + } }) } basicFormRef.value.open(type, row) diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts index 1d3ce0f67..3524c8118 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts @@ -2,6 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as ProductionLineCodeApi from '@/api/wms/productionline' import { Productionline } from './../../factoryModeling/productionline/productionline.data' +import * as LocationApi from '@/api/wms/location' import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from './../itembasic/itembasic.data' @@ -10,6 +11,7 @@ const { t } = useI18n() // 国际化 const confgiData = await confgiApi.queryByKey("Productionlineitem") +const lineCodeData = await ProductionLineCodeApi.getProductionlinePage({isSearch:false}) /** * @returns {Array} 生产线物料关系 @@ -71,17 +73,25 @@ export const Productionlineitem = useCrudSchemas(reactive([ width: 150, fixed: 'left' }, + isForm:true, form: { + show:true, + component: 'SelectV2', + value:'undefined', // labelMessage: '信息提示说明!!!', componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择生产线', + // isSearchList: true, + placeholder:'请选择库位代码', searchField: 'code', - searchTitle: '生产线信息', - searchAllSchemas: Productionline.allSchemas, - searchPage: ProductionLineCodeApi.getProductionlinePage + // searchTitle: '生产线信息', + // searchAllSchemas: Productionline.allSchemas, + // searchPage: ProductionLineCodeApi.getProductionlinePage + options:lineCodeData.list.map(item=>({ + label:item.code, + value:item.code + })) } - } + }, }, { label: '物料代码', From 488eca8ef49a6997490af196c1666e037cf7bbb8 Mon Sep 17 00:00:00 2001 From: chenfang Date: Thu, 13 Jun 2024 16:51:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=9A=90=E8=97=8F=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deliversettlementManage/saleShipmentMainRequest/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index d26b868f1..3a9d13a1d 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -226,7 +226,7 @@ const butttondata = (row,$index) => { defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), // 提交审批 defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), // 驳回 defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), // 审批通过 - defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3','8']),hasPermi:'wms:sale-shipment-main-request:handle'}), // 处理 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), // 处理 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // 删除 ] } From 8e152cb445a40afc4f0ad7dca43121b9dc22955e Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 13 Jun 2024 17:51:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/itembasic/index.ts | 5 +++++ src/api/wms/productreceiptRequestDetail/index.ts | 5 +---- .../productreceiptscrapRequestMain/index.vue | 2 +- .../supplierinvoice/supplierinvoiceRequestMain/index.vue | 1 + .../supplierinvoiceRequestMain.data.ts | 5 ++++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/api/wms/itembasic/index.ts b/src/api/wms/itembasic/index.ts index a92781ac3..25f3566ec 100644 --- a/src/api/wms/itembasic/index.ts +++ b/src/api/wms/itembasic/index.ts @@ -108,4 +108,9 @@ export const selectConfigToItembasic = async (params) => { } else { return await request.get({ url: `/wms/itembasic/pageConfigToItembasic`, params }) } +} + +// 根据物料代码查计量单位 +export const getQueryItemCodeInfo = async (data) => { + return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data }) } \ No newline at end of file diff --git a/src/api/wms/productreceiptRequestDetail/index.ts b/src/api/wms/productreceiptRequestDetail/index.ts index 5301001fc..7b21ba14b 100644 --- a/src/api/wms/productreceiptRequestDetail/index.ts +++ b/src/api/wms/productreceiptRequestDetail/index.ts @@ -65,10 +65,7 @@ export const getProductreceiptRequestDetailPageScrap = async (params) => { return await request.get({ url: `/wms/productreceipt-request-detail/page`, params }) } } -// 根据物料代码查计量单位 -export const getQueryItemCodeInfo = async (data) => { - return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data }) -} + // 查询制品收货申请子详情 export const getProductreceiptRequestDetail = async (id: number) => { diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index 0235a1311..0946338d2 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -193,7 +193,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro row['secondPackQty'] = val[0]['packQty'] }else if(formField == 'itemCode'){ - let res = await ProductreceiptRequestDetailApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')}) + let res = await ItembasicApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')}) if(res.length>0){ row['uom'] = res[0]['uom'] } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index b03465d49..5d4bf5ba2 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -268,6 +268,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea newRow['invoicableQuantity'] = item['invoicableQuantity'] newRow['itemCode'] = item['itemCode'] newRow['planArriveTime'] = item['prhRcpDate'] + newRow['arrivalQty'] = item['prhRcvd'] } tableData.value.push(newRow) }) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 6cd315ed7..9c99575ab 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -1099,9 +1099,12 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive Date: Thu, 13 Jun 2024 18:47:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=9C=88=E5=8F=B0=E5=89=8D=E7=AB=AF=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerdock/customerdock.data.ts | 71 ++++++++++--------- .../customerManage/customerdock/index.vue | 3 - .../deliverRequestMain.data.ts | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts b/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts index 27a5f66e5..50709ae3a 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts +++ b/src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts @@ -26,27 +26,8 @@ export const Customerdock = useCrudSchemas(reactive([ field: 'code', sort: 'custom', table: { - width: 150, - fixed: 'left' + width: 150 }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择月台代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '月台基础信息', // 查询弹窗标题 - searchAllSchemas: Dock.allSchemas, // 查询弹窗所需类 - searchPage: DockApi.getDockPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - action: '==', - isSearch: true, - isMainValue: false - }] - } - } }, { label: '客户代码', @@ -130,6 +111,17 @@ export const Customerdock = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择从仓库代码', + searchField: 'code', + searchTitle: '仓库基础信息', + searchAllSchemas: Warehouse.allSchemas, + searchPage: WarehouseApi.getWarehousePage, + } + } }, { label: '默认库位', @@ -142,20 +134,25 @@ export const Customerdock = useCrudSchemas(reactive([ form: { // // labelMessage: '信息提示说明!!!', componentProps: { - // disabled:true - // isSearchList: true, // 开启查询弹窗 - // searchListPlaceholder: '请选择库位代码', // 输入框占位文本 - // searchField: 'code', // 查询弹窗赋值字段 - // searchTitle: '库位基础信息', // 查询弹窗标题 - // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 - // searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 - // searchCondition: [{ - // key: 'available', - // value: 'TRUE', - // action: '==', - // isSearch: true, - // isMainValue: false - // }] + disabled:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位基础信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.selectConfigToLocation, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isSearch: true, + isMainValue: false + }, + { + key: 'warehouseCode', + value: 'warehouseCode', + message: '请选择仓库', + isMainValue: true + }] } } }, @@ -313,6 +310,12 @@ export const CustomerdockRules = reactive({ customerCode: [ { required: true, message: '请输入客户代码', trigger: 'blur' } ], + warehouseCode: [ + { required: true, message: '请选择仓库', trigger: 'blur' } + ], + defaultLocationCode: [ + { required: true, message: '请选择默认库位', trigger: 'blur' } + ], available: [ { required: true, message: '请选择是否可用', trigger: 'change' } ], diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue index a5436fa5c..06a9aaea8 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue @@ -156,15 +156,12 @@ const openForm = (type: string, row?: any) => { } if (item.field == 'customerCode') { item.componentProps.disabled = true - item.componentProps.isSearchList = false } }) - }else { Customerdock.allSchemas.formSchema.forEach((item) => { if (item.field == 'code') { item.componentProps.disabled = false - item.componentProps.isSearchList = true } if (item.field == 'customerCode') { item.componentProps.disabled = false diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index 7e4d7b243..c3e5592b5 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -112,7 +112,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ searchField: 'code', // 查询弹窗赋值字段 searchTitle: '客户月台信息', // 查询弹窗标题 searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类 - searchPage: CustomerdockApi.pageCustomerCodeToCustomerDock, // 查询弹窗所需分页方法 + searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE',