From 7bb6247118695c5f4819d86a033e6c2874207cbb Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 23 Jan 2024 16:55:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E9=80=89=E6=8B=A9=E6=9C=88?= =?UTF-8?q?=E5=8F=B0=E9=99=90=E5=88=B6=E5=8F=AA=E8=83=BD=E9=80=89=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/customerdock/index.ts | 11 +++++++ .../deliverRequestMain.data.ts | 2 +- .../deliver/deliverRequestMain/index.vue | 26 +++++++++++++++ .../deliverPlanMain/deliverPlanMain.data.ts | 33 ++++++++++++------- .../deliverplan/deliverPlanMain/index.vue | 20 +++++++++++ 5 files changed, 80 insertions(+), 12 deletions(-) diff --git a/src/api/wms/customerdock/index.ts b/src/api/wms/customerdock/index.ts index 5a5d1dbc4..d93f98c85 100644 --- a/src/api/wms/customerdock/index.ts +++ b/src/api/wms/customerdock/index.ts @@ -62,3 +62,14 @@ export const exportCustomerdock = async (params) => { export const importTemplate = () => { return request.download({ url: '/wms/customerdock/get-import-template' }) } + +// 查询客户月台列表 +export const pageCustomerCodeToCustomerDock = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return request.post({ url: '/wms/customerdock/pageCustomerCodeToCustomerDockSenior', data }) + } else { + return await request.get({ url: `/wms/customerdock/pageCustomerCodeToCustomerDock`, params }) + } +} \ No newline at end of file diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index 75ab5882c..73324cdb5 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -146,7 +146,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ searchField: 'code', // 查询弹窗赋值字段 searchTitle: '客户月台信息', // 查询弹窗标题 searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类 - searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法 + searchPage: CustomerdockApi.pageCustomerCodeToCustomerDock, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 8d401726e..22dffc30e 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -100,6 +100,7 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name +const customerCode = ref() const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) const isShowButton = ref(true) @@ -144,6 +145,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => item.tableForm.disabled = true } }) + // 修改 tableform 属性 + if(formField == 'customerCode'){ + console.log(1111,val); + customerCode.value = val[0]['code'] + console.log(11112,customerCode.value); + } + DeliverRequestMain.allSchemas.tableFormColumns.map(item => { + if(item.field == 'customerDockCode') { + item.tableForm.searchCondition = [ + { + key: 'customerCode', + value: customerCode.value , + isMainValue: true + }] + item.form.componentProps.searchCondition = [ + { + key: 'customerCode', + value: customerCode.value , + isMainValue: true + }]} + else { + delete item.tableForm.searchCondition + delete item.form.componentProps.searchCondition + } + }) }).catch(err => { console.log(err) message.error('错误') diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index 6adcb194e..577da3ab7 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -10,13 +10,6 @@ import { Customerdock } from '@/views/wms/basicDataManage/customerManage/custome import * as CustomerItemApi from '@/api/wms/customeritem' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.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() // 国际化 /** @@ -328,11 +321,11 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ }, tableForm:{ isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择物料代码', + searchListPlaceholder: '请选择客户月台代码', searchField: 'code', - searchTitle: '物料基础信息', + searchTitle: '客户月台基础信息', searchAllSchemas: Customerdock.allSchemas, - searchPage: CustomerDockApi.getCustomerdockPage, + searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock, searchCondition: [{ key: 'available', value: 'TRUE', @@ -343,7 +336,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ isMainValue: true }] }, - isForm: false, + form: { + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择客户月台代码', + searchField: 'code', + searchTitle: '客户月台基础信息', + searchAllSchemas: Customerdock.allSchemas, + searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'customerCode', + value: 'customerCode', + isMainValue: true + }] + } + }, }, { label: '项目', diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 3bd12d4f6..7d2884a86 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -91,6 +91,7 @@ const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name +const customerCode = ref() const tableColumns = ref(DeliverPlanMain.allSchemas.tableColumns) // 字段设置 更新主列表字段 @@ -101,6 +102,25 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { + // 修改 tableform 属性 + if(formField == 'customerCode'){ + customerCode.value = val[0]['code'] + } + DeliverPlanDetail.allSchemas.tableFormColumns.map(item => { + if(item.field == 'customerDockCode') { + item.tableForm.searchCondition = [ + { + key: 'customerCode', + value: customerCode.value , + isMainValue: false + }] + item.form.componentProps.searchCondition = [ + { + key: 'customerCode', + value: customerCode.value , + isMainValue: false + }]} + }) if (type == 'tableForm') { if(formField == 'itemCode') { row['uom'] = val[0]['customerUom']