From 4fdde57a837b47b0a04aa17a7627c21b7425eda2 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期五, 26 十二月 2025 23:25:11 +0800
Subject: [PATCH] feat: 优化取消时,调度单中显示原因
---
app/pagesTask/create-emergency.vue | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/app/pagesTask/create-emergency.vue b/app/pagesTask/create-emergency.vue
index 8d590d5..d3db251 100644
--- a/app/pagesTask/create-emergency.vue
+++ b/app/pagesTask/create-emergency.vue
@@ -567,11 +567,7 @@
console.log('杞嚭鍖婚櫌鍙樺寲:', hospitalData)
// 缁勪欢宸茬粡閫氳繃 v-model 鏇存柊浜� taskForm.hospitalOut
- // 濡傛灉閫夋嫨鐨勬槸"瀹朵腑"锛岃嚜鍔ㄨ缃瀹や负"鍏跺畠"
- if (hospitalData.name === '瀹朵腑') {
- this.taskForm.hospitalOut.department = '鍏跺畠'
- this.taskForm.hospitalOut.departmentId = null
- }
+ // 绉戝鐨勮缃敱 DepartmentSelector 缁勪欢鑷姩澶勭悊锛堥�氳繃 isHome 灞炴�э級
// 濡傛灉杞叆鍦板潃宸插~鍐�,鑷姩璁$畻璺濈
if (this.taskForm.hospitalIn.address) {
@@ -597,11 +593,7 @@
console.log('杞叆鍖婚櫌鍙樺寲:', hospitalData)
// 缁勪欢宸茬粡閫氳繃 v-model 鏇存柊浜� taskForm.hospitalIn
- // 濡傛灉閫夋嫨鐨勬槸"瀹朵腑"锛岃嚜鍔ㄨ缃瀹や负"鍏跺畠"
- if (hospitalData.name === '瀹朵腑') {
- this.taskForm.hospitalIn.department = '鍏跺畠'
- this.taskForm.hospitalIn.departmentId = null
- }
+ // 绉戝鐨勮缃敱 DepartmentSelector 缁勪欢鑷姩澶勭悊锛堥�氳繃 isHome 灞炴�э級
// 濡傛灉杞嚭鍦板潃宸插~鍐�,鑷姩璁$畻璺濈
if (this.taskForm.hospitalOut.address) {
@@ -813,6 +805,18 @@
return false
}
+ // 濡傛灉杞叆鍖婚櫌鏄�滃涓�濓紝蹇呴』濉啓鍦板潃
+ if (this.taskForm.hospitalIn.name === '瀹朵腑' && !this.taskForm.hospitalIn.address) {
+ this.$modal.showToast('璇疯緭鍏ヨ浆鍏ュ湴鍧�锛堝涓級')
+ return false
+ }
+
+ // 濡傛灉杞嚭鍖婚櫌鏄�滃涓�濓紝蹇呴』濉啓鍦板潃
+ if (this.taskForm.hospitalOut.name === '瀹朵腑' && !this.taskForm.hospitalOut.address) {
+ this.$modal.showToast('璇疯緭鍏ヨ浆鍑哄湴鍧�锛堝涓級')
+ return false
+ }
+
if (!this.taskForm.transferDistance) {
this.$modal.showToast('璇疯緭鍏ヨ浆杩愬叕閲屾暟')
return false
@@ -846,6 +850,10 @@
conditionText = this.taskForm.patient.condition
}
}
+
+ // 璋冭瘯鏃ュ織锛氭鏌ヨ浆鍏ュ尰闄㈠湴鍧�
+ console.log('鏋勫缓鎻愪氦鏁版嵁 - 杞叆鍖婚櫌:', this.taskForm.hospitalIn.name)
+ console.log('鏋勫缓鎻愪氦鏁版嵁 - 杞叆鍖婚櫌鍦板潃:', this.taskForm.hospitalIn.address)
const submitData = {
taskType: 'EMERGENCY_TRANSFER',
@@ -908,8 +916,11 @@
if (!this.validateForm()) {
return
}
-
- // 鑾峰彇褰撳墠鏃ユ湡锛堟牸寮廦YYY-MM-DD锛�
+ this.doSubmitTask();
+
+ },
+ checkTaskDp(){
+ // 鑾峰彇褰撳墠鏃ユ湡锛堟牸寮廦YYY-MM-DD锛�
const today = new Date()
const createDate = today.getFullYear() + '-' +
String(today.getMonth() + 1).padStart(2, '0') + '-' +
@@ -938,7 +949,6 @@
this.$modal.showToast('妫�鏌ュけ璐ワ紝璇烽噸璇�')
})
},
-
// 鎵ц瀹為檯鐨勬彁浜ゆ搷浣�
doSubmitTask() {
this.$modal.confirm('纭畾瑕佷繚瀛樹换鍔″悧锛�').then(() => {
--
Gitblit v1.9.1