From 2ab3a09103fedd360ff39979a4ee522ac5040be1 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Tue, 24 Dec 2024 15:29:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E9=A2=84=E6=B5=8B-=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=94=A8=E5=88=B0=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/demandforecastingMain/index.ts | 8 + .../demandforecastingMain.data.ts | 158 +++++++++++++++--- .../demandforecastingMain/index.vue | 18 +- 3 files changed, 153 insertions(+), 31 deletions(-) diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index a8e96a0c5..819fdc475 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -149,6 +149,14 @@ export const queryUserPlanerList = async () => { export const querySupplierList = async (data) => { return await request.post({ url: `/wms/demandforecasting-main/querySupplierList`,data }) } +// 供应商代码 +export const queryQadSupplierList = async (data) => { + return await request.post({ url: `/wms/demandforecasting-main/queryQadSupplierList`,data }) +} +// 物料代码 +export const queryQadItemCodeList = async (data) => { + return await request.post({ url: `/wms/demandforecasting-main/queryQadItemCodeList`,data }) +} // 是否已读接口 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index bb061cc19..45de11ae8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -4,7 +4,6 @@ import * as SupplierApi from '@/api/wms/supplier' import * as SupplieritemApi from '@/api/wms/supplieritem' import { Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' -import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import * as ItembasicApi from '@/api/wms/itembasic' import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; import * as PurchaseMainApi from '@/api/wms/purchaseMain' @@ -33,34 +32,25 @@ try { /** * @returns {Array} 要货预测主表 */ -Supplieritem.allSchemas.searchSchema = Supplieritem.allSchemas.searchSchema.filter(item=>item.field!="allowOverShipment") -export const Supplier1 = useCrudSchemas(reactive([ - { - label: '用户名称', - field: 'userName', - sort: 'custom', - isSearch:true, - - }, - { - label: '用户昵称', - field: 'nickName', - sort: 'custom', - - }, +export const Supplier2= useCrudSchemas(reactive([ { label: '供应商代码', field: 'supplierCode', isSearch:true, sort: 'custom', - }, { label: '供应商名称', field: 'supplierName', sort: 'custom', + }, + { + label: '供应商简称', + field: 'shortName', + sort: 'custom', + }, { label: '创建时间', @@ -70,8 +60,128 @@ export const Supplier1 = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, sort: 'custom', - + }, + { + label: '更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', } + +])) + +export const Supplieritem1 = useCrudSchemas(reactive([ + + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 180 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch:true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchCondition: [], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + } + }, + { + label: '物料名称', + field: 'name', + isForm:true, + form:{ + componentProps:{ + disabled: true + } + }, + table: { + width: 180 + } + }, + { + label: '物料描述1', + field: 'desc1', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '物料描述2', + field: 'desc2', + sort: 'custom', + table: { + width: 150 + }, + }, + + { + label: '创建时间', + field: 'createTime', + isForm: false, + formatter: dateFormatter, + detail: { + dateFormat : 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + } + }, + ])) export const Version = useCrudSchemas(reactive([ { @@ -146,7 +256,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 searchField: 'supplierCode', // 查询弹窗赋值字段 searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplier1.allSchemas, // 查询弹窗所需类 + searchAllSchemas: Supplier2.allSchemas, // 查询弹窗所需类 searchPage: DemandforecastingMainApi.querySupplierList, // 查询弹窗所需分页方法 searchCondition: [{ key: 'planers', @@ -197,7 +307,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '物料基础信息', // 查询弹窗标题 - searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchAllSchemas: Supplieritem1.allSchemas, // 查询弹窗所需类 searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法 searchCondition: [{ key: 'supplierCodes', @@ -547,8 +657,8 @@ export const UpdateMain = useCrudSchemas(reactive([ searchListPlaceholder: t(`ts.${'填写供应商代码(填写多个供应商)'}`), // 输入框占位文本 searchField: 'supplierCode', // 查询弹窗赋值字段 searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplier1.allSchemas, // 查询弹窗所需类 - searchPage: DemandforecastingMainApi.querySupplierList, // 查询弹窗所需分页方法 + searchAllSchemas: Supplier2.allSchemas, // 查询弹窗所需类 + searchPage: DemandforecastingMainApi.queryQadSupplierList, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -582,8 +692,8 @@ export const UpdateMain = useCrudSchemas(reactive([ searchListPlaceholder: t(`ts.${'填写物料号(填写多个物料号)'}`), // 输入框占位文本 searchField: 'itemCode', // 查询弹窗赋值字段 searchTitle: '物料基础信息', // 查询弹窗标题 - searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 - searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法 + searchAllSchemas: Supplieritem1.allSchemas, // 查询弹窗所需类 + searchPage: DemandforecastingMainApi.queryQadItemCodeList, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 9fb23d0ef..7ca7cd927 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -49,7 +49,11 @@ @searchTableSuccess="searchTableSuccessUpdate" @onChange="onChange" :isBusiness="false" - /> + :showSearchTableQueryFields="['supplierCode','itemCode']" + :hiddenFilterBtnFields="['supplierCode','itemCode']" + > + + @@ -231,12 +235,12 @@ const searchFormClick = (searchData) => { const updateFormRef = ref() const updateHandle = ()=>{ UpdateMain.allSchemas.formSchema.forEach((item) => { - if(item.field == 'supplierCode'||item.field == 'itemCode'){ - item.componentProps.enterSearch = false - item.componentProps.isSearchList = false - item.componentProps.disabled = true - } - }) + if(item.field == 'supplierCode'||item.field == 'itemCode'){ + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) updateFormRef.value.open('create',null,null,t(`ts.更新要货预测`),t(`ts.更新要货预测`)) } const onChange = (field, cur, formRef) => {