|
|
|
@ -103,6 +103,7 @@ |
|
|
|
class="el-button el-button--primary el-button--medium"> |
|
|
|
{{ "导出" }} |
|
|
|
</download-excel> |
|
|
|
<el-button type="primary" @click="getCollect">测试采集</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
@ -934,6 +935,8 @@ |
|
|
|
dataAcquisitionByItem, // 根据项目数据采集 |
|
|
|
cancelApproval2, // 取消审核 |
|
|
|
searchPartAttributeDetails, // 查询物料属性模板 |
|
|
|
getEamPropertiesItemByItemNo, |
|
|
|
getCollectorDataByItem, |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
@ -2546,35 +2549,105 @@ |
|
|
|
this.loadFlag = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCollect(){ |
|
|
|
let param = { |
|
|
|
site: '2', |
|
|
|
} |
|
|
|
getCollectorDataByItem(param).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 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据项目数据采集 |
|
|
|
dataAcquisitionByItem (row) { |
|
|
|
this.loadFlag = true |
|
|
|
let tempDate = { |
|
|
|
let params = { |
|
|
|
site: row.site, |
|
|
|
buNo: row.buNo, |
|
|
|
inspectionNo: row.inspectionNo, |
|
|
|
templateId: row.templateId, |
|
|
|
itemNo: row.itemNo, |
|
|
|
flag: 'ipqc' |
|
|
|
} |
|
|
|
dataAcquisitionByItem(tempDate).then(({data}) => { |
|
|
|
this.loadFlag = true |
|
|
|
getEamPropertiesItemByItemNo(params).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.changeMyString(data.rows) |
|
|
|
this.$message({ |
|
|
|
message: '数据采集成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
let itemData = data.itemData |
|
|
|
console.log("this", itemData); |
|
|
|
console.log("itemData.colss)",itemData.collectionFlag == 'Y' && itemData.collectionMethod.includes('thickness')); |
|
|
|
|
|
|
|
|
|
|
|
if(itemData.collectionFlag == 'Y' && itemData.collectionMethod.includes('thickness')){ |
|
|
|
let param = { |
|
|
|
site: row.site, |
|
|
|
sopType: 'ipqc', |
|
|
|
bu: row.buNo, |
|
|
|
itemNo: row.itemNo, |
|
|
|
inspectionNo: row.inspectionNo, |
|
|
|
} |
|
|
|
getCollectorDataByItem(param).then(({data}) => { |
|
|
|
if (data.code === 0 && data.rows.length > 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 |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
|
|
|
|
let tempDate = { |
|
|
|
site: row.site, |
|
|
|
buNo: row.buNo, |
|
|
|
inspectionNo: row.inspectionNo, |
|
|
|
templateId: row.templateId, |
|
|
|
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 |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: data.msg, |
|
|
|
type: 'warning', |
|
|
|
duration: 1500 |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.loadFlag = false |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取用户角色 |
|
|
|
|