From 5319d5b95497b5b546947ac340c14c71e5b54ca6 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 10 十二月 2025 09:57:58 +0800
Subject: [PATCH] 测试完成
---
src/views/patient/patient/index.vue | 362 ++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 308 insertions(+), 54 deletions(-)
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 270fb81..3092bca 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -73,20 +73,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <!-- <el-form-item label="鎮h�呰寖鍥�" prop="tagId">
+ <el-form-item label="鎮h�呮�у埆" prop="tagId">
<el-select
- v-model="queryParams.searchscope"
- placeholder="璇烽�夋嫨鎮h�呰寖鍥�"
+ v-model="queryParams.sex"
+ placeholder="璇烽�夋嫨鎮h�呮�у埆"
>
- <el-option
- v-for="item in source"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
+ <el-option label="鐢�" :value="1"> </el-option>
+ <el-option label="濂�" :value="2"> </el-option>
</el-select>
- </el-form-item> -->
+ </el-form-item>
+ <el-form-item label="鎮h�呭勾榫�" prop="telcode">
+ <el-input
+ v-model="queryParams.age"
+ placeholder="璇疯緭鍏ユ煡璇㈠勾榫�"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
<el-form-item label="鑱旂郴鐢佃瘽" prop="telcode">
<el-input
v-model="queryParams.telcode"
@@ -313,14 +315,14 @@
><i class="el-icon-edit"></i>鎮h�呰繃婊�</span
></el-button
>
- <!-- <el-button
+ <el-button
size="medium"
type="text"
- @click="Distributionservice(scope.row)"
+ @click="openContractDialog(scope.row)"
><span class="button-textxg"
- ><i class="el-icon-menu"></i>鏈嶅姟</span
+ ><i class="el-icon-menu"></i>鎮h�呯绾�</span
></el-button
- > -->
+ >
<!-- <el-button
size="medium"
type="text"
@@ -738,20 +740,123 @@
</div>
</el-dialog>
<!-- 璺宠浆鏈嶅姟瀵硅瘽妗� -->
- <el-dialog title="閫夋嫨鏈嶅姟绫诲瀷" :visible.sync="serviceVisible">
- <el-card class="box-card">
- <el-radio-group v-model="serviceradio">
- <el-radio :label="1">瀹f暀闅忚</el-radio>
- <el-radio :label="2">闂ㄨ瘖鏈嶅姟</el-radio>
- <el-radio :label="3">鍑洪櫌鏈嶅姟</el-radio>
- <el-radio :label="4">澶嶈瘖鏈嶅姟</el-radio>
- <el-radio :label="5">浣撴閫氱煡</el-radio>
- <el-radio :label="6">闂嵎鏈嶅姟</el-radio>
+ <!-- 绠�鍖栫増鎮h�呯绾﹀璇濇 -->
+ <el-dialog
+ title="鎮h�呯绾︽湇鍔�"
+ :visible.sync="contractDialogVisible"
+ width="600px"
+ >
+ <!-- 姝ラ鎸囩ず鍣� -->
+ <el-steps
+ :active="contractStep"
+ align-center
+ simple
+ style="margin-bottom: 20px"
+ >
+ <el-step title="閫夋嫨鏈嶅姟" icon="el-icon-document"></el-step>
+ <el-step title="纭绛剧害" icon="el-icon-finished"></el-step>
+ </el-steps>
+
+ <!-- 姝ラ1: 鏈嶅姟閫夋嫨 -->
+ <div v-if="contractStep === 1" class="step-content">
+ <h4>璇蜂负 {{ currentPatient.name }} 閫夋嫨绛剧害鏈嶅姟濂楅锛�</h4>
+
+ <el-radio-group
+ v-model="tempContractData.servicePackage"
+ style="width: 100%"
+ >
+ <el-row :gutter="16">
+ <el-col :span="8" v-for="pkg in servicePackages" :key="pkg.id">
+ <el-card
+ :class="[
+ 'package-card',
+ { active: tempContractData.servicePackage === pkg.id },
+ ]"
+ @click.native="tempContractData.servicePackage = pkg.id"
+ shadow="hover"
+ style="margin-bottom: 16px; cursor: pointer"
+ >
+ <div style="text-align: center">
+ <h4>{{ pkg.name }}</h4>
+ <p style="color: #666; font-size: 12px; margin: 8px 0">
+ {{ pkg.description }}
+ </p>
+ <p style="color: #e6a23c; font-weight: bold">
+ {{ pkg.price > 0 ? `楼${pkg.price}/骞碻 : "鍏嶈垂" }}
+ </p>
+ <el-tag
+ v-for="feature in pkg.features"
+ :key="feature"
+ size="mini"
+ style="margin: 2px"
+ type="info"
+ >{{ feature }}</el-tag
+ >
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
</el-radio-group>
- </el-card>
+
+ <el-form label-width="80px" style="margin-top: 20px">
+ <el-form-item label="绛剧害鍛ㄦ湡">
+ <el-select
+ v-model="tempContractData.contractPeriod"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option label="1骞�" :value="1"></el-option>
+ <el-option label="2骞�" :value="2"></el-option>
+ <el-option label="3骞�" :value="3"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="澶囨敞淇℃伅">
+ <el-input
+ type="textarea"
+ :rows="2"
+ v-model="tempContractData.remark"
+ placeholder="鍙~鍐欑壒娈婂仴搴烽渶姹傛垨澶囨敞淇℃伅"
+ ></el-input>
+ </el-form-item>
+ </el-form>
+ </div>
+
+ <!-- 姝ラ2: 绛剧害纭 -->
+ <div v-if="contractStep === 2" class="step-content">
+ <el-card>
+ <h4>绛剧害淇℃伅纭</h4>
+ <el-descriptions :column="1" border>
+ <el-descriptions-item label="鎮h�呭鍚�">{{
+ currentPatient.name
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鎮h�呯紪鍙�">{{
+ currentPatient.patientno
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鏈嶅姟濂楅">
+ {{ getSelectedPackage().name }}
+ </el-descriptions-item>
+ <el-descriptions-item label="绛剧害鍛ㄦ湡"
+ >{{ tempContractData.contractPeriod }}骞�</el-descriptions-item
+ >
+ <el-descriptions-item label="绛剧害鏃ユ湡">{{
+ new Date().toLocaleDateString()
+ }}</el-descriptions-item>
+ <el-descriptions-item label="澶囨敞淇℃伅">{{
+ tempContractData.remark || "鏃�"
+ }}</el-descriptions-item>
+ </el-descriptions>
+ </el-card>
+ </div>
+
<div slot="footer" class="dialog-footer">
- <el-button @click="serviceVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="CreateService">鍒涘缓鏈嶅姟</el-button>
+ <el-button @click="prevStep" v-if="contractStep > 1">涓婁竴姝�</el-button>
+ <el-button @click="closeContractDialog">鍙栨秷</el-button>
+ <el-button
+ type="primary"
+ @click="nextStep"
+ :disabled="contractStep === 1 && !tempContractData.servicePackage"
+ >
+ {{ contractStep === 2 ? "纭绛剧害" : "涓嬩竴姝�" }}
+ </el-button>
</div>
</el-dialog>
<!-- 椋庨櫓绫诲瀷 -->
@@ -846,20 +951,87 @@
serviceradio: 1,
distributeVisible: false,
RiskVisible: false,
- tasktopic: "5", //鏂板绫诲瀷
+ tasktopic: "2", //鏂板绫诲瀷
Riskradio: 1,
RiskObj: {},
// 鏌ヨ鍙傛暟
topqueryParams: {
pageNum: 1,
pageSize: 10,
+ type: 2,
userName: undefined,
tagid: undefined,
topic: undefined,
},
// 鏃ユ湡鑼冨洿
dateRange: [],
- taskoptions: [],
+ contractDialogVisible: false, // 鎺у埗绛剧害瀵硅瘽妗嗘樉绀�
+ contractStep: 1, // 绛剧害姝ラ锛�1-閫夋嫨鏈嶅姟 2-纭淇℃伅
+ currentPatient: {}, // 褰撳墠绛剧害鐨勬偅鑰呬俊鎭�
+ tempContractData: {
+ // 涓存椂瀛樺偍鐨勭绾︽暟鎹�
+ servicePackage: null, // 閫変腑鐨勬湇鍔″椁�
+ contractPeriod: 1, // 绛剧害鍛ㄦ湡锛堝勾锛�
+ remark: "", // 澶囨敞淇℃伅
+ },
+ // 妯℃嫙鏁版嵁锛氬彲閫夌殑绛剧害鏈嶅姟濂楅
+ servicePackages: [
+ {
+ id: 1,
+ name: "鍩虹鍋ュ悍绠$悊鍖�",
+ description: "鍖呭惈瀹氭湡鍋ュ悍璇勪及銆佸熀鏈挩璇�",
+ price: 0,
+ features: ["骞村害鍋ュ悍璇勪及", "鍦ㄧ嚎鍜ㄨ"],
+ },
+ {
+ id: 2,
+ name: "鎱㈡�х梾绠$悊鍖�",
+ description: "涓撲负鎱㈡�х梾鎮h�呰璁�",
+ price: 299,
+ features: ["涓撳睘鍖荤敓", "鐢ㄨ嵂鎻愰啋", "瀹氭湡闅忚"],
+ },
+ {
+ id: 3,
+ name: "鑰佸勾浜哄仴搴峰寘",
+ description: "鍏虫敞鑰佸勾浜哄仴搴烽棶棰�",
+ price: 499,
+ features: ["璺屽�掗闄╄瘎浼�", "搴峰鎸囧", "绱ф�ヨ仈绯�"],
+ },
+ ],
+ taskoptions: [
+ // {
+ // value: "1",
+ // label: "鐩戞祴璇勪及",
+ // },
+ {
+ value: "2",
+ label: "鍑洪櫌闅忚",
+ },
+ {
+ value: "3",
+ label: "闂ㄨ瘖闅忚",
+ },
+ {
+ value: "4",
+ label: "瀹f暀鍏虫��",
+ },
+ {
+ value: "5",
+ label: "澶嶈瘖绠$悊",
+ },
+ // {
+ // value: "6",
+ // label: "婊℃剰搴﹁皟鏌�",
+ // },
+ {
+ value: "7",
+ label: "鎮h�呮姤鍛�",
+ },
+ {
+ value: "8",
+ label: "鍏朵粬閫氱煡",
+ },
+ ],
paperstypes: [
{ papersname: "韬唤璇�" },
{ papersname: "鎶ょ収" },
@@ -970,6 +1142,7 @@
queryParams: {
pageNum: 1,
allhosp: "0",
+ sex: 1,
pageSize: 10,
searchscope: 2,
notrequiredFlag: 0,
@@ -1031,8 +1204,12 @@
created() {
this.getList();
this.gettabList();
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
//鑾峰彇宸茬瓫閫夊悗鐨勫彲閫変换鍔$被鍨�
- this.taskoptions = store.getters.Serviceauthority;
},
methods: {
/** 鏌ヨ鎮h�呭垪琛� */
@@ -1090,8 +1267,76 @@
this.loading = false;
});
},
- Distributionservice(row) {
- this.serviceVisible = true;
+ openContractDialog(row) {
+ this.currentPatient = { ...row }; // 璁剧疆褰撳墠鎮h��
+ this.contractDialogVisible = true;
+ this.contractStep = 1;
+ // 閲嶇疆琛ㄥ崟鏁版嵁
+ this.tempContractData = {
+ servicePackage: null,
+ contractPeriod: 1,
+ remark: "",
+ };
+ },
+ // 涓嬩竴姝ユ搷浣�
+ nextStep() {
+ if (this.contractStep < 2) {
+ this.contractStep++;
+ } else {
+ this.submitContract();
+ }
+ },
+
+ // 涓婁竴姝ユ搷浣�
+ prevStep() {
+ if (this.contractStep > 1) {
+ this.contractStep--;
+ }
+ },
+ // 鑾峰彇閫変腑鐨勬湇鍔″椁愪俊鎭�
+ getSelectedPackage() {
+ return (
+ this.servicePackages.find(
+ (pkg) => pkg.id === this.tempContractData.servicePackage
+ ) || {}
+ );
+ },
+
+ // 妯℃嫙鎻愪氦绛剧害淇℃伅
+ submitContract() {
+ // 杩欓噷鏄墠绔ā鎷熸搷浣滐紝瀹為檯寮�鍙戜腑搴旈�氳繃API鎻愪氦鏁版嵁
+ const contractInfo = {
+ patientId: this.currentPatient.id,
+ patientName: this.currentPatient.name,
+ package: this.getSelectedPackage(),
+ period: this.tempContractData.contractPeriod,
+ signDate: new Date().toISOString().split("T")[0],
+ remark: this.tempContractData.remark,
+ };
+
+ console.log("妯℃嫙绛剧害鏁版嵁:", contractInfo);
+
+ // 妯℃嫙鎴愬姛鎻愮ず
+ this.$message.success(
+ `宸叉垚鍔熶负 ${this.currentPatient.name} 绛剧害 ${
+ this.getSelectedPackage().name
+ }`
+ );
+
+ // 鍏抽棴瀵硅瘽妗�
+ this.closeContractDialog();
+
+ // 鍙互鍦ㄨ繖閲岃Е鍙戝叾浠栨搷浣滐紝濡傚埛鏂版偅鑰呭垪琛ㄧ瓑
+ },
+ // 鍏抽棴瀵硅瘽妗嗗苟閲嶇疆鐘舵��
+ closeContractDialog() {
+ this.contractDialogVisible = false;
+ this.contractStep = 1;
+ this.tempContractData = {
+ servicePackage: null,
+ contractPeriod: 1,
+ remark: "",
+ };
},
RiskMarker(row) {
this.RiskVisible = true;
@@ -1131,7 +1376,7 @@
pageSize: 10,
searchscope: 2,
};
- this.handleQuery();
+ this.handleQuery();
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
@@ -1148,12 +1393,12 @@
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- const userIds = row.id || this.ids;
- particularpatient(userIds).then((response) => {
- this.form = response.data;
- });
- this.amendtag = true;
- this.Labelchange = true;
+ // const userIds = row.id || this.ids;
+ // particularpatient(userIds).then((response) => {
+ // this.form = response.data;
+ // });
+ // this.amendtag = true;
+ // this.Labelchange = true;
},
//淇敼/鏂板鎮h��
submitForm() {
@@ -1223,23 +1468,20 @@
},
distribute() {
this.distributeVisible = true;
- if (this.tasktopic == 1) {
- this.topqueryParams.type = 3;
- } else if (this.tasktopic == 2) {
- this.topqueryParams.type = 1;
- } else if (this.tasktopic == 3) {
- this.topqueryParams.type = 1;
- } else if (this.tasktopic == 4) {
- this.topqueryParams.type = 1;
+ if (
+ this.tasktopic == 2 ||
+ this.tasktopic == 3 ||
+ this.tasktopic == 1 ||
+ this.tasktopic == 7 ||
+ this.tasktopic == 6
+ ) {
+ this.topqueryParams.type = "2";
+ } else if (this.tasktopic == 4 || this.tasktopic == 8) {
+ this.topqueryParams.type = "3";
} else if (this.tasktopic == 5) {
- this.topqueryParams.type = 1;
- } else if (this.tasktopic == 6) {
- this.topqueryParams.type = 2;
+ this.topqueryParams.type = "1";
}
- this.topqueryParams.typename = this.findLabelByValue(
- this.taskoptions,
- this.tasktopic
- );
+ this.topqueryParams.serviceType = Number(this.tasktopic);
getTasklist(this.topqueryParams).then((response) => {
this.taskuserList = response.rows;
this.tasktotal = response.total;
@@ -1345,6 +1587,18 @@
display: center !important;
}
}
+.package-card.active {
+ border-color: #409EFF;
+ background-color: #f0f9ff;
+}
+
+.step-content {
+ min-height: 300px;
+}
+
+.dialog-footer {
+ text-align: right;
+}
.preview-left {
margin: 20px;
// margin: 20px;
--
Gitblit v1.9.3