From f670b79094c95d791fc43c8fc8b5858ebf8426dc Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 17 九月 2026 13:50:29 +0800
Subject: [PATCH] 一些向web对齐

---
 src/pages/cooperativeOffice/collaborativeApproval/detail.vue |  585 +++++++++++++++++++++-------------------------------------
 1 files changed, 212 insertions(+), 373 deletions(-)

diff --git a/src/pages/cooperativeOffice/collaborativeApproval/detail.vue b/src/pages/cooperativeOffice/collaborativeApproval/detail.vue
index 16f9923..1c9eb5f 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/detail.vue
+++ b/src/pages/cooperativeOffice/collaborativeApproval/detail.vue
@@ -8,39 +8,38 @@
             :rules="rules"
             :model="form"
             label-width="140rpx">
-      <template v-if="operationType !== 'detail'">
-        <u-form-item prop="approveReason"
-                     label="娴佺▼缂栧彿">
-          <u-input v-model="form.approveId"
-                   disabled
-                   placeholder="鑷姩缂栧彿" />
-        </u-form-item>
-        <u-form-item prop="approveReason"
-                     :label="approveType === 5 ? '閲囪喘浜嬬敱' : '鐢宠浜嬬敱'"
-                     required>
-          <u-input v-model="form.approveReason"
-                   type="textarea"
-                   rows="2"
-                   auto-height
-                   maxlength="200"
-                   :placeholder="approveType === 5 ? '璇疯緭鍏ラ噰璐簨鐢�' : '璇疯緭鍏ョ敵璇蜂簨鐢�'"
-                   show-word-limit />
-        </u-form-item>
-        <u-form-item prop="approveDeptName"
-                     label="鐢宠閮ㄩ棬"
-                     required>
-          <!-- <u-input v-model="form.approveDeptName"
-                 placeholder="璇烽�夋嫨鐢宠閮ㄩ棬" /> -->
-          <u-input v-model="form.approveDeptName"
-                   readonly
-                   placeholder="璇烽�夋嫨鐢宠閮ㄩ棬"
-                   @click="showPicker = true" />
-          <template #right>
-            <up-icon name="arrow-right"
-                     @click="showPicker = true"></up-icon>
-          </template>
-        </u-form-item>
-        <!-- <u-form-item prop="approveUser"
+      <u-form-item prop="approveReason"
+                   label="娴佺▼缂栧彿">
+        <u-input v-model="form.approveId"
+                 disabled
+                 placeholder="鑷姩缂栧彿" />
+      </u-form-item>
+      <u-form-item prop="approveReason"
+                   :label="approveType === 5 ? '閲囪喘浜嬬敱' : '鐢宠浜嬬敱'"
+                   required>
+        <u-input v-model="form.approveReason"
+                 type="textarea"
+                 rows="2"
+                 auto-height
+                 maxlength="200"
+                 :disabled="isDetailMode"
+                 :placeholder="approveType === 5 ? '璇疯緭鍏ラ噰璐簨鐢�' : '璇疯緭鍏ョ敵璇蜂簨鐢�'"
+                 show-word-limit />
+      </u-form-item>
+      <u-form-item prop="approveDeptName"
+                   label="鐢宠閮ㄩ棬"
+                   required>
+        <u-input v-model="form.approveDeptName"
+                 readonly
+                 :disabled="isDetailMode"
+                 placeholder="璇烽�夋嫨鐢宠閮ㄩ棬"
+                 @click="isDetailMode || (showPicker = true)" />
+        <template #right>
+          <up-icon name="arrow-right"
+                   @click="isDetailMode || (showPicker = true)"></up-icon>
+        </template>
+      </u-form-item>
+      <!-- <u-form-item prop="approveUser"
                    label="鐢宠浜�"
                    required>
         <u-input v-model="form.approveUserName"
@@ -59,228 +58,91 @@
                    @click="showDatePicker"></up-icon>
         </template>
       </u-form-item> -->
