gaoluyang
2025-11-17 c46bf7475742e9b50a8fdcc8d592ba3a86b2754d
src/pages/cooperativeOffice/collaborativeApproval/index.vue
@@ -55,6 +55,31 @@
                     <text class="detail-label">申请日期</text>
                     <text class="detail-value">{{ item.approveTime }}</text>
                  </view>
                  <!-- approveType=2 请假相关字段 -->
                  <template v-if="item.approveType === 2">
                     <view class="detail-row">
                        <text class="detail-label">请假开始时间</text>
                        <text class="detail-value">{{ item.startDate || '-' }}</text>
                     </view>
                     <view class="detail-row">
                        <text class="detail-label">请假结束时间</text>
                        <text class="detail-value">{{ item.endDate || '-' }}</text>
                     </view>
                  </template>
                  <!-- approveType=3 出差相关字段 -->
                  <view v-if="item.approveType === 3" class="detail-row">
                     <text class="detail-label">出差地点</text>
                     <text class="detail-value">{{ item.location || '-' }}</text>
                  </view>
                  <!-- approveType=4 报销相关字段 -->
                  <view v-if="item.approveType === 4" class="detail-row">
                     <text class="detail-label">报销金额</text>
                     <text class="detail-value highlightYellow">{{ item.price ? `¥${item.price}` : '-' }}</text>
                  </view>
                  <view class="detail-row">
                     <text class="detail-label">结束日期</text>
                     <text class="detail-value">{{ item.approveOverTime }}</text>
@@ -117,6 +142,14 @@
   import {onShow} from "@dcloudio/uni-app";
   import useUserStore from "@/store/modules/user";
   
   // 接收父组件传递的 approveType 参数
   const props = defineProps({
      approveType: {
         type: Number,
         default: 0
      }
   });
   const userStore = useUserStore()
   // 数据
   const ledgerList = ref([]);
@@ -139,7 +172,7 @@
         size: -1,
      };
      approveProcessListPage({
            ...page,approveType: 0,...searchForm.value
            ...page,approveType: props.approveType,...searchForm.value
         })
         .then((res) => {
            ledgerList.value = res.data.records;
@@ -206,6 +239,7 @@
      uni.setStorageSync('invoiceLedgerEditRow', JSON.stringify(item));
      uni.setStorageSync('operationType', 'edit');
      uni.setStorageSync('approveId', item.approveId);
      uni.setStorageSync('approveType', props.approveType);
      uni.navigateTo({
         url: "/pages/cooperativeOffice/collaborativeApproval/detail",
      });
@@ -214,15 +248,17 @@
   // 添加新记录
   const handleAdd = () => {
      uni.setStorageSync('operationType', 'add');
      uni.setStorageSync('approveType', props.approveType);
      uni.navigateTo({
         url: "/pages/cooperativeOffice/collaborativeApproval/detail",
         url: `/pages/cooperativeOffice/collaborativeApproval/detail?approveType=${props.approveType}`,
      });
   };
   // 点击审核
   const approve = (item) => {
      uni.setStorageSync('approveId', item.approveId);
      uni.setStorageSync('approveType', props.approveType);
      uni.navigateTo({
         url: "/pages/cooperativeOffice/collaborativeApproval/approve"
         url: "/pages/cooperativeOffice/collaborativeApproval/approve?approveType=" + props.approveType
      })
   }