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