zhangwencui
9 天以前 41acc01d0056630ac11083cf31397f2462acaf4e
一些编辑功能隐藏
已修改39个文件
3621 ■■■■ 文件已修改
src/api/inspectionManagement/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspectionUpload/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cooperativeOffice/clientVisit/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cooperativeOffice/collaborativeApproval/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cooperativeOffice/noticeManagement/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/equipmentManagement/inspection/detail.vue 1364 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/equipmentManagement/inspection/index.vue 881 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/equipmentManagement/repair/index.vue 347 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/humanResources/attendance/checkin.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/humanResources/attendance/report.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/humanResources/monthlyStatistics/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/indexItem.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inspectionUpload/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/managementMeetings/knowledgeBase/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/managementMeetings/meetingSettings/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/managementMeetings/rulesRegulationsManagement/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/managementMeetings/sealManagement/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/procurementManagement/invoiceEntry/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/procurementManagement/paymentEntry/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/procurementManagement/procurementInvoiceLedger/index.vue 769 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/procurementManagement/procurementLedger/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/procurementManagement/receiptPaymentHistory/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/qualityManagement/finalInspection/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/qualityManagement/materialInspection/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/qualityManagement/processInspection/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/accidentReportingRecord/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/dangerInvestigation/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/emergencyPlanReview/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/hazardSourceLedger/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/hazardousMaterialsControl/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/safeQualifications/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/safetyTrainingAssessment/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/sales/invoiceLedger/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/sales/invoicingRegistration/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/sales/receiptPayment/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/sales/receiptPaymentHistory/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/sales/salesAccount/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspectionManagement/index.js
@@ -1,4 +1,4 @@
// 设备巡检
// 巡检管理
import request from '@/utils/request'
// 巡检任务表表查询
@@ -35,7 +35,7 @@
}
// /inspectionTask/addOrEditInspectionTask
// 设备巡检
// 巡检管理
export function uploadInspectionTask(query) {
    return request({
        url: '/inspectionTask/addOrEditInspectionTask',
src/api/inspectionUpload/index.js
@@ -1,4 +1,4 @@
// 设备巡检
// 巡检管理
import request from '@/utils/request'
// 二维码管理表查询
src/pages.json
@@ -564,7 +564,7 @@
    {
      "path": "pages/equipmentManagement/inspection/index",
      "style": {
        "navigationBarTitleText": "设备巡检",
        "navigationBarTitleText": "巡检管理",
        "navigationStyle": "custom"
      }
    },
@@ -599,7 +599,7 @@
    {
      "path": "pages/inspectionUpload/index",
      "style": {
        "navigationBarTitleText": "设备巡检",
        "navigationBarTitleText": "巡检管理",
        "navigationStyle": "custom",
        "enablePullDownRefresh": true,
        "backgroundColor": "#f8f8f8"
src/pages/cooperativeOffice/clientVisit/index.vue
@@ -83,12 +83,12 @@
                      @click="editVisit(item)">
              编辑
            </u-button>
            <u-button type="error"
            <!-- <u-button type="error"
                      size="small"
                      class="action-btn"
                      @click="deleteVisit(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
src/pages/cooperativeOffice/collaborativeApproval/index.vue
@@ -97,13 +97,13 @@
              </view>
              <view class="detail-row">
                <view class="actions">
                  <u-button type="primary"
                  <!-- <u-button type="primary"
                            size="small"
                            class="action-btn edit"
                            :disabled="item.approveStatus == 2 || item.approveStatus == 1 || item.approveStatus == 4 || item.approveStatus == 8"
                            @click="handleItemClick(item)">
                    编辑
                  </u-button>
                  </u-button> -->
                  <u-button type="success"
                            size="small"
                            class="action-btn approve"
@@ -123,13 +123,13 @@
      <text>暂无审批数据</text>
    </view>
    <!-- 浮动操作按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          v-if="props.approveType != 5 && props.approveType != 6 && props.approveType != 7"
          @click="handleAdd">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/cooperativeOffice/noticeManagement/index.vue
@@ -100,7 +100,7 @@
                <text>{{ notice.title }}</text>
              </view>
              <view class="card-actions">
                <up-button text
                <!-- <up-button text
                           type="primary"
                           size="mini"
                           @click="handleEdit(notice)"
@@ -112,7 +112,7 @@
                           size="mini"
                           @click="handleDelete(notice.id)">
                  删除
                </up-button>
                </up-button> -->
              </view>
            </view>
            <view class="card-content">
src/pages/equipmentManagement/inspection/detail.vue
@@ -1,20 +1,25 @@
<template>
  <view class="inspection-detail">
    <!-- 使用通用页面头部组件 -->
    <PageHeader title="设备巡检详情" @back="goBack" />
    <PageHeader title="巡检管理详情"
                @back="goBack" />
    <!-- 设备信息卡片 -->
    <view class="device-card">
      <view class="device-header">
        <view class="device-icon">
          <up-icon name="settings" size="24" color="#1890ff"></up-icon>
          <up-icon name="settings"
                   size="24"
                   color="#1890ff"></up-icon>
        </view>
        <view class="device-info">
          <text class="device-name">{{ deviceInfo.deviceName }}</text>
          <text class="device-code">{{ deviceInfo.deviceCode }}</text>
        </view>
        <view class="qr-scan" @click="scanDeviceQR">
          <up-icon name="scan" size="20" color="#1890ff"></up-icon>
        <view class="qr-scan"
              @click="scanDeviceQR">
          <up-icon name="scan"
                   size="20"
                   color="#1890ff"></up-icon>
          <text class="scan-text">扫码</text>
        </view>
      </view>
@@ -33,134 +38,131 @@
        </view>
      </view>
    </view>
    <!-- 巡检项目清单 -->
    <view class="inspection-items">
      <view class="section-title">
        <up-icon name="list" size="18" color="#333"></up-icon>
        <up-icon name="list"
                 size="18"
                 color="#333"></up-icon>
        <text class="title-text">巡检项目清单</text>
        <text class="progress-text">({{ completedItems }}/{{ totalItems }})</text>
      </view>
      <view class="items-list">
        <view
          v-for="(item, index) in inspectionItems"
          :key="index"
          class="inspection-item"
          :class="{ 'completed': item.completed, 'abnormal': item.isAbnormal }"
        >
          <view class="item-header" @click="toggleItem(index)">
        <view v-for="(item, index) in inspectionItems"
              :key="index"
              class="inspection-item"
              :class="{ 'completed': item.completed, 'abnormal': item.isAbnormal }">
          <view class="item-header"
                @click="toggleItem(index)">
            <view class="item-left">
              <view class="checkbox" :class="{ 'checked': item.completed }">
                <up-icon v-if="item.completed" name="checkmark" size="14" color="#ffffff"></up-icon>
              <view class="checkbox"
                    :class="{ 'checked': item.completed }">
                <up-icon v-if="item.completed"
                         name="checkmark"
                         size="14"
                         color="#ffffff"></up-icon>
              </view>
              <text class="item-name">{{ item.name }}</text>
            </view>
            <view class="item-status">
              <u-tag v-if="item.isAbnormal" type="error" size="mini">异常</u-tag>
              <u-tag v-else-if="item.completed" type="success" size="mini">正常</u-tag>
              <u-tag v-else type="info" size="mini">待检</u-tag>
              <u-tag v-if="item.isAbnormal"
                     type="error"
                     size="mini">异常</u-tag>
              <u-tag v-else-if="item.completed"
                     type="success"
                     size="mini">正常</u-tag>
              <u-tag v-else
                     type="info"
                     size="mini">待检</u-tag>
            </view>
          </view>
          <!-- 展开的详情内容 -->
          <view v-if="item.expanded" class="item-content">
          <view v-if="item.expanded"
                class="item-content">
            <view class="item-description">
              <text class="desc-text">{{ item.description }}</text>
            </view>
            <!-- 巡检结果选择 -->
            <view class="result-section">
              <text class="section-label">巡检结果:</text>
              <view class="result-options">
                <u-radio-group v-model="item.result" @change="onResultChange(index, $event)">
                  <u-radio
                    v-for="option in resultOptions"
                    :key="option.value"
                    :label="option.value"
                    :name="option.label"
                    size="small"
                  >
                <u-radio-group v-model="item.result"
                               @change="onResultChange(index, $event)">
                  <u-radio v-for="option in resultOptions"
                           :key="option.value"
                           :label="option.value"
                           :name="option.label"
                           size="small">
                    {{ option.label }}
                  </u-radio>
                </u-radio-group>
              </view>
            </view>
            <!-- 异常情况描述 -->
            <view v-if="item.result === 'abnormal'" class="abnormal-section">
            <view v-if="item.result === 'abnormal'"
                  class="abnormal-section">
              <text class="section-label">异常描述:</text>
              <up-textarea
                v-model="item.abnormalDesc"
                placeholder="请详细描述异常情况"
                :maxlength="200"
                count
                height="80"
              ></up-textarea>
              <up-textarea v-model="item.abnormalDesc"
                           placeholder="请详细描述异常情况"
                           :maxlength="200"
                           count
                           height="80"></up-textarea>
            </view>
            <!-- 图片上传 -->
            <view class="upload-section">
              <text class="section-label">现场照片:</text>
              <up-upload
                :fileList="item.images"
                @afterRead="(event) => afterRead(event, index, 'images')"
                @delete="(event) => deleteFile(event, index, 'images')"
                name="images"
                multiple
                :maxCount="5"
                :previewImage="true"
              >
              <up-upload :fileList="item.images"
                         @afterRead="(event) => afterRead(event, index, 'images')"
                         @delete="(event) => deleteFile(event, index, 'images')"
                         name="images"
                         multiple
                         :maxCount="5"
                         :previewImage="true">
                <view class="upload-btn">
                  <up-icon name="camera" size="20" color="#999"></up-icon>
                  <up-icon name="camera"
                           size="20"
                           color="#999"></up-icon>
                  <text class="upload-text">添加照片</text>
                </view>
              </up-upload>
            </view>
            <!-- 视频上传 -->
            <view class="upload-section">
              <text class="section-label">现场视频:</text>
              <up-upload
                :fileList="item.videos"
                @afterRead="(event) => afterRead(event, index, 'videos')"
                @delete="(event) => deleteFile(event, index, 'videos')"
                name="videos"
                :maxCount="2"
                accept="video"
              >
              <up-upload :fileList="item.videos"
                         @afterRead="(event) => afterRead(event, index, 'videos')"
                         @delete="(event) => deleteFile(event, index, 'videos')"
                         name="videos"
                         :maxCount="2"
                         accept="video">
                <view class="upload-btn">
                  <up-icon name="play-circle" size="20" color="#999"></up-icon>
                  <up-icon name="play-circle"
                           size="20"
                           color="#999"></up-icon>
                  <text class="upload-text">添加视频</text>
                </view>
              </up-upload>
            </view>
            <!-- 备注 -->
            <view class="remark-section">
              <text class="section-label">备注:</text>
              <up-textarea
                v-model="item.remark"
                placeholder="请输入备注信息(可选)"
                :maxlength="100"
                count
                height="60"
              ></up-textarea>
              <up-textarea v-model="item.remark"
                           placeholder="请输入备注信息(可选)"
                           :maxlength="100"
                           count
                           height="60"></up-textarea>
            </view>
          </view>
        </view>
      </view>
    </view>
    <!-- 底部操作按钮 -->
    <view class="bottom-actions">
      <u-button
        type="primary"
        size="large"
        :disabled="!canSubmit"
        @click="submitInspection"
        :loading="submitting"
      >
      <u-button type="primary"
                size="large"
                :disabled="!canSubmit"
                @click="submitInspection"
                :loading="submitting">
        {{ allCompleted ? '提交巡检记录' : `继续巡检 (${completedItems}/${totalItems})` }}
      </u-button>
    </view>
@@ -168,638 +170,646 @@
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import PageHeader from '@/components/PageHeader.vue'
import { submitInspectionRecord } from '@/api/equipmentManagement/inspection'
import dayjs from 'dayjs'
  import { ref, computed, onMounted } from "vue";
  import { onShow } from "@dcloudio/uni-app";
  import PageHeader from "@/components/PageHeader.vue";
  import { submitInspectionRecord } from "@/api/equipmentManagement/inspection";
  import dayjs from "dayjs";
// 设备信息
const deviceInfo = ref({})
  // 设备信息
  const deviceInfo = ref({});
// 巡检项目列表
const inspectionItems = ref([])
  // 巡检项目列表
  const inspectionItems = ref([]);
// 提交状态
const submitting = ref(false)
  // 提交状态
  const submitting = ref(false);
// 巡检结果选项
const resultOptions = [
  { label: '正常', value: 'normal' },
  { label: '异常', value: 'abnormal' }
]
  // 巡检结果选项
  const resultOptions = [
    { label: "正常", value: "normal" },
    { label: "异常", value: "abnormal" },
  ];
// 显示提示信息
const showToast = (message) => {
  uni.showToast({
    title: message,
    icon: 'none'
  })
}
  // 显示提示信息
  const showToast = message => {
    uni.showToast({
      title: message,
      icon: "none",
    });
  };
// 计算属性
const totalItems = computed(() => inspectionItems.value.length)
const completedItems = computed(() => inspectionItems.value.filter(item => item.completed).length)
const allCompleted = computed(() => completedItems.value === totalItems.value && totalItems.value > 0)
const canSubmit = computed(() => completedItems.value > 0)
  // 计算属性
  const totalItems = computed(() => inspectionItems.value.length);
  const completedItems = computed(
    () => inspectionItems.value.filter(item => item.completed).length
  );
  const allCompleted = computed(
    () => completedItems.value === totalItems.value && totalItems.value > 0
  );
  const canSubmit = computed(() => completedItems.value > 0);
// 返回上一页
const goBack = () => {
  if (completedItems.value > 0) {
    uni.showModal({
      title: '提示',
      content: '当前有未保存的巡检记录,确定要离开吗?',
      success: (res) => {
        if (res.confirm) {
          uni.navigateBack()
  // 返回上一页
  const goBack = () => {
    if (completedItems.value > 0) {
      uni.showModal({
        title: "提示",
        content: "当前有未保存的巡检记录,确定要离开吗?",
        success: res => {
          if (res.confirm) {
            uni.navigateBack();
          }
        },
      });
    } else {
      uni.navigateBack();
    }
  };
  // 扫描设备二维码
  const scanDeviceQR = () => {
    uni.scanCode({
      success: res => {
        console.log("扫码结果:", res);
        if (res.result.includes(deviceInfo.value.deviceCode)) {
          showToast("设备确认成功");
          // 记录扫码时间
          deviceInfo.value.scanTime = new Date().toISOString();
        } else {
          showToast("设备二维码不匹配");
        }
      },
      fail: err => {
        console.log("扫码失败:", err);
        showToast("扫码失败");
      },
    });
  };
  // 切换巡检项目
  const toggleItem = index => {
    inspectionItems.value[index].expanded =
      !inspectionItems.value[index].expanded;
  };
  // 巡检结果改变
  const onResultChange = (index, value) => {
    const item = inspectionItems.value[index];
    item.result = value;
    item.completed = true;
    item.isAbnormal = value === "abnormal";
    // 如果选择正常,清空异常描述
    if (value === "normal") {
      item.abnormalDesc = "";
    }
  };
  // 文件上传后处理
  const afterRead = async (event, index, type) => {
    const { file } = event;
    const item = inspectionItems.value[index];
    // 模拟上传过程
    uni.showLoading({ title: "上传中..." });
    try {
      // 这里应该调用实际的上传API
      await new Promise(resolve => setTimeout(resolve, 1000));
      // 添加到对应的文件列表
      if (type === "images") {
        item.images = item.images || [];
        item.images.push({
          url: file.url,
          name: file.name,
          size: file.size,
        });
      } else if (type === "videos") {
        item.videos = item.videos || [];
        item.videos.push({
          url: file.url,
          name: file.name,
          size: file.size,
        });
      }
    })
  } else {
    uni.navigateBack()
  }
}
// 扫描设备二维码
const scanDeviceQR = () => {
  uni.scanCode({
    success: (res) => {
      console.log('扫码结果:', res)
      if (res.result.includes(deviceInfo.value.deviceCode)) {
        showToast('设备确认成功')
        // 记录扫码时间
        deviceInfo.value.scanTime = new Date().toISOString()
      } else {
        showToast('设备二维码不匹配')
      uni.hideLoading();
      showToast("上传成功");
    } catch (error) {
      uni.hideLoading();
      showToast("上传失败");
    }
  };
  // 删除文件
  const deleteFile = (event, index, type) => {
    const item = inspectionItems.value[index];
    if (type === "images") {
      item.images.splice(event.index, 1);
    } else if (type === "videos") {
      item.videos.splice(event.index, 1);
    }
  };
  // 提交巡检记录
  const submitInspection = async () => {
    if (!canSubmit.value) {
      showToast("请至少完成一项巡检");
      return;
    }
    // 检查异常项目是否填写了描述
    const abnormalItems = inspectionItems.value.filter(item => item.isAbnormal);
    for (const item of abnormalItems) {
      if (!item.abnormalDesc || item.abnormalDesc.trim() === "") {
        showToast(`请填写"${item.name}"的异常描述`);
        return;
      }
    },
    fail: (err) => {
      console.log('扫码失败:', err)
      showToast('扫码失败')
    }
  })
}
// 切换巡检项目
const toggleItem = (index) => {
  inspectionItems.value[index].expanded = !inspectionItems.value[index].expanded
}
    submitting.value = true;
// 巡检结果改变
const onResultChange = (index, value) => {
  const item = inspectionItems.value[index]
  item.result = value
  item.completed = true
  item.isAbnormal = value === 'abnormal'
  // 如果选择正常,清空异常描述
  if (value === 'normal') {
    item.abnormalDesc = ''
  }
}
    try {
      const recordData = {
        deviceId: deviceInfo.value.id,
        deviceCode: deviceInfo.value.deviceCode,
        inspectionDate: dayjs().format("YYYY-MM-DD"),
        inspector: deviceInfo.value.inspector,
        scanTime: deviceInfo.value.scanTime,
        items: inspectionItems.value.map(item => ({
          name: item.name,
          result: item.result,
          completed: item.completed,
          isAbnormal: item.isAbnormal,
          abnormalDesc: item.abnormalDesc,
          images: item.images || [],
          videos: item.videos || [],
          remark: item.remark,
        })),
        completedAt: new Date().toISOString(),
      };
// 文件上传后处理
const afterRead = async (event, index, type) => {
  const { file } = event
  const item = inspectionItems.value[index]
  // 模拟上传过程
  uni.showLoading({ title: '上传中...' })
  try {
    // 这里应该调用实际的上传API
    await new Promise(resolve => setTimeout(resolve, 1000))
    // 添加到对应的文件列表
    if (type === 'images') {
      item.images = item.images || []
      item.images.push({
        url: file.url,
        name: file.name,
        size: file.size
      })
    } else if (type === 'videos') {
      item.videos = item.videos || []
      item.videos.push({
        url: file.url,
        name: file.name,
        size: file.size
      })
      // 模拟API调用
      await new Promise(resolve => setTimeout(resolve, 2000));
      // 实际API调用
      // await submitInspectionRecord(recordData)
      showToast("巡检记录提交成功");
      // 返回列表页面
      setTimeout(() => {
        uni.navigateBack();
      }, 1500);
    } catch (error) {
      showToast("提交失败,请重试");
    } finally {
      submitting.value = false;
    }
    uni.hideLoading()
    showToast('上传成功')
  } catch (error) {
    uni.hideLoading()
    showToast('上传失败')
  }
}
  };
// 删除文件
const deleteFile = (event, index, type) => {
  const item = inspectionItems.value[index]
  if (type === 'images') {
    item.images.splice(event.index, 1)
  } else if (type === 'videos') {
    item.videos.splice(event.index, 1)
  }
}
// 提交巡检记录
const submitInspection = async () => {
  if (!canSubmit.value) {
    showToast('请至少完成一项巡检')
    return
  }
  // 检查异常项目是否填写了描述
  const abnormalItems = inspectionItems.value.filter(item => item.isAbnormal)
  for (const item of abnormalItems) {
    if (!item.abnormalDesc || item.abnormalDesc.trim() === '') {
      showToast(`请填写"${item.name}"的异常描述`)
      return
  // 初始化数据
  const initData = () => {
    // 从存储中获取当前巡检信息
    const currentInspection = uni.getStorageSync("currentInspection");
    if (currentInspection) {
      deviceInfo.value = currentInspection;
    }
  }
  submitting.value = true
  try {
    const recordData = {
      deviceId: deviceInfo.value.id,
      deviceCode: deviceInfo.value.deviceCode,
      inspectionDate: dayjs().format('YYYY-MM-DD'),
      inspector: deviceInfo.value.inspector,
      scanTime: deviceInfo.value.scanTime,
      items: inspectionItems.value.map(item => ({
        name: item.name,
        result: item.result,
        completed: item.completed,
        isAbnormal: item.isAbnormal,
        abnormalDesc: item.abnormalDesc,
        images: item.images || [],
        videos: item.videos || [],
        remark: item.remark
      })),
      completedAt: new Date().toISOString()
    }
    // 模拟API调用
    await new Promise(resolve => setTimeout(resolve, 2000))
    // 实际API调用
    // await submitInspectionRecord(recordData)
    showToast('巡检记录提交成功')
    // 返回列表页面
    setTimeout(() => {
      uni.navigateBack()
    }, 1500)
  } catch (error) {
    showToast('提交失败,请重试')
  } finally {
    submitting.value = false
  }
}
// 初始化数据
const initData = () => {
  // 从存储中获取当前巡检信息
  const currentInspection = uni.getStorageSync('currentInspection')
  if (currentInspection) {
    deviceInfo.value = currentInspection
  }
  // 模拟巡检项目数据
  inspectionItems.value = [
    {
      name: '设备外观检查',
      description: '检查设备外观是否有损坏、锈蚀、变形等异常情况',
      completed: false,
      expanded: false,
      result: '',
      isAbnormal: false,
      abnormalDesc: '',
      images: [],
      videos: [],
      remark: ''
    },
    {
      name: '运行状态检查',
      description: '检查设备运行是否正常,有无异常声音、振动等',
      completed: false,
      expanded: false,
      result: '',
      isAbnormal: false,
      abnormalDesc: '',
      images: [],
      videos: [],
      remark: ''
    },
    {
      name: '安全装置检查',
      description: '检查各类安全装置是否完好,安全标识是否清晰',
      completed: false,
      expanded: false,
      result: '',
      isAbnormal: false,
      abnormalDesc: '',
      images: [],
      videos: [],
      remark: ''
    },
    {
      name: '环境条件检查',
      description: '检查设备周围环境是否符合要求,通风、照明等是否正常',
      completed: false,
      expanded: false,
      result: '',
      isAbnormal: false,
      abnormalDesc: '',
      images: [],
      videos: [],
      remark: ''
    },
    {
      name: '仪表读数记录',
      description: '记录相关仪表的读数,检查是否在正常范围内',
      completed: false,
      expanded: false,
      result: '',
      isAbnormal: false,
      abnormalDesc: '',
      images: [],
      videos: [],
      remark: ''
    }
  ]
}
    // 模拟巡检项目数据
    inspectionItems.value = [
      {
        name: "设备外观检查",
        description: "检查设备外观是否有损坏、锈蚀、变形等异常情况",
        completed: false,
        expanded: false,
        result: "",
        isAbnormal: false,
        abnormalDesc: "",
        images: [],
        videos: [],
        remark: "",
      },
      {
        name: "运行状态检查",
        description: "检查设备运行是否正常,有无异常声音、振动等",
        completed: false,
        expanded: false,
        result: "",
        isAbnormal: false,
        abnormalDesc: "",
        images: [],
        videos: [],
        remark: "",
      },
      {
        name: "安全装置检查",
        description: "检查各类安全装置是否完好,安全标识是否清晰",
        completed: false,
        expanded: false,
        result: "",
        isAbnormal: false,
        abnormalDesc: "",
        images: [],
        videos: [],
        remark: "",
      },
      {
        name: "环境条件检查",
        description: "检查设备周围环境是否符合要求,通风、照明等是否正常",
        completed: false,
        expanded: false,
        result: "",
        isAbnormal: false,
        abnormalDesc: "",
        images: [],
        videos: [],
        remark: "",
      },
      {
        name: "仪表读数记录",
        description: "记录相关仪表的读数,检查是否在正常范围内",
        completed: false,
        expanded: false,
        result: "",
        isAbnormal: false,
        abnormalDesc: "",
        images: [],
        videos: [],
        remark: "",
      },
    ];
  };
onMounted(() => {
  initData()
})
  onMounted(() => {
    initData();
  });
onShow(() => {
  // 页面显示时刷新数据
})
  onShow(() => {
    // 页面显示时刷新数据
  });
</script>
<style scoped lang="scss">
.inspection-detail {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding-bottom: 80px;
  position: relative;
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 0;
  .inspection-detail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 200px;
      background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.8) 0%,
        rgba(118, 75, 162, 0.8) 100%
      );
      z-index: 0;
    }
  }
}
.device-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  margin: 10px 20px;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }
}
  .device-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    margin: 10px 20px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
.device-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.device-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  &:hover {
    transform: scale(1.05);
  }
}
.device-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.device-name {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.device-code {
  font-size: 13px;
  color: #8c8c8c;
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(140, 140, 140, 0.1);
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
}
.qr-scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #52c41a, #389e0d);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
  transition: all 0.3s ease;
  &:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
  }
  &:active {
    transform: scale(0.98);
  }
}
.scan-text {
  font-size: 13px;
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.device-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(10px);
}
.detail-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 8px 0;
  transition: all 0.2s ease;
  &:hover {
    background: rgba(255, 255, 255, 0.5);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
  }
}
.label {
  color: #595959;
  min-width: 80px;
  font-weight: 500;
}
.value {
  color: #262626;
  flex: 1;
  font-weight: 500;
}
.inspection-items {
  margin: 10px 20px;
  position: relative;
  z-index: 1;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.title-text {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
}
.progress-text {
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.items-list {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.inspection-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  &:last-child {
    border-bottom: none;
  }
  &.completed {
    background: rgba(82, 196, 26, 0.05);
    border-left: 4px solid #52c41a;
  }
  &.abnormal {
    background: rgba(255, 77, 79, 0.05);
    border-left: 4px solid #ff4d4f;
  }
  &:hover {
    background: rgba(102, 126, 234, 0.05);
  }
}
.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  cursor: pointer;
}
.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #d9d9d9;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  &.checked {
    background: #52c41a;
    border-color: #52c41a;
  }
}
.item-name {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}
.item-status {
  flex-shrink: 0;
}
.item-content {
  padding: 0 15px 20px;
  border-top: 1px solid #f5f5f5;
}
.item-description {
  padding: 15px 0;
}
.desc-text {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}
.result-section,
.abnormal-section,
.upload-section,
.remark-section {
  margin-top: 15px;
}
.section-label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}
.result-options {
  display: flex;
  gap: 20px;
}
.upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  background: rgba(102, 126, 234, 0.05);
  gap: 8px;
  transition: all 0.3s ease;
  &:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  }
  &:active {
    transform: translateY(0);
  }
}
.upload-text {
  font-size: 13px;
  color: #667eea;
  font-weight: 500;
}
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
  z-index: 10;
  button {
    height: 48px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
  }
  .device-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
  }
  .device-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    &:hover {
      transform: scale(1.05);
    }
  }
  .device-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .device-name {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
  }
  .device-code {
    font-size: 13px;
    color: #8c8c8c;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(140, 140, 140, 0.1);
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
  }
  .qr-scan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #52c41a, #389e0d);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(82, 196, 26, 0.3);
    transition: all 0.3s ease;
    &:hover {
      transform: scale(1.05);
      box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
    }
    &:active {
      transform: scale(0.98);
    }
  }
  .scan-text {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
  .device-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
  }
  .detail-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
    transition: all 0.2s ease;
    &:hover {
      background: rgba(255, 255, 255, 0.5);
      margin: 0 -8px;
      padding-left: 8px;
      padding-right: 8px;
      border-radius: 8px;
    }
  }
  .label {
    color: #595959;
    min-width: 80px;
    font-weight: 500;
  }
  .value {
    color: #262626;
    flex: 1;
    font-weight: 500;
  }
  .inspection-items {
    margin: 10px 20px;
    position: relative;
    z-index: 1;
  }
  .section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }
  .title-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
  }
  .progress-text {
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .items-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  .inspection-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    &:last-child {
      border-bottom: none;
    }
    &.completed {
      background: rgba(82, 196, 26, 0.05);
      border-left: 4px solid #52c41a;
    }
    &.abnormal {
      background: rgba(255, 77, 79, 0.05);
      border-left: 4px solid #ff4d4f;
    }
    &:hover {
      background: rgba(102, 126, 234, 0.05);
    }
  }
  .item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    cursor: pointer;
  }
  .item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }
  .checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    &.checked {
      background: #52c41a;
      border-color: #52c41a;
    }
  }
  .item-name {
    font-size: 15px;
    color: #333;
    font-weight: 500;
  }
  .item-status {
    flex-shrink: 0;
  }
  .item-content {
    padding: 0 15px 20px;
    border-top: 1px solid #f5f5f5;
  }
  .item-description {
    padding: 15px 0;
  }
  .desc-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
  }
  .result-section,
  .abnormal-section,
  .upload-section,
  .remark-section {
    margin-top: 15px;
  }
  .section-label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
  }
  .result-options {
    display: flex;
    gap: 20px;
  }
  .upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    background: rgba(102, 126, 234, 0.05);
    gap: 8px;
    transition: all 0.3s ease;
    &:hover {
      border-color: rgba(102, 126, 234, 0.5);
      background: rgba(102, 126, 234, 0.1);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    }
    &:active {
      transform: translateY(0);
    }
  }
}
  .upload-text {
    font-size: 13px;
    color: #667eea;
    font-weight: 500;
  }
  .bottom-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10;
    button {
      height: 48px;
      border-radius: 16px;
      font-weight: 600;
      font-size: 16px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      &:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      }
      &:active {
        transform: translateY(0);
      }
    }
  }
