2020251146lljV3备料出库记录排序和页面样式修改
This commit is contained in:
@@ -40,33 +40,33 @@
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询备料出库记录" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="total=0;pageSize=20; pageCurrent=1;selecttable()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="total=0;pageSize=40; pageCurrent=1;selecttable()">查询</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 840px;margin-top: 3px" height="550px">
|
||||
<el-table-column label="项目名称" prop="项目名称" align="center" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table :data="tableData1" border stripe size="mini" highlight-current-row style="width: 700px;margin-top: 3px" height="800px" @sort-change="sortChange">
|
||||
<!--<el-table-column label="项目名称" prop="项目名称" align="center" width="150" show-overflow-tooltip>-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.项目名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="225" show-overflow-tooltip>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="233" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="150" show-overflow-tooltip>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="150" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" prop="出库时间" align="center" width="120" show-overflow-tooltip>
|
||||
<el-table-column label="出库时间" prop="出库时间" align="center" width="120" sortable="custom" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 | formatTime }}
|
||||
</template>
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
tableData1: [],
|
||||
loading: false,
|
||||
total: null, // 总条数
|
||||
pageSize: 20, // 每页显示条数
|
||||
pageSize: 40, // 每页显示条数
|
||||
pageCurrent: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
@@ -116,6 +116,25 @@ export default {
|
||||
this.initProject()
|
||||
},
|
||||
methods: {
|
||||
sortChange(column) {
|
||||
console.log(column + '-' + column.prop + '-' + column.order, 11111)
|
||||
if (column.prop === '零件名称') {
|
||||
this.ordername = 1
|
||||
} else if (column.prop === '零件图号') {
|
||||
this.ordername = 2
|
||||
} else if (column.prop === '出库时间') {
|
||||
this.ordername = 3
|
||||
} else {
|
||||
this.ordername = ''
|
||||
}
|
||||
console.log(this.ordername, 9990999)
|
||||
if (column.order === 'ascending') {
|
||||
this.order = 1
|
||||
} else if (column.order === 'descending') { this.order = 2 } else {
|
||||
this.order = ''
|
||||
}
|
||||
this.selecttable()
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -146,7 +165,7 @@ export default {
|
||||
if (this.PartDrawingNumber !== '' && this.PartDrawingNumber !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
|
||||
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.PartDrawingNumber, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.PartDrawingNumber, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize, this.ordername, this.order).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.loading = false
|
||||
this.total = response.data.total
|
||||
|
||||
Reference in New Issue
Block a user