From 688505dded0a49ee685abcb980bd0dc521df4241 Mon Sep 17 00:00:00 2001
From: xwt <2740516069@qq.com>
Date: 星期四, 18 九月 2025 22:57:36 +0800
Subject: [PATCH] SJ,XJ,RKJ
---
pages/QC/SJ/Add.vue | 760 +++++++++++++++++++++++++++++++++------------------------
1 files changed, 437 insertions(+), 323 deletions(-)
diff --git a/pages/QC/SJ/Add.vue b/pages/QC/SJ/Add.vue
index 9fd0624..589aa9d 100644
--- a/pages/QC/SJ/Add.vue
+++ b/pages/QC/SJ/Add.vue
@@ -20,23 +20,15 @@
<view class="material-info">
<view class="info-block">
<view class="info-label">鐢熶骇绾垮埆锛�</view>
- <view class="info-value" v-if="!isUpdate">{{formData.line}}</view>
- <superwei-combox v-else :candidates="DAA020List" placeholder="璇烽�夋嫨鎴栬緭鍏�"
- v-model="formData.line" @select="onDaa020Change" class="info-picker-input"></superwei-combox>
+ <view class="info-value">{{formData.line}}</view>
</view>
<view class="info-block">
<view class="info-label">鐗╂枡缂栫爜锛�</view>
- <view class="info-value" v-if="!isUpdate">{{formData.itemNo}}</view>
- <superwei-combox v-else :candidates="boardItems" placeholder="璇烽�夋嫨鎴栬緭鍏�" v-model="formData.itemNo"
- :isJSON="true" keyName="itemName" @select="onItemChange" class="info-picker-input"></superwei-combox>
+ <view class="info-value">{{formData.itemNo}}</view>
</view>
<view class="info-block">
<view class="info-label">璁″垝缂栧彿锛�</view>
- <view class="info-value" v-if="!isUpdate">{{formData.daa001}}</view>
- <picker v-else class="info-picker" name="selector" :range="DAA001List"
- @change="onDaa001Change">
- <view>{{ DAA001List[DAA001Index] }}</view>
- </picker>
+ <view class="info-value">{{formData.daa001}}</view>
</view>
<view class="info-block">
<view class="info-label">浜у搧鍚嶇О锛�</view>
@@ -60,14 +52,33 @@
</view>
</view>
- <!-- 鎿嶄綔鎸夐挳鍖� -->
- <view class="action-buttons" v-if="isUpdate">
- <button class="action-btn secondary" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
- </view>
-
<!-- 妫�楠岄」鐩〃鏍� -->
- <view class="inspection-table" v-if="tableData.length > 0">
- <table>
+ <view class="inspection-table">
+ <!-- 琛ㄦ牸澶撮儴缁熻淇℃伅 -->
+ <view class="table-header-stats">
+ <view class="stats-left">
+ <view class="stats-title">妫�楠岄」鐩竻鍗�</view>
+ <view class="stats-subtitle">鍏� {{tableData.length}} 涓楠岄」鐩�</view>
+ <view class="submit-status" :class="{'can-submit': canSubmit, 'cannot-submit': !canSubmit}">
+ {{canSubmit ? '鉁� 鍙互鎻愪氦' : '鉁� 妫�楠屾湭瀹屾垚锛屾棤娉曟彁浜�'}}
+ </view>
+ </view>
+ <view class="stats-right">
+ <view class="stat-item passed">
+ <span class="stat-count">{{getPassedCount()}}</span>
+ <span class="stat-label">宸插悎鏍�</span>
+ </view>
+ <view class="stat-item failed">
+ <span class="stat-count">{{getFailedCount()}}</span>
+ <span class="stat-label">涓嶅悎鏍�</span>
+ </view>
+ <view class="stat-item pending">
+ <span class="stat-count">{{getPendingCount()}}</span>
+ <span class="stat-label">寰呮楠�</span>
+ </view>
+ </view>
+ </view>
+ <table v-if="tableData.length > 0">
<thead>
<tr>
<th width="15%" style="text-align: center;">妫�楠岄」鐩�</th>
@@ -84,39 +95,47 @@
'status-rejected': item.result=='涓嶅悎鏍�',
'status-pending': item.result=='鏈畬鎴�'
}"></span>
- {{ item.projName }}
+ <span>{{ item.projName }}</span>
</view>
</td>
<td>
- <view v-if="item.result=='鍚堟牸'" class="watermark approved">鍚堟牸</view>
- <view v-if="item.result=='涓嶅悎鏍�'" class="watermark rejected">涓嶅悎鏍�</view>
- <view v-if="item.result=='鏈畬鎴�'" class="watermark pending">寰呯‘璁�</view>
+ <view v-if="item.result=='鍚堟牸'" class="watermark approved">
+ 鍚堟牸
+ </view>
+ <view v-if="item.result=='涓嶅悎鏍�'" class="watermark rejected">
+ 涓嶅悎鏍�
+ </view>
+ <view v-if="item.result=='鏈畬鎴�'" class="watermark pending">
+ 寰呮楠�
+ </view>
<view class="description-text">{{ item.itemMod }}</view>
</td>
- <td>
- <button v-if="item.isCheck < item.levelNum" class="record-btn record-btn-fill" @click="toDetail(item, index)">
- 濉啓 ({{ item.isCheck }}/{{ item.levelNum }})
- </button>
- <button v-else class="record-btn record-btn-view" @click="toDetail(item, index)">
- 鏌ョ湅 ({{ item.isCheck }}/{{ item.levelNum }})
+ <td>
+ <button class="record-btn" :class="{
+ 'record-btn-fill': item.isCheck >= item.levelNum,
+ 'record-btn-view': item.isCheck < item.levelNum
+ }" @click="toDetail(item, index)">
+ {{item.isCheck >= item.levelNum ? '鏌ョ湅' : '濉啓'}}
</button>
</td>
</tr>
</tbody>
</table>
+ <!-- 绌虹姸鎬佹樉绀� -->
+ <view v-else class="empty-state">
+ <view class="empty-icon">馃搵</view>
+ <view class="empty-text">鏆傛棤妫�楠岄」鐩�</view>
+ <view class="empty-desc">璇ユ楠屽崟杩樻病鏈夋楠岄」鐩�</view>
+ </view>
</view>
<!-- 鎿嶄綔鎸夐挳鍖� -->
<view class="action-buttons">
- <button class="action-btn primary" v-if="isUpdate && !isShowTable" @click="save">鍒涘缓妫�楠屽崟骞剁敓鎴愰儴鍒嗛粯璁ゅ��</button>
- <button class="action-btn secondary" v-if="!isUpdate && !isShowTable" @click="toImage">涓婁紶/鏌ョ湅鍥剧墖</button>
- <button class="action-btn secondary" v-if="!isUpdate && !isShowTable" @click="refreshItems">鍒锋柊妫�楠岄」鐩�</button>
- <button class="action-btn success" v-if="!isUpdate && !isShowTable" @click="submit">鎻愪氦妫�楠�</button>
- <!-- <button class="action-btn danger" v-if="!isUpdate && !formData.statusUser && !isShowTable" @click="removeXJ">鍒犻櫎鍗曟嵁</button> -->
- <button class="action-btn secondary" v-if="!isUpdate && !isShowTable" @click="saveRemarks">娣诲姞涓嶅悎鏍兼弿杩�</button>
- <!-- <button class="action-btn success" v-if="!isUpdate && !isShowTable" @click="submit">瀹℃牳鍗曟嵁</button> -->
- <button class="action-btn secondary" v-if="isShowTable" @click="getTable">鑾峰彇妫�楠岄」鐩�</button>
- <button class="action-btn primary" v-if="isShowTable && isUpdate" @click="saveTable">鐢熸垚妫�楠岄」鐩�</button>
+ <button class="secondary-btn" v-if="!isSubmitted" @click="genByProc">鑾峰彇妫�楠岄」鐩�</button>
+ <button class="secondary-btn" @click="toImage">涓婁紶/鏌ョ湅鍥剧墖</button>
+ <button class="secondary-btn" v-if="!isSubmitted" @click="saveRemarks">娣诲姞涓嶅悎鏍兼弿杩�</button>
+ <button class="primary-btn" v-if="!isSubmitted && canSubmit" @click="submit">鎻愪氦妫�楠�</button>
+ <button class="primary-btn disabled" v-if="!isSubmitted && !canSubmit" disabled>鎻愪氦妫�楠�</button>
</view>
<!-- 寮圭獥 -->
@@ -159,30 +178,41 @@
itemId: "",
},
- DAA020List: [],
-
- DAA001List: [],
- schemeResult: [],
- DAA001Index: -1,
-
- ItemList: [],
-
- boardItems: [],
-
- womdaaList: [],
-
tableData: [],
isSubmit: true,
-
- isUpdate: true,
-
- isShowTable: false,
remarks: "",
remarksPopup: false,
};
+ },
+ computed: {
+ isSubmitted() {
+ const val = this.formData && (this.formData.Fsubmit ?? this.formData.fsubmit ?? this.formData.FSUBMIT ?? this.formData.fSubmit);
+ if (val === null || val === undefined || val === '') return false;
+ return String(val).trim() === '1' || Number(val) === 1;
+ },
+ canSubmit() {
+ // 妫�鏌ユ槸鍚︽湁妫�楠岄」鐩�
+ if (!Array.isArray(this.tableData) || this.tableData.length === 0) {
+ return false;
+ }
+
+ // 妫�鏌ユ槸鍚︽墍鏈夋楠岄」鐩兘宸插畬鎴�
+ const allCompleted = this.tableData.every(it => {
+ const checkedCount = Number(it?.isCheck ?? 0);
+ const requiredCount = Number(it?.levelNum ?? 0);
+ return checkedCount >= requiredCount;
+ });
+
+ // 妫�鏌ユ槸鍚︽墍鏈夋楠岄」鐩兘鏈夌粨鏋�
+ const allHaveResult = this.tableData.every(it =>
+ it.result && it.result !== '鏈畬鎴�' && it.result !== '鏈娴�'
+ );
+
+ return allCompleted && allHaveResult;
+ }
},
onLoad(options) {
//options涓寘鍚簡url闄勫甫鐨勫弬鏁�
@@ -195,36 +225,25 @@
this.formData.billNo = params["billNo"];
this.init();
} else {
- //鍒濆鍖栨楠屽崟鍙�
- this.$post({
- url: "/SJ/GetMaxBillNo"
- }).then(res => {
- this.formData.billNo = res.data.tbBillList;
- this.formData.createTime = this.$getDate("yyyy-mm-dd");
- });
-
- //浜у搧缂栫爜涓嬫媺妗嗙殑鍒濆鍖�
- this.$post({
- url: "/XJ/getLineAll"
- }).then(res => {
- this.lineList = res.data.tbBillList;
- this.DAA020List = res.data.tbBillList.map(item => item.lineName);
- this.formData.itemNo = "";
- this.formData.itemName = "";
- this.formData.workshopCode = "";
- this.formData.workshopName = "";
- this.formData.line = "";
- this.formData.lineName = "";
- this.formData.pbaid = null;
- })
+ // 鑷缓鍗曟嵁鍔熻兘宸茬Щ闄わ紝鍙厑璁告煡鐪嬬幇鏈夊崟鎹�
+ this.$showMessage("璇蜂粠鍒楄〃涓�夋嫨妫�楠屽崟杩涜鏌ョ湅");
+ uni.navigateBack();
}
},
methods: {
- refreshItems() {
- if (!this.formData.id) {
- this.$showMessage("璇峰厛淇濆瓨妫�楠屽崟");
- return;
- }
+ // 鑾峰彇鍚堟牸椤圭洰鏁伴噺
+ getPassedCount() {
+ return this.tableData.filter(item => item.result === '鍚堟牸').length;
+ },
+ // 鑾峰彇涓嶅悎鏍奸」鐩暟閲�
+ getFailedCount() {
+ return this.tableData.filter(item => item.result === '涓嶅悎鏍�').length;
+ },
+ // 鑾峰彇寰呮楠岄」鐩暟閲�
+ getPendingCount() {
+ return this.tableData.filter(item => item.result === '鏈畬鎴�').length;
+ },
+ genByProc() {
this.$post({
url: "/SJ/GenUpdateSJ",
data: {
@@ -234,14 +253,17 @@
}
}).then(res => {
if (res.status === 0) {
- this.$showMessage(res.message || "宸插埛鏂版楠岄」鐩�");
- this.init();
+ this.$showMessage("鐢熸垚/鑾峰彇妫�楠岄」鐩垚鍔�");
+ // 鎴愬姛鍚庡埛鏂版楠岄」鐩�
+ this.$post({
+ url: "/SJ/getQSItems",
+ data: { pid: this.formData.id }
+ }).then(r => {
+ this.tableData = r.data.tbBillList || [];
+ });
} else {
- this.$showMessage(res.message || "鍒锋柊澶辫触");
+ this.$showMessage(res.message || "鐢熸垚澶辫触");
}
- }).catch(err => {
- console.error("鍒锋柊妫�楠岄」鐩け璐�:", err);
- this.$showMessage("鍒锋柊澶辫触锛岃绋嶅悗閲嶈瘯");
});
},
removeXJ() {
@@ -266,15 +288,40 @@
},
submit() {
- // 鏍¢獙锛氭墍鏈夋楠岄」鐩繀椤诲畬鎴�
- const hasIncomplete = this.tableData && this.tableData.some(item => {
- // 鍏佽鐨勫畬鎴愭潯浠讹細result 涓嶄负 '鏈畬鎴�' 涓� 宸叉娆℃暟杈惧埌瑕佹眰
- const resultIncomplete = item.result === '鏈畬鎴�';
- const countIncomplete = (item.isCheck ?? 0) < (item.levelNum ?? 0);
- return resultIncomplete || countIncomplete;
+ // 鏍¢獙鏄惁鏈夋楠岄」鐩�
+ if (!Array.isArray(this.tableData) || this.tableData.length === 0) {
+ this.$showMessage("娌℃湁妫�楠岄」鐩紝鏃犳硶鎻愪氦");
+ return;
+ }
+
+ // 鏍¢獙妫�楠岄」鐩槸鍚﹀叏閮ㄥ畬鎴�
+ const unfinishedItems = [];
+ const hasUnfinished = this.tableData.some(it => {
+ const checkedCount = Number(it?.isCheck ?? 0);
+ const requiredCount = Number(it?.levelNum ?? 0);
+ // 鍏佽鎻愪氦鐨勫墠鎻愶細宸叉娆℃暟闇�杈惧埌瑕佹眰娆℃暟
+ if (checkedCount < requiredCount) {
+ unfinishedItems.push(it.projName);
+ return true;
+ }
+ return false;
});
- if (hasIncomplete) {
- this.$showMessage("杩樻湁鏈畬鎴愮殑妫�楠岄」鐩紝鏃犳硶鎻愪氦");
+
+ if (hasUnfinished) {
+ const message = unfinishedItems.length > 0
+ ? `浠ヤ笅妫�楠岄」鐩湭瀹屾垚锛屼笉鑳芥彁浜わ細\n${unfinishedItems.join('銆�')}`
+ : "瀛樺湪鏈畬鎴愮殑妫�楠岄」鐩紝涓嶈兘鎻愪氦";
+ this.$showMessage(message);
+ return;
+ }
+
+ // 鏍¢獙鏄惁鎵�鏈夋楠岄」鐩兘鏈夌粨鏋�
+ const itemsWithoutResult = this.tableData.filter(it =>
+ !it.result || it.result === '鏈畬鎴�' || it.result === '鏈娴�'
+ );
+ if (itemsWithoutResult.length > 0) {
+ const itemNames = itemsWithoutResult.map(it => it.projName);
+ this.$showMessage(`浠ヤ笅妫�楠岄」鐩病鏈夋楠岀粨鏋滐紝涓嶈兘鎻愪氦锛歕n${itemNames.join('銆�')}`);
return;
}
this.$post({
@@ -284,26 +331,50 @@
id: this.formData.id
}
}).then(res => {
- // 鎸夊悗绔粺涓�杩斿洖缁撴瀯鍒ゆ柇
+ //2024-11-28 kyy 鏍¢獙鍚堟牸鎻愪氦澧炲姞鎻愮ず
+ console.log("Response:", res);
if (res.status === 0) {
- this.$showMessage("鎴愬姛鎻愪氦妫�楠�");
- // 浣跨敤setTimeout鍦�7绉掑悗闅愯棌娑堟伅
- setTimeout(() => {
- this.hideCustomMessage();
- }, 7000); // 7000姣绛変簬7绉�
+ // 鏄剧ず鎴愬姛鎻愮ず妗�
+ uni.showModal({
+ title: '鎻愪氦鎴愬姛',
+ content: '妫�楠屽崟宸叉垚鍔熸彁浜わ紒',
+ showCancel: false,
+ confirmText: '纭畾',
+ confirmColor: '#27ae60',
+ success: (modalRes) => {
+ if (modalRes.confirm) {
+ // 鎻愪氦鎴愬姛鍚庡埛鏂板綋鍓嶅崟鎹紝纭繚FSUBMIT鏈�鏂帮紝浠庤�岄殣钘忔寜閽�
+ this.init();
+ }
+ }
+ });
} else {
- this.$showMessage(res.message || "瀹℃牳澶辫触");
+ // 鏄剧ず澶辫触鎻愮ず妗�
+ uni.showModal({
+ title: '鎻愪氦澶辫触',
+ content: res.message || "瀹℃牳澶辫触锛岃閲嶈瘯",
+ showCancel: false,
+ confirmText: '纭畾',
+ confirmColor: '#e74c3c'
+ });
}
}).catch(error => {
console.error("瀹℃牳鎻愪氦澶辫触:", error);
- // 澶勭悊瀹℃牳澶辫触鐨勬儏鍐�
+ // 澶勭悊瀹℃牳澶辫触鐨勬儏鍐碉紝鏄剧ず閿欒鎻愮ず妗�
+ let errorMessage = "瀹℃牳澶辫触锛岃妫�鏌ユ楠岄」鐩槸鍚﹀畬鎴�";
if (error.message) {
- this.$showMessage(error.message);
+ errorMessage = error.message;
} else if (error.data && error.data.message) {
- this.$showMessage(error.data.message);
- } else {
- this.$showMessage("瀹℃牳澶辫触锛岃妫�鏌ユ楠岄」鐩槸鍚﹀畬鎴�");
+ errorMessage = error.data.message;
}
+
+ uni.showModal({
+ title: '鎻愪氦澶辫触',
+ content: errorMessage,
+ showCancel: false,
+ confirmText: '纭畾',
+ confirmColor: '#e74c3c'
+ });
})
},
@@ -338,9 +409,6 @@
}
});
- if (this.tableData.length <= 0) {
- this.isShowTable = true;
- }
}).catch(error => {
console.error("鑾峰彇妫�楠岄」鐩け璐�:", error);
this.$showMessage("鑾峰彇妫�楠岄」鐩け璐�");
@@ -349,170 +417,11 @@
})
}
},
- onDaa020Change(event) {
- //鑾峰彇鐢熶骇绾垮埆鐨勪笅鏍囧湴鍧�
- //this.formData.line = event;
-
- this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo;
-
- this.formData.line = this.lineNo;
-
- this.$post({
- url: "/XJ/getBoardItem",
- data: {
- lineNo: this.lineNo
- }
- }).then(res => {
- //濉厖宸ュ崟鍙风殑鏁版嵁婧�
- this.boardItems = res.data.tbBillList;
-
- this.ItemList = this.boardItems.map(item => item.itemName);
- })
-
- },
- onItemChange(event) {
-
- this.formData.itemNo = event.itemNo;
-
- this.$post({
- url: "/XJ/getDaa001",
- data: {
- daa020: this.lineNo,
- item: this.formData.itemNo
- }
- }).then(res => {
- //濉厖宸ュ崟鍙风殑鏁版嵁婧�
- this.schemeResult = res.data.tbBillList;
- this.DAA001List = this.schemeResult.map(s => s.daa001);
- //鍙樹负榛樿绌哄�肩殑鐘舵��
- this.DAA001Index = -1;
- this.formData.daa001 = "";
- })
- },
- //閫夊彇宸ュ崟濉厖鐗╂枡鍙峰拰鍏朵粬淇℃伅
- onDaa001Change(event) {
- this.DAA001Index = event.mp.detail.value;
-
- this.formData.daa001 = this.schemeResult[this.DAA001Index].daa001;
-
- //琛ㄥ崟涓殑閮ㄥ垎瀛楁璧嬪��
- this.$post({
- url: "/XJ/getItem",
- data: {
- daa001: this.formData.daa001
- }
- }).then(res => {
- let data = res.data.tbBillList[0];
- //褰撹繑鍥炵殑缁撴灉闆嗕负绌烘椂缃┖鍘熸湁鐨勫��
- if (!data) {
- this.formData.billNo = "";
- this.formData.taskNo = "";
- this.formData.itemNo = "";
- this.tableData = [];
- return;
- }
- //涓嶄负绌烘椂璧嬪��
- this.formData.daa001 = data.daa001;
- this.formData.daa003 = data.daa003;
- this.formData.daa004 = data.daa004;
- this.formData.daa008 = data.daa008;
- this.formData.pbaid = data.id;
-
-
- this.$post({
- url: "/SJ/SetQSItems",
- data: {
- itemId: this.formData.itemNo
- }
- }).then(res => {
- if (res.data.tbBillList.length > 0) {
- this.tableData = res.data.tbBillList; // 鍦ㄧ澶村嚱鏁颁腑锛宼his 鎸囧悜澶栧眰浣滅敤鍩熺殑 this
- this.isSubmit = false;
- } else {
- this.$showMessage("姝ょ墿鏂欐病鏈夊惎鐢ㄧ殑妫�楠岄」鐩紝璇风淮鎶�!");
- this.isSubmit = true;
- this.tableData = [];
- }
- });
-
- });
- },
toDetail(item, index) {
- if (this.isUpdate) {
- uni.showToast({
- icon: "none",
- title: "璇峰厛鐢熸垚妫�楠岄」鐩�",
- duration: 2000,
- });
- } else {
- uni.navigateTo({
- url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData
- .id+'&index='+index
- });
- }
- },
- getTable() {
- this.$post({
- url: "/SJ/SetQSItems",
- data: {
- itemId: this.formData.itemNo
- }
- }).then(res => {
- if (res.data.tbBillList.length > 0) {
- this.tableData = res.data.tbBillList; // 鍦ㄧ澶村嚱鏁颁腑锛宼his 鎸囧悜澶栧眰浣滅敤鍩熺殑 this
- this.isShowTable = true;
- this.isUpdate = true;
- } else {
- this.$showMessage("姝ょ墿鏂欐病鏈夊惎鐢ㄧ殑妫�楠岄」鐩紝璇风淮鎶�!");
- this.isShowTable = true;
- this.isUpdate = false;
- this.tableData = [];
- }
+ uni.navigateTo({
+ url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData
+ .id+'&index='+index
});
- },
- saveTable() {
- if (this.tableData.length === 0) {
- return;
- }
-
- this.$post({
- url: "/SJ/SaveItem",
- data: {
- gid: this.formData.id,
- items: this.tableData,
- statusUser: this.$loginInfo.account
- }
- }).then(res => {
- this.tableData = res.data.tbBillList.items;
- this.isShowTable = false;
- this.isUpdate = false;
- })
- },
- save() {
-
- // if (this.tableData.length === 0) {
- // this.$showMessage(this.formData.itemNo + "鐗╂枡娌℃湁妫�楠岄」鐩�");
- // return;
- // }
-
- if (!this.formData.daa001) {
- this.$showMessage("璇烽�夋嫨璁″垝缂栧彿");
- return;
- }
-
- this.formData.statusUser = this.$loginInfo.account;
-
- this.$post({
- url: "/SJ/Save",
- data: {
- from: this.formData,
- items: this.tableData
- }
- }).then(res => {
- this.formData = res.data.tbBillList.result;
- this.tableData = res.data.tbBillList.items;
- this.isUpdate = false;
- })
},
saveRemarks() {
this.remarksPopup = !this.remarksPopup;
@@ -670,6 +579,108 @@
/* 妫�楠岄」鐩〃鏍� */
.inspection-table {
margin: 25px 0;
+ border-radius: 8px;
+ overflow: hidden;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ background: #fff;
+}
+
+/* 琛ㄦ牸澶撮儴缁熻淇℃伅 */
+.table-header-stats {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16px 20px;
+ background: linear-gradient(135deg, #f8f9fa, #e9ecef);
+ border-bottom: 1px solid #e0e0e0;
+}
+
+.stats-left .stats-title {
+ font-size: 18px;
+ font-weight: bold;
+ color: #2c3e50;
+ margin-bottom: 4px;
+}
+
+.stats-left .stats-subtitle {
+ font-size: 14px;
+ color: #7f8c8d;
+}
+
+.submit-status {
+ font-size: 13px;
+ font-weight: 500;
+ margin-top: 4px;
+ padding: 4px 8px;
+ border-radius: 4px;
+ display: inline-block;
+}
+
+.submit-status.can-submit {
+ background-color: rgba(39, 174, 96, 0.1);
+ color: #27ae60;
+ border: 1px solid rgba(39, 174, 96, 0.3);
+}
+
+.submit-status.cannot-submit {
+ background-color: rgba(231, 76, 60, 0.1);
+ color: #e74c3c;
+ border: 1px solid rgba(231, 76, 60, 0.3);
+}
+
+.stats-right {
+ display: flex;
+ gap: 16px;
+}
+
+.stat-item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 8px 12px;
+ border-radius: 6px;
+ min-width: 60px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+}
+
+.stat-item.passed {
+ background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.2));
+ border: 1px solid rgba(39, 174, 96, 0.3);
+}
+
+.stat-item.failed {
+ background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(230, 126, 34, 0.2));
+ border: 1px solid rgba(230, 126, 34, 0.3);
+}
+
+.stat-item.pending {
+ background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(243, 156, 18, 0.2));
+ border: 1px solid rgba(243, 156, 18, 0.3);
+}
+
+.stat-count {
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 1;
+ margin-bottom: 2px;
+}
+
+.stat-item.passed .stat-count {
+ color: #27ae60;
+}
+
+.stat-item.failed .stat-count {
+ color: #e67e22;
+}
+
+.stat-item.pending .stat-count {
+ color: #f39c12;
+}
+
+.stat-label {
+ font-size: 12px;
+ color: #7f8c8d;
+ font-weight: 500;
}
.inspection-table table {
@@ -677,25 +688,43 @@
border-collapse: collapse;
}
-.inspection-table th,
-.inspection-table td {
- padding: 12px 15px;
- border: 1px solid #ddd;
+.inspection-table th, .inspection-table td {
+ padding: 16px 20px;
+ border: none;
text-align: left;
+ border-bottom: 1px solid #eee;
}
.inspection-table th {
- background-color: #f8f9fa;
- font-weight: bold;
- color: #34495e;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ font-weight: 600;
+ color: #fff;
+ font-size: 14px;
+ letter-spacing: 0.5px;
+ position: relative;
}
-.inspection-table tr:nth-child(even) {
- background-color: #f9f9f9;
+.inspection-table tbody tr {
+ transition: all 0.3s ease;
+ border-left: 4px solid transparent;
}
-.inspection-table tr:hover {
- background-color: #f1f5f9;
+.inspection-table tbody tr:nth-child(even) {
+ background-color: #f8fafc;
+}
+
+.inspection-table tbody tr:hover {
+ background-color: #e8f4fd;
+ border-left-color: #3498db;
+ transform: translateY(-1px);
+ box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
+}
+
+/* 妫�楠岄」鐩垪鏍峰紡 */
+.inspection-table td:first-child {
+ font-weight: 600;
+ color: #2c3e50;
+ font-size: 15px;
}
/* 椤圭洰鍚嶇О鍖呰鍣� */
@@ -730,48 +759,61 @@
box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.3);
}
+/* 妫�楠屾弿杩板垪鐗规畩鏍峰紡 */
+.inspection-table td:nth-child(2) {
+ position: relative;
+ min-height: 80px;
+ vertical-align: top;
+ padding: 16px 20px;
+}
+
/* 姘村嵃鏍峰紡 */
.watermark {
position: absolute;
- font-size: 40px;
+ font-size: 32px;
font-weight: bold;
- opacity: 1;
- z-index: 1;
+ opacity: 0.4;
+ z-index: 3;
+ pointer-events: none;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-15deg);
+ text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
+ min-width: 60px;
+ text-align: center;
}
.watermark.approved {
- color: #2ecc71;
+ color: #27ae60; /* 鏇存贰鐨勭豢鑹� */
}
.watermark.rejected {
- color: #e74c3c;
+ color: #e67e22; /* 鏇存贰鐨勭孩鑹� */
}
.watermark.pending {
- color: #f39c12;
+ color: #f39c12; /* 姗欒壊 */
}
-/* 鎻忚堪鏂囨湰瀹瑰櫒 */
+/* 鎻忚堪鏂囨湰鏍峰紡 */
.description-text {
position: relative;
z-index: 2;
- background-color: rgba(255, 255, 255, 0.7);
- padding: 10px;
+ padding: 12px 16px;
+ background: transparent;
+ line-height: 1.6;
font-size: 14px;
- color: #2c3e50;
+ color: #555;
+ margin: 0;
+ word-wrap: break-word;
+ word-break: break-word;
+ max-width: 100%;
+ /* 纭繚鏂囧瓧涓嶄細澶暱閬尅姘村嵃 */
+ padding-right: 80px;
+ min-height: 20px;
+ display: block;
}
-/* 璋冩暣琛ㄦ牸鍗曞厓鏍� */
-.inspection-table td:nth-child(2) {
- position: relative;
- overflow: hidden;
- padding: 0;
-}
-
-/* 鎸夐挳鏍峰紡 */
.record-btn {
padding: 8px 16px;
background: linear-gradient(135deg, #3498db, #2980b9);
@@ -825,7 +867,8 @@
margin-top: 20px;
}
-.action-btn {
+.primary-btn,
+.secondary-btn {
padding: 10px 20px;
border: none;
border-radius: 4px;
@@ -834,40 +877,36 @@
transition: all 0.3s;
}
-.action-btn.primary {
+.primary-btn {
background-color: #3498db;
color: white;
}
-.action-btn.primary:hover {
+.primary-btn:hover {
background-color: #2980b9;
}
-.action-btn.secondary {
+.primary-btn.disabled {
+ background: #bdc3c7;
+ color: #7f8c8d;
+ border-color: #bdc3c7;
+ cursor: not-allowed;
+ box-shadow: none;
+}
+
+.primary-btn.disabled:hover {
+ background: #bdc3c7;
+ transform: none;
+ box-shadow: none;
+}
+
+.secondary-btn {
background-color: #ecf0f1;
color: #7f8c8d;
}
-.action-btn.secondary:hover {
+.secondary-btn:hover {
background-color: #d5dbdb;
-}
-
-.action-btn.danger {
- background-color: #e74c3c;
- color: white;
-}
-
-.action-btn.danger:hover {
- background-color: #c0392b;
-}
-
-.action-btn.success {
- background: linear-gradient(135deg, #2ecc71, #27ae60);
- color: white;
-}
-
-.action-btn.success:hover {
- background: linear-gradient(135deg, #27ae60, #229954);
}
/* 寮瑰嚭妗嗘牱寮� */
@@ -918,6 +957,76 @@
justify-content: flex-end;
}
+/* 绉诲姩绔〃鏍煎ご閮ㄧ粺璁� */
+@media (max-width: 500px) {
+ .table-header-stats {
+ flex-direction: column;
+ gap: 12px;
+ align-items: flex-start;
+ padding: 12px 16px;
+ }
+
+ .stats-right {
+ width: 100%;
+ justify-content: space-around;
+ gap: 8px;
+ }
+
+ .stat-item {
+ flex: 1;
+ min-width: auto;
+ padding: 6px 8px;
+ }
+
+ .stat-count {
+ font-size: 16px;
+ }
+
+ .stat-label {
+ font-size: 11px;
+ }
+
+ .stats-left .stats-title {
+ font-size: 16px;
+ }
+
+ .stats-left .stats-subtitle {
+ font-size: 13px;
+ }
+}
+
+/* 绌虹姸鎬佹牱寮� */
+.empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 60px 20px;
+ text-align: center;
+ background-color: #fafafa;
+ border-radius: 8px;
+ margin: 20px 0;
+}
+
+.empty-icon {
+ font-size: 48px;
+ margin-bottom: 16px;
+ opacity: 0.6;
+}
+
+.empty-text {
+ font-size: 18px;
+ font-weight: 600;
+ color: #666;
+ margin-bottom: 8px;
+}
+
+.empty-desc {
+ font-size: 14px;
+ color: #999;
+ line-height: 1.5;
+}
+
/* 鍝嶅簲寮忚璁� */
@media (max-width: 768px) {
.info-row {
@@ -938,5 +1047,10 @@
margin-top: 10px;
width: 100%;
}
+
+ .inspection-table table {
+ display: block;
+ overflow-x: auto;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3