</style>
src/pages/equipmentManagement/inspection/index.vue
@@ -1,8 +1,8 @@
<template>
  <view class="inspection-page">
    <!-- 使用通用页面头部组件 -->
    <PageHeader title="设备巡检" @back="goBack" />
    <PageHeader title="巡检管理"
                @back="goBack" />
    <!-- 统计信息卡片 -->
    <view class="stats-cards">
      <view class="stat-card">
@@ -18,15 +18,20 @@
        <text class="stat-label">待巡检</text>
      </view>
    </view>
    <!-- 巡检清单 -->
    <view class="inspection-list" v-if="inspectionList.length > 0">
      <view v-for="(item, index) in inspectionList" :key="index">
        <view class="inspection-item" @click="startInspection(item)">
    <view class="inspection-list"
          v-if="inspectionList.length > 0">
      <view v-for="(item, index) in inspectionList"
            :key="index">
        <view class="inspection-item"
              @click="startInspection(item)">
          <view class="item-header">
            <view class="item-left">
              <view class="device-icon" :class="getStatusClass(item.status)">
                <up-icon :name="getStatusIcon(item.status)" size="16" color="#ffffff"></up-icon>
              <view class="device-icon"
                    :class="getStatusClass(item.status)">
                <up-icon :name="getStatusIcon(item.status)"
                         size="16"
                         color="#ffffff"></up-icon>
              </view>
              <view class="device-info">
                <text class="device-name">{{ item.deviceName }}</text>
