diff --git a/src/pages/login/Home.vue b/src/pages/login/Home.vue
index 3bd92ca..2598532 100644
--- a/src/pages/login/Home.vue
+++ b/src/pages/login/Home.vue
@@ -53,7 +53,7 @@ export default {
methods: {
toPage (e) {
let name = e.path.substr(2)
- if (name === 'CheckManage' || name === 'ConveyorLine') {
+ if (name === 'CheckManage' || name === 'ConveyorLine' || name === 'BindMaterPoint') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(e.path.substr(2))
diff --git a/src/pages/proj/BindMaterPoint.vue b/src/pages/proj/BindMaterPoint.vue
index 55bf17c..44a99ef 100644
--- a/src/pages/proj/BindMaterPoint.vue
+++ b/src/pages/proj/BindMaterPoint.vue
@@ -8,12 +8,17 @@
v-model="val1"
@handleChange="handleChange1"
>
-
+
物料名称
@@ -62,6 +67,18 @@ export default {
disabled: false
}
},
+ beforeRouteLeave (to, from, next) {
+ if (to.path === '/home' || to.path === '/login') {
+ this.$store.dispatch('setKeepAlive', [])
+ }
+ next()
+ },
+ activated () {
+ if (JSON.stringify(this.$store.getters.receiveMaterObj) !== '{}') {
+ this.val2 = this.$store.getters.receiveMaterObj.material_code
+ this.val3 = this.$store.getters.receiveMaterObj.material_name
+ }
+ },
methods: {
handleChange1 (e, type) {
if (type) {
@@ -76,7 +93,7 @@ export default {
this.val2 = res.result.material_code
this.val3 = res.result.material_name
this.val4 = res.result.pcsn
- this.val5 = `res.result.parseFloat(qty).toFixed(3)`
+ this.val5 = `${parseFloat(res.result.qty).toFixed(3)}`
} else {
this.Dialog(res.desc)
}
@@ -104,6 +121,12 @@ export default {
/** 取消 */
toCancle () {
Object.assign(this.$data, this.$options.data())
+ },
+ searchList () {
+ this.$router.push({
+ path: '/SearchMater',
+ query: {url: 'BindMaterPoint'}
+ })
}
}
}
diff --git a/src/pages/proj/SearchMater.vue b/src/pages/proj/SearchMater.vue
index c499a3a..0696677 100644
--- a/src/pages/proj/SearchMater.vue
+++ b/src/pages/proj/SearchMater.vue
@@ -105,6 +105,8 @@ export default {
path: '/ConveyorLine',
query: {id: this.$route.query.id}
})
+ } else if (this.$route.query.url === 'BindMaterPoint') {
+ this.$router.push('/BindMaterPoint')
} else {
this.$router.push({
path: 'CheckManage',