| manifest.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/LLJ/Add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/LLJ/detail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/RKJ/Add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/SJ/Add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/QC/XJ/Add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| store/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
manifest.json
@@ -2,7 +2,7 @@ "name" : "GS-MES-AP", "appid" : "__UNI__F08FAE3", "description" : "", "versionName" : "1.1.3.6", "versionName" : "1.1.3.8", "versionCode" : 1, "transformPx" : false, /* 5+App特有相关 */ pages/QC/LLJ/Add.vue
@@ -136,7 +136,6 @@ <button class="action-btn small" @click="addDestruction" v-if="this.current">破坏实验</button> <button class="action-btn small" @click="uploadImages">上传/查看图片</button> <button class="action-btn small" @click="fetchDrawingNumber">调取PLM图纸</button> <button class="action-btn small" @click="getBom">Bom用料清单</button> <button class="action-btn small" @click="viewAttachmentInfo">查看附件信息</button> <button class="action-btn small" @click="addDefectDescription" v-if="this.current">添加不良描述</button> <button class="action-btn small primary" @click="submitInspection" v-if="this.current">检验提交</button> pages/QC/LLJ/detail.vue
@@ -25,6 +25,10 @@ <view class="info-label">项目名称</view> <view class="info-value">{{ formData.fcheckItem }}</view> </view> <view v-if="parseHoleCount(formData.fcheckItem)" class="info-item"> <view class="info-label">穴数</view> <view class="info-value hole-count">{{ parseHoleCount(formData.fcheckItem) }}穴</view> </view> <view class="info-item"> <view class="info-label">检验工具</view> <view class="info-value">{{ formData.fcheckTool }}</view> @@ -204,13 +208,45 @@ <!-- 结果表格 --> <view v-if="tableData.length>0" class="table-container"> <view class="table-header"> <!-- 有穴数时的表格头部 --> <view v-if="parseHoleCount(formData.fcheckItem)" class="table-header"> <view class="th">编号</view> <view class="th">穴号</view> <view class="th">记录值</view> <view class="th">检验结果<i style="color: rgb(0 212 68);" v-if="!(tableData.length < formData.checkQyt)">(输入已完成)</i></view> <view class="th" v-if="current">操作</view> </view> <!-- 无穴数时的表格头部 --> <view v-else class="table-header"> <view class="th">编号</view> <view class="th">检验结果<i style="color: rgb(0 212 68);" v-if="!(tableData.length < formData.checkQyt)">(输入已完成)</i></view> <view class="th" v-if="current">操作</view> </view> <!-- 有穴数时的表格行 --> <template v-if="parseHoleCount(formData.fcheckItem)"> <view v-for="(item, index) in completeHoleList" :key="index" class="table-row"> <view class="td">{{ index + 1 }}</view> <view class="td">{{ item.holeNumber }}穴</view> <view class="td">{{ item.recordValue }}</view> <view class="td"> <view :class="['result-badge', getResultBadgeClass(item.resultStatus)]"> {{ item.resultStatus }} </view> </view> <view class="td" v-if="current"> <button v-if="!item.isDefault && isNumber" class="btn danger-btn" @tap="toDetail(item)"> 修改 </button> </view> </view> </template> <!-- 无穴数时的表格行 --> <template v-else> <view v-for="(item, index) in tableData" :key="index" class="table-row"> <view class="td">{{ index + 1 }}</view> <view class="td"> @@ -227,6 +263,7 @@ </button> </view> </view> </template> </view> <view v-if="remarksPopup" class="overlay"> <view class="popup"> @@ -305,7 +342,100 @@ isFocus: false, // 新增,控制输入框聚焦 } }, computed: { // 生成完整的穴位列表(根据检验数量生成,穴号循环显示) completeHoleList() { const holeCount = this.parseHoleCount(this.formData.fcheckItem); if (!holeCount) return this.tableData; const checkQyt = this.formData.checkQyt || 0; // 检验数量 const completeList = []; // 根据检验数量生成记录,穴号循环显示 for (let i = 1; i <= checkQyt; i++) { // 计算当前记录的穴号(循环显示) const holeNumber = ((i - 1) % holeCount) + 1; // 查找是否已有该位置的记录 const existingRecord = this.tableData.find((item, index) => { return index === i - 1; // 按顺序匹配 }); if (existingRecord) { // 如果已有记录,使用现有数据 completeList.push({ ...existingRecord, holeNumber: holeNumber, recordValue: existingRecord.fcheckResu || 'N/A', resultStatus: this.getResultStatus(existingRecord.fcheckResu) || '未填写' }); } else { // 如果没有记录,创建默认记录 completeList.push({ id: null, holeNumber: holeNumber, recordValue: 'N/A', resultStatus: '未填写', fcheckResu: null, isDefault: true // 标记为默认记录 }); } } return completeList; } }, methods: { // 解析检验项目名称中的穴数 parseHoleCount(checkItemName) { if (!checkItemName) return null; // 匹配格式:尺寸检查(5穴)或 尺寸检查(5穴) const match = checkItemName.match(/[((](\d+)穴[))]/); return match ? parseInt(match[1]) : null; }, // 根据记录值判断检验结果状态 getResultStatus(recordValue) { if (!recordValue) return ''; // 如果有上下限,根据数值判断 if (this.formData.fupAllow && this.formData.fdownAllow) { const numValue = parseFloat(recordValue); if (isNaN(numValue)) return recordValue; if (numValue >= parseFloat(this.formData.fdownAllow) && numValue <= parseFloat(this.formData.fupAllow)) { return 'OK'; } else { return 'NG'; } } // 无上下限时,直接返回记录值 return recordValue; }, // 获取检验结果徽章的样式类 getResultBadgeClass(resultStatus) { switch(resultStatus) { case 'OK': return 'OK'; case 'NG': return 'NG'; case '未填写': return 'pending'; default: return 'default'; } }, // 添加新记录(用于未填写的穴位) addNewRecord(item) { // 这里可以触发填写逻辑,比如弹出输入框或跳转到填写页面 // 暂时先显示提示 this.$showMessage(`请填写第${item.holeNumber}穴的检验结果`); }, // 防抖自动保存方法 autoSaveResult() { // 清除之前的定时器 @@ -504,7 +634,6 @@ this.remarksPopup = true; }, saveResult() { let count = this.formData.checkQyt; let fstand = "√"; @@ -573,6 +702,7 @@ }) }, goBack() { uni.navigateBack() }, @@ -603,11 +733,8 @@ }) }, editResult(fcheckResu) { if (fcheckResu == 'OK') { // 统一显示"改为不合格" return "改为不合格"; } else { return "改为合格"; } }, toDetail(item) { this.showPopup = !this.showPopup; @@ -952,6 +1079,7 @@ flex: 1; padding: 12px; font-weight: bold; text-align: center; } } @@ -968,6 +1096,8 @@ flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; } } } @@ -987,6 +1117,16 @@ &.NG { background-color: rgba($danger-color, 0.1); color: $danger-color; } &.pending { background-color: rgba(#f39c12, 0.1); color: #f39c12; } &.default { background-color: rgba(#909399, 0.1); color: #909399; } } @@ -1081,4 +1221,13 @@ opacity: 0.6; cursor: not-allowed; } .hole-count { color: #409EFF; font-weight: bold; background-color: rgba(64, 158, 255, 0.1); padding: 2px 8px; border-radius: 4px; display: inline-block; } </style> pages/QC/RKJ/Add.vue
@@ -2745,13 +2745,19 @@ } .bottom-action-buttons { flex-direction: column; gap: 5px; flex-direction: row; align-items: center; justify-content: center; padding: 8px; gap: 6px; } .action-btn.small { min-width: 100%; max-width: none; min-width: 70px; max-width: 100px; padding: 8px 10px; font-size: 13px; min-height: 40px; } } pages/QC/SJ/Add.vue
@@ -74,8 +74,8 @@ </view> <!-- 检验项目表格 --> <view class="inspection-table" v-if="tableData.length > 0"> <table> <view class="inspection-table"> <table v-if="tableData.length > 0"> <thead> <tr> <th width="20%" style="text-align: center;">检验项目</th> @@ -106,6 +106,12 @@ </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="top-action-buttons"> @@ -386,7 +392,10 @@ }); if (this.tableData.length <= 0) { this.isShowTable = true; this.isShowTable = true; // 没有检验项目时显示生成按钮 } else { this.isShowTable = false; // 有检验项目时直接进入填写阶段 this.isUpdate = false; // 设置为非更新状态,可以直接填写 } }) } @@ -476,10 +485,14 @@ if (res.data.tbBillList.length > 0) { this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this this.isSubmit = false; // 注意:这里不自动保存,因为还没有创建检验单,需要先调用save()创建检验单 this.isShowTable = false; // 直接进入填写阶段 this.isUpdate = false; // 设置为非更新状态,可以直接填写 } else { this.$showMessage("此物料没有启用的检验项目,请维护!"); this.isSubmit = true; this.tableData = []; this.isShowTable = true; // 没有检验项目时显示生成按钮 } }); @@ -509,8 +522,8 @@ }).then(res => { if (res.data.tbBillList.length > 0) { this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this this.isShowTable = true; this.isUpdate = true; // 自动保存检验项目到数据库 this.saveTable(); } else { this.$showMessage("此物料没有启用的检验项目,请维护!"); this.isShowTable = true; @@ -969,6 +982,9 @@ if (genRes.data.result === 0) { this.$showMessage("获取检验项目成功"); this.init(); // 获取成功后直接进入填写阶段 this.isShowTable = false; this.isUpdate = false; } else { this.$showMessage(genRes.data.message || "获取失败"); } @@ -988,6 +1004,9 @@ if (genRes.data.result === 0) { this.$showMessage("获取检验项目成功"); this.init(); // 获取成功后直接进入填写阶段 this.isShowTable = false; this.isUpdate = false; } else { this.$showMessage(genRes.data.message || "获取失败"); } @@ -1006,57 +1025,58 @@ <style scoped> /* 基础样式 */ .inspection-sheet { font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif; max-width: 1000px; margin: 0 auto; padding: 20px 20px 100px 20px; /* 底部增加内边距为固定按钮留空间 */ background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); padding: 10px; background-color: #f5f7fa; min-height: 100vh; position: relative; transition: all 0.3s ease; padding-bottom: 120px; /* 为底部固定按钮留出空间 */ } /* 头部样式 */ .sheet-header { text-align: center; background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #e0e0e0; } .sheet-header h1 { color: #2c3e50; font-size: 24px; margin-bottom: 5px; font-weight: 600; color: #2c3e50; margin-bottom: 10px; } .inspection-number { font-size: 16px; font-weight: bold; color: #3498db; font-weight: 500; } /* 基本信息区样式 */ .basic-info, .material-info { /* 基本信息区 */ .basic-info { background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); margin-bottom: 20px; } .info-row { display: flex; margin-bottom: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; } .info-label { font-weight: bold; color: #34495e; font-size: 14px; color: #7f8c8d; margin-right: 10px; min-width: 80px; margin-right: 5px; } .info-value { font-size: 14px; color: #2c3e50; margin-right: 20px; } @@ -1070,18 +1090,19 @@ margin-right: 20px; } /* 物料信息区样式 */ /* 物料信息区 */ .material-info { border: 1px solid #eee; padding: 15px; border-radius: 5px; background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); margin-bottom: 20px; } .info-block { display: flex; align-items: center; margin-bottom: 10px; flex-wrap: wrap; margin-bottom: 15px; } .info-block .info-label { @@ -1115,13 +1136,18 @@ } .highlight { font-weight: bold; font-weight: 600; color: #e74c3c; font-size: 16px; } /* 表格样式 */ /* 检验项目表格 */ .inspection-table { margin: 25px 0; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); background: #fff; } .inspection-table table { @@ -1129,71 +1155,114 @@ 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: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; transform: rotate(-15deg); width: 100%; text-align: center; 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; padding: 25px; background-color: rgba(255, 255, 255, 0.7); 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; } /* 调整表格单元格 */ .inspection-table td:nth-child(2) { position: relative; overflow: hidden; padding: 0; .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); } /* 表单上方操作按钮区样式 */ @@ -1277,19 +1346,6 @@ justify-content: flex-end; } .record-btn { padding: 6px 12px; background-color: #f8f9fa; border: 1px solid #ddd; /* border-radius: 3px; */ cursor: pointer; transition: all 0.2s; } .record-btn:hover { background-color: #e9ecef; } .overlay { position: fixed; top: 0; @@ -1341,8 +1397,43 @@ justify-content: flex-end; } /* 空状态样式 */ .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) { .inspection-sheet { padding-bottom: 100px; /* 小屏幕设备上减少底部内边距 */ } .info-row, .info-block { pages/QC/XJ/Add.vue
@@ -1459,7 +1459,8 @@ <style scoped> /* 基础样式 */ .container { padding: 10px; padding: 20px; padding-bottom: 120px; /* 为固定按钮留出更多空间,避免遮盖检验项目 */ background-color: #f5f7fa; min-height: 100vh; } @@ -1572,18 +1573,18 @@ } .inspection-table th { background-color: #f8f9fa; color: #34495e; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 15px; font-weight: bold; text-align: left; border: 1px solid #ddd; text-align: center; border: none; } .inspection-table td { padding: 12px 15px; text-align: left; border: 1px solid #ddd; border: none; } .inspection-table tr:nth-child(even) { @@ -1592,14 +1593,16 @@ .inspection-table tr:hover { background-color: #f1f5f9; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } /* 水印样式 */ .watermark { position: absolute; font-size: 40px; font-size: 32px; font-weight: bold; opacity: 1; opacity: 0.3; z-index: 1; pointer-events: none; transform: rotate(-15deg); @@ -1655,55 +1658,106 @@ /* 操作按钮 */ .action-buttons { position: fixed; bottom: 0; left: 0; right: 0; background-color: white; border-top: 1px solid #e9ecef; padding: 12px; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 1000; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; } .action-btn { padding: 12px 20px; background-color: #ecf0f1; color: #34495e; padding: 12px 15px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; font-size: 12px; font-weight: 500; transition: all 0.3s ease; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; } .action-btn:hover { background-color: #d5dbdb; transform: translateY(-1px); } .action-btn.primary { background-color: #3498db; color: white; color: #fff; } .action-btn.primary:hover { background-color: #2980b9; } .action-btn.secondary { background-color: #95a5a6; color: white; background-color: #ecf0f1; color: #34495e; } .action-btn.secondary:hover { background-color: #d5dbdb; } .action-btn.danger { background-color: #e74c3c; color: white; color: #fff; } .action-btn.danger:hover { background-color: #c0392b; } .action-btn.warning { background-color: #f39c12; color: white; color: #fff; } .action-btn.warning:hover { background-color: #e67e22; } .action-btn.success { background-color: #2ecc71; color: white; color: #fff; } .action-btn.success:hover { background-color: #27ae60; } .action-btn.info { background-color: #17a2b8; color: white; color: #fff; } .action-btn.info:hover { background-color: #138496; } .action-btn.small { padding: 6px 12px; padding: 10px 12px; font-size: 12px; min-height: 44px; white-space: nowrap; flex-shrink: 0; min-width: 80px; max-width: 120px; } /* 弹出框样式 */ @@ -2324,12 +2378,36 @@ /* 响应式设计 */ @media (max-width: 768px) { .container { padding-bottom: 120px; /* 为固定按钮留出空间,避免遮盖检验项目 */ } .info-grid { grid-template-columns: 1fr; } .action-buttons { flex-direction: column; flex-direction: row; align-items: center; justify-content: center; padding: 8px; gap: 6px; } .action-btn { min-width: 70px; max-width: 100px; padding: 8px 10px; font-size: 11px; min-height: 40px; } .action-btn.small { min-width: 70px; max-width: 100px; padding: 8px 10px; font-size: 11px; min-height: 40px; } /* 附件弹窗响应式 */ @@ -2386,9 +2464,7 @@ .attachment-icon { font-size: 20px; } } @media (max-width: 480px) { .attachment-popup-content { padding: 16px; } store/index.js
@@ -10,9 +10,9 @@ networkFlag:'内网', serverURLInt:'http://192.168.11.251:10055',//服务器体检 10.0.1.104:10054 serverURL:'http://localhost:10055',//本地调试地址 serverAPI:'http://localhost:5184/api',//当前正在使用的服务器,默认为外网 localhost //serverAPI:'http://localhost:5184/api',//当前正在使用的服务器,默认为外网 localhost //serverAPI:'http://192.168.1.22:10054/api',//内网 //serverAPI:'http://36.26.21.214:10054/api', serverAPI:'http://36.26.21.214:10054/api', ftpServer:'ftp://36.26.21.214',//FTP服务器地址 } },