Browse Source

HL-5399 供应商发票申请-切换账号-采购价格审批人的下拉选项列表数据没更新

hella_online_20240819
wangyufei 4 months ago
parent
commit
c017050282
  1. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  2. 5
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -1401,6 +1401,14 @@ const getLoginUserRoleList = async () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(async item=>{
if(item.field == 'procurementCreator'){
//
const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' })
item.componentProps.options = procurementCreators.list
}
})
getList() getList()
getDefaultSupplier() getDefaultSupplier()
getLoginUserRoleList() getLoginUserRoleList()

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

@ -29,7 +29,7 @@ const requestsettingData = data?.list[0] || {}
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray:any = [userDept]
const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) // const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' })
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -809,8 +809,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isDetail:false, isDetail:false,
form: { form: {
component: 'Select', component: 'Select',
api: () => procurementCreators.list, // api: () => procurementCreators.list,
componentProps: { componentProps: {
options:[],
optionsAlias: { optionsAlias: {
labelField: 'nickname', labelField: 'nickname',
valueField: 'id' valueField: 'id'

Loading…
Cancel
Save