拼箱修改
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<u--text bold size="36" :text="'拼箱后主箱零件数:' + mainPackageQuantity"></u--text>
|
||||
</view>
|
||||
<view>
|
||||
<u--input placeholder="请输入拼入数量" type="number" border="surround" v-model="secondNum"></u--input>
|
||||
<u--input placeholder="请输入拼入数量" type="number" border="surround" v-model="secondNum" @input="numInput"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal>
|
||||
@@ -244,6 +244,17 @@ export default {
|
||||
this.modalShow = false;
|
||||
this.secondNum = 0;
|
||||
},
|
||||
numInput(value) {
|
||||
let maxQuantity = this.newMaterialList[1]?.quantity;
|
||||
if (!maxQuantity) {
|
||||
this.secondNum = 0;
|
||||
return;
|
||||
}
|
||||
if (!(value * 1 < maxQuantity * 1)) {
|
||||
this.secondNum = maxQuantity;
|
||||
return;
|
||||
}
|
||||
},
|
||||
// 点击拼箱
|
||||
handlerSubmit() {
|
||||
if (this.newMaterialList.length < 2) {
|
||||
|
||||
Reference in New Issue
Block a user