压制叫料添加物料查询
This commit is contained in:
@@ -45,11 +45,14 @@ export const sendMaterialconfirm = (wid, did, pid, pcode, qty, vcode, isfull) =>
|
|||||||
// 1.1查询点位
|
// 1.1查询点位
|
||||||
export const callMaterialqueryPoint = () => post('api/pda/callMaterial/queryPoint', {})
|
export const callMaterialqueryPoint = () => post('api/pda/callMaterial/queryPoint', {})
|
||||||
// 1.2压制叫料确定
|
// 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_id: pid,
|
||||||
point_code: pcode,
|
point_code: pcode,
|
||||||
point_name: pname,
|
point_name: pname,
|
||||||
is_full: isfull
|
is_full: isfull,
|
||||||
|
material_id: id,
|
||||||
|
material_code: code,
|
||||||
|
material_name: mname
|
||||||
})
|
})
|
||||||
|
|
||||||
// 送空托盘
|
// 送空托盘
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
document.getElementsByTagName('body')[0].className = 'bgwhite'
|
document.getElementsByTagName('body')[0].className = 'bgwhite'
|
||||||
|
this.$store.dispatch('receiveMaterObj', {})
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._authority()
|
this._authority()
|
||||||
@@ -50,7 +51,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
toPage (e) {
|
toPage (e) {
|
||||||
let name = e.path.substr(2)
|
let name = e.path.substr(2)
|
||||||
if (name === 'CheckManage') {
|
if (name === 'CheckManage' || name === 'PressCallMater') {
|
||||||
this.$store.dispatch('setKeepAlive', [name])
|
this.$store.dispatch('setKeepAlive', [name])
|
||||||
}
|
}
|
||||||
this.$router.push(e.path.substr(2))
|
this.$router.push(e.path.substr(2))
|
||||||
@@ -71,7 +72,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goInner (path) {
|
goInner (path) {
|
||||||
let name = path.substr(1)
|
let name = path.substr(1)
|
||||||
if (name === 'CheckManage') {
|
if (name === 'CheckManage' || name === 'PressCallMater') {
|
||||||
this.$store.dispatch('setKeepAlive', [name])
|
this.$store.dispatch('setKeepAlive', [name])
|
||||||
}
|
}
|
||||||
this.$router.push(path)
|
this.$router.push(path)
|
||||||
|
|||||||
@@ -15,6 +15,12 @@
|
|||||||
</dropdown-menu>
|
</dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
</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="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">是否满托</div>
|
<div class="filter-label txtjustify">是否满托</div>
|
||||||
<div class="fxcol mgl20 visible" >
|
<div class="fxcol mgl20 visible" >
|
||||||
@@ -30,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<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>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -54,7 +60,19 @@ export default {
|
|||||||
option2: [{value: '1', label: '是'}, {value: '2', label: '否'}],
|
option2: [{value: '1', label: '是'}, {value: '2', label: '否'}],
|
||||||
active2: '',
|
active2: '',
|
||||||
open2: false,
|
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 () {
|
created () {
|
||||||
@@ -77,12 +95,12 @@ export default {
|
|||||||
/** 确定 */
|
/** 确定 */
|
||||||
async _callMaterialconfirm () {
|
async _callMaterialconfirm () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.active1 === '' || this.active2 === '') {
|
if (this.active1 === '' || this.active2 === '' || this.val1 === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
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') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
this.toCancle()
|
this.toCancle()
|
||||||
@@ -99,6 +117,8 @@ export default {
|
|||||||
this.active1 = ''
|
this.active1 = ''
|
||||||
this.active2 = ''
|
this.active2 = ''
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
|
this.val1 = ''
|
||||||
|
this.$store.dispatch('receiveMaterObj', {})
|
||||||
},
|
},
|
||||||
toggleItem1 () {
|
toggleItem1 () {
|
||||||
if (!this.open1) {
|
if (!this.open1) {
|
||||||
@@ -121,6 +141,13 @@ export default {
|
|||||||
dropdownMenu2 (i) {
|
dropdownMenu2 (i) {
|
||||||
this.active2 = i + ''
|
this.active2 = i + ''
|
||||||
this.open2 = false
|
this.open2 = false
|
||||||
|
},
|
||||||
|
/** 查找物料 */
|
||||||
|
searchList () {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/SearchMater',
|
||||||
|
query: {url: 'PressCallMater'}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,10 +100,16 @@ export default {
|
|||||||
toSure () {
|
toSure () {
|
||||||
if (this.pkId) {
|
if (this.pkId) {
|
||||||
this.$store.dispatch('receiveMaterObj', this.pkObj)
|
this.$store.dispatch('receiveMaterObj', this.pkObj)
|
||||||
this.$router.push({
|
if (this.$route.query.url === 'PressCallMater') {
|
||||||
path: 'CheckManage',
|
this.$router.push({
|
||||||
query: {uuid: this.$route.query.uuid}
|
path: '/PressCallMater'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: 'CheckManage',
|
||||||
|
query: {uuid: this.$route.query.uuid}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user