压制叫料添加物料查询

This commit is contained in:
2022-08-31 16:28:08 +08:00
parent f51c49f621
commit d0eec752e4
4 changed files with 49 additions and 12 deletions

View File

@@ -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
})
// 送空托盘

View File

@@ -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)

View File

@@ -15,6 +15,12 @@
</dropdown-menu>
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">物料</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="val1" @click="searchList">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">是否满托</div>
<div class="fxcol mgl20 visible" >
@@ -30,7 +36,7 @@
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" :class="{'btn-disabled' : active1 === '' || active2 === ''}" :disabled="disabled1" @click="_callMaterialconfirm">确定</button>
<button class="btn submit-button" :class="{'btn-disabled' : active1 === '' || active2 === '' || val1 === ''}" :disabled="disabled1" @click="_callMaterialconfirm">确定</button>
<button class="btn submit-button" @click="toCancle">取消</button>
</section>
</section>
@@ -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'}
})
}
}
}

View File

@@ -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}
})
}
}
}
}