|
|
|
@ -388,7 +388,8 @@ |
|
|
|
<el-input v-model="detailData.responsiblePersonName" readonly style="width: 173px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="addUploadFileModal">上传文件</el-button> |
|
|
|
<el-button type="primary" @click="getFileContentData(detailData)">工作文件</el-button> |
|
|
|
<!-- <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>--> |
|
|
|
<el-button type="primary" icon="el-icon-upload" @click="subDetailUpload">明细导入</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -427,10 +428,11 @@ |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="60" |
|
|
|
min-width="90" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button class="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button> |
|
|
|
<el-button style="margin-left: 2px" class="el-icon-s-platform" type="primary" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)"></el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -518,7 +520,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 子明细信息 --> |
|
|
|
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="572px"> |
|
|
|
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="736px"> |
|
|
|
<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="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button> |
|
|
|
@ -544,10 +546,16 @@ |
|
|
|
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="150"> |
|
|
|
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input> |
|
|
|
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150"> |
|
|
|
<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-else :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input> |
|
|
|
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input> |
|
|
|
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="tableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -735,6 +743,11 @@ |
|
|
|
|
|
|
|
<!-- 文件清单 --> |
|
|
|
<el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item v-if="detailInformationFlag"> |
|
|
|
<el-button type="primary" @click="addUploadFileModal">上传文件</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="350" |
|
|
|
:data="fileContentList" |
|
|
|
@ -880,7 +893,7 @@ |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
<!-- 上传文件的modal --> |
|
|
|
<qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="getDataList" v-drag></qcFAIUploadFile> |
|
|
|
<qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="()=>{this.getFileContentData(this.detailData)}" v-drag></qcFAIUploadFile> |
|
|
|
|
|
|
|
<!-- 上传文件的modal --> |
|
|
|
<comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile> |
|
|
|
@ -920,6 +933,7 @@ |
|
|
|
dataAcquisition, // 数据采集 |
|
|
|
getResponsibleOperatorList, // 获取责任人列表 |
|
|
|
getIPQCItemObjectList, // 查询项目设备 |
|
|
|
dataAcquisitionByItem, // 根据项目数据采集 |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
@ -2432,6 +2446,35 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据项目数据采集 |
|
|
|
dataAcquisitionByItem (row) { |
|
|
|
this.loadFlag = true |
|
|
|
let tempDate = { |
|
|
|
site: row.site, |
|
|
|
buNo: row.buNo, |
|
|
|
inspectionNo: row.inspectionNo, |
|
|
|
itemNo: row.itemNo, |
|
|
|
flag: 'ipqc' |
|
|
|
} |
|
|
|
dataAcquisitionByItem(tempDate).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.changeMyString(data.rows) |
|
|
|
this.$message({ |
|
|
|
message: '数据采集成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: data.msg, |
|
|
|
type: 'warning', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
} |
|
|
|
this.loadFlag = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取用户角色 |
|
|
|
getUserRoleList () { |
|
|
|
getUserRoleList().then(({data}) => { |
|
|
|
@ -3607,9 +3650,12 @@ |
|
|
|
handleAddBtn (td) { |
|
|
|
checkIPQCIsSubmit(td).then(({data}) => { |
|
|
|
if (data.flag !== 1) { |
|
|
|
let obj = {} |
|
|
|
obj.subDetailValue = "" |
|
|
|
obj.samplingLocation = "" |
|
|
|
let obj = { |
|
|
|
subDetailValue: '', |
|
|
|
samplingLocation: '', |
|
|
|
samplingLocationB: '', |
|
|
|
subDetailValueB: '' |
|
|
|
} |
|
|
|
this.tableData.push(obj) |
|
|
|
} else { |
|
|
|
this.$alert("记录已提交!", '错误', { |
|
|
|
@ -3635,10 +3681,12 @@ |
|
|
|
// 批量新增行 |
|
|
|
batchHandleAddModal () { |
|
|
|
for (let i = 0; i < this.batchAddData.samplingNumber; i++) { |
|
|
|
let obj = {} |
|
|
|
obj.samplingLocation = this.batchAddData.samplingLocation |
|
|
|
obj.samplingLocationB = this.batchAddData.samplingLocationB |
|
|
|
obj.subDetailValue = "" |
|
|
|
let obj = { |
|
|
|
samplingLocation: this.batchAddData.samplingLocation, |
|
|
|
samplingLocationB: this.batchAddData.samplingLocationB, |
|
|
|
subDetailValue: '', |
|
|
|
subDetailValueB: '' |
|
|
|
} |
|
|
|
this.tableData.push(obj) |
|
|
|
} |
|
|
|
this.batchHandleAddModalFlag = false |
|
|
|
@ -3663,6 +3711,12 @@ |
|
|
|
this.$refs[a3].focus() |
|
|
|
}) |
|
|
|
}, |
|
|
|
nextFocus4 (index) { |
|
|
|
let a3 = `${index + 1}` + `d` |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[a3].focus() |
|
|
|
}) |
|
|
|
}, |
|
|
|
focusNextInput (index, type) { |
|
|
|
let aaa = '' |
|
|
|
if (this.detailList.length - 1 === index) { |
|
|
|
|