-        <!-- approveType=2 璇峰亣鐩稿叧瀛楁 -->
-        <template v-if="approveType === 2">
-          <u-form-item prop="startDate"
-                       label="寮�濮嬫椂闂�"
-                       required>
-            <u-input v-model="form.startDate"
-                     readonly
-                     placeholder="璇峰亣寮�濮嬫椂闂�"
-                     @click="showStartDatePicker" />
-            <template #right>
-              <up-icon name="arrow-right"
-                       @click="showStartDatePicker"></up-icon>
-            </template>
-          </u-form-item>
-          <u-form-item prop="endDate"
-                       label="缁撴潫鏃堕棿"
-                       required>
-            <u-input v-model="form.endDate"
-                     readonly
-                     placeholder="璇峰亣缁撴潫鏃堕棿"
-                     @click="showEndDatePicker" />
-            <template #right>
-              <up-icon name="arrow-right"
-                       @click="showEndDatePicker"></up-icon>
-            </template>
-          </u-form-item>
+      <!-- approveType=2 璇峰亣鐩稿叧瀛楁 -->
+      <u-form-item v-if="approveType === 2"
+                   prop="startDate"
+                   label="寮�濮嬫椂闂�"
+                   required>
+        <u-input v-model="form.startDate"
+                 readonly
+                 :disabled="isDetailMode"
+                 placeholder="璇峰亣寮�濮嬫椂闂�"
+                 @click="showStartDatePicker" />
+        <template #right>
+          <up-icon name="arrow-right"
+                   @click="showStartDatePicker"></up-icon>
         </template>
