<template>
|
<view class="inspection-sheet">
|
<!-- 头部信息 -->
|
<view class="sheet-header">
|
<h1>巡检单</h1>
|
<view class="inspection-number">检验单号:{{formData.releaseNo}}</view>
|
<!-- 加载指示器 -->
|
<view v-if="isLoading" class="loading-indicator">
|
<view class="loading-spinner"></view>
|
<span>加载中...</span>
|
</view>
|
</view>
|
|
<!-- 基本信息区 -->
|
<view class="basic-info">
|
<view class="info-row">
|
<span class="info-label">创建人:</span>
|
<span class="info-value">{{formData.createBy}}</span>
|
<span class="info-label">创建时间:</span>
|
<span class="info-value">{{formData.createDate}}</span>
|
</view>
|
<view class="info-row" v-if="formData.fsubmitBy || formData.fsubmitDate">
|
<span class="info-label">检验人:</span>
|
<span class="info-value">{{formData.fsubmitBy || '未知'}}</span>
|
<span class="info-label">检验时间:</span>
|
<span class="info-value">{{formData.fsubmitDate || '未知'}}</span>
|
</view>
|
</view>
|
|
<!-- 物料信息区 -->
|
<view class="material-info">
|
<view class="info-block">
|
<view class="info-label">线体编号:</view>
|
<view class="info-value">{{formData.daa020}}</view>
|
</view>
|
<view class="info-block">
|
<view class="info-label">物料编码:</view>
|
<view class="info-value">{{formData.itemNo}}</view>
|
</view>
|
<view class="info-block">
|
<view class="info-label">计划编号:</view>
|
<view class="info-value">{{formData.billNo}}</view>
|
</view>
|
<view class="info-block">
|
<view class="info-label">物料名称:</view>
|
<view class="info-value">{{formData.itemName}}</view>
|
</view>
|
<view class="info-block">
|
<view class="info-label">规格型号:</view>
|
<view class="info-value">{{formData.itemModel}}</view>
|
</view>
|
<view class="info-block">
|
<view class="info-label">工单数量:</view>
|
<view class="info-value highlight">{{formData.planQty}}</view>
|
</view>
|
<view class="info-block" v-if="formData.remarks">
|
<view class="info-label">不合格描述:</view>
|
<view class="info-value">{{formData.remarks}}</view>
|
</view>
|
</view>
|
|
<!-- 操作按钮区 - 已移除重复的获取检验项目按钮 -->
|
|
<!-- 检验项目表格 -->
|
<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>
|
<th width="50%" style="text-align: center;">检验描述</th>
|
<th width="20%" style="text-align: center;">记录(点击)</th>
|
</tr>
|
</thead>
|
<tbody>
|
<tr v-for="(item, index) in tableData" :key="index">
|
<td>
|
<view class="project-name-wrapper">
|
<span class="status-indicator" :class="{
|
'status-approved': item.result=='合格',
|
'status-rejected': item.result=='不合格',
|
'status-pending': item.result=='未完成'
|
}"></span>
|
<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 class="description-text">{{ item.itemMod }}</view>
|
</td>
|
<td>
|
<button class="record-btn" :class="{
|
'record-btn-fill': item.isCheck >= item.levelNum,
|
'record-btn-view': item.isCheck < item.levelNum
|
}" @click="toDetail(item)">
|
{{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="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>
|
|
<!-- 弹窗 -->
|
<view v-if="remarksPopup" class="overlay">
|
<view class="popup">
|
<view class="popup-header">
|
<h3>修改不合格描述</h3>
|
</view>
|
<view class="popup-content">
|
<view class="info-block">
|
<view class="info-label">不合格描述:</view>
|
<input class="info-input" type="text" v-model="remarks" placeholder="请输入不合格描述,留空表示清除描述" />
|
</view>
|
</view>
|
<view class="popup-actions">
|
<button class="action-btn primary" @click="editRemarks">修改</button>
|
<button class="action-btn secondary" @click="remarksPopup = !remarksPopup">取消</button>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
formData: {
|
id: "",
|
releaseNo: "",
|
createBy: "",
|
createDate: "",
|
daa020: "",
|
itemNo: "",
|
billNo: "",
|
catQty: "",
|
detailMem: "",
|
taskNo: "",
|
fcheckResu: "",
|
boardModel: "",
|
planQty: "",
|
mocode: "",
|
boardStyle: ""
|
},
|
|
tableData: [],
|
|
isSubmit: true,
|
|
remarks: "",
|
remarksPopup: false,
|
|
// 添加加载状态
|
isLoading: false,
|
isInitialized: 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附带的参数
|
|
let params = options;
|
|
if (params["id"]) {
|
this.formData.id = params["id"];
|
this.formData.releaseNo = params["releaseNo"];
|
//getQaItemXj02
|
this.init();
|
} else {
|
// 自建单据功能已移除,只允许查看现有单据
|
this.$showMessage("请从列表中选择检验单进行查看");
|
uni.navigateBack();
|
}
|
},
|
methods: {
|
// 获取合格项目数量
|
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 || item.result === '').length;
|
},
|
genByProc() {
|
this.$post({
|
url: "/XJ/GenUpdateXJ",
|
data: {
|
id: this.formData.id,
|
no: this.formData.billNo,
|
userNo: this.$loginInfo.account
|
}
|
}).then(res => {
|
if (res.status === 0) {
|
this.$showMessage("生成/获取检验项目成功");
|
// 成功后刷新检验项目
|
this.$post({
|
url: "/XJ/getJYItem",
|
data: { pid: this.formData.id }
|
}).then(r => {
|
this.tableData = r.data.tbBillList || [];
|
});
|
} else {
|
this.$showMessage(res.message || "生成失败");
|
}
|
});
|
},
|
removeXJ() {
|
if (this.formData.id) {
|
this.$post({
|
url: "/XJ/removeXJ",
|
data: {
|
id: this.formData.id
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.$showMessage("删除成功");
|
//关闭当前页面,返回上一页面或多级页面
|
uni.navigateBack();
|
} else {
|
this.$showMessage("删除失败");
|
}
|
});
|
} else {
|
this.$showMessage("请先选择检验单号");
|
}
|
},
|
init() {
|
// 防止重复加载
|
if (this.isLoading || !this.formData.id) {
|
return;
|
}
|
|
this.isLoading = true;
|
console.log('init: 开始加载数据,ID:', this.formData.id);
|
|
this.$post({
|
url: "/XJ/getPage",
|
data: {
|
id: this.formData.id,
|
pageIndex: 1,
|
limit: 1,
|
}
|
}).then(res => {
|
let data = res.data.tbBillList[0];
|
if (data) {
|
this.formData = data;
|
|
this.$post({
|
url: "/XJ/getJYItem",
|
data: {
|
pid: this.formData.id
|
}
|
}).then(res1 => {
|
let tableData = res1.data.tbBillList
|
//当已检验个数都不为空时按照检测结构排序
|
tableData.sort((a, b) => {
|
if (a.result === '未完成' && b.result === '合格') {
|
return -1;
|
} else if (a.result === '合格' && b.result === '未完成') {
|
return 1;
|
} else {
|
return 0;
|
}
|
});
|
this.tableData = tableData;
|
this.isInitialized = true;
|
this.isLoading = false;
|
|
}).catch(error => {
|
console.error('获取检验项目失败:', error);
|
this.isLoading = false;
|
});
|
} else {
|
this.isLoading = false;
|
}
|
}).catch(error => {
|
console.error('获取页面数据失败:', error);
|
this.isLoading = false;
|
});
|
},
|
toDetail(item) {
|
uni.navigateTo({
|
url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id
|
});
|
}, saveRemarks() {
|
this.remarksPopup = !this.remarksPopup;
|
this.remarks = this.formData.remarks;
|
},
|
editRemarks() {
|
// 允许留空,留空代表清除描述
|
this.$post({
|
url: "/XJ/saveRemarksGid",
|
data: {
|
gid: this.formData.id,
|
remarks: this.remarks || "" // 留空时传递空字符串
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.formData.remarks = this.remarks || ""; // 更新本地数据
|
this.remarksPopup = !this.remarksPopup;
|
this.$showMessage(this.remarks ? "保存成功" : "描述已清除");
|
}
|
}).catch(error => {
|
this.$showMessage("保存失败,请重试");
|
});
|
},
|
toImage() {
|
uni.navigateTo({
|
url: 'ImageItem?id=' + this.formData.id
|
});
|
},
|
getTable() {
|
// 调用存储过程生成检验项目
|
this.$post({
|
url: "/XJ/GenUpdateXJ",
|
data: {
|
id: this.formData.id || 0,
|
no: this.formData.billNo,
|
userNo: this.$loginInfo.account
|
}
|
}).then(res => {
|
if (res.status === 0) {
|
this.$showMessage("获取检验项目成功");
|
this.init(); // 重新加载数据
|
} else {
|
this.$showMessage(res.message || "获取检验项目失败");
|
}
|
}).catch(error => {
|
this.$showMessage("网络错误,请重试");
|
});
|
},
|
submit() {
|
// 校验是否有检验项目
|
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 (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({
|
url: "/XJ/XJQaSubmit",
|
data: {
|
gid: this.formData.id,
|
userNo: this.$loginInfo.account
|
}
|
}).then(res => {
|
if (res.status === 0) {
|
// 显示成功提示框
|
uni.showModal({
|
title: '提交成功',
|
content: res.message || '检验提交成功!',
|
showCancel: false,
|
confirmText: '确定',
|
confirmColor: '#27ae60',
|
success: (modalRes) => {
|
if (modalRes.confirm) {
|
// 提交成功后刷新当前单据,确保FSUBMIT最新,从而隐藏按钮
|
this.init();
|
}
|
}
|
});
|
} else {
|
// 显示失败提示框
|
uni.showModal({
|
title: '提交失败',
|
content: res.message || '检验提交失败,请重试!',
|
showCancel: false,
|
confirmText: '确定'
|
});
|
}
|
}).catch(error => {
|
uni.showModal({
|
title: '提交失败',
|
content: '网络错误,请检查网络连接后重试!',
|
showCancel: false,
|
confirmText: '确定'
|
});
|
});
|
},
|
// 刷新检验项目数据
|
refreshTableData() {
|
if (!this.formData.id || this.isLoading) {
|
return;
|
}
|
|
this.isLoading = true;
|
this.$post({
|
url: "/XJ/getJYItem",
|
data: {
|
pid: this.formData.id
|
}
|
}).then(res => {
|
let tableData = res.data.tbBillList;
|
// 当已检验个数都不为空时按照检测结构排序
|
tableData.sort((a, b) => {
|
if (a.result === '未完成' && b.result === '合格') {
|
return -1;
|
} else if (a.result === '合格' && b.result === '未完成') {
|
return 1;
|
} else {
|
return 0;
|
}
|
});
|
this.tableData = tableData;
|
this.isLoading = false;
|
console.log('检验项目数据已刷新');
|
}).catch(error => {
|
console.error('刷新检验项目失败:', error);
|
this.isLoading = false;
|
});
|
}
|
},
|
onShow() {
|
// 只有在有ID且已经初始化过的情况下才刷新数据
|
if (this.formData.id && this.formData.id !== '' && this.isInitialized) {
|
console.log('onShow: 页面显示,刷新检验项目数据,ID:', this.formData.id);
|
// 只刷新检验项目数据,不重新加载基本信息
|
this.refreshTableData();
|
}
|
}
|
};
|
</script>
|
|
<style>
|
/* 基础样式 */
|
.inspection-sheet {
|
font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
|
max-width: 1000px;
|
margin: 0 auto;
|
padding: 20px;
|
background-color: #fff;
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
}
|
|
/* 头部样式 */
|
.sheet-header {
|
text-align: center;
|
margin-bottom: 20px;
|
padding-bottom: 15px;
|
border-bottom: 2px solid #e0e0e0;
|
}
|
|
.sheet-header h1 {
|
color: #2c3e50;
|
font-size: 24px;
|
margin-bottom: 5px;
|
}
|
|
.inspection-number {
|
font-size: 16px;
|
font-weight: bold;
|
color: #3498db;
|
}
|
|
/* 加载指示器样式 */
|
.loading-indicator {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
gap: 8px;
|
margin-top: 10px;
|
padding: 8px 16px;
|
background: rgba(52, 152, 219, 0.1);
|
border-radius: 20px;
|
font-size: 14px;
|
color: #3498db;
|
}
|
|
.loading-spinner {
|
width: 16px;
|
height: 16px;
|
border: 2px solid #e3f2fd;
|
border-top: 2px solid #3498db;
|
border-radius: 50%;
|
animation: spin 1s linear infinite;
|
}
|
|
@keyframes spin {
|
0% { transform: rotate(0deg); }
|
100% { transform: rotate(360deg); }
|
}
|
|
/* 基本信息区样式 */
|
.basic-info,
|
.material-info {
|
margin-bottom: 20px;
|
}
|
|
.info-row {
|
display: flex;
|
margin-bottom: 10px;
|
flex-wrap: wrap;
|
}
|
|
.info-label {
|
font-weight: bold;
|
color: #34495e;
|
min-width: 80px;
|
margin-right: 5px;
|
}
|
|
.info-value {
|
color: #2c3e50;
|
margin-right: 20px;
|
}
|
|
.highlight {
|
font-weight: bold;
|
color: #e74c3c;
|
}
|
|
/* 物料信息区样式 */
|
.material-info {
|
border: 1px solid #eee;
|
padding: 15px;
|
border-radius: 5px;
|
}
|
|
.info-block {
|
display: flex;
|
align-items: center;
|
margin-bottom: 10px;
|
flex-wrap: wrap;
|
}
|
|
.info-value-input {
|
flex: 1;
|
padding: 8px 12px;
|
border: 1px solid #e9ecef;
|
border-radius: 6px;
|
background: #ffffff;
|
font-size: 14px;
|
margin-top: 6px;
|
}
|
|
.picker {
|
width: 100%;
|
padding: 8px 12px;
|
border: 1px solid #e9ecef;
|
border-radius: 6px;
|
background: #ffffff;
|
font-size: 14px;
|
margin-top: 6px;
|
}
|
|
/* 表格样式 */
|
.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;
|
}
|
|
/* 移动端表格头部统计 */
|
@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;
|
}
|
}
|
|
.inspection-table table {
|
width: 100%;
|
border-collapse: collapse;
|
}
|
|
.inspection-table th, .inspection-table td {
|
padding: 16px 20px;
|
border: none;
|
text-align: left;
|
border-bottom: 1px solid #eee;
|
}
|
|
.inspection-table th {
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
font-weight: 600;
|
color: #fff;
|
font-size: 14px;
|
letter-spacing: 0.5px;
|
position: relative;
|
}
|
|
.inspection-table tbody tr {
|
transition: all 0.3s ease;
|
border-left: 4px solid transparent;
|
}
|
|
.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;
|
}
|
|
/* 项目名称包装器 */
|
.project-name-wrapper {
|
display: flex;
|
align-items: center;
|
gap: 8px;
|
}
|
|
/* 状态指示器 */
|
.status-indicator {
|
width: 8px;
|
height: 8px;
|
border-radius: 50%;
|
display: inline-block;
|
flex-shrink: 0;
|
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
|
}
|
|
.status-indicator.status-approved {
|
background-color: #27ae60;
|
box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.3);
|
}
|
|
.status-indicator.status-rejected {
|
background-color: #e67e22;
|
box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.3);
|
}
|
|
.status-indicator.status-pending {
|
background-color: #f39c12;
|
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: middle;
|
padding: 16px 20px;
|
}
|
|
/* 按钮样式 */
|
.action-buttons {
|
display: flex;
|
justify-content: flex-end;
|
gap: 10px;
|
margin-top: 20px;
|
}
|
|
.primary-btn,
|
.secondary-btn {
|
padding: 10px 20px;
|
border: none;
|
border-radius: 4px;
|
font-size: 14px;
|
cursor: pointer;
|
transition: all 0.3s;
|
}
|
|
.primary-btn {
|
background-color: #3498db;
|
color: white;
|
}
|
|
.primary-btn:hover {
|
background-color: #2980b9;
|
}
|
|
.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;
|
}
|
|
.secondary-btn:hover {
|
background-color: #d5dbdb;
|
}
|
|
.info-btn {
|
background: linear-gradient(135deg, #17a2b8, #138496);
|
color: white;
|
}
|
|
.info-btn:hover {
|
background: linear-gradient(135deg, #138496, #117a8b);
|
transform: translateY(-2px);
|
box-shadow: 0 4px 16px rgba(23, 162, 184, 0.4);
|
}
|
|
.info-btn:active {
|
transform: translateY(0);
|
box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
|
}
|
|
.record-btn {
|
padding: 8px 16px;
|
background: linear-gradient(135deg, #3498db, #2980b9);
|
color: #fff;
|
border: none;
|
border-radius: 6px;
|
cursor: pointer;
|
transition: all 0.3s ease;
|
font-weight: 500;
|
font-size: 13px;
|
box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
|
}
|
|
.record-btn:hover {
|
background: linear-gradient(135deg, #2980b9, #1f618d);
|
transform: translateY(-1px);
|
box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
|
}
|
|
.record-btn:active {
|
transform: translateY(0);
|
}
|
|
/* 填写状态按钮 */
|
.record-btn-fill {
|
background: linear-gradient(135deg, #2ecc71, #27ae60);
|
box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
|
}
|
|
.record-btn-fill:hover {
|
background: linear-gradient(135deg, #27ae60, #229954);
|
box-shadow: 0 4px 8px rgba(46, 204, 113, 0.4);
|
}
|
|
/* 查看状态按钮 */
|
.record-btn-view {
|
background: linear-gradient(135deg, #95a5a6, #7f8c8d);
|
box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
|
}
|
|
.record-btn-view:hover {
|
background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
|
box-shadow: 0 4px 8px rgba(149, 165, 166, 0.4);
|
}
|
|
/* 水印样式 */
|
.watermark {
|
position: absolute;
|
font-size: 28px;
|
font-weight: bold;
|
opacity: 0.3;
|
z-index: 3;
|
pointer-events: none;
|
top: 50%;
|
right: 12px;
|
transform: translateY(-50%) rotate(-15deg);
|
transform-origin: center;
|
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
|
min-width: 60px;
|
text-align: center;
|
}
|
|
.watermark.approved {
|
color: #27ae60; /* 更淡的绿色 */
|
}
|
|
.watermark.rejected {
|
color: #e67e22; /* 更淡的红色 */
|
}
|
|
.watermark.pending {
|
color: #f39c12; /* 橙色 */
|
}
|
|
/* 描述文本样式 */
|
.description-text {
|
position: relative;
|
z-index: 2;
|
padding: 12px 16px;
|
background: transparent;
|
line-height: 1.6;
|
font-size: 14px;
|
color: #555;
|
margin: 0;
|
word-wrap: break-word;
|
word-break: break-word;
|
max-width: 100%;
|
/* 确保文字不会太长遮挡水印 */
|
padding-right: 80px;
|
min-height: 20px;
|
display: block;
|
}
|
|
/* 弹出框样式 */
|
.overlay {
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 100%;
|
background-color: rgba(0, 0, 0, 0.5);
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
z-index: 1000;
|
}
|
|
.popup {
|
background-color: white;
|
border-radius: 8px;
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
width: 90%;
|
max-width: 400px;
|
max-height: 80vh;
|
overflow-y: auto;
|
}
|
|
.popup-header {
|
padding: 20px;
|
border-bottom: 1px solid #eee;
|
}
|
|
.popup-header h3 {
|
font-size: 18px;
|
font-weight: 600;
|
color: #2c3e50;
|
margin: 0;
|
}
|
|
.popup-content {
|
padding: 20px;
|
}
|
|
.popup-actions {
|
padding: 20px;
|
border-top: 1px solid #eee;
|
display: flex;
|
gap: 10px;
|
justify-content: flex-end;
|
}
|
|
.action-btn {
|
padding: 10px 20px;
|
border: none;
|
border-radius: 4px;
|
font-size: 14px;
|
cursor: pointer;
|
transition: all 0.3s;
|
}
|
|
.action-btn.primary {
|
background-color: #3498db;
|
color: white;
|
}
|
|
.action-btn.primary:hover {
|
background-color: #2980b9;
|
}
|
|
.action-btn.secondary {
|
background-color: #ecf0f1;
|
color: #7f8c8d;
|
}
|
|
.action-btn.secondary:hover {
|
background-color: #d5dbdb;
|
}
|
|
/* 空状态样式 */
|
.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: 500px) {
|
.info-row,
|
.info-block {
|
flex-direction: column;
|
align-items: flex-start;
|
}
|
|
.action-buttons {
|
flex-direction: column;
|
}
|
|
.inspection-table table {
|
display: block;
|
overflow-x: auto;
|
}
|
}
|
</style>
|