This commit is contained in:
liushuai
2019-07-02 12:27:55 +08:00
parent 80a6dd0472
commit 7653ac202f
5 changed files with 52 additions and 17 deletions

View File

@@ -57,6 +57,14 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>质检人员:</span>
<el-select v-model="personNum" filterable placeholder="质检人员" size="small" clearable>
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
</el-row>
</el-card>
@@ -107,6 +115,11 @@
{{ scope.row.质检类型 }}
</template>
</el-table-column>
<el-table-column label="质检人员" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="检验数量" align="center">
<template slot-scope="scope">
{{ scope.row.数量 }}
@@ -431,7 +444,7 @@
</template>
<script>
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus, initPerson } from '@/api/Assembly/QualityInspectionInformationInquiry'
import { readFile } from '@/utils/request'
// import { mapGetters } from 'vuex'
export default {
@@ -466,6 +479,8 @@ export default {
SpareParts: '',
SparePartsNumber: '',
SparePartsName: '',
personNum: '',
person: [],
dialogFormVisible: false,
dialogFormVisible4: false,
loading: false,
@@ -510,6 +525,14 @@ export default {
})
}
})
initPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
fetchData() {
searchData(this.pageSize1, this.pageCurrent1).then(response => {
@@ -551,7 +574,8 @@ export default {
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.pageCurrent, this.pageSize).then(response => {
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum, this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data.rows
this.loading = false
this.total = response.data.total

View File

@@ -130,6 +130,7 @@ export default {
name: 'BZ'
}],
group: '',
ceshi: '',
machineNames: [],
err: 0,
disabled: false
@@ -322,9 +323,6 @@ export default {
} else {
if (machineNum && groupNum) {
await sleep(50)
if (classificationCode) {
drawingNum += '-' + classificationCode
}
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
@@ -379,9 +377,6 @@ export default {
} else {
if (machineNum && groupNum) {
await sleep(50)
if (classificationCode) {
drawingNum += '-' + classificationCode
}
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
@@ -418,19 +413,24 @@ export default {
if (groupNum.indexOf('MX') > -1) {
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
if (res[0].result === '0') {
console.log(res)
if (res.result[0].result === '0') {
this.$notify.error(`${drawingNum}导入失败`)
}
if (res[0].result === '2') {
this.$notify.error(`${drawingNum}导入重复`)
if (res.output[0].导入类型 === '2') {
this.$notify.warning(`存在重复数据`)
}
} else {
console.log(drawingNum, 1111111111)
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
console.log(res)
if (res[0].result === '0') {
console.log(res, 222222)
if (res.result[0].result === '0') {
this.$notify.error(`${drawingNum}导入失败`)
}
if (res.output[0].导入类型 === '2') {
this.$notify.warning(`存在重复数据`)
}
}
} catch (e) {
this.err++