This commit is contained in:
liushuai
2019-10-16 12:12:06 +08:00
parent 6c56511627
commit 0194563f97
7 changed files with 464 additions and 300 deletions

View File

@@ -21,12 +21,28 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>名称:</span>
<el-input v-model="Name" placeholder="名称" clearable size="small"/>
<span>领料情况:</span>
<el-select v-model="PickingValue" placeholder="领料情况" size="small" clearable>
<el-option
v-for="item in Picking"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=20;pageCurrent1=1;pageSize1=20;pageCurrent2=1;pageSize2=20;searchTable()">查询</el-button>
</div>
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件">
<el-table ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.领料单编号==='' || scope.row.领料单编号===null" type="warning" size="small">未领</el-tag>
<el-tag v-else type="primary" size="small">已领</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -67,6 +83,11 @@
{{ scope.row.备件总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领料单编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;">
<el-pagination
@@ -83,6 +104,12 @@
<el-tab-pane label="外购件" name="外购件">
<el-table ref="multipleTable" :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.领料单编号==='' || scope.row.领料单编号===null" type="warning" size="small">未领</el-tag>
<el-tag v-else type="primary" size="small">已领</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -118,6 +145,11 @@
{{ scope.row.备件总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领料单编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;">
<el-pagination
@@ -134,6 +166,12 @@
<el-tab-pane label="基本件" name="基本件">
<el-table ref="multipleTable" :data="tableData2" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.领料单编号==='' || scope.row.领料单编号===null" type="warning" size="small">未领</el-tag>
<el-tag v-else type="primary" size="small">已领</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -174,6 +212,11 @@
{{ scope.row.备件总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领料单编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;">
<el-pagination
@@ -292,7 +335,7 @@
</el-table-column>
<el-table-column label="已领数量" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
{{ scope.row.出库数量1 }}
</template>
</el-table-column>
<el-table-column v-if="true" label="备料确认" align="center" width="100">
@@ -303,13 +346,35 @@
</el-table-column>
<el-table-column v-if="true" label="领料确认" align="center" width="100">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否领料确认)===1" type="success" size="mini">已领料</el-tag>
<el-tag v-else type="warning" size="mini">未领</el-tag>
<el-tag v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领料</el-tag>
<el-tag v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">未领</el-tag>
<el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领料</el-tag>
</template>
</el-table-column>
<el-table-column v-if="true" label="操作" align="center" width="100">
<el-table-column v-if="true" label="操作" align="center" width="230">
<template slot-scope="scope">
<el-button :disabled="!!scope.row.是否出库 || Number(scope.row.是否领料确认)===1" size="mini" plain type="danger" icon="el-icon-delete" @click="dropListDetail(scope.row)">删除</el-button>
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="100" align="center" label="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="领料时间">
<template slot-scope="scope">
{{ scope.row.操作日期 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="数量" prop="出库数量">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="primary" size="mini" icon="el-icon-search" plain @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="!!scope.row.是否出库 || Number(scope.row.是否领料确认)===1" size="mini" plain type="danger" icon="el-icon-delete" style="margin-left: 10px" @click="dropListDetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -339,7 +404,7 @@
</template>
<script>
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail } from '@/api/Inventory/CreatePickingList'
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, searchListDetailMX } from '@/api/Inventory/CreatePickingList'
import request from '@/utils/request'
import { mapGetters } from 'vuex'
export default {
@@ -349,6 +414,16 @@ export default {
PartType: '基本件',
machineNumberValue: '',
machineNumber: [],
PickingValue: '',
Picking: [{
value: 0,
label: '未领'
}, {
value: 1,
label: '已领'
}],
Name: '',
gridData: [],
groupNumberValue: '',
groupNumber: [],
tableData0: [],
@@ -472,34 +547,43 @@ export default {
},
// 标准件
searchTable0() {
let check1, check2
let check1, check2, check3
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1).then(response => {
this.Name ? check3 = 1 : check3 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, this.pageCurrent0, this.pageSize0, 1).then(response => {
console.log(response.data.rows)
this.tableData0 = response.data.rows
this.total0 = response.data.total
})
},
// 外购件
searchTable1() {
let check1, check2
let check1, check2, check3
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2).then(response => {
this.Name ? check3 = 1 : check3 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, this.pageCurrent1, this.pageSize1, 2).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
// 基本件
searchTable2() {
let check1, check2
let check1, check2, check3
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2, 3).then(response => {
this.Name ? check3 = 1 : check3 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, this.pageCurrent2, this.pageSize2, 3).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
searchTable02(row) {
searchListDetailMX(row.领料单流水号, row.基本件流水号, row.标准件和外购件流水号).then(response => {
this.gridData = response.data
})
},
handleSizeChange0(val) {
this.pageSize0 = val
this.pageCurrent0 = 1