功能修改_20190531

This commit is contained in:
jiangfuzhuang
2019-05-31 13:37:43 +08:00
parent ef1237ac3d
commit 7168844c50
2 changed files with 30 additions and 6 deletions

View File

@@ -11,6 +11,17 @@ export function initProject() {
} }
}) })
} }
// 初始化质检类型
export function QualityType() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '质量管理_质检类型_查询数据'
}
})
}
// 组件查询 // 组件查询
export function searchgroup(num) { export function searchgroup(num) {
return request({ return request({
@@ -24,14 +35,14 @@ export function searchgroup(num) {
}) })
} }
// 组件查询 // 组件查询
export function selecttable(check1, value1, check2, value2, check3, value3) { export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '质量管理_质量情况_查询数据', name: '质量管理_质量情况_查询数据',
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 + '&质检类型代码_check=' + check4 + '&质检类型代码=' + value4
} }
}) })
} }

View File

@@ -22,9 +22,9 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>质检类型:</span> <span>质检类型:</span>
<el-select v-model="QualityTypeNumber" filterable placeholder="质检类型" size="small" clearable> <el-select v-model="QualityTypeValue" filterable placeholder="质检类型" size="small" clearable>
<el-option <el-option
v-for="item in QualityTypeValue" v-for="item in QualityTypeNumber"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
@@ -102,7 +102,7 @@
</template> </template>
<script> <script>
import { initProject, searchgroup, selecttable } from '@/api/Assembly/QualityInspectionInformationInquiry' import { initProject, searchgroup, selecttable, QualityType } from '@/api/Assembly/QualityInspectionInformationInquiry'
// import { mapGetters } from 'vuex' // import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -122,6 +122,7 @@ export default {
}, },
mounted() { mounted() {
this.initProject() this.initProject()
this.QualityType()
}, },
methods: { methods: {
initProject() { initProject() {
@@ -135,6 +136,17 @@ export default {
} }
}) })
}, },
QualityType() {
QualityType().then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
this.QualityTypeNumber.push({
label: response.data[i].质检类型,
value: response.data[i].质检类型代码
})
}
})
},
machineChange() { machineChange() {
this.groupNumberValue = '' this.groupNumberValue = ''
this.groupNumber = [] this.groupNumber = []
@@ -152,7 +164,8 @@ export default {
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 } if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 } if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 } if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts).then(response => { if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue).then(response => {
this.tableData1 = response.data this.tableData1 = response.data
console.log(response.data, 1111) console.log(response.data, 1111)
}) })