From 74acdf4710c91c5ffb1ad79d7b45df7136dc577f Mon Sep 17 00:00:00 2001 From: yejiaxing <591141169@qq.com> Date: Thu, 28 Dec 2023 14:05:38 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandforecastingMain.data.ts | 194 +++++++++++------- .../demandforecastingMain/index.vue | 5 + .../purchasePlanMain/index.vue | 13 -- 3 files changed, 130 insertions(+), 82 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index d0079c458..e0092c798 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -4,6 +4,9 @@ import * as SupplierApi from '@/api/wms/supplier' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import * as SupplieritemApi from '@/api/wms/supplieritem' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' +import * as PurchaseMainApi from '@/api/wms/purchaseMain' +import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' +import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' const { t } = useI18n() // 国际化 /** @@ -57,7 +60,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -80,7 +83,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -103,7 +106,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -132,7 +135,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ isForm: false, form: { value: 'PurchasePrediction', - componentProps:{ + componentProps: { disabled: true } } @@ -179,7 +182,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -270,7 +273,7 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -283,74 +286,140 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ } }, { - label: '单据号', - field: 'number', + label: '订单号', + field: 'poNumber', sort: 'custom', table: { width: 150 }, - isTableForm: false, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + } + , { + key: 'status', + value: 2, + isMainValue: false + } + ] + }, form: { + // labelMessage: '信息提示说明!!!', componentProps: { - disbaled: true + isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseMain.allSchemas, + searchPage: PurchaseMainApi.getPurchaseMainPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] } } }, { - label: '物品代码', - field: 'itemCode', + label: '订单行', + field: 'poLine', sort: 'custom', table: { width: 150 }, - tableForm:{ - isInpuFocusShow: true, - searchListPlaceholder: '请选择供应商物品', - searchField: 'itemCode', - searchTitle: '供应商物品信息', - searchAllSchemas: Supplieritem.allSchemas, - searchPage: SupplieritemApi.getSupplieritemPage, - searchCondition: [{ - key:'supplierCode', - value:'supplierCode', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }//, //条件,例:isMainValue: true,表示查询条件是主表的字段的值 itemCode:查询列表中字段 supplierCode:指主表某字段 - // { - // key:'available', - // value:'TRUE', - // isMainValue: false - // } - ] // 条件,例:isMainValue: false,表示查询条件不是主表的字段的值 available:查询列表中字段 TRUE:指查询具体值 - }, form: { // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, - searchListPlaceholder: '请选择供应商物品', - searchField: 'itemCode', - searchTitle: '供应商物品信息', - searchAllSchemas: Supplieritem.allSchemas, - searchPage: SupplieritemApi.getSupplieritemPage, + searchListPlaceholder: '请选择订单行', + searchField: 'lineNumber', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseDetail.allSchemas, + searchPage: PurchaseDetailApi.getPurchaseDetailPage, searchCondition: [{ - key:'supplierCode', - value:'supplierCode', + key: 'number', + value: 'poNumber', isMainValue: true - },{ + }, { key: 'available', value: 'TRUE', isMainValue: false - }//, //条件,例:isMainValue: true,表示查询条件是主表的字段的值 itemCode:查询列表中字段 supplierCode:指主表某字段 - // { - // key:'available', - // value:'TRUE', - // isMainValue: false - // } - ] // 条件,例:isMainValue: false,表示查询条件不是主表的字段的值 available:查询列表中字段 TRUE:指查询具体值 + }] } + }, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单行', + searchField: 'lineNumber', + searchTitle: '采购订单信息', + searchAllSchemas: PurchaseDetail.allSchemas, + searchPage: PurchaseDetailApi.getPurchaseDetailPage, + searchCondition: [{ + key: 'number', + value: 'poNumber', + isMainValue: true + }, { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + form: { + componentProps: { + disbaled: true + } + } + }, + { + label: '物品代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select' } }, { @@ -375,7 +444,7 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -414,20 +483,7 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ precision: 6 } }, - { - label: '计量单位', - field: 'uom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select' - } - }, + { label: '最后更新时间', field: 'updateTime', @@ -442,7 +498,7 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ form: { component: 'DatePicker', componentProps: { - style: {width:'100%'}, + style: { width: '100%' }, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', @@ -465,12 +521,12 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ label: '操作', field: 'action', isDetail: false, - isForm: false , + isForm: false, table: { width: 150, fixed: 'right' }, - isTableForm:false, + isTableForm: false, } ])) @@ -494,4 +550,4 @@ export const DemandforecastingDetailRules = reactive({ itemCode: [ { required: true, message: '请选择物品代码', trigger: 'change' } ], -}) +}) \ No newline at end of file diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 1e32e2031..6d27c4545 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -105,6 +105,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if (type == 'tableForm') { // 明细查询页赋值 row[formField] = val[0][searchField] + if (formField == 'poLine') { + row['itemCode'] = val[0]['itemCode'] + row['uom'] = val[0]['uom'] + row['available'] = val[0]['available'] + } } else { const setV = {} setV[formField] = val[0][searchField] diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index fe4f9e7da..97f8958a3 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -88,19 +88,6 @@ row['planQty'] = val[0]['orderQty']-val[0]['plannedQty'] row['available'] = val[0]['available'] } - // await PurchaseDetailApi.getPurchaseDetailPage({ - // number: row['poNumber'], - // available: 'TRUE', - // // poLine: row['lineNumber'], - // }).then(res => { - // if (formField == 'poLine') { - // row['itemCode'] = res.list[0].itemCode - // row['uom'] = res.list[0].uom - // row['orderQty'] = res.list[0].orderQty - // row['planQty'] = res.list[0].orderQty-res.list[0].plannedQty - // row['available'] = res.list[0].available - // } - // }) } else { const setV = {} setV[formField] = val[0][searchField]