|
|
@ -42,10 +42,13 @@ |
|
|
|
<text>数量 : </text> |
|
|
|
<view class="uni-flex uni-row uni-center" |
|
|
|
style="align-items: center;margin-left: 20rpx;"> |
|
|
|
<uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;' |
|
|
|
:focus="numberFocus" @blur='numberFocus = false'> |
|
|
|
</uni-number-box> |
|
|
|
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number" |
|
|
|
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" /> |
|
|
|
|
|
|
|
<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> |
|
|
@ -109,7 +112,9 @@ |
|
|
|
isModifiedPosition: true, |
|
|
|
customerList: [], |
|
|
|
customerName: "请选择客户", |
|
|
|
customerCode:"" |
|
|
|
customerCode:"", |
|
|
|
maxlength:10, |
|
|
|
stdPackInfo:undefined |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
@ -119,6 +124,21 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
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) { |
|
|
|
if (this.customerList.length == 0) { |
|
|
|
getBasicCustomerList().then(res => { |
|
|
|