|
@@ -202,6 +202,7 @@ const clientNameStr = ref('');
|
|
|
const { proxy } = getCurrentInstance(); //访问this
|
|
const { proxy } = getCurrentInstance(); //访问this
|
|
|
const parentOrganizationAdditionHql = ref('');
|
|
const parentOrganizationAdditionHql = ref('');
|
|
|
const parentFieldValue = ref({});
|
|
const parentFieldValue = ref({});
|
|
|
|
|
+const clients = ref([]);
|
|
|
const parentOrganizationFieldValue = ref({
|
|
const parentOrganizationFieldValue = ref({
|
|
|
displayValue: [],
|
|
displayValue: [],
|
|
|
fieldType: 'Key',
|
|
fieldType: 'Key',
|
|
@@ -217,10 +218,13 @@ onMounted(() => {
|
|
|
});
|
|
});
|
|
|
// 获取公司名称id
|
|
// 获取公司名称id
|
|
|
const getComponyInfo = () => {
|
|
const getComponyInfo = () => {
|
|
|
|
|
+ companies.value = [];
|
|
|
getCompony().then(
|
|
getCompony().then(
|
|
|
success => {
|
|
success => {
|
|
|
if (success.errorCode == 0) {
|
|
if (success.errorCode == 0) {
|
|
|
- companies.value = success.datas;
|
|
|
|
|
|
|
+ if(success.datas && success.datas.length >0){
|
|
|
|
|
+ getALLClient(success.datas);
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
message.error(success.errorMessage);
|
|
message.error(success.errorMessage);
|
|
|
}
|
|
}
|
|
@@ -230,7 +234,15 @@ const getComponyInfo = () => {
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+// 展示子公司数据
|
|
|
|
|
+const getALLClient = datas => {
|
|
|
|
|
+ datas.forEach(item =>{
|
|
|
|
|
+ companies.value.push({id:item.id,name:item.name});
|
|
|
|
|
+ if(item.childrenClients && item.childrenClients.length >0){
|
|
|
|
|
+ getALLClient(item.childrenClients);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
// 编辑公司(获取公司信息)
|
|
// 编辑公司(获取公司信息)
|
|
|
const editClient = () => {
|
|
const editClient = () => {
|
|
|
if (clientNameStr.value) {
|
|
if (clientNameStr.value) {
|