fixed bug

This commit is contained in:
chenjianan
2019-06-21 11:05:59 +08:00
parent 5e18bfcc3a
commit d768f952d1
4 changed files with 177 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
import request from '@/utils/request'
// 查询外协到货单列表
export function searchTable1(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_外协到货单_查询数据',
param: ``,
Pagination: params[0] + '&' + params[1]
}
})
}
// 查询外协到货单明细
export function searchTable2(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_外协到货单明细_查询数据',
param: `外协到货单流水号=${params[2]}`,
Pagination: params[0] + '&' + params[1]
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1545978796022" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1103" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M835.584 1016.32H50.176c-14.336 0-25.6-11.264-25.6-25.6V76.8c0-14.336 11.264-25.6 25.6-25.6h545.28c6.656 0 13.312 2.56 17.92 7.68l240.128 240.64c4.608 4.608 7.68 11.264 7.68 17.92v673.28c0 14.336-11.264 25.6-25.6 25.6z m-759.808-51.2h734.208V328.192l-225.28-225.792H75.776v862.72z" p-id="1104"></path><path d="M835.584 343.04h-240.128c-14.336 0-25.6-11.264-25.6-25.6V76.8c0-14.336 11.264-25.6 25.6-25.6s25.6 11.264 25.6 25.6v215.04h214.528c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM688.128 865.792c-6.656 0-13.312-2.56-17.92-7.68l-99.84-99.84c-4.608-4.608-7.68-11.264-7.68-17.92 0-6.656 2.56-13.312 7.68-17.92l99.84-99.328c10.24-9.728 26.112-9.728 36.352 0 9.728 10.24 9.728 26.112 0 36.352l-81.92 80.896 81.92 81.92c10.24 10.24 10.24 26.112 0 36.352-5.12 4.608-11.776 7.168-18.432 7.168zM574.464 428.544H247.808c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h326.656c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM574.464 604.672H247.808c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h326.656c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6z" p-id="1105"></path><path d="M984.064 769.024h-345.6c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h345.6c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM376.32 770.56H247.808c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h128.512c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6z" p-id="1106"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -128,7 +128,7 @@ export function groupBy(datas, keys) {
group.data1 = group.data1 || 0 group.data1 = group.data1 || 0
group.key.数量 = group.data1 += v.数量 group.key.数量 = group.data1 += v.数量
group.data2 = group.data2 || '' group.data2 = group.data2 || ''
group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ';' group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ' '
group.data3 = group.data3 || 0 group.data3 = group.data3 || 0
group.key.合计 = group.data3 += v.合计 group.key.合计 = group.data3 += v.合计
}) })

View File

@@ -1,10 +1,155 @@
<template> <template>
<div>123</div> <div class="app-container">
<el-card>
<div slot="header">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</div>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 600px;" height="440px" size="mini" @row-click="searchTable2">
<el-table-column label="序号" align="center" width="80" type="index"/>
<el-table-column label="外协到货单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.外协到货单编号 }}
</template>
</el-table-column>
<el-table-column label="外协厂家" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.外协厂家名称 }}
</template>
</el-table-column>
<el-table-column label="操作日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.操作日期 }}
</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" show-summary stripe border style="width: 100%;max-height: 600px;" height="600px" size="mini">
<el-table-column label="序号" align="center" width="80" type="index"/>
<el-table-column label="零件名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="检验数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.检验数量 || 0 }}
</template>
</el-table-column>
<el-table-column label="不合格数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.不合格数量 || 0 }}
</template>
</el-table-column>
<el-table-column label="检验时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.检验时间 || '—' }}
</template>
</el-table-column>
<el-table-column label="形位" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.形位 }}
</template>
</el-table-column>
<el-table-column label="尺寸" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.尺寸 }}
</template>
</el-table-column>
<el-table-column label="外观" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.外观 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</div>
</template> </template>
<script> <script>
import { searchTable1, searchTable2 } from '@/api/Outsourcing/OutsourcingQCSearch'
export default { export default {
name: 'OutsourcingQCSearch' name: 'OutsourcingQCSearch',
data() {
return {
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData2: [],
pageCurrent2: 1,
pageSize2: 10,
total2: 0
}
},
mounted() {
this.searchTable1()
},
methods: {
// 查询到货单列表
searchTable1() {
searchTable1(this.pageCurrent1, this.pageSize1).then(response => {
console.log(response.data, 1)
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2(row) {
console.log(row, 2)
searchTable2(this.pageCurrent2, this.pageSize2, row.外协到货单流水号).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
}
}
} }
</script> </script>