输送线

This commit is contained in:
2022-07-22 14:46:40 +08:00
parent 46e6aad61a
commit 2282c119dd
3 changed files with 33 additions and 8 deletions

View File

@@ -53,7 +53,7 @@ export default {
methods: { methods: {
toPage (e) { toPage (e) {
let name = e.path.substr(2) let name = e.path.substr(2)
if (name === 'CheckManage' || name === 'ConveyorLine') { if (name === 'CheckManage' || name === 'ConveyorLine' || name === 'BindMaterPoint') {
this.$store.dispatch('setKeepAlive', [name]) this.$store.dispatch('setKeepAlive', [name])
} }
this.$router.push(e.path.substr(2)) this.$router.push(e.path.substr(2))

View File

@@ -8,12 +8,17 @@
v-model="val1" v-model="val1"
@handleChange="handleChange1" @handleChange="handleChange1"
></search-box> ></search-box>
<search-box <div class="bottom-filter-tip">
label="产品编码" <div class="fxcol fxrow relative">
v-model="val2" <div class="filter-label txtjustify">产品编码</div>
:seaShow="false" <div class="fxcol mgl20">
:focused="true" <input type="text" class="filter-input filter-scan-input" v-model="val2" disabled>
></search-box> </div>
</div>
<div class="mgl20">
<button class="btn" @click="searchList">查询</button>
</div>
</div>
<div class="bottom-filter-tip"> <div class="bottom-filter-tip">
<div class="filter-label txtjustify">物料名称</div> <div class="filter-label txtjustify">物料名称</div>
<div class="fxcol mgl20"> <div class="fxcol mgl20">
@@ -62,6 +67,18 @@ export default {
disabled: false 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: { methods: {
handleChange1 (e, type) { handleChange1 (e, type) {
if (type) { if (type) {
@@ -76,7 +93,7 @@ export default {
this.val2 = res.result.material_code this.val2 = res.result.material_code
this.val3 = res.result.material_name this.val3 = res.result.material_name
this.val4 = res.result.pcsn this.val4 = res.result.pcsn
this.val5 = `res.result.parseFloat(qty).toFixed(3)` this.val5 = `${parseFloat(res.result.qty).toFixed(3)}`
} else { } else {
this.Dialog(res.desc) this.Dialog(res.desc)
} }
@@ -104,6 +121,12 @@ export default {
/** 取消 */ /** 取消 */
toCancle () { toCancle () {
Object.assign(this.$data, this.$options.data()) Object.assign(this.$data, this.$options.data())
},
searchList () {
this.$router.push({
path: '/SearchMater',
query: {url: 'BindMaterPoint'}
})
} }
} }
} }

View File

@@ -105,6 +105,8 @@ export default {
path: '/ConveyorLine', path: '/ConveyorLine',
query: {id: this.$route.query.id} query: {id: this.$route.query.id}
}) })
} else if (this.$route.query.url === 'BindMaterPoint') {
this.$router.push('/BindMaterPoint')
} else { } else {
this.$router.push({ this.$router.push({
path: 'CheckManage', path: 'CheckManage',