@@ -34,14 +39,13 @@
              </view>
            </view>
            <view class="status-tag">
              <u-tag :type="getTagType(item.status)" size="mini">
              <u-tag :type="getTagType(item.status)"
                     size="mini">
                {{ getStatusText(item.status) }}
              </u-tag>
            </view>
          </view>
          <up-divider></up-divider>
          <view class="item-details">
            <view class="detail-row">
              <text class="detail-label">设备编号</text>
@@ -55,472 +59,485 @@
              <text class="detail-label">负责人</text>
              <text class="detail-value">{{ item.inspector || '-' }}</text>
            </view>
            <view class="detail-row" v-if="item.status === 2">
            <view class="detail-row"
                  v-if="item.status === 2">
              <text class="detail-label">完成时间</text>
              <text class="detail-value">{{ formatDateTime(item.completedTime) || '-' }}</text>
            </view>
          </view>
          <!-- 操作按钮 -->
          <view class="action-buttons">
            <u-button
              type="primary"
              size="small"
              class="action-btn"
              :disabled="item.status === 2"
              @click.stop="startInspection(item)"
            >
            <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.status === 2"
                      @click.stop="startInspection(item)">
              {{ item.status === 0 ? '开始巡检' : item.status === 1 ? '继续巡检' : '查看详情' }}
            </u-button>
            <u-button
              type="success"
              size="small"
              class="action-btn"
              :disabled="item.status !== 1"
              @click.stop="scanQRCode(item)"
            >
            <u-button type="success"
                      size="small"
                      class="action-btn"
                      :disabled="item.status !== 1"
                      @click.stop="scanQRCode(item)">
              扫码打卡
            </u-button>
          </view>
        </view>
      </view>
    </view>
    <view v-else class="no-data">
      <up-empty mode="data" text="暂无巡检任务"></up-empty>
    <view v-else
          class="no-data">
      <up-empty mode="data"
                text="暂无巡检任务"></up-empty>
    </view>
  </view>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import PageHeader from '@/components/PageHeader.vue'
// import { getInspectionList } from '@/api/inspectionUpload/index'
import dayjs from 'dayjs'
  import { ref, computed, onMounted } from "vue";
  import { onShow } from "@dcloudio/uni-app";
  import PageHeader from "@/components/PageHeader.vue";
  // import { getInspectionList } from '@/api/inspectionUpload/index'
  import dayjs from "dayjs";
// 选中的日期
const selectedDate = ref(Date.now())
  // 选中的日期
  const selectedDate = ref(Date.now());
// 巡检清单数据
const inspectionList = ref([])
  // 巡检清单数据
  const inspectionList = ref([]);
// 显示提示信息
const showToast = (message) => {
  uni.showToast({
    title: message,
    icon: 'none'
  })
}
  // 显示提示信息
  const showToast = message => {
    uni.showToast({
      title: message,
      icon: "none",
    });
  };
// 计算统计数据
const totalCount = computed(() => inspectionList.value.length)
const completedCount = computed(() => inspectionList.value.filter(item => item.status === 2).length)
const pendingCount = computed(() => inspectionList.value.filter(item => item.status === 0).length)
  // 计算统计数据
  const totalCount = computed(() => inspectionList.value.length);
  const completedCount = computed(
    () => inspectionList.value.filter(item => item.status === 2).length
  );
  const pendingCount = computed(
    () => inspectionList.value.filter(item => item.status === 0).length
  );
// 返回上一页
const goBack = () => {
  uni.navigateBack()
}
  // 返回上一页
  const goBack = () => {
    uni.navigateBack();
  };
