This commit is contained in:
2023-09-16 21:14:24 +08:00
parent 0c32d938ce
commit 22bf55bffb
2 changed files with 33 additions and 26 deletions

View File

@@ -102,12 +102,11 @@ export const pdaReport = (code, qty) => post('api/pda/report', {
})
// 送料
export const sendMaterial = (code, vcode, qty, weight, is) => post('api/pda/sendMaterial', {
export const sendMaterial = (code, vcode, qty, weight) => post('api/pda/sendMaterial', {
point_code: code,
vehicle_code: vcode,
qty: qty,
weight: weight,
is_full: is
weight: weight
})
// 叫料

View File

@@ -43,18 +43,18 @@
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">数量</div>
<div class="fxcol mgl20">
<input class="filter-input filter-scan-input" v-model="val4" @input="val4 = val4.replace(/[^\d]/g,'')">
<input class="filter-input filter-scan-input" type="number" v-model="val4" @input="val4 = val4.replace(/[^\d]/g,'')">
</div>
<div class="filter-unit"></div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">重量</div>
<div class="fxcol mgl20">
<input class="filter-input filter-scan-input" v-model="val5" @input="val5 = val5.replace(/[^\d]/g,'')">
<input class="filter-input filter-scan-input" type="number" v-model="val5" @input="inputLimit">
</div>
<div class="filter-unit"></div>
<div class="filter-unit">千克</div>
</div>
<div class="bottom-filter-tip">
<!-- <div class="bottom-filter-tip">
<div class="filter-label txtjustify">是否满托</div>
<div class="fxcol mgl20 visible" >
<dropdown-menu
@@ -65,11 +65,11 @@
@dropdownMenu="dropdownMenu3">
</dropdown-menu>
</div>
</div>
</div> -->
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" :class="{'btn-disabled' : val2 === '' || val3 === '' || val4 === '' || val5 === '' || active3 === ''}" :disabled="disabled1" @click="_sendMaterial">确定</button>
<button class="btn submit-button" :class="{'btn-disabled' : val2 === '' || val3 === '' || val4 === '' || val5 === ''}" :disabled="disabled1" @click="_sendMaterial">确定</button>
<button class="btn submit-button" @click="toCancle">取消</button>
</section>
</section>
@@ -99,9 +99,9 @@ export default {
active2: '',
open2: false,
val2: '',
option3: [{value: '0', label: '否'}, {value: '1', label: '是'}],
active3: '1',
open3: false,
// option3: [{value: '0', label: '否'}, {value: '1', label: '是'}],
// active3: '1',
// open3: false,
val3: '',
val4: '',
val5: '',
@@ -112,6 +112,9 @@ export default {
this._pdaRegion()
},
methods: {
inputLimit () {
this.val5 = this.val5.indexOf('.') > -1 ? this.val5.slice(0, this.val5.indexOf('.') + 4) : this.val5
},
/** 查询区域 */
async _pdaRegion () {
let res = await pdaRegion('send_material')
@@ -223,7 +226,7 @@ export default {
/** 确认 */
async _sendMaterial () {
this.disabled1 = true
if (this.val2 === '' || this.val3 === '' || this.val4 === '' || this.val5 === '' || this.active3 === '') {
if (this.val2 === '' || this.val3 === '' || this.val4 === '' || this.val5 === '') {
this.disabled1 = false
return
}
@@ -234,7 +237,7 @@ export default {
code = el.point_code
}
})
let res = await sendMaterial(code, this.val3, this.val4, this.val5, this.option3[this.active3].value)
let res = await sendMaterial(code, this.val3, this.val4, this.val5)
if (res.code === '1') {
this.toast(res.desc)
this.toCancle()
@@ -252,23 +255,28 @@ export default {
this.val2 = ''
this.active1 = ''
this.active2 = ''
this.active3 = ''
this.val3 = ''
this.val4 = ''
this.val5 = ''
this.disabled1 = false
},
toggleItem3 () {
if (!this.open3) {
this.open3 = true
} else {
this.open3 = false
}
},
dropdownMenu3 (i) {
this.active3 = i + ''
this.open3 = false
}
// toggleItem3 () {
// if (!this.open3) {
// this.open3 = true
// } else {
// this.open3 = false
// }
// },
// dropdownMenu3 (i) {
// this.active3 = i + ''
// this.open3 = false
// }
}
}
</script>
<style lang="stylus" scoped>
.filter-unit
width .6rem
text-align right
</style>