Files
JY1.0/src/views/ManufacturingCenter/GroupMatching/index.vue
liushuai 6e4a26aeed 更新
2020-05-20 18:08:00 +08:00

783 lines
34 KiB
Vue

<template>
<div class="app-container">
<el-card>
<el-select v-model="Machine" filterable clearable size="small" style="margin: 10px 10px 5px 0px;width: 150px;" placeholder="机床号" @change="searchGroupList">
<el-option
v-for="item in Machines"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 150px;" @change="total=0;pageSize=50;pageCurrent=1;searchData();searchTable()">
<el-option
v-for="item in Groups"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<el-button type="primary" plain icon="el-icon-search" size="small" style="margin-left: 20px" @click="total=0;pageSize=50;pageCurrent=1;searchData();searchTable()">查询</el-button>
<el-button type="text" plain style="float: right;margin-right: 20px;margin-top: 5px" @click="turnTo()">组件状态查询</el-button>
</el-card>
<el-card>
<el-tabs v-model="PartType2" type="border-card" style="margin-top: 10px">
<el-tab-pane label="车间生产" name="车间生产">
<!--<h3 style="text-align: center;">车间生产</h3>-->
<el-table v-loading="loading" :data="tableData" :summary-method="getSummaries" style="width: 100%;margin-top: 6px" highlight-current-row height="600" size="mini" show-summary border stripe>
<el-table-column align="center" label="零件图号">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产数量">
<template slot-scope="scope">
{{ scope.row.投产数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="入库数量">
<template slot-scope="scope">
{{ scope.row.入库数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="类别">
<template slot-scope="scope">
{{ scope.row.类别 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="实际完成">
<template slot-scope="scope">
{{ scope.row.机加工实际完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="入库时间">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="processingStatus(scope.row)">查看加工进度</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-tab-pane>
<el-tab-pane label="采购部采购" name="采购部采购">
<!--<h3 style="text-align: center;">采购部采购</h3>-->
<el-tabs v-model="PartType" type="border-card" style="margin-top: 10px" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件">
<el-table :data="tableData00" size="mini" height="530px" border stripe>
<el-table-column align="center" prop="询价状态编号" label="采购状态" width="110px" sortable="custom" fixed="left">
<template slot-scope="scope">
<!--<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>-->
<span v-if="!scope.row.人员编号" type="primary" size="small">未分配</span>
<span v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===1" type="success" size="small">已询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==1" type="info" size="small">已采购</span>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产数量">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : (scope.row.数量 !== '0.00' ? scope.row.数量 : '—' ) || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="用库存数">
<template slot-scope="scope">
{{ scope.row.使用库存数 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购时间">
<template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : scope.row.采购时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent00"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize00"
:total="total00"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange00"
@current-change="handleCurrentChange00"/>
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-table :data="tableData01" size="mini" height="530px" border stripe>
<el-table-column align="center" prop="询价状态编号" label="采购状态" width="110px" sortable="custom" fixed="left">
<template slot-scope="scope">
<!--<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>-->
<span v-if="!scope.row.人员编号" type="primary" size="small">未分配</span>
<span v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===1" type="success" size="small">已询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==1" type="info" size="small">已采购</span>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产数量">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : (scope.row.数量 !== '0.00' ? scope.row.数量 : '—' ) || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="用滞货数">
<template slot-scope="scope">
{{ scope.row.使用滞货数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="用库存数">
<template slot-scope="scope">
{{ scope.row.使用库存数 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购时间">
<template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : scope.row.采购时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent01"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize01"
:total="total01"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange01"
@current-change="handleCurrentChange01"/>
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-table :data="tableData02" size="mini" height="530px" border stripe>
<el-table-column align="center" prop="询价状态编号" label="采购状态" width="110px" sortable="custom" fixed="left">
<template slot-scope="scope">
<!--<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>-->
<!--<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>-->
<span v-if="!scope.row.人员编号" type="primary" size="small">未分配</span>
<span v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===1" type="success" size="small">已询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==1" type="info" size="small">已采购</span>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产数量">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购时间">
<template slot-scope="scope">
{{ scope.row.创建日期 ? scope.row.创建日期.split(' ')[0] : (scope.row.采购日期 ? scope.row.采购日期.split(' ')[0]: '') }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || '—' }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent02"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize02"
:total="total02"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange02"
@current-change="handleCurrentChange02"/>
</div>
</el-tab-pane>
</el-tabs>
</el-tab-pane>
<el-tab-pane label="制造部采购" name="制造部采购">
<!--<h3 style="text-align: center;">制造部采购</h3>-->
<el-table :data="tableData1" border style="width: 100%;margin-top: 6px;" height="600">
<el-table-column label="进程" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.采购状态 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="材料或规格" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.规格或材料 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="已到货数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.已到货数量 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent5"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize5"
:total="total5"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange5"
@current-change="handleCurrentChange5"/>
</div>
</el-tab-pane>
</el-tabs>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" :title="titleaa" center style="min-height: 300px">
<el-table :data="tableData5" style="width: 100%;max-height: 400px;" size="mini" height="300" highlight-current-row border>
<el-table-column align="center" label="工序顺序" width="80">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺名称" width="110">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺要求" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成" width="100">
<template slot-scope="scope">
{{ scope.row.计划日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="实际完成" width="100">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.工序状态)===4" type="success" size="small">已完成</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)===5" type="warning" size="small">报废</el-tag>
<el-tag v-if="parseInt(scope.row.工序状态)!==4 && parseInt(scope.row.工序状态)!==5" type="primary" size="small">未完成</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="质检" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否质检)===1" type="success" size="small">合格</el-tag>
<el-tag v-if="parseInt(scope.row.是否质检)===2" type="warning" size="small">不合格</el-tag>
<el-tag v-if="parseInt(scope.row.是否质检)!==1 && parseInt(scope.row.是否质检)!==2" type="primary" size="small">未检测</el-tag>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { searchTable, searchmachine, searchgroup, searchTable1, processingStatus, searchTable01, searchTable02 } from '@/api/ManufacturingCenter/GroupMatching'
export default {
data() {
return {
titleaa: '',
零件图号: '',
Machines: [],
Machine: '',
Groups: [],
Group: '',
entryNameValue: null, // 项目流水号
entryName: [], // 项目数组
machineToolNumber: '', // 机床图号
machineNumber: '',
machine: null, // 机床流水号
groupNumber: '', // 组号
groupNumber1: '',
groupNum: null, // 组件流水号
partNumber: '', // 零件号
num: null,
PartType: '标准件',
PartType2: '车间生产',
pageCurrent00: 1,
pageSize00: 50,
pageCurrent01: 1,
pageSize01: 50,
pageCurrent02: 1,
pageSize02: 50,
pageCurrent: 1,
pageSize: 50,
pageCurrent1: 1,
pageSize1: 10,
pageCurrent2: 1,
pageSize2: 10,
pageCurrent4: 1,
pageSize4: 10,
pageCurrent5: 1,
pageSize5: 50,
tableData7: [],
tableData6: [],
tableData: [],
tableData1: [],
tableData5: [],
tableData00: [],
tableData01: [],
tableData02: [],
state: null,
total00: 0,
total01: 0,
total02: 0,
total: 0,
total1: 0,
total2: 0,
total4: 0,
total5: 0,
title: '',
totalNum: 0,
totalNum1: 0,
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
check: null,
check1: null,
check2: null,
check3: null,
check4: null,
check5: null,
month: null,
year: null,
time: '',
loading: false,
monthes: [{
value: 1,
label: '1'
}, {
value: 2,
label: '2'
}, {
value: 3,
label: '3'
}, {
value: 4,
label: '4'
}, {
value: 5,
label: '5'
}, {
value: 6,
label: '6'
}, {
value: 7,
label: '7'
}, {
value: 8,
label: '8'
}, {
value: 9,
label: '9'
}, {
value: 10,
label: '10'
}, {
value: 11,
label: '11'
}, {
value: 12,
label: '12'
}],
tableDataPurchase: []
}
},
created() {
this.SearchMachine()
},
methods: {
turnTo() {
this.$router.push({ path: '/ManufacturingCenter/CompletionOfWorkshopComponents' })
},
searchData() {
this.totalNum = 0
this.loading = true
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].入库时间) {
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
this.totalNum += 1
}
if (response.data.result[i].计划完成时间) {
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
}
if (response.data.result[i].机加工实际完成时间) {
response.data.result[i].机加工实际完成时间 = response.data.result[i].机加工实际完成时间.split(' ', 2)[0]
}
}
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
// searchTable22(this.check1, this.Machine, this.check2, this.Group, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
// console.log(response.data, 123243)
// for (let i = 0; i < response.data.length; i++) {
// if (response.data[i].入库时间 !== null) {
// this.totalNum += 1
// }
// }
// })
searchTable1(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data.rows
this.total5 = parseInt(response.data.total)
})
},
processingStatus(row) {
this.dialogFormVisible4 = true
this.titleaa = row.零件图号
processingStatus(row.工艺计划流水号).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].计划日期 !== '' && response.data[i].计划日期 !== null) {
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
}
if (response.data[i].完成日期 !== '' && response.data[i].完成日期 !== null) {
response.data[i].完成日期 = response.data[i].完成日期.split(' ')[0]
}
}
this.tableData5 = response.data
})
},
SearchMachine() { // 查询机床
searchmachine().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machines.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
value2: response.data[i].装配状态
})
}
})
},
searchGroupList() { // 查询组号
this.Group = ''
this.Groups = []
searchgroup(this.Machine).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Groups.push({
label: response.data[i].组号,
value: response.data[i].组件流水号,
value2: response.data[i].装配状态
})
}
})
},
searchTable() {
if (this.PartType === '标准件') {
this.searchTable0()
} else if (this.PartType === '外购件') {
this.searchTable1()
} else if (this.PartType === '基本件') {
this.searchTable2()
}
},
searchTable0() { // 查询标准件
let check1, check2
this.Machine ? check1 = 1 : check1 = 0
this.Group ? check2 = 1 : check2 = 0
searchTable01(check1, this.Machine, check2, this.Group, this.pageCurrent00, this.pageSize00, 1).then(response => {
this.tableData00 = response.data.rows
this.total00 = response.data.total
})
},
searchTable1() { // 查询外购件
let check1, check2
this.Machine ? check1 = 1 : check1 = 0
this.Group ? check2 = 1 : check2 = 0
searchTable01(check1, this.Machine, check2, this.Group, this.pageCurrent01, this.pageSize01, 2).then(response => {
this.tableData01 = response.data.rows
this.total01 = response.data.total
})
},
searchTable2() { // 查询基本件
let check1, check2
this.Machine ? check1 = 1 : check1 = 0
this.Group ? check2 = 1 : check2 = 0
searchTable02(check1, this.Machine, check2, this.Group, this.pageCurrent02, this.pageSize02).then(response => {
this.tableData02 = response.data.rows
this.total02 = response.data.total
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.loading = true
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].入库时间) {
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
}
if (response.data.result[i].计划完成时间) {
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
}
}
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
},
handleCurrentChange(val) {
this.pageCurrent = val
this.loading = true
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].入库时间) {
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
}
if (response.data.result[i].计划完成时间) {
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
}
}
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
},
handleSizeChange5(val) {
this.pageCurrent5 = 1
this.pageSize5 = val
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable1(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data.rows
this.total5 = parseInt(response.data.total)
})
},
handleCurrentChange5(val) {
this.pageCurrent5 = val
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
searchTable1(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data.rows
this.total5 = parseInt(response.data.total)
})
},
handleSizeChange00(val) {
this.pageCurrent00 = 1
this.pageSize00 = val
this.searchTable0()
},
handleCurrentChange00(val) {
this.pageCurrent00 = val
this.searchTable0()
},
handleSizeChange01(val) {
this.pageCurrent01 = 1
this.pageSize01 = val
this.searchTable1()
},
handleCurrentChange01(val) {
this.pageCurrent01 = val
this.searchTable1()
},
handleSizeChange02(val) {
this.pageCurrent02 = 1
this.pageSize02 = val
this.searchTable2()
},
handleCurrentChange02(val) {
this.pageCurrent02 = val
this.searchTable2()
},
getSummaries(param) {
const { columns } = param
const sums = []
columns.forEach((column, index) => {
if (index === 4) {
sums[index] = '总件数'
return
} else if (index === 5) {
sums[index] = this.total + '件'
} else if (index === 6) {
sums[index] = '入库数量'
} else if (index === 7) {
sums[index] = this.totalNum + ' 件'
}
})
return sums
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px
}
span{
margin: 10px 0 10px 10px;
}
.el-card{
margin: 1px;
}
</style>