-        <!-- approveType=3 鍑哄樊鐩稿叧瀛楁 -->
-        <u-form-item v-if="approveType === 3"
-                     prop="location"
-                     label="鍑哄樊鍦扮偣"
-                     required>
-          <u-input v-model="form.location"
-                   placeholder="璇疯緭鍏ュ嚭宸湴鐐�"
-                   clearable />
-        </u-form-item>
-        <!-- approveType=4 鎶ラ攢鐩稿叧瀛楁 -->
-        <u-form-item v-if="approveType === 4"
-                     prop="price"
-                     label="鎶ラ攢閲戦"
-                     required>
-          <u-input v-model="form.price"
-                   type="number"
-                   placeholder="璇疯緭鍏ユ姤閿�閲戦"
-                   clearable />
-        </u-form-item>
-      </template>
-      <!-- 鎶ヤ环瀹℃壒璇︽儏 -->
-      <view v-if="isQuotationApproval"
-            style="margin: 20rpx 0;">
-        <u-divider text="鎶ヤ环璇︽儏"
-                   text-size="28rpx"
-                   color="#2979ff"></u-divider>
-        <u-skeleton :loading="quotationLoading"
-                    rows="3"
-                    animated>
-          <view v-if="!currentQuotation || !currentQuotation.quotationNo"
-                style="padding: 40rpx; text-align: center; color: #999;">
-            鏈煡璇㈠埌瀵瑰簲鎶ヤ环璇︽儏
-          </view>
-          <view v-else>
-            <u-cell-group :border="false">
-              <u-cell title="鎶ヤ环鍗曞彿"
-                      :value="currentQuotation.quotationNo"></u-cell>
-              <u-cell title="瀹㈡埛鍚嶇О"
-                      :value="currentQuotation.customer"></u-cell>
-              <u-cell title="涓氬姟鍛�"
-                      :value="currentQuotation.salesperson"></u-cell>
-              <u-cell title="鎶ヤ环鏃ユ湡"
-                      :value="currentQuotation.quotationDate"></u-cell>
-              <u-cell title="鏈夋晥鏈熻嚦"
-                      :value="currentQuotation.validDate"></u-cell>
-              <u-cell title="浠樻鏂瑰紡"
-                      :value="currentQuotation.paymentMethod"></u-cell>
-              <u-cell title="鎶ヤ环鎬婚">
-                <template #value>
-                  <text style="font-size: 32rpx; color: #e6a23c; font-weight: bold;">
-                    楼{{ Number(currentQuotation.totalAmount ?? 0).toFixed(2) }}
-                  </text>
-                </template>
-              </u-cell>
-            </u-cell-group>
-            <view style="margin-top: 20rpx; padding: 0 30rpx;">
-              <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">浜у搧鏄庣粏</view>
-              <view v-for="(item, index) in (currentQuotation.products || [])"
-                    :key="index"
-                    style="background: #f8f8f8; border-radius: 8rpx; padding: 20rpx; margin-bottom: 10rpx;">
-                <view style="display: flex; justify-content: space-between;">
-                  <text style="font-weight: bold;">{{ item.product }}</text>
-                  <text style="color: #e6a23c;">楼{{ Number(item.unitPrice ?? 0).toFixed(2) }}</text>
-                </view>
-                <view style="font-size: 24rpx; color: #666; margin-top: 10rpx;">
-                  瑙勬牸: {{ item.specification }} | 鍗曚綅: {{ item.unit }}
-                </view>
-              </view>
-            </view>
-            <view v-if="currentQuotation.remark"
-                  style="margin-top: 20rpx; padding: 0 30rpx;">
-              <view style="font-size: 28rpx; font-weight: bold;">澶囨敞</view>
-              <view style="font-size: 26rpx; color: #666; margin-top: 10rpx;">{{ currentQuotation.remark }}</view>
-            </view>
-          </view>
-        </u-skeleton>
-      </view>
-      <!-- 閲囪喘瀹℃壒璇︽儏 -->
-      <view v-if="isPurchaseApproval"
-            style="margin: 20rpx 0;">
-        <u-divider text="閲囪喘璇︽儏"
-                   text-size="28rpx"
-                   color="#2979ff"></u-divider>
-        <u-skeleton :loading="purchaseLoading"
-                    rows="3"
-                    animated>
-          <view v-if="!currentPurchase || !currentPurchase.purchaseContractNumber"
-                style="padding: 40rpx; text-align: center; color: #999;">
-            鏈煡璇㈠埌瀵瑰簲閲囪喘璇︽儏
-          </view>
-          <view v-else>
-            <u-cell-group :border="false">
-              <u-cell title="閲囪喘鍚堝悓鍙�"
-                      :value="currentPurchase.purchaseContractNumber"></u-cell>
-              <u-cell title="渚涘簲鍟嗗悕绉�"
-                      :value="currentPurchase.supplierName"></u-cell>
-              <u-cell title="椤圭洰鍚嶇О"
-                      :value="currentPurchase.projectName"></u-cell>
-              <u-cell title="閿�鍞悎鍚屽彿"
-                      :value="currentPurchase.salesContractNo"></u-cell>
-              <u-cell title="绛捐鏃ユ湡"
-                      :value="currentPurchase.executionDate"></u-cell>
-              <u-cell title="褰曞叆鏃ユ湡"
-                      :value="currentPurchase.entryDate"></u-cell>
-              <u-cell title="浠樻鏂瑰紡"
-                      :value="currentPurchase.paymentMethod"></u-cell>
-              <u-cell title="鍚堝悓閲戦">
-                <template #value>
-                  <text style="font-size: 32rpx; color: #e6a23c; font-weight: bold;">
-                    楼{{ Number(currentPurchase.contractAmount ?? 0).toFixed(2) }}
-                  </text>
-                </template>
-              </u-cell>
-            </u-cell-group>
-            <view style="margin-top: 20rpx; padding: 0 30rpx;">
-              <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">浜у搧鏄庣粏</view>
-              <view v-for="(item, index) in (currentPurchase.productData || [])"
-                    :key="index"
-                    style="background: #f8f8f8; border-radius: 8rpx; padding: 20rpx; margin-bottom: 10rpx;">
-                <view style="display: flex; justify-content: space-between;">
-                  <text style="font-weight: bold;">{{ item.productCategory }}</text>
-                  <text style="color: #e6a23c;">楼{{ Number(item.taxInclusiveTotalPrice ?? 0).toFixed(2) }}</text>
-                </view>
-                <view style="font-size: 24rpx; color: #666; margin-top: 10rpx;">
-                  瑙勬牸: {{ item.specificationModel }} | 鏁伴噺: {{ item.quantity }} {{ item.unit }}
-                </view>
-                <view style="font-size: 24rpx; color: #999; margin-top: 4rpx;">
-                  鍚◣鍗曚环: 楼{{ Number(item.taxInclusiveUnitPrice ?? 0).toFixed(2) }}
-                </view>
-              </view>
-            </view>
-          </view>
-        </u-skeleton>
-      </view>
-      <!-- 鍙戣揣瀹℃壒璇︽儏 -->
-      <view v-if="isDeliveryApproval"
-            style="margin: 20rpx 0;">
-        <u-divider text="鍙戣揣璇︽儏"
-                   text-size="28rpx"
-                   color="#2979ff"></u-divider>
-        <u-skeleton :loading="deliveryLoading"
-                    rows="3"
-                    animated>
-          <view v-if="!currentDelivery || !currentDelivery.shippingInfo"
-                style="padding: 40rpx; text-align: center; color: #999;">
-            鏈煡璇㈠埌瀵瑰簲鍙戣揣璇︽儏
-          </view>
-          <view v-else>
-            <u-cell-group :border="false">
-              <u-cell title="閿�鍞鍗�"
-                      :value="currentDelivery.shippingInfo.salesContractNo || '--'"></u-cell>
-              <u-cell title="鍙戣揣璁㈠崟鍙�"
-                      :value="currentDelivery.shippingInfo.shippingNo || '--'"></u-cell>
-              <u-cell title="瀹㈡埛鍚嶇О"
-                      :value="currentDelivery.shippingInfo.customerName || '--'"></u-cell>
-              <u-cell title="鍙戣揣绫诲瀷"
-                      :value="currentDelivery.shippingInfo.type || '--'"></u-cell>
-              <u-cell title="鍙戣揣鏃ユ湡"
-                      :value="currentDelivery.shippingInfo.shippingDate || '--'"></u-cell>
-              <u-cell title="瀹℃牳鐘舵��"
-                      :value="currentDelivery.shippingInfo.status || '--'"></u-cell>
-              <u-cell title="鍙戣揣杞︾墝鍙�"
-                      :value="currentDelivery.shippingInfo.shippingCarNumber || '--'"></u-cell>
-              <u-cell title="蹇�掑叕鍙�"
-                      :value="currentDelivery.shippingInfo.expressCompany || '--'"></u-cell>
-              <u-cell title="蹇�掑崟鍙�"
-                      :value="currentDelivery.shippingInfo.expressNumber || '--'"></u-cell>
-            </u-cell-group>
-            <view style="margin-top: 20rpx; padding: 0 30rpx;">
-              <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">浜у搧鏄庣粏</view>
-              <view v-for="(item, index) in deliveryProductList"
-                    :key="index"
-                    style="background: #f8f8f8; border-radius: 8rpx; padding: 20rpx; margin-bottom: 10rpx;">
-                <view style="display: flex; justify-content: space-between;">
-                  <text style="font-weight: bold;">{{ item.productName }}</text>
-                  <text style="color: #2979ff;">鏁伴噺: {{ item.deliveryQuantity }}</text>
-                </view>
-                <view style="font-size: 24rpx; color: #666; margin-top: 10rpx;">
-                  瑙勬牸: {{ item.specificationModel }}
-                </view>
-                <view v-if="item.batchNo"
-                      style="font-size: 24rpx; color: #999; margin-top: 4rpx;">
-                  鎵瑰彿: {{ item.batchNo }}
-                </view>
-              </view>
-            </view>
-            <view v-if="currentDelivery.shippingInfo.storageBlobVOs && currentDelivery.shippingInfo.storageBlobVOs.length"
-                  style="margin-top: 20rpx; padding: 0 30rpx;">
-              <view style="font-size: 28rpx; font-weight: bold; margin-bottom: 10rpx;">鍙戣揣鍥剧墖</view>
-              <CommonUpload :model-value="currentDelivery.shippingInfo.storageBlobVOs"
-                            disabled />
-            </view>
-          </view>
-        </u-skeleton>
-      </view>
+      </u-form-item>
+      <u-form-item v-if="approveType === 2"
+                   prop="endDate"
+                   label="缁撴潫鏃堕棿"
+                   required>
+        <u-input v-model="form.endDate"
+                 readonly
+                 :disabled="isDetailMode"
+                 placeholder="璇峰亣缁撴潫鏃堕棿"
+                 @click="showEndDatePicker" />
+        <template #right>
+          <up-icon name="arrow-right"
+                   @click="showEndDatePicker"></up-icon>
+        </template>
+      </u-form-item>
+      <!-- approveType=3 鍑哄樊鐩稿叧瀛楁 -->
+      <u-form-item v-if="approveType === 3"
+                   prop="startDateTime"
+                   label="鍑哄樊寮�濮嬫椂闂�"
+                   required>
+        <u-input v-model="form.startDateTime"
+                 readonly
+                 :disabled="isDetailMode"
+                 placeholder="璇烽�夋嫨寮�濮嬫椂闂�"
+                 @click="showStartDateTimePicker" />
+        <template #right>
+          <up-icon name="arrow-right"
+                   @click="showStartDateTimePicker"></up-icon>
+        </template>
+      </u-form-item>
+      <u-form-item v-if="approveType === 3"
+                   prop="endDateTime"
+                   label="鍑哄樊缁撴潫鏃堕棿"
+                   required>
+        <u-input v-model="form.endDateTime"
+                 readonly
+                 :disabled="isDetailMode"
+                 placeholder="璇烽�夋嫨缁撴潫鏃堕棿"
+                 @click="showEndDateTimePicker" />
+        <template #right>
+          <up-icon name="arrow-right"
+                   @click="showEndDateTimePicker"></up-icon>
+        </template>
+      </u-form-item>
+      <u-form-item v-if="approveType === 3"
+                   prop="location"
+                   label="鍑哄樊鍦扮偣"
+                   required>
+        <u-input v-model="form.location"
+                 :disabled="isDetailMode"
+                 placeholder="璇疯緭鍏ュ嚭宸湴鐐�"
+                 clearable />
+      </u-form-item>
+      <!-- approveType=4 鎶ラ攢鐩稿叧瀛楁 -->
+      <u-form-item v-if="approveType === 4"
+                   prop="price"
+                   label="鎶ラ攢閲戦"
+                   required>
+        <u-input v-model="form.price"
+                 type="number"
+                 :disabled="isDetailMode"
+                 placeholder="璇疯緭鍏ユ姤閿�閲戦"
+                 clearable />
+      </u-form-item>
+      <!-- 閲囪喘/鎶ヤ环/鍙戣揣瀹℃壒璇︽儏 -->
+      <ApprovalBusinessDetail :approve-type="approveType"
+                              :business-no="form.approveReason" />
+      <!-- 瀹℃壒娴佺▼锛堜粎璇︽儏妯″紡灞曠ず锛屼笌 Web 涓�鑷达級 -->
+      <ApproveFlowSteps v-if="isDetailMode"
+                        :steps="approvalSteps"
+                        show-pending-opinion />
       <u-form-item v-if="operationType !== 'detail'"
                    label="鍥剧墖闄勪欢"
                    prop="storageBlobDTOS"
