This commit is contained in:
liushuai
2020-03-20 18:06:37 +08:00
parent 7389ead64d
commit 4d32454b1a
19 changed files with 387 additions and 165 deletions

View File

@@ -48,7 +48,7 @@
<el-tabs v-model="PartType" type="border-card" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件">
<el-table v-loading="loading0" :data="tableData0" size="mini" height="700px" border stripe>
<el-table v-loading="loading0" :data="tableData0" size="mini" height="700px" border stripe @sort-change="sortChange0">
<el-table-column align="center" prop="询价状态编号" label="采购状态" width="90px">
<template slot-scope="scope">
<!--<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>-->
@@ -66,12 +66,12 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" prop="组号" width="70px">
<el-table-column align="center" label="组号" prop="组号" width="80px" sortable="custom">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称" prop="物料名称" width="153px" show-overflow-tooltip>
<el-table-column align="center" label="名称" prop="物料名称" width="153px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
@@ -81,12 +81,12 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" prop="物料规格" width="128px" show-overflow-tooltip>
<el-table-column align="center" label="规格" prop="物料规格" width="128px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" prop="供货商" width="132px" show-overflow-tooltip>
<el-table-column align="center" label="供货商" prop="供货商" width="132px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.供货商 || '—' }}
</template>
@@ -117,7 +117,7 @@
<span v-else>未到货</span>
</template>
</el-table-column>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="150px" show-overflow-tooltip>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="150px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || scope.row.离线合同供应商名称 || '—' }}
</template>
@@ -156,7 +156,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-table v-loading="loading1" :data="tableData1" size="mini" height="700px" border stripe>
<el-table v-loading="loading1" :data="tableData1" size="mini" height="700px" border stripe @sort-change="sortChange1">
<el-table-column align="center" label="采购状态" prop="询价状态编号" width="90px">
<template slot-scope="scope">
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
@@ -170,12 +170,12 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" prop="组号" width="70px">
<el-table-column align="center" label="组号" prop="组号" width="70px" sortable="custom">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称" prop="物料名称" width="153px" show-overflow-tooltip>
<el-table-column align="center" label="名称" prop="物料名称" width="153px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
@@ -185,12 +185,12 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" prop="物料规格" width="128px" show-overflow-tooltip>
<el-table-column align="center" label="规格" prop="物料规格" width="128px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" prop="供货商" width="132px" show-overflow-tooltip>
<el-table-column align="center" label="供货商" prop="供货商" width="132px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.供货商 || '—' }}
</template>
@@ -221,7 +221,7 @@
<span v-else>未到货</span>
</template>
</el-table-column>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="150px" show-overflow-tooltip>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="150px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || scope.row.离线合同供应商名称 || '—' }}
</template>
@@ -260,7 +260,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-table v-loading="loading2" :data="tableData2" size="mini" height="700px" border stripe>
<el-table v-loading="loading2" :data="tableData2" size="mini" height="700px" border stripe @sort-change="sortChange2">
<el-table-column align="center" label="采购状态" prop="询价状态编号" width="90px">
<template slot-scope="scope">
<span v-if="!scope.row.人员编号" type="primary" size="small">未分配</span>
@@ -274,12 +274,12 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" prop="组号" width="70px">
<el-table-column align="center" label="组号" prop="组号" width="70px" sortable="custom">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称" prop="物料名称" width="153px" show-overflow-tooltip>
<el-table-column align="center" label="名称" prop="物料名称" width="153px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
@@ -289,7 +289,7 @@
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" prop="规格" width="128px" show-overflow-tooltip>
<el-table-column align="center" label="规格" prop="规格" width="128px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
@@ -299,7 +299,7 @@
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" prop="供货商" width="132px" show-overflow-tooltip>
<el-table-column align="center" label="供货商" prop="供货商" width="132px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ scope.row.供货商 || '—' }}
</template>
@@ -332,7 +332,7 @@
<span v-else>未到货</span>
</template>
</el-table-column>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="100px" show-overflow-tooltip>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="100px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || '—' }}
</template>
@@ -613,6 +613,27 @@ export default {
this.pageCurrent2 = val
this.searchTable2()
},
sortChange0(column, prop, order) {
console.log(column + '-' + column.prop + '-' + column.order, 11111)
if (column.prop === '组号') {
this.partName = 1
} else if (column.prop === '物料名称') { this.partName = 2 } else if (column.prop === '物料规格') {
this.partName = 3
} else if (column.prop === '供货商') {
this.partName = 4
} else if (column.prop === '供应商名称') {
this.partName = 5
} else {
this.partName = ''
}
console.log(this.ordername, 9990999)
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = ''
}
this.searchTable0()
},
searchTable0() { // 查询标准件
this.tableData0 = []
let check1, check2, check3, check4, check5, check6
@@ -623,7 +644,7 @@ export default {
this.model ? check5 = 1 : check5 = 0
this.startTime ? check6 = 1 : (check6 = 0, this.startTime = '')
this.loading0 = true
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1]).then(response => {
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1], this.order, this.partName).then(response => {
if (response.data.result !== 0) {
for (let i = 0; i < response.data.result.length; i++) {
this.tableData0.push({
@@ -659,6 +680,27 @@ export default {
this.loading0 = false
})
},
sortChange1(column, prop, order) {
console.log(column + '-' + column.prop + '-' + column.order, 11111)
if (column.prop === '组号') {
this.partName = 1
} else if (column.prop === '物料名称') { this.partName = 2 } else if (column.prop === '物料规格') {
this.partName = 3
} else if (column.prop === '供货商') {
this.partName = 4
} else if (column.prop === '供应商名称') {
this.partName = 5
} else {
this.partName = ''
}
console.log(this.ordername, 9990999)
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = ''
}
this.searchTable1()
},
searchTable1() { // 查询外购件
this.tableData1 = []
let check1, check2, check3, check4, check5, check6
@@ -669,7 +711,7 @@ export default {
this.model ? check5 = 1 : check5 = 0
this.startTime ? check6 = 1 : (check6 = 0, this.startTime = '')
this.loading1 = true
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1]).then(response => {
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1], this.order, this.partName).then(response => {
console.log(response.data.result.length, 222)
// this.total02 = parseInt(response.data.output[0].ItemCount)
@@ -708,6 +750,27 @@ export default {
this.loading1 = false
})
},
sortChange2(column, prop, order) {
console.log(column + '-' + column.prop + '-' + column.order, 11111)
if (column.prop === '组号') {
this.partName = 1
} else if (column.prop === '物料名称') { this.partName = 2 } else if (column.prop === '物料规格') {
this.partName = 3
} else if (column.prop === '供货商') {
this.partName = 4
} else if (column.prop === '供应商名称') {
this.partName = 5
} else {
this.partName = ''
}
console.log(this.ordername, 9990999)
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = ''
}
this.searchTable2()
},
searchTable2() { // 查询基本件
let check1, check2, check3, check4, check5, check6
this.machineNumberValue ? check1 = 1 : check1 = 0
@@ -717,7 +780,7 @@ export default {
this.model ? check5 = 1 : check5 = 0
this.loading2 = true
this.startTime ? check6 = 1 : (check6 = 0, this.startTime = '')
searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1]).then(response => {
searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1], this.order, this.partName).then(response => {
this.tableData2 = response.data.result
this.total2 = parseInt(response.data.output[0].ItemCount)
this.loading2 = false