|
@@ -46,6 +46,7 @@ const { loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data })
|
|
|
branch.value = to(data);
|
|
branch.value = to(data);
|
|
|
});
|
|
});
|
|
|
const form = reactive<SystemModel>({
|
|
const form = reactive<SystemModel>({
|
|
|
|
|
+ institutionName: '',
|
|
|
conditioningProgramType: '',
|
|
conditioningProgramType: '',
|
|
|
conditioningProgramSupplierId: '',
|
|
conditioningProgramSupplierId: '',
|
|
|
institutionId: '',
|
|
institutionId: '',
|
|
@@ -94,14 +95,12 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
|
|
|
let filterSupplierArr = supplierArr.value.filter((item: any) => item.id === e);
|
|
let filterSupplierArr = supplierArr.value.filter((item: any) => item.id === e);
|
|
|
if (filterSupplierArr.length > 0) {
|
|
if (filterSupplierArr.length > 0) {
|
|
|
isShowOnline.value = filterSupplierArr.every((items: any) => {
|
|
isShowOnline.value = filterSupplierArr.every((items: any) => {
|
|
|
- console.log(items, 'filterSupplierArr');
|
|
|
|
|
if (newType.length > 0) {
|
|
if (newType.length > 0) {
|
|
|
return items.offlineCPTypes?.includes(newType[0]) && items.onlineCPTypes?.includes(newType[0]);
|
|
return items.offlineCPTypes?.includes(newType[0]) && items.onlineCPTypes?.includes(newType[0]);
|
|
|
} else {
|
|
} else {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- console.log(isShowOnline.value, 'isShowOnline2222');
|
|
|
|
|
if (isShowOnline.value) {
|
|
if (isShowOnline.value) {
|
|
|
if (newOffline) {
|
|
if (newOffline) {
|
|
|
onlineArr.value = [newOffline];
|
|
onlineArr.value = [newOffline];
|
|
@@ -135,7 +134,6 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
|
|
|
onlineArr.value = [];
|
|
onlineArr.value = [];
|
|
|
deliverArr.value = [];
|
|
deliverArr.value = [];
|
|
|
}
|
|
}
|
|
|
- console.log(isShowOnline.value, 'isShowOnline');
|
|
|
|
|
}
|
|
}
|
|
|
watch(
|
|
watch(
|
|
|
[() => form.conditioningProgramType, () => form.institutionId, () => form.conditioningProgramSupplierId, () => form.isOffline, () => form.isDelivery],
|
|
[() => form.conditioningProgramType, () => form.institutionId, () => form.conditioningProgramSupplierId, () => form.isOffline, () => form.isDelivery],
|
|
@@ -169,6 +167,7 @@ function doSubmit() {
|
|
|
formRef.value
|
|
formRef.value
|
|
|
?.validate()
|
|
?.validate()
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
|
|
+
|
|
|
form.photo = fileList.value[0]?.response?.url || '';
|
|
form.photo = fileList.value[0]?.response?.url || '';
|
|
|
submit(form);
|
|
submit(form);
|
|
|
})
|
|
})
|
|
@@ -295,6 +294,7 @@ function getConditioningProgramSupplier(value: any) {
|
|
|
}
|
|
}
|
|
|
function handleSelect(value: string, node: any, extra: any) {
|
|
function handleSelect(value: string, node: any, extra: any) {
|
|
|
form.institutionId = value;
|
|
form.institutionId = value;
|
|
|
|
|
+ form.institutionName = node.label;
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|