|
@@ -25,7 +25,7 @@
|
|
|
import { companyAdd, companyUpdate } from '/@/api/customer';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
import { uploadApi } from '/@/api/product/index';
|
|
|
- import { getByRyId, addAuth } from '/@/api/operate';
|
|
|
+ import { getByRyId, addAuth, checkAuthOtherApi } from '/@/api/operate';
|
|
|
import { useModalInner } from '/@/components/Modal';
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
@@ -220,11 +220,13 @@
|
|
|
|
|
|
onMounted(() => {});
|
|
|
let addListFunc = () => {};
|
|
|
- const [register, { closeModal }] = useModalInner((data) => {
|
|
|
+ const [register, { closeModal }] = useModalInner(async (data) => {
|
|
|
onSearch('');
|
|
|
+ let checkAuthOther = await checkAuthOtherApi({ num: data.num });
|
|
|
if (data) {
|
|
|
title.value = data.id ? '编辑授权' : '新增授权';
|
|
|
modelRef.value = data.id ? true : false;
|
|
|
+ console.log('checkAuthOther', checkAuthOther);
|
|
|
setFieldsValue({
|
|
|
...data,
|
|
|
isEmpower:[data.canAuthLook?0:'',data.canEditLook?1:'']
|
|
@@ -234,6 +236,7 @@
|
|
|
}
|
|
|
updateSchema([
|
|
|
{ field: 'isEmpower', ifShow: data.isAuthor == 1 },
|
|
|
+ { field: 'isAuthor', componentProps: { disabled: !checkAuthOther} },
|
|
|
{ field: 'editEndTime', ifShow: data.editAuth == 2 },
|
|
|
{ field: 'lookEndTime', ifShow: data.lookAuth == 2 },
|
|
|
]);
|