✨ 新增应收账单按角色和客户归属的行级数据权限
This commit is contained in:
@@ -36,6 +36,11 @@ import { listCustomer, listCustomerOption } from '@/api/customersuppliermanageme
|
||||
import { listSupplier } from '@/api/customersuppliermanagement/supplierinfo/supplier.js'
|
||||
|
||||
const props = defineProps({
|
||||
// 业务页面可传入专用选项接口,默认行为保持不变。
|
||||
fetchOptions: {
|
||||
type: Function,
|
||||
default: undefined
|
||||
},
|
||||
// 单选时为 String/Number;multiple 时为数组
|
||||
modelValue: {
|
||||
type: [String, Number, Array],
|
||||
@@ -143,9 +148,9 @@ const displayOptions = computed(() => {
|
||||
function fetchList(keyword = '') {
|
||||
if (!props.remoteSearch && loaded.value) return Promise.resolve(options.value)
|
||||
loading.value = true
|
||||
const api = !isCustomer.value
|
||||
const api = props.fetchOptions || (!isCustomer.value
|
||||
? listSupplier
|
||||
: (props.optionSelect ? listCustomerOption : listCustomer)
|
||||
: (props.optionSelect ? listCustomerOption : listCustomer))
|
||||
const currentRequest = ++requestSerial
|
||||
const query = String(keyword || '').trim()
|
||||
return api({
|
||||
|
||||
Reference in New Issue
Block a user