|
@@ -4,7 +4,10 @@
|
|
|
<template v-if="!inboundVisible && !outboundVisible && !detailVisible">
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
|
|
|
<el-form-item label="出入库类型">
|
|
|
- <el-select v-model="dataForm.recordType" placeholder="请选择">
|
|
|
+ <el-select
|
|
|
+ v-model="dataForm.recordType"
|
|
|
+ @change="recordTypeChanged"
|
|
|
+ placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in recordTypeOptions"
|
|
|
:key="item.value"
|
|
@@ -119,7 +122,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-if="isAuth('wh:inon:info')" type="text" size="small" @click="detailHandle(scope.row.id)">查看</el-button>
|
|
|
<el-button v-if="false" type="text" size="small" @click="exportItem(scope.row.id)">导出</el-button>
|
|
|
- <el-button v-if="isAuth('wh:in:editor') && (Number(scope.row.state) === 0 || Number(scope.row.state) === 4)" type="text" size="small" @click="inBound(scope.row.id, false)">编辑</el-button>
|
|
|
+ <el-button v-if="isAuth('wh:in:editor') && (Number(scope.row.state) === 0 || Number(scope.row.state) === 4)" type="text" size="small" @click="editBound(scope.row.id)">编辑</el-button>
|
|
|
<el-button v-if="isAuth('wh:in:revoke') && (Number(scope.row.state) === 1 || Number(scope.row.state) === 2)" type="text" size="small" @click="cancelItem(scope.row)">撤回</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -239,6 +242,16 @@
|
|
|
selectionChangeHandle (val) {
|
|
|
this.dataListSelections = val
|
|
|
},
|
|
|
+ // 编辑
|
|
|
+ editBound (id) {
|
|
|
+ if (Number(this.dataForm.recordType) === 1) {
|
|
|
+ // 出库
|
|
|
+ this.outBound(id, false)
|
|
|
+ } else {
|
|
|
+ // 入库
|
|
|
+ this.inBound(id, false)
|
|
|
+ }
|
|
|
+ },
|
|
|
// 入库申请
|
|
|
inBound (id, display) {
|
|
|
this.inboundVisible = true
|
|
@@ -246,10 +259,10 @@
|
|
|
this.$refs.inbound.init(id, display)
|
|
|
})
|
|
|
},
|
|
|
- outBound () {
|
|
|
+ outBound (id) {
|
|
|
this.outboundVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.outbound.init()
|
|
|
+ this.$refs.outbound.init(id)
|
|
|
})
|
|
|
},
|
|
|
// 申请单类型
|
|
@@ -296,6 +309,9 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.details.init(id)
|
|
|
})
|
|
|
+ },
|
|
|
+ recordTypeChanged () {
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
}
|
|
|
}
|