From 0d09138253f49d0edc7e6eb09b1a68729b82e844 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 5 Jul 2024 10:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=B7=B2=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/demandforecastingMain/index.ts | 10 +- src/locales/en-US.ts | 3 +- src/locales/zh-CN.ts | 4 +- .../demandforecastingMain.data.ts | 430 ++++------------- .../demandforecastingSupplierMain/index.vue | 448 ++++++------------ 5 files changed, 258 insertions(+), 637 deletions(-) diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index 588fbd8bd..7d5596a8f 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -92,4 +92,12 @@ export const queryUserPlanerList = async () => { // 供应商代码 export const querySupplierList = async (data) => { return await request.post({ url: `/wms/demandforecasting-main/querySupplierList`,data }) -} \ No newline at end of file +} + + +// 是否已读接口 +export const updateIsRead = async (data) => { + return await request.post({ url: `/wms/demandforecasting-main/updateIsRead`,data }) +} + + diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 19f98f6c5..03c07ece7 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1138,7 +1138,8 @@ export default { 批量发布:'Batch release', '重新生成标签会删除上次生成的标签,是否确认继续?':'Regenerating labels will delete the last generated label. Are you sure you want to continue?', '确 认':'Confirm', - 请输入拒收原因:'Please enter the reason for rejection' + 请输入拒收原因:'Please enter the reason for rejection', + 全部已读:'All read' }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 3b9c17161..7f47117c5 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1138,7 +1138,9 @@ export default { 批量发布:'批量发布', '重新生成标签会删除上次生成的标签,是否确认继续?':'重新生成标签会删除上次生成的标签,是否确认继续?', '确 认':'确 认', - 请输入拒收原因:'请输入拒收原因' + 请输入拒收原因:'请输入拒收原因', + 全部已读:'全部已读' + }, } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index 561ce9eee..2ae6c3e90 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -1,288 +1,171 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import * as SupplierApi from '@/api/wms/supplier' -import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +// 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 ItembasicApi from '@/api/wms/itembasic' +import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; import * as PurchaseMainApi from '@/api/wms/purchaseMain' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' +import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' +import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' + const { t } = useI18n() // 国际化 /** * @returns {Array} 要货预测主表 */ -export const DemandforecastingMain = useCrudSchemas(reactive([ + +export const Version = useCrudSchemas(reactive([ { - label: '单据号', - field: 'number', + label: '供应商代码', + field: 'supplerCodes', sort: 'custom', - table: { - width: 200, - fixed: 'left' - }, - isForm: false, - isSearch: true, + isSearch:true, }, { - label: '供应商代码', - field: 'supplierCode', + label: '订单号', + field: 'poNumber', sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - form: { - labelMessage: '影响明细中物料代码,需在供应商物料中维护', - componentProps: { - enterSearch:true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 - searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } + isSearch:true, }, { - label: '版本号', - field: 'version', + label: '订单行', + field: 'poLine', sort: 'custom', - table: { - width: 150 - }, }, { label: '物料代码', field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, isSearch:true, - isTable:false, - isForm: false, - }, - { - label: '发布时间', - field: 'publishTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, sort: 'custom', - table: { - width: 180 - }, - isTable: false, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false, }, { - label: '开始时间', - field: 'beginTime', - isTable: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - isTable: false, + label: '子表版本', + field: 'detailVersion', sort: 'custom', - table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } - }, - isForm: false, - }, + } +])) +export const DemandforecastingMain = useCrudSchemas(reactive([ { - label: '结束时间', - field: 'endTime', - isTable: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - isTable: false, + label: '是否已读', + field: 'isRead', sort: 'custom', table: { - width: 180 - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', - } + width: 150 }, }, { - label: '业务类型', - field: 'businessType', + label: '订单号', + field: 'poNumber', sort: 'custom', table: { width: 150 }, - isTable:false, - isForm: false, - form: { - value: 'PurchasePrediction', - componentProps: { - disabled: true - } - } }, { - label: '状态', - field: 'status', - dictType: DICT_TYPE.PURCHASE_ORDER_STATUS, - dictClass: 'string', - isTable: true, - isForm:false, - isSearch: true, + label: '订单行', + field: 'poLine', sort: 'custom', table: { width: 150 - }, - form: { - value: '1', - componentProps: { - disabled: true - } } }, { - label: '备注', - field: 'remark', + label: '物料代码', + field: 'itemCode', sort: 'custom', table: { width: 150 }, - isTable: false, - }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - table: { - width: 180 - }, - isTable:false, - form: { - component: 'DatePicker', + isSearch:true, + isTable:true, + isForm: false, + search: { + // labelMessage: '信息提示说明!!!', componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + multiple: true, + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'itemCode', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 + searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'supplierCodes', + value: 'supplierCode', + message: '请填写供应商代码!', + isMainValue: true, + isCSV:true,//是否用逗号分隔参数 + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] } - }, - isForm: false, - }, - { - label: '创建者', - field: 'creator', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, + } }, { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, + label: '版本号', + field: 'version', sort: 'custom', table: { width: 150 }, - form: { - component: 'Switch', - value: 'TRUE', + isSearch:true, + search: { + // labelMessage: '信息提示说明!!!', componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + multiple: true, + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', // 输入框占位文本 + searchField: 'detailVersion', // 查询弹窗赋值字段 + searchTitle: '版本号', // 查询弹窗标题 + searchAllSchemas: Version.allSchemas, // 查询弹窗所需类 + searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'supplierCodes', + value: 'supplierCode', + message: '请填写供应商代码!', + isMainValue: true, + isCSV:true,//是否用逗号分隔参数 + },{ + key: 'itemCodes', + value: 'itemCode', + message: '请填写物料代码!', + isMainValue: true, + isCSV:true,//是否用逗号分隔参数 + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] } - }, - }, - { - label: '计划员', - field: 'planerId', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '计划员名称', - field: 'planerUserName', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, - }, - { - label: '版本', - field: 'activeVersion', - sort: 'custom', - table: { - width: 150 - }, - isTable:false, - isForm: false, + } }, { label: '到货日期', field: 'dueDate', + formatter: dateFormatter, sort: 'custom', table: { width: 150 }, + isSearch:true, isTable:false, isForm: false, - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 300, - fixed: 'right' + search: { + value:[], + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD', + type: 'daterange', + defaultTime: [new Date('1 '), new Date('1 ')] + } }, } ])) @@ -307,14 +190,6 @@ export const DemandforecastingMainRules = reactive({ * @returns {Array} 要货预测子表 */ export const DemandforecastingDetail = useCrudSchemas(reactive([ - { - label: '是否已读', - field: 'isRead', - sort: 'custom', - table: { - width: 150 - }, - }, { label: '单据号', field: 'number', @@ -355,6 +230,7 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ table: { width: 180 }, + isTable:false, form: { component: 'DatePicker', componentProps: { @@ -370,117 +246,7 @@ export const DemandforecastingDetail = useCrudSchemas(reactive([ valueFormat: 'x', } }, - { - label: '订单号', - field: 'poNumber', - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择订单号', - searchField: 'number', - searchTitle: '采购订单信息', - searchAllSchemas: PurchaseMain.allSchemas, - searchPage: PurchaseMainApi.getPurchaseMainPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, { - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - } - , { - key: 'status', - value: 2, - isMainValue: false - } - ] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择订单号', - searchField: 'number', - searchTitle: '采购订单信息', - searchAllSchemas: PurchaseMain.allSchemas, - searchPage: PurchaseMainApi.getPurchaseMainPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, - { - label: '订单行', - field: 'poLine', - sort: 'custom', - table: { - width: 150 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择订单行', - searchField: 'lineNumber', - searchTitle: '采购订单信息', - searchAllSchemas: PurchaseDetail.allSchemas, - searchPage: PurchaseDetailApi.getPurchaseDetailPage, - searchCondition: [{ - key: 'number', - value: 'poNumber', - message: '请填写订单号!', - isMainValue: true - }, { - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - }, - tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择订单行', - searchField: 'lineNumber', - searchTitle: '采购订单信息', - searchAllSchemas: PurchaseDetail.allSchemas, - searchPage: PurchaseDetailApi.getPurchaseDetailPage, - searchCondition: [{ - key: 'number', - value: 'poNumber', - message: '请填写订单号!', - isMainValue: true - }, { - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - }, - { - label: '物料代码', - field: 'itemCode', - sort: 'custom', - table: { - width: 150 - }, - form: { - componentProps: { - disabled: true - } - }, - tableForm: { - disabled: true - } - }, + { label: '计量单位', field: 'uom', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue index bea1c5d35..9ce425e76 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue @@ -1,23 +1,23 @@ + \ No newline at end of file