From c80bc467a41daa6cbae4e5515a300a8ca98cfeaa Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 七月 2026 15:44:01 +0800
Subject: [PATCH] 维护
---
pagesSub/case/transferinfo.vue | 129 +++++++++++++++++++++++++++++--------------
1 files changed, 87 insertions(+), 42 deletions(-)
diff --git a/pagesSub/case/transferinfo.vue b/pagesSub/case/transferinfo.vue
index 54ffe7e..ee18393 100644
--- a/pagesSub/case/transferinfo.vue
+++ b/pagesSub/case/transferinfo.vue
@@ -76,24 +76,26 @@
/>
</view>
+ <!-- 鍑哄彂鏃堕棿 -->
<view class="form-item">
<text class="item-label required">鍑哄彂鏃堕棿</text>
- <u-input
- v-model="transportData.transportStartTime"
- placeholder="璇烽�夋嫨鍑哄彂鏃堕棿"
- readonly
- border="none"
- :disabled="!isEdit"
+ <view
+ class="picker-trigger"
@click="isEdit && (showTimePicker = true)"
- :customStyle="inputStyle(!transportData.transportStartTime)"
>
- <template #suffix v-if="isEdit">
- <u-icon name="arrow-down" color="#86868b"></u-icon>
- </template>
- </u-input>
+ <text>{{
+ transportData.transportStartTime || "璇烽�夋嫨鍑哄彂鏃堕棿"
+ }}</text>
+ <up-icon
+ v-if="isEdit"
+ name="arrow-down"
+ size="16"
+ color="#999"
+ ></up-icon>
+ </view>
</view>
- <view class="form-item">
+ <!-- <view class="form-item">
<text class="item-label">杞繍鐘舵��</text>
<view
class="picker-trigger"
@@ -103,14 +105,14 @@
<text>{{
getTransportStatusText(transportData.transitStatus)
}}</text>
- <u-icon
+ <up-icon
v-if="isEdit"
name="arrow-down"
size="16"
color="#999"
- ></u-icon>
+ ></up-icon>
</view>
- </view>
+ </view> -->
<view class="form-item">
<text class="item-label required">璐熻矗鍗忚皟鍛�</text>
@@ -156,16 +158,16 @@
<view class="form-grid">
<view class="form-item">
- <text class="item-label">鎬ヨ瘖绉戝尰鐢�</text>
+ <text class="item-label">鍑鸿瘖鍖荤敓</text>
<u-input
v-model="transportData.doctor"
- placeholder="璇疯緭鍏ユ�ヨ瘖绉戝尰鐢�"
+ placeholder="璇疯緭鍏ュ嚭璇婂尰鐢�"
border="none"
:readonly="!isEdit"
/>
</view>
- <view class="form-item">
+ <!-- <view class="form-item">
<text class="item-label">鍖荤敓鐢佃瘽</text>
<u-input
v-model="transportData.doctorPhone"
@@ -174,28 +176,28 @@
border="none"
:readonly="!isEdit"
/>
- </view>
+ </view> -->
<view class="form-item">
- <text class="item-label">鎶ゅ+</text>
+ <text class="item-label">鍑鸿瘖鎶ゅ+</text>
<u-input
v-model="transportData.nurse"
- placeholder="璇疯緭鍏ユ姢澹鍚�"
+ placeholder="璇疯緭鍏ュ嚭璇婃姢澹鍚�"
border="none"
:readonly="!isEdit"
/>
</view>
- <view class="form-item">
- <text class="item-label">鎶ゅ+鐢佃瘽</text>
+ <!-- <view class="form-item">
+ <text class="item-label">鍑鸿瘖鎶ゅ+鐢佃瘽</text>
<u-input
v-model="transportData.nursePhone"
- placeholder="璇疯緭鍏ユ姢澹墜鏈哄彿"
+ placeholder="璇疯緭鍏ュ嚭璇婃姢澹墜鏈哄彿"
type="number"
border="none"
:readonly="!isEdit"
/>
- </view>
+ </view> -->
<view class="form-item">
<text class="item-label">椹鹃┒鍛�</text>
@@ -207,7 +209,7 @@
/>
</view>
- <view class="form-item">
+ <!-- <view class="form-item">
<text class="item-label">椹鹃┒鍛樼數璇�</text>
<u-input
v-model="transportData.driverPhone"
@@ -216,7 +218,7 @@
border="none"
:readonly="!isEdit"
/>
- </view>
+ </view> -->
<view class="form-item">
<text class="item-label">ICU璇勪及鍖荤敓</text>
@@ -339,7 +341,7 @@
</template>
<script setup>
-import { ref, computed, onMounted,watch } from "vue";
+import { ref, computed, onMounted, watch } from "vue";
import attachmentUpload from "@/components/attachment";
import { useUserStore } from "@/stores/user";
@@ -502,6 +504,15 @@
const initNewTransport = async (caseId, caseNo) => {
try {
// 濡傛灉鏈夋渚婭D锛屽姞杞芥渚嬩俊鎭�
+ // 鏂板鏃堕粯璁ゅ~褰撳墠鏃堕棿
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+ transportData.value.transportStartTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
if (caseId) {
const res = await uni.$uapi.get(
`/project/donatebaseinforeport/getInfo/${caseId}`,
@@ -583,19 +594,13 @@
// 鏃堕棿纭
const onTimeConfirm = (e) => {
const date = new Date(e.value);
- // 娣诲姞绉掔殑閮ㄥ垎
- transportData.value.transportStartTime = `${date.getFullYear()}-${(
- date.getMonth() + 1
- )
- .toString()
- .padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")} ${date
- .getHours()
- .toString()
- .padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date
- .getSeconds()
- .toString()
- .padStart(2, "0")}`; // 娣诲姞绉�
-
+ transportData.value.transportStartTime = `${date.getFullYear()}-${String(
+ date.getMonth() + 1,
+ ).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String(
+ date.getHours(),
+ ).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}:${String(
+ date.getSeconds(),
+ ).padStart(2, "0")}`;
showTimePicker.value = false;
};
@@ -693,7 +698,7 @@
res = await uni.$uapi.post("/project/transport/edit", submitData);
} else {
// 鏂板
- submitData.createBy = "绉诲姩绔敤鎴�";
+ submitData.transitStatus = 2;
res = await uni.$uapi.post("/project/transport/add", submitData);
}
@@ -791,6 +796,46 @@
if (res.code === 200) {
uni.showToast({ title: `${actionName}鎴愬姛`, icon: "success" });
+
+ // 濡傛灉鏄畬鎴愯浆杩愶紙鐘舵�佸彉涓�3锛夛紝鍚屾鏇存柊妗堜緥鐘舵��
+ if (newStatus === 3) {
+ try {
+ // 鑾峰彇杞繍鍗曞搴旂殑涓婃姤妗堜緥ID
+ const reportId = transportData.value.reportId;
+
+ if (reportId) {
+ // 鑾峰彇妗堜緥璇︽儏
+ const caseRes = await uni.$uapi.get(
+ `/project/donatebaseinforeport/getInfo/${reportId}`,
+ );
+
+ if (caseRes && caseRes.data) {
+ const caseData = caseRes.data;
+ caseData.isDonate = 1; // 鏍囪涓哄凡鎹愮尞
+
+ const editRes = await uni.$uapi.post(
+ "/project/donatebaseinforeport/edit",
+ caseData,
+ );
+
+ if (editRes && editRes.code == 200) {
+ uni.showToast({
+ title: "瀵瑰簲涓婃姤妗堜緥宸茶繘鍏ユ寮忔渚嬫祦绋�",
+ icon: "success",
+ });
+ }
+ }
+ }
+ } catch (caseError) {
+ console.error("鏇存柊妗堜緥鐘舵�佸け璐�:", caseError);
+ // 涓嶉樆鏂富娴佺▼锛屽彧鎻愮ず
+ uni.showToast({
+ title: "妗堜緥鐘舵�佹洿鏂板け璐ワ紝璇疯仈绯荤鐞嗗憳",
+ icon: "none",
+ });
+ }
+ }
+
await loadTransportData(transportId.value);
} else {
throw new Error(res.msg || `${actionName}澶辫触`);
--
Gitblit v1.9.3