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/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/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/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/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: '物料代码', 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', 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'}), // 删除 ] } 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