From fd01f640805e42f96ab98c8187d57881c4624869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 31 Jan 2024 14:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=A4=84=E7=90=86=20?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=98=BE=E7=A4=BA=E5=90=8D=E7=A7=B0=20?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E5=90=8E=E7=AB=AF=E4=B8=BAid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../countRequestMain/countRequestMain.data.ts | 16 ++++++- .../countadjustRequestMain.data.ts | 16 ++++++- .../customerreceiptRequestMain.data.ts | 16 ++++++- .../customerreturnRequestMain.data.ts | 16 ++++++- .../customersettleRequestMain.data.ts | 16 ++++++- .../deliverRequestMain.data.ts | 16 ++++++- .../inventoryinitRequestMain.data.ts | 15 +++++- .../scrapRequestMain/scrapRequestMain.data.ts | 20 ++++++-- .../transferissueRequestMain.data.ts | 22 +++++++-- .../transferreceiptRequestMain.data.ts | 15 +++++- .../unplannedissueRequestMain.data.ts | 15 +++++- .../unplannedreceiptRequestMain.data.ts | 48 +++++++++++-------- .../issueRequestMain/issueRequestMain.data.ts | 32 ++++++++----- .../onlinesettlementRequestMain.data.ts | 21 ++++++-- .../pickRequestMain/pickRequestMain.data.ts | 22 +++++++-- .../productionreturnRequestMain.data.ts | 23 ++++++--- .../repleinshRequestMain.data.ts | 23 ++++++--- .../inventorychangeRequestMain.data.ts | 22 +++++++-- .../inventorymoveRequestMain.data.ts | 23 ++++++--- .../offlinesettlementRequestMain.data.ts | 23 ++++++--- .../productdismantleRequestMain.data.ts | 23 ++++++--- .../productputawayRequestMain.data.ts | 16 ++++++- .../productreceiptRequestMain.data.ts | 23 ++++++--- .../productrepairRequestMain.data.ts | 29 +++++++---- .../productscrapRequestMain.data.ts | 48 +++++++++++-------- .../inspectRequestMain.data.ts | 36 +++++++------- .../purchasereceiptRequestMain.data.ts | 23 +++++++-- .../purchasereturnRequestMain.data.ts | 28 ++++++----- .../putawayRequestMain.data.ts | 26 ++++++---- .../supplierdeliverRequestMain.data.ts | 21 ++++++-- .../purchaseclaimRequestMain.data.ts | 34 ++++++++----- .../supplierinvoiceRequestMain.data.ts | 24 +++++++--- 32 files changed, 551 insertions(+), 200 deletions(-) diff --git a/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts b/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts index e60036c7e..78b3a17e3 100644 --- a/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts +++ b/src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' + import { dateFormatter } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' @@ -20,6 +22,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 盘点申请主表 @@ -173,10 +176,19 @@ export const CountRequestMain = useCrudSchemas(([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts b/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts index 457d1f427..b9f6d987c 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' + import { dateFormatter } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' @@ -20,6 +22,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 盘点调整申请主表 @@ -159,10 +162,19 @@ export const CountadjustRequestMain = useCrudSchemas(([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts index e31c17d64..dd284d1e6 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' + import { dateFormatter } from '@/utils/formatTime' const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' @@ -16,6 +18,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 客户收货申请主表 @@ -224,10 +227,19 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts index d135c96e8..a6fefd9bd 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' + import { dateFormatter, formatDate } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' @@ -37,6 +39,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 客户退货申请主表 @@ -341,10 +344,19 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/customersettleRequestMain.data.ts b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/customersettleRequestMain.data.ts index b0220bc76..56119bf31 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/customersettleRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/customersettleRequestMain.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' + import { dateFormatter } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' @@ -21,6 +23,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 客户结算申请主表 @@ -170,10 +173,19 @@ export const CustomersettleRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index f06754363..28eb2652e 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -1,4 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { TableColumn } from '@/types/table' + import { dateFormatter } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' @@ -32,6 +34,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 发货申请主表 @@ -337,10 +340,19 @@ export const DeliverRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts index 3705715de..735860417 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts @@ -27,8 +27,10 @@ const queryParams = { // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 库存初始化申请主表 @@ -153,10 +155,19 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index 0f52150e6..1c3d6871f 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -5,6 +5,9 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; +import * as WarehouseApi from "@/api/wms/warehouse"; + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -18,10 +21,10 @@ const queryParams = { // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' -import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; -import * as WarehouseApi from "@/api/wms/warehouse"; +import { TableColumn } from '@/types/table' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 报废出库申请主表 @@ -181,10 +184,19 @@ export const ScrapRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts index 3290111b8..1f37c0f92 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts @@ -14,6 +14,9 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; +import * as WarehouseApi from "@/api/wms/warehouse"; + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -27,11 +30,11 @@ const queryParams = { // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' -import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; -import * as WarehouseApi from "@/api/wms/warehouse"; - +import { TableColumn } from '@/types/table' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] + /** * @returns {Array} 调拨出库申请主表 @@ -309,10 +312,19 @@ export const TransferissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts index 9321f4d31..9453096e3 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts @@ -14,8 +14,10 @@ const queryParams = { // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 调拨入库申请主表 @@ -199,10 +201,19 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 1f562ed23..2df111255 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -18,8 +18,10 @@ const queryParams = { // 获取当前操作人的部门 import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 计划外出库申请主表 @@ -150,10 +152,19 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 8fb5e7200..f42f6f89b 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -8,21 +8,6 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' - - -const { t } = useI18n() // 国际化 - -// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 -const queryParams = { - pageSize:10, - pageNo:1, - code:'UnplannedReceiptRequest' -} - const data = await getRequestsettingApi.getRequestsettingPage(queryParams) - const requestsettingData =data?.list[0]||{} - - // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; import * as WarehouseApi from "@/api/wms/warehouse"; import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data"; @@ -35,9 +20,25 @@ import { Supplieritem } from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data"; import * as SupplieritemApi from "@/api/wms/supplieritem"; -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'UnplannedReceiptRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 计划外入库申请主表 */ @@ -191,10 +192,19 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index 3e6d22d8f..5d903a91c 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -32,10 +32,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 发料申请主表 */ @@ -237,13 +239,21 @@ export const IssueRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, - isForm: false, - // form: { - // value: userDept.name, - // componentProps: { - // disabled: true - // } - // } + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + } }, { label: '备注', diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts index 3f2174777..6cbac6089 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/onlinesettlementRequestMain.data.ts @@ -17,10 +17,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 上线结算申请主表 */ @@ -111,10 +113,19 @@ export const OnlinesettlementRequestMain = useCrudSchemas(reactive table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/issueManage/pick/pickRequestMain/pickRequestMain.data.ts b/src/views/wms/issueManage/pick/pickRequestMain/pickRequestMain.data.ts index 308ea71af..3549ddbae 100644 --- a/src/views/wms/issueManage/pick/pickRequestMain/pickRequestMain.data.ts +++ b/src/views/wms/issueManage/pick/pickRequestMain/pickRequestMain.data.ts @@ -13,9 +13,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 拣料申请主表 @@ -188,10 +191,19 @@ export const PickRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 6655eede6..c513c2fa7 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -34,10 +34,12 @@ const queryParams = { console.log(34, requestsettingData) // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 生产退料申请主表 */ @@ -225,10 +227,19 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts index b3136e51c..a40591ba8 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts @@ -23,10 +23,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 补料申请主表 */ @@ -226,10 +228,19 @@ export const RepleinshRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts index 2eb16c259..14eac07e3 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts @@ -20,9 +20,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 库存修改申请主表 @@ -125,10 +128,19 @@ export const InventorychangeRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 10631f408..b90304246 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -23,10 +23,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 库存转移申请主表 */ @@ -214,10 +216,19 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/offlinesettlementRequestMain.data.ts b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/offlinesettlementRequestMain.data.ts index 1757d913c..322aa819a 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/offlinesettlementRequestMain.data.ts +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/offlinesettlementRequestMain.data.ts @@ -13,10 +13,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 下线结算申请主表 */ @@ -143,10 +145,19 @@ export const OfflinesettlementRequestMain = useCrudSchemas(reactive { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index 7f0e5a0ae..cd02eb2be 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts @@ -38,10 +38,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 制品拆解申请主表 */ @@ -265,10 +267,19 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts index a856da666..25acb73e0 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts @@ -5,6 +5,8 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import { TableColumn } from '@/types/table' + const { t } = useI18n() // 国际化 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -20,6 +22,7 @@ const queryParams = { import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() const userDept = userStore.userSelfInfo.dept +const userDeptArray:any = [userDept] /** * @returns {Array} 制品上架申请主表 @@ -179,10 +182,19 @@ export const ProductputawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index 5247492ac..0095b2fb5 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -38,10 +38,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 制品收货申请主表 */ @@ -275,10 +277,19 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 1d2a61c59..e7a694d3a 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -22,6 +22,9 @@ import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/pro import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data"; +import * as BomApi from "@/api/wms/bom"; +import {getBalanceItemPage} from "@/api/wms/balance"; const { t } = useI18n() // 国际化 @@ -35,13 +38,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data"; -import * as BomApi from "@/api/wms/bom"; -import {getBalanceItemPage} from "@/api/wms/balance"; -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 制品返修申请主表 */ @@ -265,10 +267,19 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index a35409adc..1c1ce43d2 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -4,20 +4,6 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' - -const { t } = useI18n() // 国际化 - -// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 -const queryParams = { - pageSize:10, - pageNo:1, - code:'ProductScrapRequest' -} - const data = await getRequestsettingApi.getRequestsettingPage(queryParams) - const requestsettingData =data?.list[0]||{} - - // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; import * as WorkshopApi from "@/api/wms/workshop"; import {Team} from "@/views/wms/basicDataManage/orderManage/team/team.data"; @@ -39,8 +25,24 @@ import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/produ import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data"; import * as BomApi from "@/api/wms/bom"; -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept +const { t } = useI18n() // 国际化 + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize:10, + pageNo:1, + code:'ProductScrapRequest' +} + const data = await getRequestsettingApi.getRequestsettingPage(queryParams) + const requestsettingData =data?.list[0]||{} + + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 制品报废申请主表 @@ -286,14 +288,22 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, - { label: '最后更新时间', field: 'updateTime', diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts index 7f91ce727..1a5af3d42 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts @@ -11,6 +11,9 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su import { Warehouse } from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; import * as WarehouseApi from "@/api/wms/warehouse"; +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as LocationApi from '@/api/wms/location' + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { pageSize: 10, @@ -20,20 +23,12 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData = data?.list[0] || {} -// 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - -import * as PurchaseMainApi from '@/api/wms/purchaseMain' -import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' -import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain' -import { PurchasereceiptRecordMain } from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' -import * as ItembasicApi from '@/api/wms/itembasic' -import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' -import { PurchaseDetail, PurchaseMain } from '../../supplierdeliver/purchaseMain/purchaseMain.data' -import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' -import * as LocationApi from '@/api/wms/location' + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] /** * @returns {Array} 检验申请主表 @@ -302,10 +297,19 @@ export const InspectRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index 29f17f0ac..3766d6484 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -17,12 +17,16 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData =data?.list[0]||{} - // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { PurchaseDetail, PurchaseMain } from '../../supplierdeliver/purchaseMain/purchaseMain.data' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept + +// 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 采购收货申请主表 @@ -276,10 +280,19 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts index 0800c46e2..3bfc7cdfd 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts @@ -24,15 +24,12 @@ const queryParams = { const requestsettingData =data?.list[0]||{} // 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -import { - PurchaseDetail -} from "@/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data"; -import * as PurchaseDetailApi from "@/api/wms/purchaseDetail"; -import {getPurchasereceiptRecordDetailPage} from "@/api/wms/purchasereceiptRecordDetail"; -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 采购退货申请主表 */ @@ -272,10 +269,19 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts index 057f1910c..906c1cd73 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts @@ -33,12 +33,13 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData = data?.list[0] || {} -// 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -import { PurchaseDetail, PurchaseMain } from '../../supplierdeliver/purchaseMain/purchaseMain.data' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept - + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 上架申请主表 */ @@ -271,10 +272,19 @@ export const PutawayRequestMain = useCrudSchemas(reactive([ table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { - disabled: true + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 4f05d0507..a4923e7b5 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -24,10 +24,12 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData = data?.list[0] || {} -// 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] /** * @returns {Array} 供应商发货申请主表 @@ -325,10 +327,19 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } } }, diff --git a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts index 556b095a9..ca748404c 100644 --- a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts +++ b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts @@ -8,13 +8,15 @@ import { SupplierdeliverRecordMain, SupplierdeliverRecordDetail } from '@/views/ - const { t } = useI18n() // 国际化 -// 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 const queryParams = { @@ -145,14 +147,24 @@ export const PurchaseclaimRequestMain = useCrudSchemas(reactive([ { label: '部门', field: 'departmentCode', + sort: 'custom', + table: { + width: 150 + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value:userDept.name, - componentProps:{ - disabled:true, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } - }, - table: { - width: 100 } }, { diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 1e7b72830..0b92ceac9 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -17,10 +17,13 @@ const queryParams = { const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const requestsettingData = data?.list[0] || {} -// 获取当前操作人的部门 -import { useUserStore } from '@/store/modules/user' -const userStore = useUserStore() -const userDept = userStore.userSelfInfo.dept + // 获取当前操作人的部门 + import { useUserStore } from '@/store/modules/user' + import { TableColumn } from '@/types/table' + const userStore = useUserStore() + const userDept = userStore.userSelfInfo.dept + const userDeptArray:any = [userDept] + /** * @returns {Array} 供应商发票申请主表 @@ -129,12 +132,21 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( table: { width: 150 }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id === cellValue)?.name + }, form: { - value: userDept.name, + value: userDept.id, + component: 'Select', + api: () => userDeptArray, componentProps: { disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } } - }, + } }, { label: '状态',