@@ -289,7 +151,7 @@
       </u-form-item>
     </u-form>
     <!-- 閫夋嫨鍣ㄥ脊绐� -->
-    <template v-if="operationType !== 'detail'">
+    <view v-if="operationType !== 'detail'">
       <up-action-sheet :show="showPicker"
                        :actions="productOptions"
                        title="閫夋嫨閮ㄩ棬"
@@ -325,7 +187,27 @@
                             @cancel="showEndDate = false"
                             mode="date" />
       </up-popup>
-    </template>
+      <!-- 鍑哄樊寮�濮嬫椂闂撮�夋嫨鍣� -->
+      <up-popup :show="showStartDateTime"
+                mode="bottom"
+                @close="showStartDateTime = false">
+        <up-datetime-picker :show="true"
+                            v-model="startDateTimeValue"
+                            @confirm="onStartDateTimeConfirm"
+                            @cancel="showStartDateTime = false"
+                            mode="datetime" />
+      </up-popup>
+      <!-- 鍑哄樊缁撴潫鏃堕棿閫夋嫨鍣� -->
+      <up-popup :show="showEndDateTime"
+                mode="bottom"
+                @close="showEndDateTime = false">
+        <up-datetime-picker :show="true"
+                            v-model="endDateTimeValue"
+                            @confirm="onEndDateTimeConfirm"
+                            @cancel="showEndDateTime = false"
+                            mode="datetime" />
+      </up-popup>
+    </view>
     <!-- 搴曢儴鎸夐挳 -->
     <view class="footer-btns"
           v-if="operationType !== 'detail'">
