From 84afc50224dd94d77fbe5bc8e4877699cb14b754 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Sat, 10 Aug 2024 16:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/inventoryManage/package/index.vue | 10 +- .../inventoryManage/package/package.data.ts | 273 +++++++++--------- 2 files changed, 145 insertions(+), 138 deletions(-) diff --git a/src/views/wms/inventoryManage/package/index.vue b/src/views/wms/inventoryManage/package/index.vue index 0d6cbe7ab..3fcce7858 100644 --- a/src/views/wms/inventoryManage/package/index.vue +++ b/src/views/wms/inventoryManage/package/index.vue @@ -86,9 +86,8 @@ const updataTableColumns = (val) => { // 查询列表页面参数设置 const searchTableParams = ref([ ]) - // 查询页面返回 -const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row ) => { +const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] @@ -98,8 +97,6 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row setV['itemDesc2'] = val[0]['desc2'] setV['uom'] = val[0]['uom'] setV['altUom'] = val[0]['altUom'] - setV['packUnit'] = null - setV['packQty'] = null } else if (formField == 'packUnit'){ setV['packQty'] = val[0]['packQty'] @@ -108,10 +105,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row setV['toLocationCode'] = null } else if(formField == 'supplierCode'){ - setV['supplierItemCode'] = null + setV['supplierItemCode'] = val[0]['supplierItemCode'] } - basicFormRef.setValues(setV) - basicFormRef.setValues(setV) + formRef.setValues(setV) }) } diff --git a/src/views/wms/inventoryManage/package/package.data.ts b/src/views/wms/inventoryManage/package/package.data.ts index 3d8f3be57..b8960a61d 100644 --- a/src/views/wms/inventoryManage/package/package.data.ts +++ b/src/views/wms/inventoryManage/package/package.data.ts @@ -15,6 +15,8 @@ import * as SupplierApi from "@/api/wms/supplier"; import {Itempackaging} from "@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data"; import * as ItempackagingApi from "@/api/wms/itempackage"; import * as SupplieritemApi from "@/api/wms/supplieritem"; +import { formatTime } from '@/utils/index' + import { Supplieritem } from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; @@ -121,6 +123,9 @@ export const Package = useCrudSchemas(reactive([ field: 'batch', sort: 'custom', isSearch: true, + form:{ + value: formatTime(new Date(), 'yyyyMMdd') + }, table: { width: 150, }, @@ -160,6 +165,7 @@ export const Package = useCrudSchemas(reactive([ }, form: { component: 'DatePicker', + value: formatTime(new Date(), 'yyyy-MM-dd'), componentProps: { style: {width: '100%'}, type: 'date', @@ -290,20 +296,21 @@ export const Package = useCrudSchemas(reactive([ enterSearch:true, isSearch:true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格', // 输入框占位文本 - searchField: 'itemCode', // 查询弹窗赋值字段 - searchTitle: '物料包装信息', // 查询弹窗标题 - searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 - searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法 + searchListPlaceholder: '请选择物料代码', + searchField: 'packUnit', + searchTitle: '物料包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItempackagingApi.getItempackagingPageTree, searchCondition: [{ key: 'available', value: 'TRUE', isMainValue: false },{ - key: 'itemCode', - value: 'itemCode', - message: '请填写物料代码!', - isMainValue: true + key:'itemCode', // 查询列表中字段 + value:'itemCode', // 指主表某字段 + message: '请选择物料代码!', // 当前置条件为空时 弹出信息提示 + isMainValue: true, // 表示查询条件是主表的字段的值 + action: '==', // 查询拼接条件 }], verificationParams: [{ key: 'packUnit', @@ -313,6 +320,7 @@ export const Package = useCrudSchemas(reactive([ isSearch: true, isFormModel: true, }], // 失去焦点校验参数 + } } }, @@ -329,9 +337,90 @@ export const Package = useCrudSchemas(reactive([ } }, }, + // { + // label: '仓库代码', + // field: 'toWarehouseCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch:true, + // isSearch:true, + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '仓库信息', // 查询弹窗标题 + // searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 + // searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, + // { + // label: '月台代码', + // field: 'toDockCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择月台代码', + // searchField: 'code', + // searchTitle: '客户月台', + // searchAllSchemas: Dock.allSchemas, + // searchPage: DockApi.getDockPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }], + // } + // } + // }, + // { + // label: '库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150, + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择库位代码', + // searchField: 'code', + // searchTitle: '库位信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.getLocationPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'warehouseCode', + // value: 'toWarehouseCode', + // message: '请填写仓库代码!', + // isMainValue: true + // }], + // } + // } + // }, { - label: '仓库代码', - field: 'toWarehouseCode', + label: '供应商代码', + field: 'supplierCode', sort: 'custom', table: { width: 150, @@ -340,102 +429,22 @@ export const Package = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { enterSearch:true, - isSearch:true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'supplierCode', // 查询弹窗赋值字段 + searchTitle: '供应商物料信息', isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '仓库信息', // 查询弹窗标题 - searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 - searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, - { - label: '月台代码', - field: 'toDockCode', - sort: 'custom', - table: { - width: 150, - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择月台代码', - searchField: 'code', - searchTitle: '客户月台', - searchAllSchemas: Dock.allSchemas, - searchPage: DockApi.getDockPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }], - } - } - }, - { - label: '库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150, - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择库位代码', - searchField: 'code', - searchTitle: '库位信息', - searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.getLocationPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'warehouseCode', - value: 'toWarehouseCode', - message: '请填写仓库代码!', + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + searchCondition:[{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码!', isMainValue: true }], - } - } - }, - { - label: '供应商代码', - field: 'supplierCode', - sort: 'custom', - table: { - width: 150, - }, - form: { - componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择供应商', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 - searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ], verificationParams: [ { - key: 'code', + key: 'supplierCode', action: '==', value: '', isMainValue: false, @@ -443,6 +452,7 @@ export const Package = useCrudSchemas(reactive([ isFormModel: true } ] // 失去焦点校验参数 + } } }, @@ -455,35 +465,36 @@ export const Package = useCrudSchemas(reactive([ }, form: { componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择供应商物料', // 输入框占位文本 - searchField: 'supplierItemCode', // 查询弹窗赋值字段 - searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 - searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'supplierCode', - value: 'supplierCode', - message: '请填写物料代码!', - isMainValue: true - } - ], - verificationParams: [ - { - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true - } - ] // 失去焦点校验参数 + disabled: true + // enterSearch: true, + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择供应商物料', // 输入框占位文本 + // searchField: 'supplierItemCode', // 查询弹窗赋值字段 + // searchTitle: '供应商信息', // 查询弹窗标题 + // searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + // searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'supplierCode', + // value: 'supplierCode', + // message: '请填写物料代码!', + // isMainValue: true + // } + // ], + // verificationParams: [ + // { + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true + // } + // ] // 失去焦点校验参数 } } },