diff --git a/src/config/getData1.js b/src/config/getData1.js
index a8e9a80..5b3d9e5 100644
--- a/src/config/getData1.js
+++ b/src/config/getData1.js
@@ -45,11 +45,14 @@ export const sendMaterialconfirm = (wid, did, pid, pcode, qty, vcode, isfull) =>
// 1.1查询点位
export const callMaterialqueryPoint = () => post('api/pda/callMaterial/queryPoint', {})
// 1.2压制叫料确定
-export const callMaterialconfirm = (pid, pcode, pname, isfull) => post('api/pda/callMaterial/confirm', {
+export const callMaterialconfirm = (pid, pcode, pname, isfull, id, code, mname) => post('api/pda/callMaterial/confirm', {
point_id: pid,
point_code: pcode,
point_name: pname,
- is_full: isfull
+ is_full: isfull,
+ material_id: id,
+ material_code: code,
+ material_name: mname
})
// 送空托盘
diff --git a/src/pages/login/Home.vue b/src/pages/login/Home.vue
index 26ac1b2..4ef83ad 100644
--- a/src/pages/login/Home.vue
+++ b/src/pages/login/Home.vue
@@ -43,6 +43,7 @@ export default {
},
mounted () {
document.getElementsByTagName('body')[0].className = 'bgwhite'
+ this.$store.dispatch('receiveMaterObj', {})
},
created () {
this._authority()
@@ -50,7 +51,7 @@ export default {
methods: {
toPage (e) {
let name = e.path.substr(2)
- if (name === 'CheckManage') {
+ if (name === 'CheckManage' || name === 'PressCallMater') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(e.path.substr(2))
@@ -71,7 +72,7 @@ export default {
},
goInner (path) {
let name = path.substr(1)
- if (name === 'CheckManage') {
+ if (name === 'CheckManage' || name === 'PressCallMater') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(path)
diff --git a/src/pages/proj/PressCallMater.vue b/src/pages/proj/PressCallMater.vue
index 7198652..6961f17 100644
--- a/src/pages/proj/PressCallMater.vue
+++ b/src/pages/proj/PressCallMater.vue
@@ -15,6 +15,12 @@
+
是否满托
@@ -30,7 +36,7 @@
@@ -54,7 +60,19 @@ export default {
option2: [{value: '1', label: '是'}, {value: '2', label: '否'}],
active2: '',
open2: false,
- disabled1: false
+ disabled1: false,
+ val1: ''
+ }
+ },
+ 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.val1 = this.$store.getters.receiveMaterObj.material_name
}
},
created () {
@@ -77,12 +95,12 @@ export default {
/** 确定 */
async _callMaterialconfirm () {
this.disabled1 = true
- if (this.active1 === '' || this.active2 === '') {
+ if (this.active1 === '' || this.active2 === '' || this.val1 === '') {
this.disabled1 = false
return
}
try {
- let res = await callMaterialconfirm(this.option1[this.active1].point_id, this.option1[this.active1].point_code, this.option1[this.active1].point_name, this.option2[this.active2].value)
+ let res = await callMaterialconfirm(this.option1[this.active1].point_id, this.option1[this.active1].point_code, this.option1[this.active1].point_name, this.option2[this.active2].value, this.$store.getters.receiveMaterObj.material_id, this.$store.getters.receiveMaterObj.material_code, this.$store.getters.receiveMaterObj.material_name)
if (res.code === '1') {
this.toast(res.desc)
this.toCancle()
@@ -99,6 +117,8 @@ export default {
this.active1 = ''
this.active2 = ''
this.disabled1 = false
+ this.val1 = ''
+ this.$store.dispatch('receiveMaterObj', {})
},
toggleItem1 () {
if (!this.open1) {
@@ -121,6 +141,13 @@ export default {
dropdownMenu2 (i) {
this.active2 = i + ''
this.open2 = false
+ },
+ /** 查找物料 */
+ searchList () {
+ this.$router.push({
+ path: '/SearchMater',
+ query: {url: 'PressCallMater'}
+ })
}
}
}
diff --git a/src/pages/proj/SearchMater.vue b/src/pages/proj/SearchMater.vue
index 6e4fe22..274d95c 100644
--- a/src/pages/proj/SearchMater.vue
+++ b/src/pages/proj/SearchMater.vue
@@ -100,10 +100,16 @@ export default {
toSure () {
if (this.pkId) {
this.$store.dispatch('receiveMaterObj', this.pkObj)
- this.$router.push({
- path: 'CheckManage',
- query: {uuid: this.$route.query.uuid}
- })
+ if (this.$route.query.url === 'PressCallMater') {
+ this.$router.push({
+ path: '/PressCallMater'
+ })
+ } else {
+ this.$router.push({
+ path: 'CheckManage',
+ query: {uuid: this.$route.query.uuid}
+ })
+ }
}
}
}