// 日期格式化器
const dateFormatter = (type, value) => {
  if (type === 'year') {
    return `${value}年`
  }
  if (type === 'month') {
    return `${value}月`
  }
  if (type === 'day') {
    return `${value}日`
  }
  return value
}
// 格式化日期
const formatDate = (timestamp) => {
  return dayjs(timestamp).format('YYYY年MM月DD日')
}
// 格式化日期时间
const formatDateTime = (dateStr) => {
  if (!dateStr) return ''
  return dayjs(dateStr).format('MM-DD HH:mm')
}
// 日期改变事件
const onDateChange = (value) => {
  selectedDate.value = value.value
  getList()
}
// 获取状态样式类
const getStatusClass = (status) => {
  switch (status) {
    case 0: return 'status-pending'
    case 1: return 'status-progress'
    case 2: return 'status-completed'
    default: return 'status-pending'
  }
}
// 获取状态图标
const getStatusIcon = (status) => {
  switch (status) {
    case 0: return 'clock'
    case 1: return 'play-circle'
    case 2: return 'checkmark-circle'
    default: return 'clock'
  }
}
// 获取标签类型
const getTagType = (status) => {
  switch (status) {
    case 0: return 'warning'
    case 1: return 'primary'
    case 2: return 'success'
    default: return 'info'
  }
}
// 获取状态文本
const getStatusText = (status) => {
  switch (status) {
    case 0: return '待巡检'
    case 1: return '巡检中'
    case 2: return '已完成'
    default: return '未知'
  }
}
// 开始巡检
const startInspection = (item) => {
  // 存储当前巡检项目信息
  uni.setStorageSync('currentInspection', item)
  uni.navigateTo({
    url: '/pages/equipmentManagement/inspection/detail'
  })
}
// 扫码打卡
const scanQRCode = (item) => {
  uni.scanCode({
    success: (res) => {
      console.log('扫码结果:', res)
      // 验证二维码内容
      if (res.result.includes(item.deviceCode)) {
        showToast('打卡成功')
        // 更新打卡状态
        updateCheckInStatus(item.id)
      } else {
        showToast('二维码不匹配,请扫描正确的设备二维码')
      }
    },
    fail: (err) => {
      console.log('扫码失败:', err)
      showToast('扫码失败')
  // 日期格式化器
  const dateFormatter = (type, value) => {
    if (type === "year") {
      return `${value}年`;
    }
  })
}
    if (type === "month") {
      return `${value}月`;
    }
    if (type === "day") {
      return `${value}日`;
    }
    return value;
  };
// 更新打卡状态
const updateCheckInStatus = (id) => {
  // 这里应该调用API更新打卡状态
  // 暂时模拟更新本地数据
  const item = inspectionList.value.find(item => item.id === id)
  if (item) {
    item.checkInTime = new Date().toISOString()
  }
}
  // 格式化日期
  const formatDate = timestamp => {
    return dayjs(timestamp).format("YYYY年MM月DD日");
  };
// 查询巡检清单
const getList = () => {
  uni.showLoading({
    title: '加载中...',
    mask: true
  })
  const params = {
    date: dayjs(selectedDate.value).format('YYYY-MM-DD')
  }
  // 模拟数据,实际应该调用API
  setTimeout(() => {
    inspectionList.value = [
      {
        id: 1,
        deviceName: '空压机A01',
        deviceCode: 'KYJ-A01',
        location: '生产车间A区',
        inspectionTime: '08:00-09:00',
        inspector: '张三',
        status: 0, // 0:待巡检 1:巡检中 2:已完成
        completedTime: null
  // 格式化日期时间
  const formatDateTime = dateStr => {
    if (!dateStr) return "";
    return dayjs(dateStr).format("MM-DD HH:mm");
  };
  // 日期改变事件
  const onDateChange = value => {
    selectedDate.value = value.value;
    getList();
  };
  // 获取状态样式类
  const getStatusClass = status => {
    switch (status) {
      case 0:
        return "status-pending";
      case 1:
        return "status-progress";
      case 2:
        return "status-completed";
      default:
        return "status-pending";
    }
  };
  // 获取状态图标
  const getStatusIcon = status => {
    switch (status) {
      case 0:
        return "clock";
      case 1:
        return "play-circle";
      case 2:
        return "checkmark-circle";
      default:
        return "clock";
    }
  };
  // 获取标签类型
  const getTagType = status => {
    switch (status) {
      case 0:
        return "warning";
      case 1:
        return "primary";
      case 2:
        return "success";
      default:
        return "info";
    }
  };
  // 获取状态文本
  const getStatusText = status => {
    switch (status) {
      case 0:
        return "待巡检";
      case 1:
        return "巡检中";
      case 2:
        return "已完成";
      default:
        return "未知";
    }
  };
  // 开始巡检
  const startInspection = item => {
    // 存储当前巡检项目信息
    uni.setStorageSync("currentInspection", item);
    uni.navigateTo({
      url: "/pages/equipmentManagement/inspection/detail",
    });
  };
  // 扫码打卡
  const scanQRCode = item => {
    uni.scanCode({
      success: res => {
        console.log("扫码结果:", res);
        // 验证二维码内容
        if (res.result.includes(item.deviceCode)) {
          showToast("打卡成功");
          // 更新打卡状态
          updateCheckInStatus(item.id);
        } else {
          showToast("二维码不匹配,请扫描正确的设备二维码");
        }
      },
      {
        id: 2,
        deviceName: '冷却塔B02',
        deviceCode: 'LQT-B02',
        location: '生产车间B区',
        inspectionTime: '09:00-10:00',
        inspector: '李四',
        status: 1,
        completedTime: null
      fail: err => {
        console.log("扫码失败:", err);
        showToast("扫码失败");
      },
      {
        id: 3,
        deviceName: '变压器C03',
        deviceCode: 'BYQ-C03',
        location: '配电房',
        inspectionTime: '10:00-11:00',
        inspector: '王五',
        status: 2,
        completedTime: '2024-01-15T10:30:00'
      }
    ]
    uni.hideLoading()
  }, 1000)
  // 实际API调用
  // getInspectionList(params)
  //   .then((res) => {
  //     inspectionList.value = res.records || res.data?.records || []
  //     uni.hideLoading()
  //   })
  //   .catch(() => {
  //     uni.hideLoading()
  //     showToast('获取数据失败')
  //   })
}
    });
  };
onMounted(() => {
  getList()
})
  // 更新打卡状态
  const updateCheckInStatus = id => {
    // 这里应该调用API更新打卡状态
    // 暂时模拟更新本地数据
    const item = inspectionList.value.find(item => item.id === id);
    if (item) {
      item.checkInTime = new Date().toISOString();
    }
  };
onShow(() => {
  getList()
})
  // 查询巡检清单
  const getList = () => {
    uni.showLoading({
      title: "加载中...",
      mask: true,
    });
    const params = {
      date: dayjs(selectedDate.value).format("YYYY-MM-DD"),
    };
    // 模拟数据,实际应该调用API
    setTimeout(() => {
      inspectionList.value = [
        {
          id: 1,
          deviceName: "空压机A01",
          deviceCode: "KYJ-A01",
          location: "生产车间A区",
          inspectionTime: "08:00-09:00",
          inspector: "张三",
          status: 0, // 0:待巡检 1:巡检中 2:已完成
          completedTime: null,
        },
        {
          id: 2,
          deviceName: "冷却塔B02",
          deviceCode: "LQT-B02",
          location: "生产车间B区",
          inspectionTime: "09:00-10:00",
          inspector: "李四",
          status: 1,
          completedTime: null,
        },
        {
          id: 3,
          deviceName: "变压器C03",
          deviceCode: "BYQ-C03",
          location: "配电房",
          inspectionTime: "10:00-11:00",
          inspector: "王五",
          status: 2,
          completedTime: "2024-01-15T10:30:00",
        },
      ];
      uni.hideLoading();
    }, 1000);
    // 实际API调用
    // getInspectionList(params)
    //   .then((res) => {
    //     inspectionList.value = res.records || res.data?.records || []
    //     uni.hideLoading()
    //   })
    //   .catch(() => {
    //     uni.hideLoading()
    //     showToast('获取数据失败')
    //   })
  };
  onMounted(() => {
    getList();
  });
  onShow(() => {
    getList();
  });
</script>
<style scoped lang="scss">
@import '@/styles/sales-common.scss';
  @import "@/styles/sales-common.scss";
.inspection-page {
  background: #ffffff;
  min-height: 100vh;
  padding-bottom: 20px;
}
.stats-cards {
  display: flex;
  gap: 10px;
  padding: 0 15px;
  margin: 15px 0;
}
.stat-card {
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  padding: 15px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  .inspection-page {
    background: #ffffff;
    min-height: 100vh;
    padding-bottom: 20px;
  }
  .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1890ff;
  .stats-cards {
    display: flex;
    gap: 10px;
    padding: 0 15px;
    margin: 15px 0;
  }
  .stat-label {
  .stat-card {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    .stat-number {
      font-size: 24px;
      font-weight: 700;
      color: #1890ff;
    }
    .stat-label {
      font-size: 13px;
      color: #666;
      font-weight: 500;
    }
  }
  .inspection-list {
    padding: 0 15px;
  }
  .inspection-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
  }
  .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
  }
  .item-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
  }
  .device-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    &.status-pending {
      background: linear-gradient(135deg, #faad14, #fa8c16);
      box-shadow: 0 4px 16px rgba(250, 173, 20, 0.3);
    }
    &.status-progress {
      background: linear-gradient(135deg, #1890ff, #096dd9);
      box-shadow: 0 4px 16px rgba(24, 144, 255, 0.3);
    }
    &.status-completed {
      background: linear-gradient(135deg, #52c41a, #389e0d);
      box-shadow: 0 4px 16px rgba(82, 196, 26, 0.3);
    }
    &:hover {
      transform: scale(1.05);
    }
  }
  .device-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .device-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
  }
  .device-location {
    font-size: 13px;
    color: #666;
    color: #8c8c8c;
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(140, 140, 140, 0.1);
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
  }
  .status-tag {
    flex-shrink: 0;
    transform: scale(1.1);
  }
  .item-details {
    margin: 15px 0;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
  }
  .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    &:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }
    &:hover {
      background: rgba(255, 255, 255, 0.5);
      margin: 0 -8px;
      padding-left: 8px;
      padding-right: 8px;
      border-radius: 8px;
    }
  }
  .detail-label {
    font-size: 14px;
    color: #595959;
    min-width: 80px;
    font-weight: 500;
  }
}
.inspection-list {
  padding: 0 15px;
}
.inspection-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  .detail-value {
    font-size: 14px;
    color: #262626;
    text-align: right;
    flex: 1;
    font-weight: 500;
  }
}
.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.item-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}
.device-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  &.status-pending {
    background: linear-gradient(135deg, #faad14, #fa8c16);
    box-shadow: 0 4px 16px rgba(250, 173, 20, 0.3);
  .action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
  &.status-progress {
    background: linear-gradient(135deg, #1890ff, #096dd9);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.3);
  .action-btn {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    &:active {
      transform: translateY(0);
    }
  }
  &.status-completed {
    background: linear-gradient(135deg, #52c41a, #389e0d);
    box-shadow: 0 4px 16px rgba(82, 196, 26, 0.3);
  .no-data {
    padding: 80px 20px;
    text-align: center;
  }
  &:hover {
    transform: scale(1.05);
  }
}
.device-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.device-name {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.device-location {
  font-size: 13px;
  color: #8c8c8c;
  font-weight: 500;
  padding: 2px 8px;
  background: rgba(140, 140, 140, 0.1);
  border-radius: 12px;
  display: inline-block;
  width: fit-content;
}
.status-tag {
  flex-shrink: 0;
  transform: scale(1.1);
}
.item-details {
  margin: 15px 0;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 12px;
  padding: 12px;
  backdrop-filter: blur(10px);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  &:hover {
    background: rgba(255, 255, 255, 0.5);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
  }
}
.detail-label {
  font-size: 14px;
  color: #595959;
  min-width: 80px;
  font-weight: 500;
}
.detail-value {
  font-size: 14px;
  color: #262626;
  text-align: right;
  flex: 1;
  font-weight: 500;
}
.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.action-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }
  &:active {
    transform: translateY(0);
  }
}
.no-data {
  padding: 80px 20px;
  text-align: center;
}
</style>
src/pages/equipmentManagement/repair/index.vue
@@ -1,44 +1,49 @@
<template>
  <view class="sales-account">
    <!-- 使用通用页面头部组件 -->
    <PageHeader title="设备报修" @back="goBack" />
    <PageHeader title="设备报修"
                @back="goBack" />
    <!-- 搜索区域 -->
    <view class="search-section">
      <view class="search-bar">
        <view class="search-input">
          <up-input
            class="search-text"
            placeholder="请输入设备名称搜索"
            v-model="searchKeyword"
            @change="getList"
            clearable
          />
          <up-input class="search-text"
                    placeholder="请输入设备名称搜索"
                    v-model="searchKeyword"
                    @change="getList"
                    clearable />
        </view>
        <view class="filter-button" @click="getList">
          <up-icon name="search" size="24" color="#999"></up-icon>
        <view class="filter-button"
              @click="getList">
          <up-icon name="search"
                   size="24"
                   color="#999"></up-icon>
        </view>
      </view>
    </view>
    <!-- 设备报修列表 -->
    <view class="ledger-list" v-if="repairList.length > 0">
      <view v-for="(item, index) in repairList" :key="index">
    <view class="ledger-list"
          v-if="repairList.length > 0">
      <view v-for="(item, index) in repairList"
            :key="index">
        <view class="ledger-item">
          <view class="item-header">
            <view class="item-left">
              <view class="document-icon">
                <up-icon name="file-text" size="16" color="#ffffff"></up-icon>
                <up-icon name="file-text"
                         size="16"
                         color="#ffffff"></up-icon>
              </view>
              <text class="item-id">设备名称:{{ item.deviceName }}</text>
            </view>
            <view class="status-tag">
              <u-tag v-if="item.status === 1" type="success">完结</u-tag>
              <u-tag v-if="item.status === 0" type="error">待维修</u-tag>
              <u-tag v-if="item.status === 1"
                     type="success">完结</u-tag>
              <u-tag v-if="item.status === 0"
                     type="error">待维修</u-tag>
            </view>
          </view>
          <up-divider></up-divider>
          <view class="item-details">
            <view class="detail-row">
              <text class="detail-label">规格型号</text>
@@ -69,197 +74,193 @@
              <text class="detail-value">{{ formatDate(item.maintenanceTime) || '-' }}</text>
            </view>
          </view>
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <u-button
              type="primary"
              size="small"
              class="action-btn"
              :disabled="item.status === 1"
              @click="edit(item.id)"
            >
            <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.status === 1"
                      @click="edit(item.id)">
              编辑
            </u-button>
            <u-button
              type="warning"
              size="small"
              class="action-btn"
              :disabled="item.status === 1"
              @click="addMaintain(item.id)"
            >
            <u-button type="warning"
                      size="small"
                      class="action-btn"
                      :disabled="item.status === 1"
                      @click="addMaintain(item.id)">
              新增维修
            </u-button>
            <u-button
              type="error"
              size="small"
              plain
              class="action-btn"
              @click="delRepairByIds(item.id)"
            >
            <u-button type="error"
                      size="small"
                      plain
                      class="action-btn"
                      @click="delRepairByIds(item.id)">
              删除
            </u-button>
          </view>
        </view>
      </view>
    </view>
    <view v-else class="no-data">
    <view v-else
          class="no-data">
      <text>暂无设备报修数据</text>
    </view>
    <!-- 浮动操作按钮 -->
        <view class="fab-button" @click="addRepair">
            <up-icon name="plus" size="24" color="#ffffff"></up-icon>
        </view>
    <view class="fab-button"
          @click="addRepair">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
  </view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import PageHeader from '@/components/PageHeader.vue'
import { getRepairPage, delRepair } from '@/api/equipmentManagement/repair'
import useUserStore from "@/store/modules/user"
  import { ref, onMounted } from "vue";
  import { onShow } from "@dcloudio/uni-app";
  import PageHeader from "@/components/PageHeader.vue";
  import { getRepairPage, delRepair } from "@/api/equipmentManagement/repair";
  import useUserStore from "@/store/modules/user";
const showToast = (message) => {
  uni.showToast({
    title: message,
    icon: 'none'
  })
}
  const showToast = message => {
    uni.showToast({
      title: message,
      icon: "none",
    });
  };
const userStore = useUserStore()
  const userStore = useUserStore();
// 搜索关键词
const searchKeyword = ref('')
  // 搜索关键词
  const searchKeyword = ref("");
// 设备报修数据
const repairList = ref([])
  // 设备报修数据
  const repairList = ref([]);
// 返回上一页
const goBack = () => {
  uni.navigateBack()
}
  // 返回上一页
  const goBack = () => {
    uni.navigateBack();
  };
// 格式化日期
const formatDate = (dateStr) => {
  if (!dateStr) return ''
  const date = new Date(dateStr)
  const year = date.getFullYear()
  const month = String(date.getMonth() + 1).padStart(2, '0')
  const day = String(date.getDate()).padStart(2, '0')
  return `${year}-${month}-${day}`
}
  // 格式化日期
  const formatDate = dateStr => {
    if (!dateStr) return "";
    const date = new Date(dateStr);
    const year = date.getFullYear();
    const month = String(date.getMonth() + 1).padStart(2, "0");
    const day = String(date.getDate()).padStart(2, "0");
    return `${year}-${month}-${day}`;
  };
// 查询列表
const getList = () => {
  showLoadingToast('加载中...')
  const params = {
    current: -1,
    size: -1,
    deviceName: searchKeyword.value || undefined
  }
  getRepairPage(params)
    .then((res) => {
      repairList.value = res.records || res.data?.records || []
      closeToast()
    })
    .catch(() => {
      closeToast()
      showToast('获取数据失败')
    })
}
  // 查询列表
  const getList = () => {
    showLoadingToast("加载中...");
    const params = {
      current: -1,
      size: -1,
      deviceName: searchKeyword.value || undefined,
    };
    getRepairPage(params)
      .then(res => {
        repairList.value = res.records || res.data?.records || [];
        closeToast();
      })
      .catch(() => {
        closeToast();
        showToast("获取数据失败");
      });
  };
// 显示加载提示
const showLoadingToast = (message) => {
  uni.showLoading({
    title: message,
    mask: true
  });
};
  // 显示加载提示
  const showLoadingToast = message => {
    uni.showLoading({
      title: message,
      mask: true,
    });
  };
// 关闭提示
const closeToast = () => {
  uni.hideLoading();
};
  // 关闭提示
  const closeToast = () => {
    uni.hideLoading();
  };
// 新增维修 - 跳转到维修页面
const addMaintain = (id) => {
  if (!id) {
    showToast('参数错误')
    return
  }
  // 使用uni.setStorageSync存储id
  uni.setStorageSync('repairId', id)
  uni.navigateTo({
    url: '/pages/equipmentManagement/repair/maintain'
  })
}
// 新增报修 - 跳转到报修页面
const addRepair = () => {
  uni.navigateTo({
    url: '/pages/equipmentManagement/repair/add'
  })
}
// 编辑 - 跳转到add页面,通过id区分新增还是编辑
const edit = (id) => {
  if (!id) return
  // 使用uni.setStorageSync存储id
  uni.setStorageSync('repairId', id)
  uni.navigateTo({
    url: '/pages/equipmentManagement/repair/add'
  })
}
// 删除报修数据
const delRepairByIds = async (ids) => {
  uni.showModal({
    title: '警告',
    content: '确认删除报修数据, 此操作不可逆?',
    confirmText: '确定',
    cancelText: '取消',
    success: async (res) => {
      if (!res.confirm) return
      try {
        const response = await delRepair(ids)
        if (response.code === 200) {
          showToast('删除成功')
          getList()
        } else {
          showToast('删除失败')
        }
      } catch (e) {
        showToast('删除失败')
      }
  // 新增维修 - 跳转到维修页面
  const addMaintain = id => {
    if (!id) {
      showToast("参数错误");
      return;
    }
  })
}
    // 使用uni.setStorageSync存储id
    uni.setStorageSync("repairId", id);
    uni.navigateTo({
      url: "/pages/equipmentManagement/repair/maintain",
    });
  };
onMounted(() => {
  getList()
})
  // 新增报修 - 跳转到报修页面
  const addRepair = () => {
    uni.navigateTo({
      url: "/pages/equipmentManagement/repair/add",
    });
  };
onShow(() => {
  getList()
})
  // 编辑 - 跳转到add页面,通过id区分新增还是编辑
  const edit = id => {
    if (!id) return;
    // 使用uni.setStorageSync存储id
    uni.setStorageSync("repairId", id);
    uni.navigateTo({
      url: "/pages/equipmentManagement/repair/add",
    });
  };
  // 删除报修数据
  const delRepairByIds = async ids => {
    uni.showModal({
      title: "警告",
      content: "确认删除报修数据, 此操作不可逆?",
      confirmText: "确定",
      cancelText: "取消",
      success: async res => {
        if (!res.confirm) return;
        try {
          const response = await delRepair(ids);
          if (response.code === 200) {
            showToast("删除成功");
            getList();
          } else {
            showToast("删除失败");
          }
        } catch (e) {
          showToast("删除失败");
        }
      },
    });
  };
  onMounted(() => {
    getList();
  });
  onShow(() => {
    getList();
  });
</script>
<style scoped lang="scss">
@import '@/styles/sales-common.scss';
  @import "@/styles/sales-common.scss";
// 设备维修特有样式
.sales-account {
  padding-bottom: 80px; // 为浮动按钮留出空间
}
  // 设备维修特有样式
  .sales-account {
    padding-bottom: 80px; // 为浮动按钮留出空间
  }
.status-tag {
  display: flex;
  align-items: center;
}
  .status-tag {
    display: flex;
    align-items: center;
  }
.action-buttons {
  gap: 8px; // 与公共样式中的 12px 不同
}
  .action-buttons {
    gap: 8px; // 与公共样式中的 12px 不同
  }
</style>
src/pages/humanResources/attendance/checkin.vue
@@ -106,10 +106,7 @@
  const todayRecord = ref({});
  // 班次信息
  const workTimeDict = ref({
    startAt: "09:00",
    endAt: "18:00",
  });
  const workTimeDict = ref();
  // 当前时间展示
  const nowTime = ref("");
src/pages/humanResources/attendance/report.vue
@@ -27,15 +27,7 @@
                        title="搜索日期" />
    <view class="record-list">
      <!-- 加载状态 -->
      <view v-if="loading"
            class="loading-state">
        <u-icon name="loading"
                size="40"
                color="#348fe2"></u-icon>
        <text class="loading-text">加载中...</text>
      </view>
      <view v-else
            v-for="(item) in tableData"
      <view v-for="(item) in tableData"
            :key="item.id"
            class="record-item-card"
            :class="{ 'abnormal': item.status !== 0 }">
src/pages/humanResources/monthlyStatistics/index.vue
@@ -74,7 +74,7 @@
          </view>
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="editItem(item)">
@@ -85,7 +85,7 @@
                      class="action-btn"
                      @click="deleteItem(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -95,12 +95,12 @@
      <text>暂无薪资台账数据</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addItem">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/index.vue
@@ -468,7 +468,7 @@
    },
    {
      icon: "/static/images/icon/xunjianshangchuan@2x.png",
      label: "设备巡检",
      label: "巡检管理",
    },
  ]);
@@ -684,7 +684,7 @@
          url: "/pages/equipmentManagement/upkeep/index",
        });
        break;
      case "设备巡检":
      case "巡检管理":
        uni.navigateTo({
          url: "/pages/inspectionUpload/index",
        });