@@ -338,28 +220,21 @@
 </template>
 
 <script setup>
-  import {
-    ref,
-    onMounted,
-    onUnmounted,
-    reactive,
-    toRefs,
-    computed,
-    watch,
-  } from "vue";
+  import { ref, onMounted, onUnmounted, reactive, toRefs, computed } from "vue";
   import PageHeader from "@/components/PageHeader.vue";
   import CommonUpload from "@/components/CommonUpload.vue";
+  import ApprovalBusinessDetail from "./_components/ApprovalBusinessDetail.vue";
+  import ApproveFlowSteps from "./_components/ApproveFlowSteps.vue";
+  import { mapApprovalSteps } from "./_utils/approveFlowSteps.js";
   import useUserStore from "@/store/modules/user";
-  import { formatDateToYMD } from "@/utils/ruoyi";
+  import { formatDateToYMD, parseTime } from "@/utils/ruoyi";
   import {
     getDept,
     approveProcessGetInfo,
     approveProcessAdd,
     approveProcessUpdate,
-    getDeliveryDetailByShippingNo,
+    approveProcessDetails,
   } from "@/api/collaborativeApproval/approvalProcess";
-  import { getQuotationList } from "@/api/salesManagement/salesQuotation";
-  import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger";
   const showToast = message => {
     uni.showToast({
       title: message,
@@ -380,6 +255,8 @@
       storageBlobDTOS: [],
       startDate: "",
       endDate: "",
+      startDateTime: "",
+      endDateTime: "",
       location: "",
       price: "",
     },
@@ -395,6 +272,12 @@
       endDate: [
         { required: false, message: "璇烽�夋嫨缁撴潫鏃堕棿", trigger: "change" },
       ],
+      startDateTime: [
+        { required: false, message: "璇烽�夋嫨鍑哄樊寮�濮嬫椂闂�", trigger: "change" },
+      ],
+      endDateTime: [
+        { required: false, message: "璇烽�夋嫨鍑哄樊缁撴潫鏃堕棿", trigger: "change" },
+      ],
       location: [{ required: false, message: "璇疯緭鍏ュ嚭宸湴鐐�", trigger: "blur" }],
       price: [{ required: false, message: "璇疯緭鍏ユ姤閿�閲戦", trigger: "blur" }],
     },
@@ -404,6 +287,21 @@
   const showPicker = ref(false);
   const productOptions = ref([]);
   const operationType = ref("");
+  const isDetailMode = computed(() => operationType.value === "detail");
+
+  /** 瀹℃壒娴佺▼鑺傜偣锛堜粎璇︽儏妯″紡灞曠ず锛� */
+  const approvalSteps = ref([]);
+
+  const loadApprovalSteps = approveIdValue => {
+    if (!approveIdValue) return;
+    approveProcessDetails(approveIdValue)
+      .then(res => {
+        approvalSteps.value = mapApprovalSteps(res?.data);
+      })
+      .catch(() => {
+        approvalSteps.value = [];
+      });
+  };
   const currentApproveStatus = ref("");
   const formRef = ref(null);
   const message = ref("");
@@ -413,21 +311,12 @@
   const startDateValue = ref(Date.now());
   const showEndDate = ref(false);
   const endDateValue = ref(Date.now());
+  const showStartDateTime = ref(false);
+  const startDateTimeValue = ref(Date.now());
+  const showEndDateTime = ref(false);
+  const endDateTimeValue = ref(Date.now());
   const userStore = useUserStore();
   const approveType = ref(0);
-  const isInitialLoading = ref(false);
-
-  const quotationLoading = ref(false);
-  const currentQuotation = ref({});
-  const purchaseLoading = ref(false);
-  const currentPurchase = ref({});
-  const deliveryLoading = ref(false);
-  const currentDelivery = ref({});
-  const deliveryProductList = ref([]);
-
-  const isQuotationApproval = computed(() => Number(approveType.value) === 6);
-  const isPurchaseApproval = computed(() => Number(approveType.value) === 5);
-  const isDeliveryApproval = computed(() => Number(approveType.value) === 7);
 
   const getProductOptions = () => {
     getDept().then(res => {
@@ -446,6 +335,7 @@
 
   // 鏄剧ず鏃ユ湡閫夋嫨鍣�
   const showDatePicker = () => {
+    if (isDetailMode.value) return;
     showDate.value = true;
   };
 
@@ -458,6 +348,7 @@
 
   // 鏄剧ず璇峰亣寮�濮嬫椂闂撮�夋嫨鍣�
   const showStartDatePicker = () => {
+    if (isDetailMode.value) return;
     showStartDate.value = true;
   };
 
@@ -468,6 +359,7 @@
   };
 
   const showEndDatePicker = () => {
+    if (isDetailMode.value) return;
     showEndDate.value = true;
   };
 
@@ -477,88 +369,38 @@
     showEndDate.value = false;
   };
 
-  const fetchDetailData = async row => {
-    // 鎶ヤ环瀹℃壒
-    if (isQuotationApproval.value) {
-      const quotationNo = row?.approveReason;
-      if (quotationNo) {
-        quotationLoading.value = true;
-        getQuotationList({ quotationNo })
-          .then(res => {
-            const records = res?.data?.records || [];
-            currentQuotation.value = records[0] || {};
-          })
-          .finally(() => {
-            quotationLoading.value = false;
-          });
-      }
-    }
-
-    // 閲囪喘瀹℃壒
-    if (isPurchaseApproval.value) {
-      const purchaseContractNumber = row?.approveReason;
-      if (purchaseContractNumber) {
-        purchaseLoading.value = true;
-        getPurchaseByCode({ purchaseContractNumber })
-          .then(res => {
-            currentPurchase.value = res;
-          })
-          .catch(err => {
-            console.error("鏌ヨ閲囪喘璇︽儏澶辫触:", err);
-          })
-          .finally(() => {
-            purchaseLoading.value = false;
-          });
-      }
-    }
-
-    // 鍙戣揣瀹℃壒
-    if (isDeliveryApproval.value) {
-      const deliveryNo = row?.approveReason;
-      if (deliveryNo) {
-        deliveryLoading.value = true;
-        currentDelivery.value = {};
-        deliveryProductList.value = [];
-        getDeliveryDetailByShippingNo({ shippingNo: deliveryNo })
-          .then(res => {
-            const detailData = res?.data || res || {};
-            currentDelivery.value = detailData;
-            deliveryProductList.value =
-              detailData.shippingProductDetailDtoList || [];
-          })
-          .catch(err => {
-            console.error("鏌ヨ鍙戣揣璇︽儏澶辫触:", err);
-          })
-          .finally(() => {
-            deliveryLoading.value = false;
-          });
-      }
-    }
+  // 鏄剧ず鍑哄樊寮�濮嬫椂闂撮�夋嫨鍣紙YYYY-MM-DD HH:mm锛屼笌 Web 涓�鑷达級
+  const showStartDateTimePicker = () => {
+    if (isDetailMode.value) return;
+    startDateTimeValue.value = parseTime(
+      form.value.startDateTime,
+      "{y}-{m}-{d} {h}:{i}"
+    )
+      ? new Date(form.value.startDateTime).getTime()
+      : Date.now();
+    showStartDateTime.value = true;
   };
 
-  // 鐩戝惉瀹℃壒浜嬬敱鍙樺寲锛屽鏋滄槸鐗瑰畾瀹℃壒绫诲瀷鍒欏皾璇曡幏鍙栬鎯�
-  watch(
-    () => form.value.approveReason,
-    newVal => {
-      if (isInitialLoading.value) return;
-      if (
-        newVal &&
-        (isQuotationApproval.value ||
-          isPurchaseApproval.value ||
-          isDeliveryApproval.value)
-      ) {
-        // 寤惰繜涓�浼氬啀璇锋眰锛岄伩鍏嶈緭鍏ヨ繃绋嬩腑棰戠箒瑙﹀彂
-        debounceFetchDetail();
-      }
-    }
-  );
+  const onStartDateTimeConfirm = e => {
+    form.value.startDateTime = parseTime(e.value, "{y}-{m}-{d} {h}:{i}");
+    showStartDateTime.value = false;
+  };
 
-  let timer = null;
-  const debounceFetchDetail = () => {
-    if (timer) clearTimeout(timer);
-    timer = setTimeout(() => {
-      fetchDetailData(form.value);
-    }, 800);
+  // 鏄剧ず鍑哄樊缁撴潫鏃堕棿閫夋嫨鍣�
+  const showEndDateTimePicker = () => {
+    if (isDetailMode.value) return;
+    endDateTimeValue.value = parseTime(
+      form.value.endDateTime,
+      "{y}-{m}-{d} {h}:{i}"
+    )
+      ? new Date(form.value.endDateTime).getTime()
+      : Date.now();
+    showEndDateTime.value = true;
+  };
+
+  const onEndDateTimeConfirm = e => {
+    form.value.endDateTime = parseTime(e.value, "{y}-{m}-{d} {h}:{i}");
+    showEndDateTime.value = false;
   };
 
   onMounted(async () => {
@@ -579,9 +421,13 @@
           const row = JSON.parse(storedData);
           currentApproveStatus.value = row.approveStatus;
 
-          isInitialLoading.value = true;
-          approveProcessGetInfo({ id: row.approveId, approveReason: "1" })
-            .then(res => {
+          // 璇︽儏妯″紡锛氭媺鍙栧鎵规祦绋嬭妭鐐�
+          if (operationType.value === "detail") {
+            loadApprovalSteps(row.approveId);
+          }
+
+          approveProcessGetInfo({ id: row.approveId, approveReason: "1" }).then(
+            res => {
               form.value = { ...res.data };
               // 璁剧疆鍥剧墖鍒楄〃鏄剧ず
               const fileData =
@@ -589,15 +435,8 @@
               if (fileData.length > 0) {
                 form.value.storageBlobDTOS = fileData;
               }
-              // 鑾峰彇棰濆璇︽儏
-              fetchDetailData(res.data);
-            })
-            .finally(() => {
-              // 寤惰繜涓�浼氶噸缃紝纭繚 watch 涓嶄細琚Е鍙�
-              setTimeout(() => {
-                isInitialLoading.value = false;
-              }, 100);
-            });
+            }
+          );
         }
       }
     } catch (error) {

--
Gitblit v1.9.3