Browse Source

成品发货申请支持小数

wms3.0_pda
lijuncheng 8 months ago
parent
commit
11388470f2
  1. 28
      pages/deliver/coms/comDeliverRequestPopup.vue

28
pages/deliver/coms/comDeliverRequestPopup.vue

@ -42,10 +42,13 @@
<text>数量 : </text> <text>数量 : </text>
<view class="uni-flex uni-row uni-center" <view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;"> style="align-items: center;margin-left: 20rpx;">
<uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;' <input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
:focus="numberFocus" @blur='numberFocus = false'> @confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
</uni-number-box>
<uom :uom="uom"></uom> <uom :uom="uom"></uom>
<!-- <view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>)
</view> -->
</view> </view>
</view> </view>
@ -109,7 +112,9 @@
isModifiedPosition: true, isModifiedPosition: true,
customerList: [], customerList: [],
customerName: "请选择客户", customerName: "请选择客户",
customerCode:"" customerCode:"",
maxlength:10,
stdPackInfo:undefined
} }
}, },
props: { props: {
@ -119,6 +124,21 @@
}, },
}, },
methods: { methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
this.change(value)
},
openRequestPopup(editPosition) { openRequestPopup(editPosition) {
if (this.customerList.length == 0) { if (this.customerList.length == 0) {
getBasicCustomerList().then(res => { getBasicCustomerList().then(res => {

Loading…
Cancel
Save