This commit is contained in:
bryan sun
2019-10-24 17:23:01 +08:00
parent ac8079a593
commit 4e538ba9f3
5 changed files with 69 additions and 74 deletions

View File

@@ -2,9 +2,9 @@
<div class="app-container">
<el-card>
<el-input v-model="orderNumber" clearable style="width: 200px" placeholder="请输入外协到货单" size="small"/>
<el-input v-model="orderNumber" clearable style="width: 200px;margin:0px 10px" placeholder="请输入外协到货单" size="small"/>
<!-- <span style="margin-left: 10px">外协厂家:</span>-->
<el-input v-model="outsourcingSupplier" clearable style="width: 200px" size="small"/>
<el-input v-model="outsourcingSupplier" clearable style="width: 200px;margin:0px 10px" placeholder="请输入外协厂家" size="small"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-table v-loading="" :data="tableData1" border stripe style="width: 100%;max-height: 600px;" height="400px" size="mini" @row-click="searchTable2">
<el-table-column label="序号" align="center" width="55" type="index"/>
@@ -24,18 +24,18 @@
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" show-summary border stripe style="width: 100%;min-height: 400px" height="400px" size="mini">
<!-- <div class="block" style="margin: 10px 0;">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent1"-->
<!-- :page-sizes="[10, 20, 30, 40]"-->
<!-- :page-size="pageSize1"-->
<!-- :total="total1"-->
<!-- style="display:inline-block;width:50%"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- @size-change="handleSizeChange1"-->
<!-- @current-change="handleCurrentChange1"/>-->
<!-- </div>-->
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" show-summary border stripe style="width: 100%;min-height: 400px" height="420px" size="mini">
<el-table-column label="序号" align="center" width="50px" type="index"/>
<el-table-column label="零件名称" align="center" min-width="70px">
<template slot-scope="scope">
@@ -171,9 +171,9 @@ export default {
orderNumber: '',
outsourcingSupplier: '',
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
// pageCurrent1: 1,
// pageSize1: 10,
// total1: 0,
tableData2: [],
pageCurrent2: 1,
pageSize2: 10,
@@ -248,20 +248,20 @@ export default {
let check1, check2
this.orderNumber ? check1 = 1 : check1 = 0
this.outsourcingSupplier ? check2 = 1 : check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, check1, this.orderNumber, check2, this.outsourcingSupplier).then(response => {
this.tableData1 = response.data.rows
searchTable1(check1, this.orderNumber, check2, this.outsourcingSupplier).then(response => {
this.tableData1 = response.data
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
// handleSizeChange1(val) {
// this.pageSize1 = val
// this.pageCurrent1 = 1
// this.searchTable1()
// },
// handleCurrentChange1(val) {
// this.pageCurrent1 = val
// this.searchTable1()
// },
searchTable2(row) {
searchTable2(row.外协到货单流水号).then(response => {
this.tableData2 = response.data