送料添加物料

This commit is contained in:
2022-08-17 15:08:17 +08:00
parent 5c6df10f54
commit 76eae90606
4 changed files with 37 additions and 8 deletions

View File

@@ -31,14 +31,17 @@ export const taskOperation = (uuid, type) => post2('api/ash/hand/taskoperation',
// 1.1查询工序设备点位
export const sendMaterialqueryDevice = () => post('api/pda/sendMaterial/queryDevice', {})
// 1.2压制叫料确定
export const sendMaterialconfirm = (wid, did, pid, pcode, qty, vcode, isfull) => post('api/pda/sendMaterial/confirm', {
export const sendMaterialconfirm = (wid, did, pid, pcode, qty, vcode, isfull, mcode, mid, mname) => post('api/pda/sendMaterial/confirm', {
workprocedure_id: wid,
device_id: did,
point_id: pid,
point_code: pcode,
qty: qty,
vehicle_code: vcode,
is_full: isfull
is_full: isfull,
material_code: mcode,
material_id: mid,
material_name: mname
})
// 压制叫料

View File

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

View File

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

View File

@@ -42,7 +42,7 @@
<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="val3">
<input type="text" class="filter-input filter-scan-input" v-model="val3" @click="getMater">
</div>
</div>
<search-box
@@ -71,7 +71,7 @@
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" :class="{'btn-disabled' : val1 === '' || val2 === '' || active1 === '' || active2 === '' || active3 === '' || active4 === ''}" :disabled="disabled1" @click="_sendMaterialconfirm">确定</button>
<button class="btn submit-button" :class="{'btn-disabled' : val1 === '' || val2 === '' || val3 === '' || active1 === '' || active2 === '' || active3 === '' || active4 === ''}" :disabled="disabled1" @click="_sendMaterialconfirm">确定</button>
<button class="btn submit-button" @click="toCancle">取消</button>
</section>
</section>
@@ -83,7 +83,7 @@ import SearchBox from '@components/SearchBox.vue'
import DropdownMenu from '@components/DropdownMenu.vue'
import {sendMaterialqueryDevice, sendMaterialconfirm} from '@config/getData1'
export default {
name: 'BindPalletPoint',
name: 'SendMater',
components: {
NavBar,
SearchBox,
@@ -94,6 +94,8 @@ export default {
val1: '',
val2: '',
val3: '',
materId: '',
materCode: '',
option1: [],
active1: '',
open1: false,
@@ -109,6 +111,19 @@ export default {
disabled1: 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.materCode = this.$store.getters.receiveMaterObj.material_code
this.materId = this.$store.getters.receiveMaterObj.material_id
this.val3 = this.$store.getters.receiveMaterObj.material_name
}
},
created () {
this._sendMaterialqueryDevice()
},
@@ -139,12 +154,12 @@ export default {
/** 确认 */
async _sendMaterialconfirm () {
this.disabled1 = true
if (this.val1 === '' || this.val2 === '' || this.active1 === '' || this.active2 === '' || this.active3 === '' || this.active4 === '') {
if (this.val1 === '' || this.val2 === '' || this.val3 === '' || this.active1 === '' || this.active2 === '' || this.active3 === '' || this.active4 === '') {
this.disabled1 = false
return
}
try {
let res = await sendMaterialconfirm(this.option1[this.active1].value, this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val2, this.val1, this.option4[this.active4].value)
let res = await sendMaterialconfirm(this.option1[this.active1].value, this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val2, this.val1, this.option4[this.active4].value, this.materCode, this.materId, this.val3)
if (res.code === '1') {
this.toast(res.desc)
this.toCancle()
@@ -160,6 +175,9 @@ export default {
toCancle () {
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.materId = ''
this.materCode = ''
this.active1 = ''
this.active2 = ''
this.active3 = ''
@@ -219,6 +237,12 @@ export default {
dropdownMenu4 (i) {
this.active4 = i + ''
this.open4 = false
},
getMater () {
this.$router.push({
path: '/SearchMater',
query: {url: 'SendMater'}
})
}
}
}