diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index 7dc4b4f..9bc130b 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -129,7 +129,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -311,6 +311,7 @@ 添加 删除 + 批量新增
@@ -341,6 +342,22 @@ + + + + + + + + + + + + 保存 + 关闭 + + + @@ -874,6 +891,11 @@ fileFlag: false, fileContentList: [], IQCSelections: [], + batchHandleAddModalFlag: false, + batchAddData: { + samplingLocation: '', + samplingNumber: '' + } } }, mounted () { @@ -1242,16 +1264,16 @@ }) }, // 子明细方法 - //表格的新增 + // 表格的新增 rowClassName({ row, rowIndex }) { row.xh = rowIndex + 1; }, - //单选框选中数据 + // 单选框选中数据 handleDetailSelectionChange(selection) { this.checkedDetail = selection; }, - //点击新增更多 - handleAddBtn(td) { + // 点击新增更多 + handleAddBtn (td) { checkIQCIsSubmit(td).then(({data}) => { if (data.flag != 1) { let obj = {}; @@ -1265,6 +1287,36 @@ } }) }, + // 批量新增操作 + batchHandleAdd (td) { + checkIQCIsSubmit(td).then(({data}) => { + if (data.flag != 1) { + this.batchHandleAddModalFlag = true + } else { + this.$alert("记录已提交!", '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + // 批量新增行 + batchHandleAddModal () { + for (let i = 0; i < this.batchAddData.samplingNumber; i++) { + let obj = {} + obj.samplingLocation = this.batchAddData.samplingLocation + obj.subDetailValue = "" + this.tableData.push(obj) + } + this.batchHandleAddModalFlag = false + }, + // 回车事件 + nextFocus(index) { + console.log(index) + let aaa = `${index + 1}` + this.$nextTick(() => { + this.$refs[aaa].focus() + }) + }, //删除 handleDeleteBtn(td) { checkIQCIsSubmit(td).then(({data}) => { @@ -1289,7 +1341,7 @@ }); }); this.$message({ - message: "删除成功,记得保存修改喔!", + message: "删除成功!", type: "success", }); return;