| | |
| | | </view> |
| | | |
| | | <view class="input-group input1"> |
| | | <view class="input-wrapper"> |
| | | <input v-if="tableData.length < formData.levelNum" class="result-input" type="number" v-model="formData.fcheckResu" placeholder="请输入检验结果..."/> |
| | | <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">保存结果</button> |
| | | <button class="btn upload-btn" @click="previewImage" v-if="isShowImg"> |
| | | <uni-icons type="image" size="16" color="#fff"></uni-icons> |
| | | 查看图片 |
| | | <view class="input-wrapper llj-flex-row"> |
| | | <input v-if="tableData.length < formData.levelNum" |
| | | class="result-input" |
| | | type="number" |
| | | v-model="formData.fcheckResu" |
| | | placeholder="请输入检验结果..." /> |
| | | <button v-if="tableData.length < formData.levelNum" |
| | | class="llj-btn llj-btn-save" |
| | | @click="submit">保存结果</button> |
| | | <button |
| | | class="llj-btn llj-btn-image" |
| | | @click="previewImage" |
| | | v-if="isShowImg" |
| | | > |
| | | <uni-icons type="image" size="20" color="#fff" style="margin-right:6px;"/> |
| | | 上传/查看图片 |
| | | </button> |
| | | <button class="btn upload-btn" @click="saveRemarks"> |
| | | <uni-icons type="compose" size="16" color="#fff"></uni-icons> |
| | | <button |
| | | class="llj-btn llj-btn-desc" |
| | | @click="saveRemarks"> |
| | | <uni-icons type="compose" size="20" color="#fff" style="margin-right:6px;"/> |
| | | 不合格描述 |
| | | </button> |
| | | <view v-if="formData.remarks" class="llj-desc-tag"> |
| | | {{ formData.remarks.length > 10 ? formData.remarks.substr(0,10)+'...' : formData.remarks }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | |
| | | <!-- NG/OK状态样式 --> |
| | | <view v-else class="simple-status-result"> |
| | | <view class="simple-status" :class="{'pass': item.fcheckResu === '1', 'fail': item.fcheckResu !== '1'}"> |
| | | {{ item.fcheckResu === '1' ? '合格' : '不合格' }} |
| | | <view class="simple-status" :class="{'pass': item.fcheckResu == 1 || item.fcheckResu == 'OK' || item.fcheckResu == 'ok', 'fail': item.fcheckResu != 1 && item.fcheckResu != 'OK' && item.fcheckResu != 'ok'}"> |
| | | {{ (item.fcheckResu == 1 || item.fcheckResu == 'OK' || item.fcheckResu == 'ok') ? '合格' : '不合格' }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <form> |
| | | <view class="form-group"> |
| | | <label class="form-label">不合格描述:</label> |
| | | <input class="form-input" type="text" v-model="remarks" placeholder="请输入不合格描述"/> |
| | | <input class="form-input" type="text" v-model="remarks" placeholder="请输入不合格描述,留空表示清除描述"/> |
| | | </view> |
| | | <view class="popup-buttons"> |
| | | <button type="warn" class="btn primary-btn" @click="editRemarks">修改</button> |
| | |
| | | <input class="form-input" type="text" v-model="editData.fcheckResu" placeholder="请输入检验结果"/> |
| | | </view> |
| | | <view class="popup-buttons"> |
| | | <button type="warn" class="btn primary-btn" @click="eidt">修改</button> |
| | | <button type="warn" class="btn primary-btn" @click="edit">修改</button> |
| | | <button class="btn cancel-btn" @click="showPopup = !showPopup">取消</button> |
| | | </view> |
| | | </form> |
| | |
| | | }); |
| | | }, |
| | | editResult(fcheckResu) { |
| | | if (fcheckResu == '1') { |
| | | if (fcheckResu == '1' || fcheckResu == 'OK' || fcheckResu == 'ok') { |
| | | return "改为不合格"; |
| | | } else { |
| | | return "改为合格"; |
| | |
| | | this.$post({ |
| | | url: "/XJ/getXjDetail02ById", |
| | | data: { |
| | | pid: this.id |
| | | id: this.id |
| | | } |
| | | }).then(res => { |
| | | this.formData = res.data.tbBillList.itemXj01; |
| | |
| | | this.showPopup = !this.showPopup; |
| | | this.editData = item; |
| | | }, |
| | | eidt() { |
| | | edit() { |
| | | |
| | | if (!this.editData.fcheckResu) { |
| | | this.$showMessage("请输入检验结果"); |
| | | return; |
| | | } |
| | | |
| | | if (this.formData.fcheckResu == this.editData.fcheckResu) { |
| | | this.$showMessage("修改成功"); |
| | | // 检查是否有实际修改 |
| | | const originalValue = this.tableData.find(item => item.id === this.editData.id)?.fcheckResu; |
| | | if (originalValue == this.editData.fcheckResu) { |
| | | this.$showMessage("没有修改"); |
| | | return; |
| | | } |
| | | |
| | |
| | | let fstand = "√"; |
| | | let fcheckResu = 1; |
| | | |
| | | if (item.fcheckResu == '1') { |
| | | if (item.fcheckResu == '1' || item.fcheckResu == 'OK' || item.fcheckResu == 'ok') { |
| | | fstand = "×"; |
| | | fcheckResu = 0; |
| | | } |
| | |
| | | this.remarks = this.formData.remarks; |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks) { |
| | | //saveRemarksGid |
| | | // 允许留空,留空代表清除描述 |
| | | this.$post({ |
| | | url: "/XJ/saveRemarksPid", |
| | | data: { |
| | | pid: this.formData.id, |
| | | remarks: this.remarks |
| | | remarks: this.remarks || "" // 留空时传递空字符串 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.formData.remarks = this.remarks; |
| | | this.formData.remarks = this.remarks || ""; // 更新本地数据 |
| | | this.remarksPopup = !this.remarksPopup; |
| | | this.$showMessage("保存成功"); |
| | | this.$showMessage(this.remarks ? "保存成功" : "描述已清除"); |
| | | } |
| | | }) |
| | | } |
| | | }).catch(error => { |
| | | this.$showMessage("保存失败,请重试"); |
| | | }); |
| | | }, |
| | | // 判断数字是否在范围内 |
| | | isInRange(value) { |
| | |
| | | } |
| | | } |
| | | |
| | | /* LLJ风格样式 */ |
| | | .llj-flex-row { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 12px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .llj-btn { |
| | | padding: 10px 16px; |
| | | border: none; |
| | | border-radius: 6px; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | cursor: pointer; |
| | | transition: all 0.3s ease; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | min-width: 100px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| | | } |
| | | |
| | | .llj-btn-save { |
| | | background: linear-gradient(135deg, #667eea, #764ba2); |
| | | color: #fff; |
| | | } |
| | | |
| | | .llj-btn-save:hover { |
| | | background: linear-gradient(135deg, #5a6fd8, #6a4190); |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); |
| | | } |
| | | |
| | | .llj-btn-image { |
| | | background: linear-gradient(135deg, #f093fb, #f5576c); |
| | | color: #fff; |
| | | } |
| | | |
| | | .llj-btn-image:hover { |
| | | background: linear-gradient(135deg, #e879f9, #f43f5e); |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4); |
| | | } |
| | | |
| | | .llj-btn-desc { |
| | | background: linear-gradient(135deg, #4facfe, #00f2fe); |
| | | color: #fff; |
| | | } |
| | | |
| | | .llj-btn-desc:hover { |
| | | background: linear-gradient(135deg, #3d8bfe, #00d4fe); |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4); |
| | | } |
| | | |
| | | .llj-desc-tag { |
| | | background: linear-gradient(135deg, #ffecd2, #fcb69f); |
| | | color: #8b4513; |
| | | padding: 6px 12px; |
| | | border-radius: 20px; |
| | | font-size: 12px; |
| | | font-weight: 600; |
| | | border: 1px solid #fcb69f; |
| | | max-width: 200px; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | /* 简洁表格样式 - 适合年长用户 */ |
| | | .simple-table-container { |
| | | margin: 20px 0; |