@@ -1084,7 +1084,7 @@
      { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "运行管理" },
      { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "设备报修" },
      { icon: "/static/images/icon/shbeibaoyang@2x.png", label: "设备保养" },
      { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "设备巡检" },
      { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "巡检管理" },
    ];
    const filteredEquipment = originalEquipment.filter(item => {
      return allowedMenuTitles.has(item.label);
src/pages/indexItem.vue
@@ -330,7 +330,7 @@
          url: "/pages/equipmentManagement/upkeep/index",
        });
        break;
      case "设备巡检":
      case "巡检管理":
        uni.navigateTo({
          url: "/pages/inspectionUpload/index",
        });
src/pages/inspectionUpload/index.vue
@@ -1,7 +1,7 @@
<template>
  <view class="inspection-upload-page">
    <!-- 页面头部 -->
    <PageHeader title="设备巡检"
    <PageHeader title="巡检管理"
                @back="goBack" />
    <!-- 数据列表 -->
    <view class="table-section">
src/pages/managementMeetings/knowledgeBase/index.vue
@@ -73,7 +73,7 @@
                      @click="viewDetail(item,3)">
              查看
            </u-button>
            <u-button type="error"
            <!-- <u-button type="error"
                      size="small"
                      class="action-btn"
                      @click="confirmDelete(item)">
