From 50562a90936a859a24e2b43d76b560bbfeadbacf Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 14 Jun 2024 13:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E8=AE=A1=E5=88=92=EF=BC=8C?= =?UTF-8?q?=E8=87=AA=E5=88=B6=E5=A4=87=E4=BB=B6=E5=8F=91=E8=B4=A7=E8=AE=A1?= =?UTF-8?q?=E5=88=92--=E5=88=B0=E4=BB=93=E5=BA=93=E3=80=81=E5=88=B0?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E3=80=81=E5=8F=91=E8=B4=A7=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deliverPlanMain/deliverPlanMain.data.ts | 148 +++++++++++------- .../deliverplan/deliverPlanMain/index.vue | 29 +++- 2 files changed, 114 insertions(+), 63 deletions(-) diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index ed61ebad9..ca6a09608 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -15,6 +15,7 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l import * as WorkstationApi from '@/api/wms/workstation' + import * as getPlansettingApi from '@/api/wms/plansetting/index' import * as getBusinessTypeApi from '@/api/wms/businesstype/index' @@ -135,6 +136,38 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ } }, }, + { + label: '到仓库', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: true, + isTableForm:false, + isDetail:false, + form: { + componentProps: { + disabled:true + } + } + }, + { + label: '到库位', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: true, + isTableForm:false, + isDetail:false, + form: { + componentProps: { + disabled:true + } + } + }, { label: '发货类型', field: 'deliverType', @@ -144,6 +177,11 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ table: { width: 150 }, + form: { + componentProps: { + disabled:true + } + } }, { label: '计划日期', @@ -608,61 +646,61 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ } } }, - { - label: '到仓库代码', - field: 'toWarehouseCode', - sort: 'custom', - isForm: false, - table: { - width: 150 - }, - }, - { - label: '到库位代码', - field: 'toLocationCode', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择到库位代码', - searchField: 'code', - searchTitle: '库位基础信息', - searchAllSchemas: Location.allSchemas, - searchPage: WorkstationApi.selectAreaTypeToLocation, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'areaType', - value: "deliverType", - message:"请选择发货类型", - isMainValue: true - }] - }, - form: { - componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择到库位代码', - searchField: 'code', - searchTitle: '库位基础信息', - searchAllSchemas: Location.allSchemas, - searchPage: WorkstationApi.selectAreaTypeToLocation, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - },{ - key: 'areaType', - value: "deliverType", - message:"请选择发货类型", - isMainValue: false - }] - } - }, - }, + // { + // label: '到仓库代码', + // field: 'toWarehouseCode', + // sort: 'custom', + // isForm: false, + // table: { + // width: 150 + // }, + // }, + // { + // label: '到库位代码', + // field: 'toLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择到库位代码', + // searchField: 'code', + // searchTitle: '库位基础信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: WorkstationApi.selectAreaTypeToLocation, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'areaType', + // value: "deliverType", + // message:"请选择发货类型", + // isMainValue: true + // }] + // }, + // form: { + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择到库位代码', + // searchField: 'code', + // searchTitle: '库位基础信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: WorkstationApi.selectAreaTypeToLocation, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // },{ + // key: 'areaType', + // value: "deliverType", + // message:"请选择发货类型", + // isMainValue: false + // }] + // } + // }, + // }, { label: '项目', field: 'project', diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index d0c8568fa..20bba5e7d 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -86,6 +86,7 @@ import { DeliverPlanMain,DeliverPlanMainRules,DeliverPlanDetail,DeliverPlanDetai import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import * as AreabasicApi from '@/api/wms/areabasic' // 发货计划 defineOptions({ name: 'DeliverPlanMain' }) @@ -132,11 +133,13 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { - nextTick(() => { + alert(11) + nextTick(async () => { + // 修改 tableform 属性 if(formField == 'customerCode'){ customerCode.value = val[0]['code'] - } + } DeliverPlanDetail.allSchemas.tableFormColumns.map(item => { if(item.field == 'customerDockCode') { item.tableForm.searchCondition = [ @@ -146,12 +149,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => isMainValue: false }] item.form.componentProps.searchCondition = [ - { - key: 'customerCode', - value: customerCode.value , - isMainValue: false - }]} - }) + { + key: 'customerCode', + value: customerCode.value , + isMainValue: false + }] + } + }) if (type == 'tableForm') { if(formField == 'itemCode') { val.forEach(item=>{ @@ -168,6 +172,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row[formField] = val[0][searchField] } else { const setV = {} + if(formField == 'customerDockCode') { + //客户月台 + setV['toWarehouseCode'] = val[0]['warehouseCode']//到仓库 + setV['toLocationCode'] = val[0]['defaultLocationCode']//到库位 + let res = await AreabasicApi.selectAreabasicDOByCode(val[0]['defaultLocationCode']) + if(res){ + setV['deliverType'] = res['type'] + } + } setV[formField] = val[0][searchField] formRef.setValues(setV) }