|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <template>
|
|
|
+ <template v-if="!inboundVisible">
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
|
|
|
<el-form-item label="物料名称">
|
|
|
<el-input
|
|
@@ -73,7 +73,7 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="disqualificationCnt"
|
|
|
+ prop="damageCnt"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
:show-tooltip-when-overflow="true"
|
|
@@ -81,7 +81,7 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="measureStateStr"
|
|
|
+ prop="stateStr"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
:show-tooltip-when-overflow="true"
|
|
@@ -97,10 +97,10 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- v-if="isAuth('quality:unqualified:update')"
|
|
|
+ v-if="isAuth('quality:unqualified:putin')"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- @click="updateHandle(scope.row)"
|
|
|
+ @click="inboundHandle(scope.row)"
|
|
|
>入库</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -117,16 +117,19 @@
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</template>
|
|
|
+ <stock-order-inbound ref="inbound" v-if="inboundVisible" @onChose="onChose"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {getUnqList} from '@/api/quality'
|
|
|
+import StockOrderInbound from '../warehouse/stock-order-inbound'
|
|
|
export default {
|
|
|
name: 'quality-unqualified',
|
|
|
+ components: {StockOrderInbound},
|
|
|
data () {
|
|
|
return {
|
|
|
- updateVisible: false,
|
|
|
+ inboundVisible: false,
|
|
|
dataForm: {},
|
|
|
dataList: [],
|
|
|
pageIndex: 1,
|
|
@@ -141,7 +144,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
- this.updateVisible = false
|
|
|
+ this.inboundVisible = false
|
|
|
},
|
|
|
search () {
|
|
|
this.pageIndex = 1
|
|
@@ -170,6 +173,9 @@ export default {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataList = data.data.records
|
|
|
this.totalPage = Number(data.data.total)
|
|
|
+ this.dataList.forEach(item => {
|
|
|
+ item.stateStr = item.state === '1' ? '待入库' : item.state === '2' ? '已入库' : ''
|
|
|
+ })
|
|
|
} else {
|
|
|
this.dataList = []
|
|
|
this.totalPage = 0
|
|
@@ -177,10 +183,12 @@ export default {
|
|
|
this.dataListLoading = false
|
|
|
})
|
|
|
},
|
|
|
- updateHandle (item) {
|
|
|
- this.updateVisible = true
|
|
|
+ inboundHandle (item) {
|
|
|
+ item.sourceCategory = '4'
|
|
|
+ item.cnt = item.damageCnt
|
|
|
+ this.inboundVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.update.init(item)
|
|
|
+ this.$refs.inbound.init(0, false, item)
|
|
|
})
|
|
|
}
|
|
|
}
|