@@ -84,7 +84,7 @@
                      class="action-btn"
                      @click="viewDetail(item,2)">
              编辑
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -94,12 +94,12 @@
      <text>暂无知识记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/managementMeetings/meetingSettings/index.vue
@@ -63,7 +63,7 @@
          </view>
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="viewDetail(item)">
@@ -74,7 +74,7 @@
                      class="action-btn"
                      @click="confirmDelete(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -84,12 +84,12 @@
      <text>暂无会议室记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/managementMeetings/rulesRegulationsManagement/index.vue
@@ -103,7 +103,7 @@
                      @click="viewDetail(item,3)">
              查看
            </u-button>
            <u-button type="error"
            <!-- <u-button type="error"
                      size="small"
                      class="action-btn"
                      @click="handleAbrogate(item)">
@@ -114,7 +114,7 @@
                      class="action-btn"
                      @click="viewDetail(item,2)">
              编辑
            </u-button>
            </u-button> -->
            <u-button type="primary"
                      size="small"
                      class="action-btn"
@@ -130,12 +130,12 @@
      <text>暂无规章制度</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/managementMeetings/sealManagement/index.vue
@@ -77,7 +77,7 @@
                      @click="viewDetail(item,3)">
              查看
            </u-button>
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      v-if="item.status === 'pending'"
@@ -90,7 +90,7 @@
                      v-if="item.status === 'pending'"
                      @click="confirmApprove(item,false)">
              拒绝
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -100,12 +100,12 @@
      <text>暂无用印记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/procurementManagement/invoiceEntry/index.vue
@@ -66,13 +66,13 @@
          </view>
          <!-- 操作按钮区域 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      @click="handleAddInvoice(item)"
                      class="action-btn"
                      :disabled="item.unReceiptPaymentAmount == 0">
              新增开票
            </u-button>
            </u-button> -->
            <u-button size="small"
                      @click="handleViewDetail(item)"
                      class="action-btn">
