From ae478a3d5dab28dd598d39f27429e4a544b15ad2 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期四, 25 十二月 2025 22:48:06 +0800
Subject: [PATCH] feat:已完成时,检查附件是否上传
---
app/pagesTask/create-emergency.vue | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/app/pagesTask/create-emergency.vue b/app/pagesTask/create-emergency.vue
index 146f013..8d590d5 100644
--- a/app/pagesTask/create-emergency.vue
+++ b/app/pagesTask/create-emergency.vue
@@ -266,7 +266,7 @@
import { mapState } from 'vuex'
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue'
-import { addTask } from "@/api/task"
+import { addTask, checkTaskDuplicate } from "@/api/task"
import { listAvailableVehicles, getUserBoundVehicle } from "@/api/vehicle"
import { searchHospitals, searchHospitalsByDeptRegion } from "@/api/hospital"
import DepartureSelector from './components/DepartureSelector.vue'
@@ -909,6 +909,38 @@
return
}
+ // 鑾峰彇褰撳墠鏃ユ湡锛堟牸寮廦YYY-MM-DD锛�
+ const today = new Date()
+ const createDate = today.getFullYear() + '-' +
+ String(today.getMonth() + 1).padStart(2, '0') + '-' +
+ String(today.getDate()).padStart(2, '0')
+ const phone = this.taskForm.patient.phone
+
+ // 鍏堟鏌ユ槸鍚﹂噸澶�
+ uni.showLoading({
+ title: '妫�鏌ヤ腑...'
+ })
+
+ checkTaskDuplicate(phone, createDate).then(response => {
+ uni.hideLoading()
+
+ // 濡傛灉鎺ュ彛杩斿洖閿欒锛岃鏄庡瓨鍦ㄩ噸澶�
+ if (response.code !== 200) {
+ this.$modal.showToast(response.msg || '璇ヨ仈绯荤數璇濆湪褰撳ぉ宸叉湁浠诲姟锛屼笉鑳介噸澶嶆彁浜�')
+ return
+ }
+
+ // 妫�鏌ラ�氳繃锛岀户缁彁浜�
+ this.doSubmitTask()
+ }).catch(error => {
+ uni.hideLoading()
+ console.error('閲嶅鎬ф鏌ュけ璐�:', error)
+ this.$modal.showToast('妫�鏌ュけ璐ワ紝璇烽噸璇�')
+ })
+ },
+
+ // 鎵ц瀹為檯鐨勬彁浜ゆ搷浣�
+ doSubmitTask() {
this.$modal.confirm('纭畾瑕佷繚瀛樹换鍔″悧锛�').then(() => {
this.loading = true
const submitData = this.buildSubmitData()
--
Gitblit v1.9.1