Browse Source

角色字段增加

master_hella_20240701
zhaoxuebing 7 months ago
parent
commit
94607246fc
  1. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  2. 47
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

5
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -124,3 +124,8 @@ export const exportSupplierinvoiceRequestDetail = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' })
} }
// 根据角色编码获取用户列表
export const queryUserInfoByRoleCode = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-main/queryUserInfoByRoleCode`, params })
}

47
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -3,6 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
import { accountantFormart } from '@/utils/formatter' import { accountantFormart } from '@/utils/formatter'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -27,6 +28,29 @@ const requestsettingData = data?.list[0] || {}
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray:any = [userDept]
/**
* @returns {Array}
*/
export const PurchaseMemberInfo = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '用户编号',
field: 'id'
},
{
label: '用户名称',
field: 'username',
table: {
width: 180,
},
},
{
label: '用户昵称',
field: 'nickname',
table: {
width: 180,
},
}
]))
/** /**
* @returns {Array} 退 * @returns {Array} 退
@ -481,14 +505,30 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
}, },
{ {
label: '采购审批人', label: '采购',
field: 'procurementCreator', field: 'procurementCreator',
sort: 'custom', sort: 'custom',
sortTableDefault:1003, sortTableDefault:1003,
table: { table: {
width: 150 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: '采购审批时间', label: '采购审批时间',
@ -709,6 +749,9 @@ export const SupplierinvoiceRequestMainRules = reactive({
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
procurementCreator: [
{ required: true, message: '请选择采购员', trigger: 'change' }
],
}) })

Loading…
Cancel
Save