src/pages/procurementManagement/paymentEntry/index.vue
@@ -85,13 +85,13 @@
          </view>
          <!-- 操作按钮 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.unPaymentAmountTotal == 0"
                      @click="openForm('add', item)">
              新增付款
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
src/pages/procurementManagement/procurementInvoiceLedger/index.vue
@@ -1,95 +1,99 @@
<template>
    <view class="sales-account">
        <!-- 使用通用页面头部组件 -->
        <PageHeader title="来票台账" @back="goBack" />
        <!-- 搜索区域 -->
        <view class="search-section">
            <view class="search-bar">
                <view class="search-input">
                    <up-input
                        class="search-text"
                        placeholder="请输入供应商名称搜索"
                        v-model="searchForm.supplierName"
                        @change="handleQuery"
                        clearable
                    />
                </view>
                <view class="filter-button" @click="handleQuery">
                    <up-icon name="search" size="24" color="#999"></up-icon>
                </view>
            </view>
        </view>
        <!-- 列表区域 -->
        <view class="ledger-list" v-if="total > 0">
            <view v-for="(item, index) in ledgerList" :key="index">
                <view class="ledger-item">
                    <view class="item-header">
                        <view class="item-left">
                            <view class="document-icon">
                                <up-icon name="file-text" size="16" color="#ffffff"></up-icon>
                            </view>
                            <text class="item-id">{{ item.purchaseContractNumber }}</text>
                        </view>
                    </view>
                    <up-divider></up-divider>
                    <view class="item-details">
                        <view class="detail-row">
                            <text class="detail-label">销售合同号</text>
                            <text class="detail-value">{{ item.salesContractNo }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">项目名称</text>
                            <text class="detail-value">{{ item.projectName }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">供应商名称</text>
                            <text class="detail-value">{{ item.supplierName }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">产品大类</text>
                            <text class="detail-value">{{ item.productCategory }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">规格型号</text>
                            <text class="detail-value">{{ item.specificationModel }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">发票号</text>
                            <text class="detail-value">{{ item.invoiceNumber || '-' }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">合同金额(元)</text>
                            <text class="detail-value">{{ item.taxInclusiveTotalPrice || '-' }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">来票日期</text>
                            <text class="detail-value">{{ item.createdAt || '-' }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">来票金额(元)</text>
                            <text class="detail-value highlight">{{ formatAmount(item.ticketsAmount) }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">不含税金额(元)</text>
                            <text class="detail-value highlight">{{ formatAmount(item.unTicketsPrice) }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">增值税</text>
                            <text class="detail-value">{{ item.invoiceAmount }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">录入人</text>
                            <text class="detail-value">{{ item.issUer }}</text>
                        </view>
                        <view class="detail-row">
                            <text class="detail-label">录入日期</text>
                            <text class="detail-value">{{ item.createdAt }}</text>
                        </view>
                    </view>
                    <view class="action-buttons">
                        <u-button
  <view class="sales-account">
    <!-- 使用通用页面头部组件 -->
    <PageHeader title="来票台账"
                @back="goBack" />
    <!-- 搜索区域 -->
    <view class="search-section">
      <view class="search-bar">
        <view class="search-input">
          <up-input class="search-text"
                    placeholder="请输入供应商名称搜索"
                    v-model="searchForm.supplierName"
                    @change="handleQuery"
                    clearable />
        </view>
        <view class="filter-button"
              @click="handleQuery">
          <up-icon name="search"
                   size="24"
                   color="#999"></up-icon>
        </view>
      </view>
    </view>
    <!-- 列表区域 -->
    <view class="ledger-list"
          v-if="total > 0">
      <view v-for="(item, index) in ledgerList"
            :key="index">
        <view class="ledger-item">
          <view class="item-header">
            <view class="item-left">
              <view class="document-icon">
                <up-icon name="file-text"
                         size="16"
                         color="#ffffff"></up-icon>
              </view>
              <text class="item-id">{{ item.purchaseContractNumber }}</text>
            </view>
          </view>
          <up-divider></up-divider>
          <view class="item-details">
            <view class="detail-row">
              <text class="detail-label">销售合同号</text>
              <text class="detail-value">{{ item.salesContractNo }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">项目名称</text>
              <text class="detail-value">{{ item.projectName }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">供应商名称</text>
              <text class="detail-value">{{ item.supplierName }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">产品大类</text>
              <text class="detail-value">{{ item.productCategory }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">规格型号</text>
              <text class="detail-value">{{ item.specificationModel }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">发票号</text>
              <text class="detail-value">{{ item.invoiceNumber || '-' }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">合同金额(元)</text>
              <text class="detail-value">{{ item.taxInclusiveTotalPrice || '-' }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">来票日期</text>
              <text class="detail-value">{{ item.createdAt || '-' }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">来票金额(元)</text>
              <text class="detail-value highlight">{{ formatAmount(item.ticketsAmount) }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">不含税金额(元)</text>
              <text class="detail-value highlight">{{ formatAmount(item.unTicketsPrice) }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">增值税</text>
              <text class="detail-value">{{ item.invoiceAmount }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">录入人</text>
              <text class="detail-value">{{ item.issUer }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">录入日期</text>
              <text class="detail-value">{{ item.createdAt }}</text>
            </view>
          </view>
          <view class="action-buttons">
            <!-- <u-button
                            type="primary"
                            size="small"
                            class="action-btn"
@@ -107,313 +111,330 @@
                            @click="handleDelete(item)"
                        >
                            删除
                        </u-button>
<!--                        <u-button-->
<!--                            type="default"-->
<!--                            size="small"-->
<!--                            plain-->
<!--                            class="action-btn"-->
<!--                            v-if="item.invoiceFileName"-->
<!--                            @click="openFileActions(item.commonFiles || [])"-->
<!--                        >-->
<!--                            查看附件-->
<!--                        </u-button>-->
<!--                        <u-button-->
<!--                            type="primary"-->
<!--                            size="small"-->
<!--                            class="action-btn"-->
<!--                            v-else-->
<!--                            :disabled="item.issUer !== userStore.nickName"-->
<!--                            @click="openUpload(item)"-->
<!--                        >-->
<!--                            上传-->
<!--                        </u-button>-->
                    </view>
                </view>
            </view>
        </view>
        <view v-else class="no-data">
            <text>暂无来票台账数据</text>
        </view>
        <!-- 单行上传弹窗(无表单) -->
        <u-popup v-model="showUpload" mode="bottom" border-radius="10">
            <view class="upload-container">
                <view class="popup-header">
                    <text class="popup-title">上传附件(仅支持 pdf,最大10MB,最多10个)</text>
                </view>
                <u-upload
                    ref="uploadRef"
                    accept="file"
                    multiple
                    :max-count="10"
                    :show-progress="true"
                    :before-upload="beforeReadPdf"
                    :action="uploadUrl"
                    :header="{ Authorization: 'Bearer ' + getToken() }"
                    name="file"
                    @on-success="onUploadSuccess"
                    @on-error="onUploadError"
                />
                <view class="uploaded-list" v-if="fileList.length">
                    <view class="uploaded-item" v-for="(f, idx) in fileList" :key="idx">
                        <text class="file-name">{{ f.name || getFileNameFromUrl(f.url) }}</text>
                        <u-button size="mini" type="error" plain @click="removeUploaded(idx)">移除</u-button>
                    </view>
                </view>
                <view class="filter-actions">
                    <u-button @click="showUpload = false" type="default" size="default" style="width: 150px;">取消</u-button>
                    <u-button @click="confirmUpload" type="primary" size="default" style="width: 150px;">确认</u-button>
                </view>
            </view>
        </u-popup>
        <!-- 附件列表选择 -->
        <u-action-sheet v-model="showFileSheet" :list="fileActions" :cancel-btn="true" @click="onSelectFile" @close="showFileSheet = false" />
    </view>
                        </u-button> -->
            <!--                        <u-button-->
            <!--                            type="default"-->
            <!--                            size="small"-->
            <!--                            plain-->
            <!--                            class="action-btn"-->
            <!--                            v-if="item.invoiceFileName"-->
            <!--                            @click="openFileActions(item.commonFiles || [])"-->
            <!--                        >-->
            <!--                            查看附件-->
            <!--                        </u-button>-->
            <!--                        <u-button-->
            <!--                            type="primary"-->
            <!--                            size="small"-->
            <!--                            class="action-btn"-->
            <!--                            v-else-->
            <!--                            :disabled="item.issUer !== userStore.nickName"-->
            <!--                            @click="openUpload(item)"-->
            <!--                        >-->
            <!--                            上传-->
            <!--                        </u-button>-->
          </view>
        </view>
      </view>
    </view>
    <view v-else
          class="no-data">
      <text>暂无来票台账数据</text>
    </view>
    <!-- 单行上传弹窗(无表单) -->
    <u-popup v-model="showUpload"
             mode="bottom"
             border-radius="10">
      <view class="upload-container">
        <view class="popup-header">
          <text class="popup-title">上传附件(仅支持 pdf,最大10MB,最多10个)</text>
        </view>
        <u-upload ref="uploadRef"
                  accept="file"
                  multiple
                  :max-count="10"
                  :show-progress="true"
                  :before-upload="beforeReadPdf"
                  :action="uploadUrl"
                  :header="{ Authorization: 'Bearer ' + getToken() }"
                  name="file"
                  @on-success="onUploadSuccess"
                  @on-error="onUploadError" />
        <view class="uploaded-list"
              v-if="fileList.length">
          <view class="uploaded-item"
                v-for="(f, idx) in fileList"
                :key="idx">
            <text class="file-name">{{ f.name || getFileNameFromUrl(f.url) }}</text>
            <u-button size="mini"
                      type="error"
                      plain
                      @click="removeUploaded(idx)">移除</u-button>
          </view>
        </view>
        <view class="filter-actions">
          <u-button @click="showUpload = false"
                    type="default"
                    size="default"
                    style="width: 150px;">取消</u-button>
          <u-button @click="confirmUpload"
                    type="primary"
                    size="default"
                    style="width: 150px;">确认</u-button>
        </view>
      </view>
    </u-popup>
    <!-- 附件列表选择 -->
    <u-action-sheet v-model="showFileSheet"
                    :list="fileActions"
                    :cancel-btn="true"
                    @click="onSelectFile"
                    @close="showFileSheet = false" />
  </view>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import dayjs from 'dayjs'
const showToast = (message) => {
    uni.showToast({
        title: message,
        icon: 'none'
    })
}
import useUserStore from '@/store/modules/user'
import { getToken } from '@/utils/auth'
import config from '@/config.js'
import {
    registrationProductPage,
    commitFile,
    delInvoiceLedgerByRegProductId
} from '@/api/salesManagement/invoiceLedger.js'
import {onShow} from "@dcloudio/uni-app";
import {productRecordPage} from "@/api/procurementManagement/procurementInvoiceLedger";
import {delRegistration} from "@/api/procurementManagement/invoiceEntry";
import PageHeader from '@/components/PageHeader.vue';
import FooterButtons from '@/components/FooterButtons.vue';
  import { ref, reactive, onMounted } from "vue";
  import dayjs from "dayjs";
  const showToast = message => {
    uni.showToast({
      title: message,
      icon: "none",
    });
  };
  import useUserStore from "@/store/modules/user";
  import { getToken } from "@/utils/auth";
  import config from "@/config.js";
  import {
    registrationProductPage,
    commitFile,
    delInvoiceLedgerByRegProductId,
  } from "@/api/salesManagement/invoiceLedger.js";
  import { onShow } from "@dcloudio/uni-app";
  import { productRecordPage } from "@/api/procurementManagement/procurementInvoiceLedger";
  import { delRegistration } from "@/api/procurementManagement/invoiceEntry";
  import PageHeader from "@/components/PageHeader.vue";
  import FooterButtons from "@/components/FooterButtons.vue";
const userStore = useUserStore()
  const userStore = useUserStore();
// 列表与查询
const ledgerList = ref([])
const total = ref(0)
const page = reactive({ current: -1, size: -1 })
const searchForm = reactive({
    supplierName: '',
})
  // 列表与查询
  const ledgerList = ref([]);
  const total = ref(0);
  const page = reactive({ current: -1, size: -1 });
  const searchForm = reactive({
    supplierName: "",
  });
const currentId = ref('')
const fileList = ref([]) // 行上传或通用上传列表
const uploadRef = ref()
const uploadUrl = config.baseUrl + '/invoiceLedger/uploadFile'
  const currentId = ref("");
  const fileList = ref([]); // 行上传或通用上传列表
  const uploadRef = ref();
  const uploadUrl = config.baseUrl + "/invoiceLedger/uploadFile";
// 行上传弹窗
const showUpload = ref(false)
  // 行上传弹窗
  const showUpload = ref(false);
// 附件查看
const showFileSheet = ref(false)
const fileActions = ref([])
let currentFilesToOpen = []
  // 附件查看
  const showFileSheet = ref(false);
  const fileActions = ref([]);
  let currentFilesToOpen = [];
const formatAmount = (val) => {
    if (val === undefined || val === null || val === '') return '0.00'
    const num = Number(val)
    if (Number.isNaN(num)) return '0.00'
    return num.toFixed(2)
}
const formatDateTime = (val) => {
    if (!val) return ''
    return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
}
  const formatAmount = val => {
    if (val === undefined || val === null || val === "") return "0.00";
    const num = Number(val);
    if (Number.isNaN(num)) return "0.00";
    return num.toFixed(2);
  };
  const formatDateTime = val => {
    if (!val) return "";
    return dayjs(val).format("YYYY-MM-DD HH:mm:ss");
  };
const goBack = () => {
    uni.navigateBack()
}
  const goBack = () => {
    uni.navigateBack();
  };
const handleQuery = () => {
    getList()
}
  const handleQuery = () => {
    getList();
  };
const getList = async () => {
    try {
        uni.showLoading({
            title: '加载中...'
        });
        const res = await productRecordPage({ ...searchForm, ...page })
        // 兼容不同返回结构
        const records = res?.data?.records || res?.records || res?.data || []
        const totalVal = res?.data?.total || res?.total || records.length || 0
        ledgerList.value = records
        total.value = totalVal
        uni.hideLoading();
    } catch (e) {
        uni.hideLoading();
        showToast('获取列表失败')
    }
}
  const getList = async () => {
    try {
      uni.showLoading({
        title: "加载中...",
      });
      const res = await productRecordPage({ ...searchForm, ...page });
      // 兼容不同返回结构
      const records = res?.data?.records || res?.records || res?.data || [];
      const totalVal = res?.data?.total || res?.total || records.length || 0;
      ledgerList.value = records;
      total.value = totalVal;
      uni.hideLoading();
    } catch (e) {
      uni.hideLoading();
      showToast("获取列表失败");
    }
  };
// 编辑逻辑改为跳转新页面
const openEdit = (row) => {
    try {
        uni.setStorageSync('invoiceLedgerEditRow', JSON.stringify(row))
        uni.navigateTo({ url: '/pages/procurementManagement/procurementInvoiceLedger/detail' })
    } catch (e) {
        showToast('跳转失败')
    }
}
  // 编辑逻辑改为跳转新页面
  const openEdit = row => {
    try {
      uni.setStorageSync("invoiceLedgerEditRow", JSON.stringify(row));
      uni.navigateTo({
        url: "/pages/procurementManagement/procurementInvoiceLedger/detail",
      });
    } catch (e) {
      showToast("跳转失败");
    }
  };
// 删除
const handleDelete = (row) => {
    let ids = [];
    ids.push(row.id);
    console.log(ids)
    uni.showModal({
        title: '删除确认',
        content: '该发票台账将被删除,是否确认删除?',
        success: async (res) => {
            if (res.confirm) {
                try {
                    uni.showLoading({
                        title: '处理中...'
                    });
                    await delRegistration(ids)
                    uni.hideLoading();
                    showToast('删除成功')
                    await getList()
                } catch (e) {
                    uni.hideLoading();
                    showToast('删除失败,请重试')
                }
            }
        }
    })
}
  // 删除
  const handleDelete = row => {
    let ids = [];
    ids.push(row.id);
    console.log(ids);
    uni.showModal({
      title: "删除确认",
      content: "该发票台账将被删除,是否确认删除?",
      success: async res => {
        if (res.confirm) {
          try {
            uni.showLoading({
              title: "处理中...",
            });
            await delRegistration(ids);
            uni.hideLoading();
            showToast("删除成功");
            await getList();
          } catch (e) {
            uni.hideLoading();
            showToast("删除失败,请重试");
          }
        }
      },
    });
  };
// 行上传
const openUpload = (row) => {
    currentId.value = row.id
    fileList.value = []
    showUpload.value = true
}
const confirmUpload = async () => {
    try {
        const payload = { fileList: fileList.value, id: currentId.value }
        uni.showLoading({
            title: '提交中...'
        });
        await commitFile(payload)
        uni.hideLoading();
        showToast('提交成功')
        showUpload.value = false
        fileList.value = []
        currentId.value = ''
        getList()
    } catch (e) {
        uni.hideLoading();
        showToast('提交失败,请重试')
    }
}
  // 行上传
  const openUpload = row => {
    currentId.value = row.id;
    fileList.value = [];
    showUpload.value = true;
  };
  const confirmUpload = async () => {
    try {
      const payload = { fileList: fileList.value, id: currentId.value };
      uni.showLoading({
        title: "提交中...",
      });
      await commitFile(payload);
      uni.hideLoading();
      showToast("提交成功");
      showUpload.value = false;
      fileList.value = [];
      currentId.value = "";
      getList();
    } catch (e) {
      uni.hideLoading();
      showToast("提交失败,请重试");
    }
  };
// 上传相关
const beforeReadPdf = (file) => {
    // 兼容多文件
    const files = Array.isArray(file) ? file : [file]
    for (const f of files) {
        const sizeOk = f.size <= 10 * 1024 * 1024
        const ext = (f.name || '').split('.').pop()?.toLowerCase()
        if (ext !== 'pdf') {
            showToast('仅支持pdf文件')
            return false
        }
        if (!sizeOk) {
            showToast('上传文件大小不能超过10MB')
            return false
        }
    }
    return true
}
  // 上传相关
  const beforeReadPdf = file => {
    // 兼容多文件
    const files = Array.isArray(file) ? file : [file];
    for (const f of files) {
      const sizeOk = f.size <= 10 * 1024 * 1024;
      const ext = (f.name || "").split(".").pop()?.toLowerCase();
      if (ext !== "pdf") {
        showToast("仅支持pdf文件");
        return false;
      }
      if (!sizeOk) {
        showToast("上传文件大小不能超过10MB");
        return false;
      }
    }
    return true;
  };
// uview-plus 的上传成功回调
const onUploadSuccess = (res, file) => {
    try {
        const data = JSON.parse(res.data || '{}')
        if (data.code === 200) {
            fileList.value.push(data.data)
            showToast('上传成功')
        } else {
            showToast('上传失败: ' + (data.msg || '未知错误'))
        }
    } catch (err) {
        showToast('上传失败')
    }
}
  // uview-plus 的上传成功回调
  const onUploadSuccess = (res, file) => {
    try {
      const data = JSON.parse(res.data || "{}");
      if (data.code === 200) {
        fileList.value.push(data.data);
        showToast("上传成功");
      } else {
        showToast("上传失败: " + (data.msg || "未知错误"));
      }
    } catch (err) {
      showToast("上传失败");
    }
  };
// uview-plus 的上传失败回调
const onUploadError = (err) => {
    showToast('上传失败')
}
  // uview-plus 的上传失败回调
  const onUploadError = err => {
    showToast("上传失败");
  };
const removeUploaded = (index) => {
    fileList.value.splice(index, 1)
}
  const removeUploaded = index => {
    fileList.value.splice(index, 1);
  };
const getFileNameFromUrl = (url) => {
    try {
        if (!url) return ''
        return decodeURIComponent(url.split('/').pop())
    } catch (e) {
        return url
    }
}
  const getFileNameFromUrl = url => {
    try {
      if (!url) return "";
      return decodeURIComponent(url.split("/").pop());
    } catch (e) {
      return url;
    }
  };
// 附件查看
const openFileActions = (commonFiles) => {
    currentFilesToOpen = commonFiles || []
    fileActions.value = (commonFiles || []).map((f, idx) => ({
        title: getFileNameFromUrl(f.url || ''),
        index: idx
    }))
    showFileSheet.value = true
}
const onSelectFile = async (action) => {
    try {
        const item = currentFilesToOpen[action.index]
        if (!item || !item.url) return
        uni.showLoading({
            title: '下载中...'
        });
        uni.downloadFile({
            url: item.url,
            success: (res) => {
                uni.hideLoading();
                if (res.statusCode === 200) {
                    uni.openDocument({ filePath: res.tempFilePath })
                } else {
                    showToast('下载失败')
                }
            },
            fail: () => {
                uni.hideLoading();
                showToast('下载失败')
            }
        })
    } catch (e) {
        uni.hideLoading();
        showToast('打开失败')
    }
}
  // 附件查看
  const openFileActions = commonFiles => {
    currentFilesToOpen = commonFiles || [];
    fileActions.value = (commonFiles || []).map((f, idx) => ({
      title: getFileNameFromUrl(f.url || ""),
      index: idx,
    }));
    showFileSheet.value = true;
  };
  const onSelectFile = async action => {
    try {
      const item = currentFilesToOpen[action.index];
      if (!item || !item.url) return;
      uni.showLoading({
        title: "下载中...",
      });
      uni.downloadFile({
        url: item.url,
        success: res => {
          uni.hideLoading();
          if (res.statusCode === 200) {
            uni.openDocument({ filePath: res.tempFilePath });
          } else {
            showToast("下载失败");
          }
        },
        fail: () => {
          uni.hideLoading();
          showToast("下载失败");
        },
      });
    } catch (e) {
      uni.hideLoading();
      showToast("打开失败");
    }
  };
onShow(() => {
    getList()
})
  onShow(() => {
    getList();
  });
</script>
<style scoped lang="scss">
@import '@/styles/procurement-common.scss';
  @import "@/styles/procurement-common.scss";
// 来票台账特有样式(所有样式都已包含在公共样式中)
  // 来票台账特有样式(所有样式都已包含在公共样式中)
</style>
src/pages/procurementManagement/procurementLedger/index.vue
@@ -77,7 +77,7 @@
              </view>
            </view>
            <!-- 仅非“审批通过”的台账展示删除按钮 -->
            <view class="detail-row"
            <!-- <view class="detail-row"
                  v-if="item.approvalStatus !== 3"
                  style="justify-content: flex-end; margin-top: 8px;">
              <up-button type="error"
@@ -86,7 +86,7 @@
                         @click.stop="handleDelete(item)">
                删除
              </up-button>
            </view>
            </view> -->
          </view>
        </view>
      </view>
@@ -96,12 +96,12 @@
      <text>暂无采购台账数据</text>
    </view>
    <!-- 浮动操作按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="handleInfo('add')">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/procurementManagement/receiptPaymentHistory/index.vue
@@ -89,13 +89,13 @@
                            >
                                编辑付款
                            </u-button> -->
              <u-button type="error"
              <!-- <u-button type="error"
                        size="small"
                        class="action-btn"
                        :disabled="item.registrant !== userStore.nickName"
                        @click="deleteItem(item)">
                删除
              </u-button>
              </u-button> -->
            </view>
          </view>
        </view>
src/pages/qualityManagement/finalInspection/index.vue
@@ -117,29 +117,29 @@
          </view>
          <!-- 操作按钮 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.inspectState"
                      @click.stop="startInspection(item)">
              编辑
            </u-button>
            </u-button> -->
            <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click.stop="viewDetail(item)">
              详情
            </u-button>
            <u-button type="success"
            <!-- <u-button type="success"
                      size="small"
                      class="action-btn"
                      :disabled="item.inspectState"
                      @click.stop="submitInspection(item)">
              提交
            </u-button>
            </u-button> -->
          </view>
          <view class="action-buttons">
            <u-button type="info"
            <!-- <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click.stop="viewFileList(item)">
@@ -151,7 +151,7 @@
                      :disabled="item.inspectState || item.checkName !== ''"
                      @click.stop="assignInspector(item)">
              分配检验员
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -163,12 +163,12 @@
    </view>
    <!-- 分页组件 -->
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addInspection">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
    <!-- 日期选择器 -->
    <up-popup v-model:show="showDate"
              mode="date"
src/pages/qualityManagement/materialInspection/index.vue
@@ -117,29 +117,29 @@
          </view>
          <!-- 操作按钮 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.inspectState"
                      @click.stop="startInspection(item)">
              编辑
            </u-button>
            </u-button> -->
            <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click.stop="viewDetail(item)">
              详情
            </u-button>
            <u-button type="success"
            <!-- <u-button type="success"
                      size="small"
                      class="action-btn"
                      :disabled="item.inspectState"
                      @click.stop="submitInspection(item)">
              提交
            </u-button>
            </u-button> -->
          </view>
          <view class="action-buttons">
            <u-button type="info"
            <!-- <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click.stop="viewFileList(item)">
@@ -151,7 +151,7 @@
                      :disabled="item.inspectState || item.checkName !== ''"
                      @click.stop="assignInspector(item)">
              分配检验员
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -163,12 +163,12 @@
    </view>
    <!-- 分页组件 -->
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addInspection">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
    <!-- 日期选择器 -->
    <up-popup v-model:show="showDate"
              mode="date"
src/pages/qualityManagement/processInspection/index.vue
@@ -117,29 +117,29 @@
          </view>
          <!-- 操作按钮 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.inspectState"
                      @click.stop="startInspection(item)">
              编辑
            </u-button>
            </u-button> -->
            <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click.stop="viewDetail(item)">
              详情
            </u-button>
            <u-button type="success"
            <!-- <u-button type="success"
                      size="small"
                      class="action-btn"
                      :disabled="item.inspectState"
                      @click.stop="submitInspection(item)">
              提交
            </u-button>
            </u-button> -->
          </view>
          <view class="action-buttons">
            <u-button type="info"
            <!-- <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click.stop="viewFileList(item)">
@@ -151,7 +151,7 @@
                      :disabled="item.inspectState || item.checkName !== ''"
                      @click.stop="assignInspector(item)">
              分配检验员
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -163,12 +163,12 @@
    </view>
    <!-- 分页组件 -->
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addInspection">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
    <!-- 日期选择器 -->
    <up-popup v-model:show="showDate"
              mode="date"
src/pages/safeProduction/accidentReportingRecord/index.vue
@@ -80,7 +80,7 @@
                      @click="viewDetail(item)">
              查看详情
            </u-button>
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="editAccident(item)">
@@ -91,7 +91,7 @@
                      class="action-btn"
                      @click="deleteAccident(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -101,12 +101,12 @@
      <text>暂无事故记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addAccident">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/safeProduction/dangerInvestigation/index.vue
@@ -112,13 +112,13 @@
          </view>
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <!-- <u-button type="info"
            <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click="viewDetail(item)">
              查看详情
            </u-button> -->
            <u-button type="warning"
            </u-button>
            <!-- <u-button type="warning"
                      size="small"
                      class="action-btn"
                      :disabled="item.isRectify"
@@ -131,10 +131,10 @@
                      :disabled="!item.rectifyActualTime"
                      @click="acceptanceVisit(item)">
              验收
            </u-button>
            </u-button> -->
          </view>
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="editVisit(item)">
@@ -151,7 +151,7 @@
                      class="action-btn"
                      @click="deleteVisit(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -161,12 +161,12 @@
      <text>暂无拜访记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/safeProduction/emergencyPlanReview/index.vue
@@ -66,24 +66,24 @@
          </view>
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="editPlan(item)">
              编辑
            </u-button>
            </u-button> -->
            <u-button type="info"
                      size="small"
                      class="action-btn"
                      @click="viewDetail(item)">
              查看详情
            </u-button>
            <u-button type="error"
            <!-- <u-button type="error"
                      size="small"
                      class="action-btn"
                      @click="deletePlan(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -93,12 +93,12 @@
      <text>暂无应急预案</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addPlan">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/safeProduction/hazardSourceLedger/index.vue
@@ -87,7 +87,7 @@
                      @click="viewDetail(item)">
              查看详情
            </u-button>
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="editVisit(item)">
@@ -98,7 +98,7 @@
                      class="action-btn"
                      @click="deleteVisit(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -108,12 +108,12 @@
      <text>暂无拜访记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/safeProduction/hazardousMaterialsControl/index.vue
@@ -94,7 +94,7 @@
                      @click="viewDetail(item)">
              查看详情
            </u-button> -->
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.returnUserId"
@@ -106,7 +106,7 @@
                      class="action-btn"
                      @click="deleteVisit(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -116,12 +116,12 @@
      <text>暂无拜访记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/safeProduction/safeQualifications/index.vue
@@ -69,7 +69,7 @@
                      @click="viewDetail(item)">
              查看详情
            </u-button>
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      @click="editVisit(item)">
@@ -80,7 +80,7 @@
                      class="action-btn"
                      @click="deleteVisit(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
        </view>
      </view>
@@ -90,12 +90,12 @@
      <text>暂无拜访记录</text>
    </view>
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/safeProduction/safetyTrainingAssessment/index.vue
@@ -100,7 +100,7 @@
          </view>
          <!-- 按钮区域 -->
          <view class="action-buttons">
            <u-button type="primary"
            <!-- <u-button type="primary"
                      size="small"
                      class="action-btn"
                      :disabled="item.state !== 0"
@@ -118,7 +118,7 @@
                      class="action-btn"
                      @click="deleteVisit(item)">
              删除
            </u-button>
            </u-button> -->
          </view>
          <view class="action-buttons">
            <u-button type="warning"
@@ -149,12 +149,12 @@
                        @cancel="handleDateCancel"
                        title="选择培训日期" />
    <!-- 浮动新增按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="addVisit">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>
src/pages/sales/invoiceLedger/index.vue
@@ -84,7 +84,7 @@
            </view>
          </view>
          <view class="action-buttons">
            <up-button type="primary"
            <!-- <up-button type="primary"
                       size="small"
                       class="action-btn"
                       @click="openEdit(item)">
@@ -96,7 +96,7 @@
                       class="action-btn"
                       @click="handleDelete(item)">
              删除
            </up-button>
            </up-button> -->
            <!--                        <up-button-->
            <!--                            size="small"-->
            <!--                            plain-->
src/pages/sales/invoicingRegistration/index.vue
@@ -66,13 +66,13 @@
          </view>
          <!-- 操作按钮区域 -->
          <view class="action-buttons">
            <up-button type="primary"
            <!-- <up-button type="primary"
                       size="small"
                       @click="handleAddInvoice(item)"
                       class="action-btn"
                       :disabled="item.noInvoiceAmountTotal == 0">
              新增开票
            </up-button>
            </up-button> -->
            <up-button size="small"
                       @click="handleViewDetail(item)"
                       class="action-btn">
src/pages/sales/receiptPayment/index.vue
@@ -79,7 +79,7 @@
            </view>
          </view>
          <!-- 操作按钮 -->
          <view class="action-buttons">
          <!-- <view class="action-buttons">
            <up-button type="primary"
                       size="small"
                       class="action-btn"
@@ -87,7 +87,7 @@
                       @click="openForm(item)">
              新增回款
            </up-button>
          </view>
          </view> -->
        </view>
      </view>
    </view>
src/pages/sales/receiptPaymentHistory/index.vue
@@ -93,13 +93,13 @@
                            >
                                编辑回款
                            </u-button> -->
              <u-button type="error"
              <!-- <u-button type="error"
                        size="small"
                        class="action-btn"
                        :disabled="item.registrant !== userStore.nickName"
                        @click="delitem(item)">
                删除
              </u-button>
              </u-button> -->
            </view>
          </view>
        </view>
src/pages/sales/salesAccount/index.vue
@@ -82,6 +82,13 @@
              <u-button class="detail-button"
                        size="small"
                        type="primary"
                        plain
                        @click.stop="openOut(item)">
                发货状态
              </u-button>
              <!-- <u-button class="detail-button"
                        size="small"
                        type="primary"
                        @click.stop="handleInfo('edit', item)">
                编辑
              </u-button>
@@ -91,14 +98,14 @@
                        plain
                        @click.stop="openOut(item)">
                发货状态
              </u-button>
              <u-button class="detail-button"
              </u-button> -->
              <!-- <u-button class="detail-button"
                        size="small"
                        type="error"
                        plain
                        @click.stop="handleDelete(item)">
                删除
              </u-button>
              </u-button> -->
            </view>
          </view>
        </view>
@@ -109,12 +116,12 @@
      <text>暂无销售台账数据</text>
    </view>
    <!-- 浮动操作按钮 -->
    <view class="fab-button"
    <!-- <view class="fab-button"
          @click="handleInfo('add')">
      <up-icon name="plus"
               size="24"
               color="#ffffff"></up-icon>
    </view>
    </view> -->
  </view>
</template>