| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <view class="action-buttons"> |
| | | <button class="btn btn-primary" @click="getTable">获取检验项目</button> |
| | | <button class="btn btn-primary" @click="submitInspection">提交</button> |
| | | <button class="secondary-btn" @click="uploadImages">上传/查看图片</button> |
| | | <button class="btn btn-secondary" @click="addDefectDescription">添加不合格描述</button> |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getTable() { |
| | | // 获取检验项目逻辑 |
| | | this.$post({ |
| | | url: "/MesOqcItemsDetect02/OqcQagetTable", |
| | | data: { |
| | | userNo: this.$loginInfo.account, |
| | | releaseNo: this.formData.releaseNo |
| | | } |
| | | }).then(res => { |
| | | if (res.status == 0) { |
| | | |
| | | uni.showToast({ |
| | | title: res.message.toString(), |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | this.getDetail5(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.message.toString(), |
| | | confirmText: "确定", |
| | | showCancel: false, |
| | | success: (res) => { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | editRemarks() { |
| | | if (this.remarks && this.formData.id) { |
| | | this.$post({ |
| | |
| | | ItemCode: this.formData.ItemBarcode |
| | | } |
| | | }).then(res => { |
| | | let fr = res.data.tbBillList; |
| | | |
| | | // 数据完整性校验 |
| | | if (!fr) { |
| | | this.$showMessage("获取条码信息失败,请重试"); |
| | | if( res.status == 1 ){ |
| | | this.$showMessage(res.message); |
| | | return; |
| | | } |
| | | |
| | | let fr = res.data.tbBillList; |
| | | |
| | | |
| | | |
| | | if (!fr.itemId || !fr.itemName || !fr.itemNo) { |
| | | this.$showMessage("条码信息不完整,请检查条码"); |
| | |
| | | } |
| | | |
| | | this.formData = fr; |
| | | this.tableData.push(fr); // 将新数据添加到表格 |
| | | let data = { |
| | | id : this.formData.id, |
| | | itemBarcode : this.formData.itemBarcode, |
| | | quantity : this.formData.quantity, |
| | | itemName : this.formData.itemName, |
| | | itemNo : this.formData.itemNo, |
| | | taskNo : this.formData.taskNo, |
| | | itemId : this.formData.itemId |
| | | }; |
| | | this.tableData.push(data); // 将新数据添加到表格 |
| | | this.quantity = this.tableData.reduce(function (accumulator, current) { |
| | | return accumulator + current["quantity"]; |
| | | }, 0); |