|
@@ -1,7 +1,7 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { useRoute } from 'vue-router';
|
|
import { useRoute } from 'vue-router';
|
|
|
import { ref, computed, nextTick, h, watch, onMounted } from 'vue';
|
|
import { ref, computed, nextTick, h, watch, onMounted } from 'vue';
|
|
|
-import { MinusCircleOutlined, EyeOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
|
+import { MinusCircleOutlined, EyeOutlined, DashOutlined } from '@ant-design/icons-vue';
|
|
|
import { notification } from 'ant-design-vue';
|
|
import { notification } from 'ant-design-vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
import type { OpenConditioningSchemeModel, SystemCwModel } from '@/model/care.model';
|
|
import type { OpenConditioningSchemeModel, SystemCwModel } from '@/model/care.model';
|
|
@@ -59,9 +59,13 @@ const form = reactive<FollowModel>({
|
|
|
},
|
|
},
|
|
|
items: [],
|
|
items: [],
|
|
|
provinceName: '',
|
|
provinceName: '',
|
|
|
|
|
+ provinceCode: '',
|
|
|
cityName: '',
|
|
cityName: '',
|
|
|
- districtName: '',
|
|
|
|
|
|
|
+ cityCode: '',
|
|
|
|
|
+ // districtName: '',
|
|
|
|
|
+ // districtCode: '',
|
|
|
areaName: '',
|
|
areaName: '',
|
|
|
|
|
+ areaCode: '',
|
|
|
detailAddress: '',
|
|
detailAddress: '',
|
|
|
phone: '',
|
|
phone: '',
|
|
|
progress: '0',
|
|
progress: '0',
|
|
@@ -147,15 +151,16 @@ async function getCpRecordDetail(id: string) {
|
|
|
form.estimatedEndDate = res?.estimatedEndDate;
|
|
form.estimatedEndDate = res?.estimatedEndDate;
|
|
|
form.provinceName = res?.provinceName;
|
|
form.provinceName = res?.provinceName;
|
|
|
form.cityName = res?.cityName;
|
|
form.cityName = res?.cityName;
|
|
|
- form.districtName = res?.districtName;
|
|
|
|
|
form.areaName = res?.areaName;
|
|
form.areaName = res?.areaName;
|
|
|
form.detailAddress = res?.detailAddress;
|
|
form.detailAddress = res?.detailAddress;
|
|
|
form.phone = res?.phone;
|
|
form.phone = res?.phone;
|
|
|
form.healthAnalysisReport = res.healthAnalysisReport;
|
|
form.healthAnalysisReport = res.healthAnalysisReport;
|
|
|
|
|
+ selectedProvince.value=res.provinceCode;
|
|
|
|
|
+ selectedCity.value=res.cityCode;
|
|
|
|
|
+ selectedArea.value=res.areaCode
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
async function getPatientList(id: string) {
|
|
async function getPatientList(id: string) {
|
|
|
- console.log(id, '切换');
|
|
|
|
|
if (id) {
|
|
if (id) {
|
|
|
getCpDetail(id);
|
|
getCpDetail(id);
|
|
|
loadTags(id);
|
|
loadTags(id);
|
|
@@ -212,14 +217,17 @@ async function selectPatient(item: any) {
|
|
|
// 清空服务包选择
|
|
// 清空服务包选择
|
|
|
selectedPackage.value = '';
|
|
selectedPackage.value = '';
|
|
|
currentSelectedPackage.value = null;
|
|
currentSelectedPackage.value = null;
|
|
|
-}
|
|
|
|
|
|
|
+ btnType.value=''
|
|
|
|
|
|
|
|
|
|
+}
|
|
|
|
|
+const btnType = ref('');
|
|
|
// 打开调养记录
|
|
// 打开调养记录
|
|
|
-function openRecord(item: any) {
|
|
|
|
|
|
|
+async function openRecord(item: any) {
|
|
|
const type = 'record';
|
|
const type = 'record';
|
|
|
|
|
+ const title = '调养方案';
|
|
|
VxeUI.modal.open({
|
|
VxeUI.modal.open({
|
|
|
id: 'servicePackageDetail-modal',
|
|
id: 'servicePackageDetail-modal',
|
|
|
- title: '调养记录',
|
|
|
|
|
|
|
+ title: '服务包详情',
|
|
|
height: 700,
|
|
height: 700,
|
|
|
width: 1200,
|
|
width: 1200,
|
|
|
escClosable: true,
|
|
escClosable: true,
|
|
@@ -227,7 +235,24 @@ function openRecord(item: any) {
|
|
|
slots: {
|
|
slots: {
|
|
|
default() {
|
|
default() {
|
|
|
return h(ServicePackageDetail, <any>{
|
|
return h(ServicePackageDetail, <any>{
|
|
|
- data: { ...item, type },
|
|
|
|
|
|
|
+ data: { ...item, type,title },
|
|
|
|
|
+ async onSubmit(data: SystemCwModel) {
|
|
|
|
|
+ form.conditioningWrapName = data?.conditioningWrapName;
|
|
|
|
|
+ selectedProvince.value = data?.provinceCode;
|
|
|
|
|
+ selectedCity.value = data?.cityCode;
|
|
|
|
|
+ selectedArea.value = data?.areaCode;
|
|
|
|
|
+ form.detailAddress = data?.detailAddress;
|
|
|
|
|
+ form.phone = data?.phone;
|
|
|
|
|
+ btnType.value = data?.btnType;
|
|
|
|
|
+ formData.items = data.items;
|
|
|
|
|
+ // 获取省份
|
|
|
|
|
+ await loadProvinces();
|
|
|
|
|
+ // 获取城市
|
|
|
|
|
+ loadCities('', data?.provinceCode);
|
|
|
|
|
+ // 获取区域
|
|
|
|
|
+ await loadAreas('', data?.cityCode);
|
|
|
|
|
+ // VxeUI.modal.close('servicePackageDetail-modal');
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
@@ -309,7 +334,6 @@ const displayTableData = computed(() => {
|
|
|
const isShowDelivery = ref<boolean>(false);
|
|
const isShowDelivery = ref<boolean>(false);
|
|
|
// 监听 displayTableData 的变化
|
|
// 监听 displayTableData 的变化
|
|
|
watch(displayTableData, (newValue, oldValue) => {
|
|
watch(displayTableData, (newValue, oldValue) => {
|
|
|
- console.log('displayTableData 变化了:', newValue);
|
|
|
|
|
if (newValue.length > 0) {
|
|
if (newValue.length > 0) {
|
|
|
isShowDelivery.value = newValue.some((item) => {
|
|
isShowDelivery.value = newValue.some((item) => {
|
|
|
return item.conditioningProgramDetail?.isDelivery === 'Y';
|
|
return item.conditioningProgramDetail?.isDelivery === 'Y';
|
|
@@ -481,13 +505,7 @@ const allProjects = ref<
|
|
|
effect?: string;
|
|
effect?: string;
|
|
|
}>
|
|
}>
|
|
|
>([]);
|
|
>([]);
|
|
|
-const {
|
|
|
|
|
- loading: projectLoading,
|
|
|
|
|
- onSuccess,
|
|
|
|
|
- refresh,
|
|
|
|
|
- remove,
|
|
|
|
|
-} = usePagination(() => getCpContentListMethod(), {
|
|
|
|
|
- initialData: { data: [], total: 0 },
|
|
|
|
|
|
|
+const { loading: projectLoading, onSuccess } = useRequest(() => getCpContentListMethod(), {
|
|
|
immediate: true,
|
|
immediate: true,
|
|
|
});
|
|
});
|
|
|
onSuccess(({ data }) => {
|
|
onSuccess(({ data }) => {
|
|
@@ -632,10 +650,19 @@ async function loadAreas(name: string, citycode: string) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleProvinceChange(value: string) {
|
|
function handleProvinceChange(value: string) {
|
|
|
|
|
+ if (btnType.value === '转方案') {
|
|
|
|
|
+ selectedCity.value = '';
|
|
|
|
|
+ selectedArea.value = '';
|
|
|
|
|
+ form.cityCode = '';
|
|
|
|
|
+ form.areaCode = '';
|
|
|
|
|
+ form.detailAddress=''
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
selectedProvince.value = value;
|
|
selectedProvince.value = value;
|
|
|
const selectedProvinceOption = provinceOptions.value.find((p) => p.value === value);
|
|
const selectedProvinceOption = provinceOptions.value.find((p) => p.value === value);
|
|
|
form.provinceName = selectedProvinceOption?.label || '';
|
|
form.provinceName = selectedProvinceOption?.label || '';
|
|
|
-
|
|
|
|
|
|
|
+ form.provinceCode = selectedProvinceOption?.value || '';
|
|
|
|
|
+ // 获取城市
|
|
|
loadCities(selectedProvinceOption?.name, value);
|
|
loadCities(selectedProvinceOption?.name, value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -643,13 +670,23 @@ function handleCityChange(value: string) {
|
|
|
selectedCity.value = value;
|
|
selectedCity.value = value;
|
|
|
const selectedCityOption = cityOptions.value.find((c) => c.value === value);
|
|
const selectedCityOption = cityOptions.value.find((c) => c.value === value);
|
|
|
form.cityName = selectedCityOption?.label || '';
|
|
form.cityName = selectedCityOption?.label || '';
|
|
|
|
|
+ form.cityCode = selectedCityOption?.value || '';
|
|
|
|
|
+ if (btnType.value === '转方案') {
|
|
|
|
|
+ selectedArea.value = '';
|
|
|
|
|
+ form.areaCode = '';
|
|
|
|
|
+ form.detailAddress=''
|
|
|
|
|
+ }
|
|
|
loadAreas(selectedCityOption?.name, value);
|
|
loadAreas(selectedCityOption?.name, value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleAreaChange(value: string) {
|
|
function handleAreaChange(value: string) {
|
|
|
selectedArea.value = value;
|
|
selectedArea.value = value;
|
|
|
const selectedAreaOption = areaOptions.value.find((a) => a.value === value);
|
|
const selectedAreaOption = areaOptions.value.find((a) => a.value === value);
|
|
|
- form.districtName = selectedAreaOption?.label || '';
|
|
|
|
|
|
|
+ form.areaName = selectedAreaOption?.label || '';
|
|
|
|
|
+ form.areaCode = selectedAreaOption?.value || '';
|
|
|
|
|
+ if (btnType.value === '转方案') {
|
|
|
|
|
+ form.detailAddress=''
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
interface PatientInfo {
|
|
interface PatientInfo {
|
|
@@ -791,7 +828,7 @@ watch(showProjectPopover, (val) => {
|
|
|
<!-- 服务包内容表格 -->
|
|
<!-- 服务包内容表格 -->
|
|
|
<div class="table-section">
|
|
<div class="table-section">
|
|
|
<div class="table-title">服务包内容</div>
|
|
<div class="table-title">服务包内容</div>
|
|
|
- <vxe-table :data="displayTableData" border style="margin-top: 8px">
|
|
|
|
|
|
|
+ <vxe-table :data="displayTableData" border style="margin-top: 8px" max-height="380px">
|
|
|
<vxe-column width="60" title="">
|
|
<vxe-column width="60" title="">
|
|
|
<template #default="{ rowIndex }">
|
|
<template #default="{ rowIndex }">
|
|
|
<a-button type="text" danger @click="removeTableRow(rowIndex)" :disabled="rowIndex === displayTableData.length - 1">
|
|
<a-button type="text" danger @click="removeTableRow(rowIndex)" :disabled="rowIndex === displayTableData.length - 1">
|
|
@@ -832,7 +869,7 @@ watch(showProjectPopover, (val) => {
|
|
|
<vxe-column field="days" title="周期" width="120">
|
|
<vxe-column field="days" title="周期" width="120">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div style="display: flex; align-items: center">
|
|
<div style="display: flex; align-items: center">
|
|
|
- <a-input v-model:value="row.days" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' ? true : false" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.days" @change="() => calculateCount(row)" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -841,9 +878,9 @@ watch(showProjectPopover, (val) => {
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div style="display: flex; align-items: center">
|
|
<div style="display: flex; align-items: center">
|
|
|
<span>每</span>
|
|
<span>每</span>
|
|
|
- <a-input v-model:value="row.frequencyType" style="width: 60px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' ? true : false" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.frequencyType" style="width: 60px" @change="() => calculateCount(row)" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
- <a-input v-model:value="row.frequencyMeasure" style="width: 60px" @change="() => calculateCount(row)" :disabled="currentPatient?.status === '0' ? true : false" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.frequencyMeasure" style="width: 60px" @change="() => calculateCount(row)" />
|
|
|
<span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.pricingUnit }}</span>
|
|
<span>{{ row.conditioningProgramDetail?.cpFixedPricingRule?.pricingUnit }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -877,7 +914,7 @@ watch(showProjectPopover, (val) => {
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div style="display: flex; align-items: center">
|
|
<div style="display: flex; align-items: center">
|
|
|
<span>调养开始第</span>
|
|
<span>调养开始第</span>
|
|
|
- <a-input v-model:value="row.initialDay" style="width: 80px" :disabled="currentPatient?.status === '0' ? true : false" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.initialDay" style="width: 80px" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -901,7 +938,7 @@ watch(showProjectPopover, (val) => {
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
<vxe-column field="remark" title="说明" width="180">
|
|
<vxe-column field="remark" title="说明" width="180">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
- <a-input v-model:value="row.remark" style="width: 120px" :disabled="currentPatient?.status === '0' ? true : false" />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.remark" style="width: 120px" />
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
</vxe-table>
|
|
@@ -913,7 +950,7 @@ watch(showProjectPopover, (val) => {
|
|
|
<!-- 调养日期 -->
|
|
<!-- 调养日期 -->
|
|
|
<div class="delivery-row">
|
|
<div class="delivery-row">
|
|
|
<span>开始调养日期:</span>
|
|
<span>开始调养日期:</span>
|
|
|
- <span v-if="currentPatient?.status === '0'">
|
|
|
|
|
|
|
+ <span v-if="currentPatient?.status === '0' && btnType !== '转方案'">
|
|
|
{{ form.estimatedStartDate }}
|
|
{{ form.estimatedStartDate }}
|
|
|
</span>
|
|
</span>
|
|
|
<span v-else>
|
|
<span v-else>
|
|
@@ -927,7 +964,15 @@ watch(showProjectPopover, (val) => {
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 配送信息 -->
|
|
<!-- 配送信息 -->
|
|
|
<div class="delivery-row" v-if="isShowDelivery">
|
|
<div class="delivery-row" v-if="isShowDelivery">
|
|
|
- <div v-if="!form.progress || currentPatient?.status === '1'">
|
|
|
|
|
|
|
+ <div v-if="(btnType !== '转方案' && currentPatient?.status === '0')">
|
|
|
|
|
+ <a-checkbox v-model:checked="deliveryChecked" disabled>配送</a-checkbox>
|
|
|
|
|
+ <span>地址:</span>
|
|
|
|
|
+ <span>{{ form.provinceName }}{{ form.cityName }}{{ form.areaName }}{{ form.detailAddress }}</span>
|
|
|
|
|
+ <span style="margin-left: 16px" v-if="form.phone">电话:</span>
|
|
|
|
|
+ <span>{{ form.phone }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <div v-if="!form.progress || currentPatient?.status === '1'"> -->
|
|
|
|
|
+ <div v-else>
|
|
|
<a-checkbox v-model:checked="deliveryChecked">配送</a-checkbox>
|
|
<a-checkbox v-model:checked="deliveryChecked">配送</a-checkbox>
|
|
|
<template v-if="deliveryChecked">
|
|
<template v-if="deliveryChecked">
|
|
|
<span>地址:</span>
|
|
<span>地址:</span>
|
|
@@ -953,13 +998,6 @@ watch(showProjectPopover, (val) => {
|
|
|
<a-input v-model:value="form.phone" placeholder="请输入" style="width: 120px" />
|
|
<a-input v-model:value="form.phone" placeholder="请输入" style="width: 120px" />
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-else>
|
|
|
|
|
- <a-checkbox v-model:checked="deliveryChecked" disabled>配送</a-checkbox>
|
|
|
|
|
- <span>地址:</span>
|
|
|
|
|
- <span>{{ form.provinceName }}{{ form.cityName }}{{ form.districtName }}{{ form.detailAddress }}</span>
|
|
|
|
|
- <span style="margin-left: 16px" v-if="form.phone">电话:</span>
|
|
|
|
|
- <span>{{ form.phone }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
@@ -975,7 +1013,6 @@ watch(showProjectPopover, (val) => {
|
|
|
<div class="right-panel">
|
|
<div class="right-panel">
|
|
|
<PatientTagWidget
|
|
<PatientTagWidget
|
|
|
style="min-height: 112px; flex: none"
|
|
style="min-height: 112px; flex: none"
|
|
|
- :style="{ height: `${height}px` }"
|
|
|
|
|
:dataset="tags"
|
|
:dataset="tags"
|
|
|
editable
|
|
editable
|
|
|
@refresh="loadTags(currentPatient.patientId)"
|
|
@refresh="loadTags(currentPatient.patientId)"
|