|
@@ -2,6 +2,7 @@
|
|
|
import { ref, watch, reactive, onMounted, h, computed } from 'vue';
|
|
import { ref, watch, reactive, onMounted, h, computed } from 'vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
import { PlusOutlined } from '@ant-design/icons-vue'; // 确保导入
|
|
import { PlusOutlined } from '@ant-design/icons-vue'; // 确保导入
|
|
|
|
|
+import { notification } from 'ant-design-vue';
|
|
|
import VxeUI from 'vxe-table';
|
|
import VxeUI from 'vxe-table';
|
|
|
import { useRequest } from 'alova/client';
|
|
import { useRequest } from 'alova/client';
|
|
|
import { getDictionaryMethod, cpMedicinesMethod } from '@/request/api/dictionary.api';
|
|
import { getDictionaryMethod, cpMedicinesMethod } from '@/request/api/dictionary.api';
|
|
@@ -137,9 +138,12 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
|
|
|
} else {
|
|
} else {
|
|
|
if (items.offlineCPTypes?.includes(newType[0])) {
|
|
if (items.offlineCPTypes?.includes(newType[0])) {
|
|
|
form.isOffline = 'Y';
|
|
form.isOffline = 'Y';
|
|
|
|
|
+
|
|
|
return false;
|
|
return false;
|
|
|
} else if (items.onlineCPTypes?.includes(newType[0])) {
|
|
} else if (items.onlineCPTypes?.includes(newType[0])) {
|
|
|
form.isOffline = 'N';
|
|
form.isOffline = 'N';
|
|
|
|
|
+ // 线上项目 显示配送选项
|
|
|
|
|
+ isShowDelivery.value = true;
|
|
|
return false;
|
|
return false;
|
|
|
} else {
|
|
} else {
|
|
|
form.isOffline = null;
|
|
form.isOffline = null;
|
|
@@ -176,6 +180,17 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
|
|
|
deliverArr.value = [];
|
|
deliverArr.value = [];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 线上项目 显示配送选项
|
|
|
|
|
+ if (newOffline === 'N') {
|
|
|
|
|
+ isShowDelivery.value = true;
|
|
|
|
|
+ deliverArr.value = [newDelivery];
|
|
|
|
|
+ if (deliverArr.value.length > 1) {
|
|
|
|
|
+ deliverArr.value = [deliverArr.value[deliverArr.value.length - 1]];
|
|
|
|
|
+ } else if (deliverArr.value.length === 0) {
|
|
|
|
|
+ deliverArr.value = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
isShowOnline.value = false;
|
|
isShowOnline.value = false;
|
|
@@ -187,6 +202,7 @@ function getisOffline(e: any, newOffline: any, newDelivery: any, newType: any) {
|
|
|
watch(
|
|
watch(
|
|
|
[() => form.conditioningProgramType, () => form.institutionId, () => form.conditioningProgramSupplierId, () => form.isOffline, () => form.isDelivery],
|
|
[() => form.conditioningProgramType, () => form.institutionId, () => form.conditioningProgramSupplierId, () => form.isOffline, () => form.isDelivery],
|
|
|
([newType, newInstitutionId, newSupplierId, newOffline, newDelivery]) => {
|
|
([newType, newInstitutionId, newSupplierId, newOffline, newDelivery]) => {
|
|
|
|
|
+
|
|
|
getSupplier({
|
|
getSupplier({
|
|
|
conditioningProgramTypes: newType ? [newType] : form.conditioningProgramType ? [form.conditioningProgramType] : [],
|
|
conditioningProgramTypes: newType ? [newType] : form.conditioningProgramType ? [form.conditioningProgramType] : [],
|
|
|
collaborateDeptId: newInstitutionId ? newInstitutionId : form.institutionId ? form.institutionId : '',
|
|
collaborateDeptId: newInstitutionId ? newInstitutionId : form.institutionId ? form.institutionId : '',
|
|
@@ -314,6 +330,9 @@ function doSubmit() {
|
|
|
if (hasDerivationLogic.value && derivationData.value.cpPatientMatchRule) {
|
|
if (hasDerivationLogic.value && derivationData.value.cpPatientMatchRule) {
|
|
|
form.cpPatientMatchRule = { ...derivationData.value.cpPatientMatchRule };
|
|
form.cpPatientMatchRule = { ...derivationData.value.cpPatientMatchRule };
|
|
|
}
|
|
}
|
|
|
|
|
+ if (props.data.isType === 'itemsList') {
|
|
|
|
|
+ delete form.id;
|
|
|
|
|
+ }
|
|
|
submit(form);
|
|
submit(form);
|
|
|
})
|
|
})
|
|
|
.catch((error: any) => {
|
|
.catch((error: any) => {
|
|
@@ -402,11 +421,9 @@ onMounted(async () => {
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if (props.data.addType === 'itemsList' && props.data.sourceId) {
|
|
|
|
|
|
|
+ if (props.data.isType === 'itemsList' && props.data.sourceId) {
|
|
|
form.sourceId = form.id;
|
|
form.sourceId = form.id;
|
|
|
form.institutionId = '';
|
|
form.institutionId = '';
|
|
|
- delete form.id;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 获取方案类型
|
|
// 获取方案类型
|
|
@@ -608,6 +625,7 @@ watch(
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
function bindchange(e: any) {
|
|
function bindchange(e: any) {
|
|
|
|
|
+ console.log(e, 'e==>');
|
|
|
form.conditioningProgramSupplierId = '';
|
|
form.conditioningProgramSupplierId = '';
|
|
|
form.isOffline = null;
|
|
form.isOffline = null;
|
|
|
}
|
|
}
|
|
@@ -699,7 +717,6 @@ function handleDerivation() {
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
allowClear
|
|
allowClear
|
|
|
:loading="typeOptionsLoading"
|
|
:loading="typeOptionsLoading"
|
|
|
- :disabled="typeOptions.length === 0"
|
|
|
|
|
@change="bindchange"
|
|
@change="bindchange"
|
|
|
/>
|
|
/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -961,6 +978,7 @@ function handleDerivation() {
|
|
|
allow-clear
|
|
allow-clear
|
|
|
tree-default-expand-all
|
|
tree-default-expand-all
|
|
|
:tree-data="branch"
|
|
:tree-data="branch"
|
|
|
|
|
+ :loading="branchLoading"
|
|
|
@select="handleSelect"
|
|
@select="handleSelect"
|
|
|
></a-tree-select>
|
|
></a-tree-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|