diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index ced9da32c..46de378c8 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -123,4 +123,9 @@ export const exportSupplierinvoiceRequestDetail = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) -} \ No newline at end of file +} + +// 根据角色编码获取用户列表 +export const queryUserInfoByRoleCode = async (params) => { + return await request.get({ url: `/wms/supplierinvoice-request-main/queryUserInfoByRoleCode`, params }) +} diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index b66207815..80ce64aa3 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -3,6 +3,7 @@ import { dateFormatter } from '@/utils/formatTime' import { accountantFormart } from '@/utils/formatter' import * as SupplierApi from '@/api/wms/supplier' +import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' const { t } = useI18n() // 国际化 @@ -27,6 +28,29 @@ const requestsettingData = data?.list[0] || {} userDept.id = userDept.id.toString() const userDeptArray:any = [userDept] +/** + * @returns {Array} 采购员列表 + */ +export const PurchaseMemberInfo = useCrudSchemas(reactive([ + { + label: '用户编号', + field: 'id' + }, + { + label: '用户名称', + field: 'username', + table: { + width: 180, + }, + }, + { + label: '用户昵称', + field: 'nickname', + table: { + width: 180, + }, + } +])) /** * @returns {Array} 采购订单或者采购退货单 @@ -481,14 +505,30 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( }, }, { - label: '采购审批人', + label: '采购员', field: 'procurementCreator', sort: 'custom', sortTableDefault:1003, table: { width: 150 }, - isForm: false, + isForm: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择采购员', // 输入框占位文本 + searchField: 'id', // 查询弹窗赋值字段 + searchTitle: '采购员信息', // 查询弹窗标题 + searchAllSchemas: PurchaseMemberInfo.allSchemas, // 查询弹窗所需类 + searchPage: SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'roleCode', // 查询列表中字段 + value: 'purchase', // 指查询具体值 + isMainValue: false // 表示查询条件不是主表的字段的值 + }] + } + } }, { label: '采购审批时间', @@ -709,6 +749,9 @@ export const SupplierinvoiceRequestMainRules = reactive({ remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], + procurementCreator: [ + { required: true, message: '请选择采购员', trigger: 'change' } + ], })