keepalive
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="search-item flexend">
|
||||
<button class="button button--primary" @click="_outgetAll">查询</button>
|
||||
<button class="button button--primary" :disabled="disabled1" @click="_inconfirm">强制确认</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': !pkId}" @click="_inconfirm">强制确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -150,7 +150,6 @@ export default {
|
||||
async _inconfirm () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId) {
|
||||
this.toast('请选择一行')
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">备注</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input" v-model="val1">
|
||||
<input type="text" class="filter-input" v-model="remark">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_2 flexend">
|
||||
@@ -70,7 +70,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.material_code}" @click="toRadio(e)">
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.sale_code}" @click="toRadio(e)">
|
||||
<td>{{i + 1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
@@ -89,6 +89,7 @@
|
||||
<script>
|
||||
import { getBcpStor, getBillType, getPoint, confirmIn } from '../../../config/getData1.js'
|
||||
export default {
|
||||
name: 'finishedinstore',
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
@@ -97,7 +98,8 @@ export default {
|
||||
value2: '',
|
||||
options3: [],
|
||||
value3: '',
|
||||
dataList: [{material_code: '030301010031'}],
|
||||
remark: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false
|
||||
@@ -110,8 +112,17 @@ export default {
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (this.$store.getters.materObj !== '') {
|
||||
console.log(111)
|
||||
this.dataList.push(JSON.parse(this.$store.getters.materObj))
|
||||
console.log(this.dataList, '2')
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// if (this.$store.getters.materObj !== '') {
|
||||
// this.dataList.push(JSON.parse(this.$store.getters.materObj))
|
||||
// console.log(this.dataList, '2')
|
||||
// }
|
||||
this._getBcpStor()
|
||||
this._getBillType()
|
||||
this._getPoint()
|
||||
@@ -137,7 +148,7 @@ export default {
|
||||
},
|
||||
async _confirmIn () {
|
||||
try {
|
||||
let res = await confirmIn(this.value1, this.value2, this.value3, this.val1, this.dataList)
|
||||
let res = await confirmIn(this.value1, this.value2, this.value3, this.remark, this.dataList)
|
||||
this.toast(res.message)
|
||||
} catch (e) {
|
||||
}
|
||||
@@ -149,8 +160,8 @@ export default {
|
||||
this.$router.push('/finishedinstoresearch')
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.material_code ? '' : e.material_code
|
||||
this.pkObj = this.pkId === e.material_code ? e : {}
|
||||
this.pkId = this.pkId === e.sale_code ? '' : e.sale_code
|
||||
this.pkObj = this.pkId === e.sale_code ? e : {}
|
||||
},
|
||||
toDel () {
|
||||
console.log('del')
|
||||
|
||||
@@ -6,22 +6,30 @@
|
||||
/>
|
||||
<div class="body-container">
|
||||
<div class="main-container">
|
||||
<router-view></router-view>
|
||||
<keep-alive :include="keepAlive" >
|
||||
<router-view/>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import jxHeader from '@components/header.vue'
|
||||
export default {
|
||||
components: {
|
||||
jxHeader
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title: ['成品入库', '选择成品箱物料', '成品入库查询'][Number(this.$route.meta.guidePath) - 1]
|
||||
}
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
title () {
|
||||
let res = ['成品入库', '选择成品箱物料', '成品入库查询'][Number(this.$route.meta.guidePath) - 1]
|
||||
return res
|
||||
},
|
||||
...mapGetters(['keepAlive'])
|
||||
},
|
||||
methods: {
|
||||
switchColor (type) {
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
val1: '',
|
||||
val2: '',
|
||||
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
||||
dataList: [{sale_code: '030301010031'}],
|
||||
dataList: [{sale_code: '030301010037'}],
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user