This commit is contained in:
bryan sun
2019-12-09 15:32:00 +08:00
parent ffae28a911
commit 17cd80e3e6
2 changed files with 32 additions and 6 deletions

View File

@@ -34,14 +34,14 @@ export function groupSelect(machineValue) {
}
})
}
export function basicPartsData(project_check, project, machine_check, machine, group_check, group, pageSize, pageCurrent) {
export function basicPartsData(project_check, project, machine_check, machine, group_check, group, whetherToImport_check, whetherToImport, pageSize, pageCurrent) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_零件明细表_基本件_查询数据_综合gj',
param: `项目流水号_check=${project_check}&项目流水号=${project}&机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}`,
param: `项目流水号_check=${project_check}&项目流水号=${project}&机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&是否导入_check=${whetherToImport_check}&是否导入=${whetherToImport}`,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -25,6 +25,13 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="whetherToImport" clearable placeholder="是否导入" filterable size="small">
<el-option
v-for="item in whetherToImports"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button>
<el-upload
@@ -93,6 +100,14 @@
align="center">
<template slot-scope="scope">{{ scope.row.零件类型名称 }}</template>
</el-table-column>
<el-table-column
label="是否导入"
align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否导入)===1" type="success">已导入</el-tag>
<el-tag v-else type="danger">未导入</el-tag>
</template>
</el-table-column>
<el-table-column
min-width="50px"
label="零件图纸"
@@ -195,7 +210,15 @@ export default {
row1: [],
operationType: '0',
str: '',
arr: []
arr: [],
whetherToImport: '',
whetherToImports: [{
value: '1',
label: '已导入'
}, {
value: 'null',
label: '未导入'
}]
}
},
computed: {
@@ -274,10 +297,10 @@ export default {
this.arr = this.str.split('|')
console.log(this.arr[0], 0)
console.log(this.arr[1], 1)
if (this.arr[1] === '0') {
if (this.arr[1] === '无该零件') {
this.$notify.error(`${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`)
}
if (this.arr[1] === '2') {
if (this.arr[1] === '重复') {
this.$notify.error(`${this.arr[0]}请勿重复上传!`)
}
// this.$message.error(`${file.name}该零件不存在,请检查上传文件名称是否正确!`)
@@ -285,6 +308,7 @@ export default {
if (fileList.length === 0) {
this.$message.success('文件上传成功')
// this.$refs.FileDown.getFileList(this.num)
this.getTableData()
}
},
uploadFailure(a, file, fileList) {
@@ -305,8 +329,9 @@ export default {
const project_check = this.projectValue ? 1 : 0
const machine_check = this.machineValue ? 1 : 0
const group_check = this.groupValue ? 1 : 0
const whetherToImport_check = this.whetherToImport ? 1 : 0
this.loading = true
basicPartsData(project_check, this.projectValue, machine_check, this.machineValue, group_check, this.groupValue, this.pageSize, this.pageCurrent).then(response => {
basicPartsData(project_check, this.projectValue, machine_check, this.machineValue, group_check, this.groupValue, whetherToImport_check, this.whetherToImport, this.pageSize, this.pageCurrent).then(response => {
this.loading = false
this.tableData = response.data.rows
this.total = response.data.total
@@ -411,6 +436,7 @@ export default {
name: `delete from ${this.tableName} where uid = N'${id}'`
}
}).then(response => {
this.getTableData()
if (response.data.length === 0) {
this.$message.success('删除成功')
this.getFileList(this.num)