送料添加物料
This commit is contained in:
@@ -31,14 +31,17 @@ export const taskOperation = (uuid, type) => post2('api/ash/hand/taskoperation',
|
|||||||
// 1.1查询工序设备点位
|
// 1.1查询工序设备点位
|
||||||
export const sendMaterialqueryDevice = () => post('api/pda/sendMaterial/queryDevice', {})
|
export const sendMaterialqueryDevice = () => post('api/pda/sendMaterial/queryDevice', {})
|
||||||
// 1.2压制叫料确定
|
// 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,
|
workprocedure_id: wid,
|
||||||
device_id: did,
|
device_id: did,
|
||||||
point_id: pid,
|
point_id: pid,
|
||||||
point_code: pcode,
|
point_code: pcode,
|
||||||
qty: qty,
|
qty: qty,
|
||||||
vehicle_code: vcode,
|
vehicle_code: vcode,
|
||||||
is_full: isfull
|
is_full: isfull,
|
||||||
|
material_code: mcode,
|
||||||
|
material_id: mid,
|
||||||
|
material_name: mname
|
||||||
})
|
})
|
||||||
|
|
||||||
// 压制叫料
|
// 压制叫料
|
||||||
|
|||||||
@@ -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' || name === 'BindMaterPoint') {
|
if (name === 'CheckManage' || name === 'ConveyorLine' || name === 'BindMaterPoint' || name === 'SendMater') {
|
||||||
this.$store.dispatch('setKeepAlive', [name])
|
this.$store.dispatch('setKeepAlive', [name])
|
||||||
}
|
}
|
||||||
this.$router.push(e.path.substr(2))
|
this.$router.push(e.path.substr(2))
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ export default {
|
|||||||
})
|
})
|
||||||
} else if (this.$route.query.url === 'BindMaterPoint') {
|
} else if (this.$route.query.url === 'BindMaterPoint') {
|
||||||
this.$router.push('/BindMaterPoint')
|
this.$router.push('/BindMaterPoint')
|
||||||
|
} else if (this.$route.query.url === 'SendMater') {
|
||||||
|
this.$router.push('/SendMater')
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: 'CheckManage',
|
path: 'CheckManage',
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<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">
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<search-box
|
<search-box
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<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>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -83,7 +83,7 @@ import SearchBox from '@components/SearchBox.vue'
|
|||||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
import {sendMaterialqueryDevice, sendMaterialconfirm} from '@config/getData1'
|
import {sendMaterialqueryDevice, sendMaterialconfirm} from '@config/getData1'
|
||||||
export default {
|
export default {
|
||||||
name: 'BindPalletPoint',
|
name: 'SendMater',
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox,
|
SearchBox,
|
||||||
@@ -94,6 +94,8 @@ export default {
|
|||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
val3: '',
|
val3: '',
|
||||||
|
materId: '',
|
||||||
|
materCode: '',
|
||||||
option1: [],
|
option1: [],
|
||||||
active1: '',
|
active1: '',
|
||||||
open1: false,
|
open1: false,
|
||||||
@@ -109,6 +111,19 @@ export default {
|
|||||||
disabled1: false
|
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 () {
|
created () {
|
||||||
this._sendMaterialqueryDevice()
|
this._sendMaterialqueryDevice()
|
||||||
},
|
},
|
||||||
@@ -139,12 +154,12 @@ export default {
|
|||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _sendMaterialconfirm () {
|
async _sendMaterialconfirm () {
|
||||||
this.disabled1 = true
|
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
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
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') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
this.toCancle()
|
this.toCancle()
|
||||||
@@ -160,6 +175,9 @@ export default {
|
|||||||
toCancle () {
|
toCancle () {
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
this.val2 = ''
|
this.val2 = ''
|
||||||
|
this.val3 = ''
|
||||||
|
this.materId = ''
|
||||||
|
this.materCode = ''
|
||||||
this.active1 = ''
|
this.active1 = ''
|
||||||
this.active2 = ''
|
this.active2 = ''
|
||||||
this.active3 = ''
|
this.active3 = ''
|
||||||
@@ -219,6 +237,12 @@ export default {
|
|||||||
dropdownMenu4 (i) {
|
dropdownMenu4 (i) {
|
||||||
this.active4 = i + ''
|
this.active4 = i + ''
|
||||||
this.open4 = false
|
this.open4 = false
|
||||||
|
},
|
||||||
|
getMater () {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/SearchMater',
|
||||||
|
query: {url: 'SendMater'}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user