From 41acc01d0056630ac11083cf31397f2462acaf4e Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 06 三月 2026 11:28:39 +0800
Subject: [PATCH] 一些编辑功能隐藏
---
src/pages/procurementManagement/procurementLedger/index.vue | 8
src/pages.json | 4
src/pages/procurementManagement/paymentEntry/index.vue | 4
src/pages/safeProduction/hazardSourceLedger/index.vue | 8
src/pages/indexItem.vue | 2
src/pages/safeProduction/accidentReportingRecord/index.vue | 8
src/pages/procurementManagement/invoiceEntry/index.vue | 4
src/pages/safeProduction/hazardousMaterialsControl/index.vue | 8
src/pages/managementMeetings/sealManagement/index.vue | 8
src/pages/managementMeetings/meetingSettings/index.vue | 8
src/pages/qualityManagement/processInspection/index.vue | 16
src/api/inspectionManagement/index.js | 4
src/pages/procurementManagement/procurementInvoiceLedger/index.vue | 769 ++++++------
src/pages/managementMeetings/knowledgeBase/index.vue | 8
src/pages/safeProduction/dangerInvestigation/index.vue | 16
src/pages/safeProduction/safetyTrainingAssessment/index.vue | 8
src/pages/sales/receiptPaymentHistory/index.vue | 4
src/pages/index.vue | 6
src/pages/procurementManagement/receiptPaymentHistory/index.vue | 4
src/pages/humanResources/attendance/checkin.vue | 5
src/pages/sales/receiptPayment/index.vue | 4
src/pages/managementMeetings/rulesRegulationsManagement/index.vue | 8
src/api/inspectionUpload/index.js | 2
src/pages/humanResources/attendance/report.vue | 10
src/pages/cooperativeOffice/collaborativeApproval/index.vue | 8
src/pages/qualityManagement/finalInspection/index.vue | 16
src/pages/inspectionUpload/index.vue | 2
src/pages/sales/invoicingRegistration/index.vue | 4
src/pages/sales/salesAccount/index.vue | 17
src/pages/safeProduction/emergencyPlanReview/index.vue | 12
src/pages/sales/invoiceLedger/index.vue | 4
src/pages/humanResources/monthlyStatistics/index.vue | 8
src/pages/equipmentManagement/inspection/index.vue | 881 +++++++-------
src/pages/cooperativeOffice/noticeManagement/index.vue | 4
src/pages/equipmentManagement/repair/index.vue | 347 ++--
src/pages/safeProduction/safeQualifications/index.vue | 8
src/pages/equipmentManagement/inspection/detail.vue | 1364 +++++++++++-----------
src/pages/qualityManagement/materialInspection/index.vue | 16
src/pages/cooperativeOffice/clientVisit/index.vue | 4
39 files changed, 1,833 insertions(+), 1,788 deletions(-)
diff --git a/src/api/inspectionManagement/index.js b/src/api/inspectionManagement/index.js
index 7eb2b81..c663eec 100644
--- a/src/api/inspectionManagement/index.js
+++ b/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',
diff --git a/src/api/inspectionUpload/index.js b/src/api/inspectionUpload/index.js
index cf11be8..844408d 100644
--- a/src/api/inspectionUpload/index.js
+++ b/src/api/inspectionUpload/index.js
@@ -1,4 +1,4 @@
-// 璁惧宸℃
+// 宸℃绠$悊
import request from '@/utils/request'
// 浜岀淮鐮佺鐞嗚〃鏌ヨ
diff --git a/src/pages.json b/src/pages.json
index e5a99cd..dcab874 100644
--- a/src/pages.json
+++ b/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"
diff --git a/src/pages/cooperativeOffice/clientVisit/index.vue b/src/pages/cooperativeOffice/clientVisit/index.vue
index 83162d8..35fe356 100644
--- a/src/pages/cooperativeOffice/clientVisit/index.vue
+++ b/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>
diff --git a/src/pages/cooperativeOffice/collaborativeApproval/index.vue b/src/pages/cooperativeOffice/collaborativeApproval/index.vue
index 21a3f7b..bc69a5f 100644
--- a/src/pages/cooperativeOffice/collaborativeApproval/index.vue
+++ b/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>
diff --git a/src/pages/cooperativeOffice/noticeManagement/index.vue b/src/pages/cooperativeOffice/noticeManagement/index.vue
index 8758626..d63a9b4 100644
--- a/src/pages/cooperativeOffice/noticeManagement/index.vue
+++ b/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">
diff --git a/src/pages/equipmentManagement/inspection/detail.vue b/src/pages/equipmentManagement/inspection/detail.vue
index 4b62205..8a88ac2 100644
--- a/src/pages/equipmentManagement/inspection/detail.vue
+++ b/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">姝e父</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">姝e父</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: '姝e父', value: 'normal' },
- { label: '寮傚父', value: 'abnormal' }
-]
+ // 宸℃缁撴灉閫夐」
+ const resultOptions = [
+ { label: "姝e父", 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";
+
+ // 濡傛灉閫夋嫨姝e父锛屾竻绌哄紓甯告弿杩�
+ if (value === "normal") {
+ item.abnormalDesc = "";
+ }
+ };
+
+ // 鏂囦欢涓婁紶鍚庡鐞�
+ const afterRead = async (event, index, type) => {
+ const { file } = event;
+ const item = inspectionItems.value[index];
+
+ // 妯℃嫙涓婁紶杩囩▼
+ uni.showLoading({ title: "涓婁紶涓�..." });
+
+ try {
+ // 杩欓噷搴旇璋冪敤瀹為檯鐨勪笂浼燗PI
+ 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'
-
- // 濡傛灉閫夋嫨姝e父锛屾竻绌哄紓甯告弿杩�
- 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 {
- // 杩欓噷搴旇璋冪敤瀹為檯鐨勪笂浼燗PI
- 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: '妫�鏌ヨ澶囧懆鍥寸幆澧冩槸鍚︾鍚堣姹傦紝閫氶銆佺収鏄庣瓑鏄惁姝e父',
- completed: false,
- expanded: false,
- result: '',
- isAbnormal: false,
- abnormalDesc: '',
- images: [],
- videos: [],
- remark: ''
- },
- {
- name: '浠〃璇绘暟璁板綍',
- description: '璁板綍鐩稿叧浠〃鐨勮鏁帮紝妫�鏌ユ槸鍚﹀湪姝e父鑼冨洿鍐�',
- 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: "妫�鏌ヨ澶囧懆鍥寸幆澧冩槸鍚︾鍚堣姹傦紝閫氶銆佺収鏄庣瓑鏄惁姝e父",
+ completed: false,
+ expanded: false,
+ result: "",
+ isAbnormal: false,
+ abnormalDesc: "",
+ images: [],
+ videos: [],
+ remark: "",
+ },
+ {
+ name: "浠〃璇绘暟璁板綍",
+ description: "璁板綍鐩稿叧浠〃鐨勮鏁帮紝妫�鏌ユ槸鍚﹀湪姝e父鑼冨洿鍐�",
+ 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>
\ No newline at end of file
diff --git a/src/pages/equipmentManagement/inspection/index.vue b/src/pages/equipmentManagement/inspection/index.vue
index bb949fa..1c9eb47 100644
--- a/src/pages/equipmentManagement/inspection/index.vue
+++ b/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骞碝M鏈圖D鏃�')
-}
-
-// 鏍煎紡鍖栨棩鏈熸椂闂�
-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('浜岀淮鐮佷笉鍖归厤锛岃鎵弿姝g‘鐨勮澶囦簩缁寸爜')
- }
- },
- 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骞碝M鏈圖D鏃�");
+ };
-// 鏌ヨ宸℃娓呭崟
-const getList = () => {
- uni.showLoading({
- title: '鍔犺浇涓�...',
- mask: true
- })
-
- const params = {
- date: dayjs(selectedDate.value).format('YYYY-MM-DD')
- }
-
- // 妯℃嫙鏁版嵁锛屽疄闄呭簲璇ヨ皟鐢ˋPI
- setTimeout(() => {
- inspectionList.value = [
- {
- id: 1,
- deviceName: '绌哄帇鏈篈01',
- 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("浜岀淮鐮佷笉鍖归厤锛岃鎵弿姝g‘鐨勮澶囦簩缁寸爜");
+ }
},
- {
- id: 2,
- deviceName: '鍐峰嵈濉擝02',
- deviceCode: 'LQT-B02',
- location: '鐢熶骇杞﹂棿B鍖�',
- inspectionTime: '09:00-10:00',
- inspector: '鏉庡洓',
- status: 1,
- completedTime: null
+ fail: err => {
+ console.log("鎵爜澶辫触锛�", err);
+ showToast("鎵爜澶辫触");
},
- {
- id: 3,
- deviceName: '鍙樺帇鍣–03',
- 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"),
+ };
+
+ // 妯℃嫙鏁版嵁锛屽疄闄呭簲璇ヨ皟鐢ˋPI
+ setTimeout(() => {
+ inspectionList.value = [
+ {
+ id: 1,
+ deviceName: "绌哄帇鏈篈01",
+ deviceCode: "KYJ-A01",
+ location: "鐢熶骇杞﹂棿A鍖�",
+ inspectionTime: "08:00-09:00",
+ inspector: "寮犱笁",
+ status: 0, // 0:寰呭贰妫� 1:宸℃涓� 2:宸插畬鎴�
+ completedTime: null,
+ },
+ {
+ id: 2,
+ deviceName: "鍐峰嵈濉擝02",
+ deviceCode: "LQT-B02",
+ location: "鐢熶骇杞﹂棿B鍖�",
+ inspectionTime: "09:00-10:00",
+ inspector: "鏉庡洓",
+ status: 1,
+ completedTime: null,
+ },
+ {
+ id: 3,
+ deviceName: "鍙樺帇鍣–03",
+ 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>
\ No newline at end of file
diff --git a/src/pages/equipmentManagement/repair/index.vue b/src/pages/equipmentManagement/repair/index.vue
index 49b2374..e280595 100644
--- a/src/pages/equipmentManagement/repair/index.vue
+++ b/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'
- })
-}
-
-// 缂栬緫 - 璺宠浆鍒癮dd椤甸潰锛岄�氳繃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()
-})
+ // 缂栬緫 - 璺宠浆鍒癮dd椤甸潰锛岄�氳繃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>
\ No newline at end of file
diff --git a/src/pages/humanResources/attendance/checkin.vue b/src/pages/humanResources/attendance/checkin.vue
index 483b264..9772d85 100644
--- a/src/pages/humanResources/attendance/checkin.vue
+++ b/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("");
diff --git a/src/pages/humanResources/attendance/report.vue b/src/pages/humanResources/attendance/report.vue
index 04bffe2..997f089 100644
--- a/src/pages/humanResources/attendance/report.vue
+++ b/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 }">
diff --git a/src/pages/humanResources/monthlyStatistics/index.vue b/src/pages/humanResources/monthlyStatistics/index.vue
index f1edbfc..d9237c9 100644
--- a/src/pages/humanResources/monthlyStatistics/index.vue
+++ b/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>
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 4ba4ce7..16fe0c2 100644
--- a/src/pages/index.vue
+++ b/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);
diff --git a/src/pages/indexItem.vue b/src/pages/indexItem.vue
index c2b6633..8f5c1dc 100644
--- a/src/pages/indexItem.vue
+++ b/src/pages/indexItem.vue
@@ -330,7 +330,7 @@
url: "/pages/equipmentManagement/upkeep/index",
});
break;
- case "璁惧宸℃":
+ case "宸℃绠$悊":
uni.navigateTo({
url: "/pages/inspectionUpload/index",
});
diff --git a/src/pages/inspectionUpload/index.vue b/src/pages/inspectionUpload/index.vue
index dd076b0..73749a7 100644
--- a/src/pages/inspectionUpload/index.vue
+++ b/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">
diff --git a/src/pages/managementMeetings/knowledgeBase/index.vue b/src/pages/managementMeetings/knowledgeBase/index.vue
index 64a209a..ff78fdb 100644
--- a/src/pages/managementMeetings/knowledgeBase/index.vue
+++ b/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>
diff --git a/src/pages/managementMeetings/meetingSettings/index.vue b/src/pages/managementMeetings/meetingSettings/index.vue
index f55c0d7..5b7fbd4 100644
--- a/src/pages/managementMeetings/meetingSettings/index.vue
+++ b/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>
diff --git a/src/pages/managementMeetings/rulesRegulationsManagement/index.vue b/src/pages/managementMeetings/rulesRegulationsManagement/index.vue
index 041550b..e6cef23 100644
--- a/src/pages/managementMeetings/rulesRegulationsManagement/index.vue
+++ b/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>
diff --git a/src/pages/managementMeetings/sealManagement/index.vue b/src/pages/managementMeetings/sealManagement/index.vue
index 569e372..2979152 100644
--- a/src/pages/managementMeetings/sealManagement/index.vue
+++ b/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>
diff --git a/src/pages/procurementManagement/invoiceEntry/index.vue b/src/pages/procurementManagement/invoiceEntry/index.vue
index 33530ff..f9315af 100644
--- a/src/pages/procurementManagement/invoiceEntry/index.vue
+++ b/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">
diff --git a/src/pages/procurementManagement/paymentEntry/index.vue b/src/pages/procurementManagement/paymentEntry/index.vue
index e88ef58..81462ac 100644
--- a/src/pages/procurementManagement/paymentEntry/index.vue
+++ b/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>
diff --git a/src/pages/procurementManagement/procurementInvoiceLedger/index.vue b/src/pages/procurementManagement/procurementInvoiceLedger/index.vue
index 4934371..cc35d42 100644
--- a/src/pages/procurementManagement/procurementInvoiceLedger/index.vue
+++ b/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('浠呮敮鎸乸df鏂囦欢')
- 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("浠呮敮鎸乸df鏂囦欢");
+ 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>
\ No newline at end of file
diff --git a/src/pages/procurementManagement/procurementLedger/index.vue b/src/pages/procurementManagement/procurementLedger/index.vue
index 4547182..615a00d 100644
--- a/src/pages/procurementManagement/procurementLedger/index.vue
+++ b/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>
diff --git a/src/pages/procurementManagement/receiptPaymentHistory/index.vue b/src/pages/procurementManagement/receiptPaymentHistory/index.vue
index cf59117..d2d463f 100644
--- a/src/pages/procurementManagement/receiptPaymentHistory/index.vue
+++ b/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>
diff --git a/src/pages/qualityManagement/finalInspection/index.vue b/src/pages/qualityManagement/finalInspection/index.vue
index ce640d8..180d08d 100644
--- a/src/pages/qualityManagement/finalInspection/index.vue
+++ b/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"
diff --git a/src/pages/qualityManagement/materialInspection/index.vue b/src/pages/qualityManagement/materialInspection/index.vue
index dd2e099..83ab257 100644
--- a/src/pages/qualityManagement/materialInspection/index.vue
+++ b/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"
diff --git a/src/pages/qualityManagement/processInspection/index.vue b/src/pages/qualityManagement/processInspection/index.vue
index dc378de..14e66ef 100644
--- a/src/pages/qualityManagement/processInspection/index.vue
+++ b/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"
diff --git a/src/pages/safeProduction/accidentReportingRecord/index.vue b/src/pages/safeProduction/accidentReportingRecord/index.vue
index 07e42fb..ce62e34 100644
--- a/src/pages/safeProduction/accidentReportingRecord/index.vue
+++ b/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>
diff --git a/src/pages/safeProduction/dangerInvestigation/index.vue b/src/pages/safeProduction/dangerInvestigation/index.vue
index 95c643f..397684d 100644
--- a/src/pages/safeProduction/dangerInvestigation/index.vue
+++ b/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>
diff --git a/src/pages/safeProduction/emergencyPlanReview/index.vue b/src/pages/safeProduction/emergencyPlanReview/index.vue
index 3b7df20..9dfafb7 100644
--- a/src/pages/safeProduction/emergencyPlanReview/index.vue
+++ b/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>
diff --git a/src/pages/safeProduction/hazardSourceLedger/index.vue b/src/pages/safeProduction/hazardSourceLedger/index.vue
index bddfeda..b33b3b6 100644
--- a/src/pages/safeProduction/hazardSourceLedger/index.vue
+++ b/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>
diff --git a/src/pages/safeProduction/hazardousMaterialsControl/index.vue b/src/pages/safeProduction/hazardousMaterialsControl/index.vue
index 25fd403..9bdad0c 100644
--- a/src/pages/safeProduction/hazardousMaterialsControl/index.vue
+++ b/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>
diff --git a/src/pages/safeProduction/safeQualifications/index.vue b/src/pages/safeProduction/safeQualifications/index.vue
index 95b18bc..1cdc444 100644
--- a/src/pages/safeProduction/safeQualifications/index.vue
+++ b/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>
diff --git a/src/pages/safeProduction/safetyTrainingAssessment/index.vue b/src/pages/safeProduction/safetyTrainingAssessment/index.vue
index 905f9e8..44a99c7 100644
--- a/src/pages/safeProduction/safetyTrainingAssessment/index.vue
+++ b/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>
diff --git a/src/pages/sales/invoiceLedger/index.vue b/src/pages/sales/invoiceLedger/index.vue
index d5d0b17..0788c4d 100644
--- a/src/pages/sales/invoiceLedger/index.vue
+++ b/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-->
diff --git a/src/pages/sales/invoicingRegistration/index.vue b/src/pages/sales/invoicingRegistration/index.vue
index 7d5bcbb..6b31c48 100644
--- a/src/pages/sales/invoicingRegistration/index.vue
+++ b/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">
diff --git a/src/pages/sales/receiptPayment/index.vue b/src/pages/sales/receiptPayment/index.vue
index ffd154a..407450f 100644
--- a/src/pages/sales/receiptPayment/index.vue
+++ b/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>
diff --git a/src/pages/sales/receiptPaymentHistory/index.vue b/src/pages/sales/receiptPaymentHistory/index.vue
index 0d148b5..5954b0f 100644
--- a/src/pages/sales/receiptPaymentHistory/index.vue
+++ b/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>
diff --git a/src/pages/sales/salesAccount/index.vue b/src/pages/sales/salesAccount/index.vue
index b5b378a..d6a3d8c 100644
--- a/src/pages/sales/salesAccount/index.vue
+++ b/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>
--
Gitblit v1.9.3