From 66c7bf67f550f54bbbf51c2d0a2c9e175a00b810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Tue, 6 Feb 2024 14:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92=20?= =?UTF-8?q?=E5=A4=87=E6=96=99=E8=AE=A1=E5=88=92=20=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=20=E7=9B=98=E7=82=B9=E8=AE=A1=E5=88=92=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../count/countPlanMain/countPlanMain.data.ts | 106 ++++++++++++++--- .../deliverPlanMain/deliverPlanMain.data.ts | 109 ++++++++++++++--- .../preparetoissueMain.data.ts | 72 ++++++++++- .../productionMain/productionMain.data.ts | 112 ++++++++++++++---- 4 files changed, 341 insertions(+), 58 deletions(-) diff --git a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts index 1fc1182df..9a1636498 100644 --- a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts +++ b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts @@ -1,11 +1,23 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -const { t } = useI18n() // 国际化 import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import * as ItembasicApi from '@/api/wms/itembasic' import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as getPlansettingApi from '@/api/wms/plansetting/index' + +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'CountPlan' +} + const data = await getPlansettingApi.getPlansettingPage(queryParams) + const plansettingData =data?.list[0]||{} + /** * @returns {Array} 盘点计划主表 */ @@ -338,6 +350,82 @@ export const CountPlanMain = useCrudSchemas(reactive([ } } }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, { label: '最后更新时间', field: 'updateTime', @@ -369,22 +457,6 @@ export const CountPlanMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - }, { label: '操作', field: 'action', diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index ef4b4463a..bc3048c0a 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -10,8 +10,19 @@ 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 getPlansettingApi from '@/api/wms/plansetting/index' + const { t } = useI18n() // 国际化 +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'DeliverPlan' +} + const data = await getPlansettingApi.getPlansettingPage(queryParams) + const plansettingData =data?.list[0]||{} + /** * @returns {Array} 发货计划主表 */ @@ -178,41 +189,71 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ } }, { - label: '最后更新者', - field: 'updater', + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, sort: 'custom', table: { width: 150 }, - isForm: false, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } }, { - label: '最后更新时间', - field: 'updateTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, sort: 'custom', table: { - width: 180 + width: 150 }, form: { - component: 'DatePicker', + component: 'Switch', + value: plansettingData.autoCommit, componentProps: { - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 }, - isForm: false, + form: { + component: 'Switch', + value: plansettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } }, { - label: '是否可用', - field: 'available', + label: '自动执行', + field: 'autoExecute', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isSearch: true, isTable: true, sort: 'custom', table: { @@ -220,7 +261,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ }, form: { component: 'Switch', - value: 'TRUE', + value: plansettingData.autoExecute, componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE', @@ -228,6 +269,36 @@ export const DeliverPlanMain = useCrudSchemas(reactive([ } } }, + { + label: '最后更新者', + field: 'updater', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + }, + { + label: '最后更新时间', + field: 'updateTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + isForm: false, + }, { label: '操作', field: 'action', diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts index 988c3540d..69caf84d6 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts @@ -25,11 +25,19 @@ import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' import * as WorkStationApi from '@/api/wms/workstation' import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' - - +import * as getPlansettingApi from '@/api/wms/plansetting/index' const { t } = useI18n() // 国际化 +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'PreparetoissuePlan' +} + const data = await getPlansettingApi.getPlansettingPage(queryParams) + const plansettingData =data?.list[0]||{} + /** * @returns {Array} 备料计划主表 */ @@ -273,6 +281,66 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ }, isForm: false, }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index c36240d64..f674ce21b 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -15,8 +15,20 @@ import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' import * as BomApi from '@/api/wms/bom' import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' + +import * as getPlansettingApi from '@/api/wms/plansetting/index' + const { t } = useI18n() // 国际化 +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ProductionPlan' +} + const data = await getPlansettingApi.getPlansettingPage(queryParams) + const plansettingData =data?.list[0]||{} + /** * @returns {Array} 生产计划主表 */ @@ -282,6 +294,86 @@ export const ProductionMain = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: plansettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, // { // label: '开始时间', // field: 'beginTime', @@ -399,26 +491,6 @@ export const ProductionMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - } - }, { label: '操作', field: 'action',