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, point_code: code,
vehicle_code: vcode, vehicle_code: vcode,
qty: qty, qty: qty,
weight: weight, weight: weight
is_full: is
}) })
// 叫料 // 叫料

View File

@@ -43,18 +43,18 @@
<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 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>
<div class="filter-unit"></div> <div class="filter-unit"></div>
</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"> <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>
<div class="filter-unit"></div> <div class="filter-unit">千克</div>
</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" >
<dropdown-menu <dropdown-menu
@@ -65,11 +65,11 @@
@dropdownMenu="dropdownMenu3"> @dropdownMenu="dropdownMenu3">
</dropdown-menu> </dropdown-menu>
</div> </div>
</div> </div> -->
</div> </div>
</section> </section>
<section class="submit-bar"> <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> <button class="btn submit-button" @click="toCancle">取消</button>
</section> </section>
</section> </section>
@@ -99,9 +99,9 @@ export default {
active2: '', active2: '',
open2: false, open2: false,
val2: '', val2: '',
option3: [{value: '0', label: '否'}, {value: '1', label: '是'}], // option3: [{value: '0', label: '否'}, {value: '1', label: '是'}],
active3: '1', // active3: '1',
open3: false, // open3: false,
val3: '', val3: '',
val4: '', val4: '',
val5: '', val5: '',
@@ -112,6 +112,9 @@ export default {
this._pdaRegion() this._pdaRegion()
}, },
methods: { methods: {
inputLimit () {
this.val5 = this.val5.indexOf('.') > -1 ? this.val5.slice(0, this.val5.indexOf('.') + 4) : this.val5
},
/** 查询区域 */ /** 查询区域 */
async _pdaRegion () { async _pdaRegion () {
let res = await pdaRegion('send_material') let res = await pdaRegion('send_material')
@@ -223,7 +226,7 @@ export default {
/** 确认 */ /** 确认 */
async _sendMaterial () { async _sendMaterial () {
this.disabled1 = true 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 this.disabled1 = false
return return
} }
@@ -234,7 +237,7 @@ export default {
code = el.point_code 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') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
this.toCancle() this.toCancle()
@@ -252,23 +255,28 @@ export default {
this.val2 = '' this.val2 = ''
this.active1 = '' this.active1 = ''
this.active2 = '' this.active2 = ''
this.active3 = ''
this.val3 = '' this.val3 = ''
this.val4 = '' this.val4 = ''
this.val5 = '' this.val5 = ''
this.disabled1 = false 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> </script>
<style lang="stylus" scoped>
.filter-unit
width .6rem
text-align right
</style>