更新
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-card style="width: 1255px">
|
||||
<el-row>
|
||||
<!--<span>项目名称:</span>-->
|
||||
<!--<el-select-->
|
||||
@@ -20,84 +20,164 @@
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="machineNameValue" placeholder="机床图号" style="margin-right: 10px; width: 150px" size="small" filterable clearable @change="machineChange">
|
||||
<el-select v-model="machineNameValue" placeholder="机床图号" style="width: 150px" size="small" filterable clearable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machineName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 15px" @click="total=0;pageSize = 20;pageCurrent = 1;searchData1()">查询</el-button>
|
||||
<el-date-picker
|
||||
v-model="outTime"
|
||||
type="daterange"
|
||||
size="small"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:240px;margin-left: 10px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="total=0;pageSize = 20;pageCurrent = 1;searchData1()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-download" size="small" plain style="margin-left: 10px" @click="exportExcel()">导出</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 15px;width: 960px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
stripe
|
||||
size="small"
|
||||
height="660"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="机床图号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废时间" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废原因" width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废工时" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 825px">
|
||||
<el-card style="margin-top: 15px;width: 825px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
stripe
|
||||
size="small"
|
||||
height="590"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="fetchTableData2">
|
||||
<el-table-column align="center" label="机床图号" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="50px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" width="173px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" width="129px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废数" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废时间" width="85px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废原因" width="140px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废工时(分)" width="105px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.报废工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 430px">
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(226,223,223,1)"
|
||||
height="630"
|
||||
border
|
||||
style="width: 430px">
|
||||
<el-table-column
|
||||
width="50px"
|
||||
prop="province1"
|
||||
label="顺序"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.工序顺序 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="80px"
|
||||
prop="province2"
|
||||
label="工艺名称"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.工艺名称 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="province4"
|
||||
label="工艺要求"
|
||||
align="center"
|
||||
width="80px"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.工艺要求 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="60px"
|
||||
prop="province5"
|
||||
label="单件定额"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.单件定额工时 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="60px"
|
||||
prop="province6"
|
||||
label="准结定额"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.准结定额工时 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="77px"
|
||||
prop="province7"
|
||||
label="完成状态"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.工序状态 === 4"><div style="width: 12px;height: 12px;border-radius: 50%;background-color: rgb(103, 194, 58);display: inline-block;margin:0px 5px 0 0"/>完成</div>
|
||||
<div v-else ><div style="width: 12px;height: 12px;border-radius: 50%;background-color: red;display: inline-block;margin:0px 5px 0 0"/>未完</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchMachine, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/DiscardedPartsInquiry'
|
||||
import { searchMachine, searchTable1, searchTable2, TableDta2Select } from '@/api/ManufacturingCenter/DiscardedPartsInquiry'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -106,6 +186,7 @@ export default {
|
||||
total: 0,
|
||||
list: [],
|
||||
check3: '',
|
||||
outTime: '',
|
||||
PartDrawingNumber: '',
|
||||
remoteLoading: false,
|
||||
listLoading: false,
|
||||
@@ -155,13 +236,41 @@ export default {
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
searchTable2(this.check1, this.machineNameValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
let check7
|
||||
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
|
||||
searchTable2(this.check1, this.machineNameValue, check7, this.outTime[0], this.outTime[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
fetchTableData2(row) {
|
||||
TableDta2Select(row.补投流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.machineNameValue !== '' && this.machineNameValue !== null) {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
let check7
|
||||
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
|
||||
var param = []
|
||||
param[0] = ['机床流水号_check', this.check1]
|
||||
param[1] = ['机床流水号', this.machineNameValue]
|
||||
param[2] = ['报废日期_check', check7]
|
||||
if (check7 === 0) {
|
||||
param[3] = ['开始时间', '']
|
||||
param[4] = ['结束时间', '']
|
||||
} else {
|
||||
param[3] = ['开始时间', this.outTime[0]]
|
||||
param[4] = ['结束时间', this.outTime[1]]
|
||||
}
|
||||
var Data = this.CreateData('2001', '报表_报废零件查询', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
|
||||
Reference in New Issue
Block a user