|
|
@ -129,7 +129,7 @@ |
|
|
|
|
|
|
|
|
<!-- 检验单详情页 --> |
|
|
<!-- 检验单详情页 --> |
|
|
<el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px"> |
|
|
<el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px"> |
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList()"> |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()"> |
|
|
<el-form-item :label="'物料编码'"> |
|
|
<el-form-item :label="'物料编码'"> |
|
|
<el-input v-model="detailData.partNo" disabled style="width: 100px"></el-input> |
|
|
<el-input v-model="detailData.partNo" disabled style="width: 100px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -143,7 +143,7 @@ |
|
|
<el-input v-model="detailData.samplingQty" disabled style="width: 80px"></el-input> |
|
|
<el-input v-model="detailData.samplingQty" disabled style="width: 80px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList()"> |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()"> |
|
|
<el-form-item :label="'不合格项目数量'"> |
|
|
<el-form-item :label="'不合格项目数量'"> |
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled type="number" style="width: 80px"></el-input> |
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled type="number" style="width: 80px"></el-input> |
|
|
<el-input v-if="detailData.submitFlag != 'Y'" v-model="detailData.unqualifiedQty" type="number" style="width: 80px"></el-input> |
|
|
<el-input v-if="detailData.submitFlag != 'Y'" v-model="detailData.unqualifiedQty" type="number" style="width: 80px"></el-input> |
|
|
@ -311,6 +311,7 @@ |
|
|
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="471px"> |
|
|
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="471px"> |
|
|
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button> |
|
|
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button> |
|
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button> |
|
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button> |
|
|
|
|
|
<el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button> |
|
|
<div class="rq "> |
|
|
<div class="rq "> |
|
|
<el-table |
|
|
<el-table |
|
|
:height="300" |
|
|
:height="300" |
|
|
@ -330,7 +331,7 @@ |
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200"> |
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200"> |
|
|
<template slot-scope="{row}"> |
|
|
<template slot-scope="{row}"> |
|
|
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input> |
|
|
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input> |
|
|
<el-input v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].subDetailValue" placeholder="请输入实测值"></el-input> |
|
|
|
|
|
|
|
|
<el-input :ref="`${row.xh-1}`" v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus(row.xh-1)" placeholder="请输入实测值" class="batch_add"></el-input> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -341,6 +342,22 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 批量新增子明细操作--> |
|
|
|
|
|
<el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="471px"> |
|
|
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
|
|
<el-form-item :label="'默认抽样位置'"> |
|
|
|
|
|
<el-input v-model="batchAddData.samplingLocation" style="width: 210px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'抽样数量'"> |
|
|
|
|
|
<el-input v-model="batchAddData.samplingNumber" style="width: 210px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="batchHandleAddModal()">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="batchHandleAddModalFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
|
<!-- 上传文件的modal --> |
|
|
<!-- 上传文件的modal --> |
|
|
@ -874,6 +891,11 @@ |
|
|
fileFlag: false, |
|
|
fileFlag: false, |
|
|
fileContentList: [], |
|
|
fileContentList: [], |
|
|
IQCSelections: [], |
|
|
IQCSelections: [], |
|
|
|
|
|
batchHandleAddModalFlag: false, |
|
|
|
|
|
batchAddData: { |
|
|
|
|
|
samplingLocation: '', |
|
|
|
|
|
samplingNumber: '' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
mounted () { |
|
|
@ -1242,16 +1264,16 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 子明细方法 |
|
|
// 子明细方法 |
|
|
//表格的新增 |
|
|
|
|
|
|
|
|
// 表格的新增 |
|
|
rowClassName({ row, rowIndex }) { |
|
|
rowClassName({ row, rowIndex }) { |
|
|
row.xh = rowIndex + 1; |
|
|
row.xh = rowIndex + 1; |
|
|
}, |
|
|
}, |
|
|
//单选框选中数据 |
|
|
|
|
|
|
|
|
// 单选框选中数据 |
|
|
handleDetailSelectionChange(selection) { |
|
|
handleDetailSelectionChange(selection) { |
|
|
this.checkedDetail = selection; |
|
|
this.checkedDetail = selection; |
|
|
}, |
|
|
}, |
|
|
//点击新增更多 |
|
|
|
|
|
handleAddBtn(td) { |
|
|
|
|
|
|
|
|
// 点击新增更多 |
|
|
|
|
|
handleAddBtn (td) { |
|
|
checkIQCIsSubmit(td).then(({data}) => { |
|
|
checkIQCIsSubmit(td).then(({data}) => { |
|
|
if (data.flag != 1) { |
|
|
if (data.flag != 1) { |
|
|
let obj = {}; |
|
|
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) { |
|
|
handleDeleteBtn(td) { |
|
|
checkIQCIsSubmit(td).then(({data}) => { |
|
|
checkIQCIsSubmit(td).then(({data}) => { |
|
|
@ -1289,7 +1341,7 @@ |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: "删除成功,记得保存修改喔!", |
|
|
|
|
|
|
|
|
message: "删除成功!", |
|
|
type: "success", |
|
|
type: "success", |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
|