5.31宁夏问题修改

This commit is contained in:
FrancisHu 2024-05-31 18:58:56 +08:00
parent c6498429c2
commit 9238036a4e
1 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@
:clear="false" :clear="false"
></uni-data-select> ></uni-data-select>
</view> </view>
<h5 class="tit">当前型号剩余库存{{ leftNum }}</h5> <h5 class="tit">当前规格剩余库存{{ leftNum }}</h5>
<h5 class="tit">预约数量</h5> <h5 class="tit">预约数量</h5>
<view class="select-num"> <view class="select-num">
<uni-number-box v-model="deviceNum" @change="numChange" :min="1"/> <uni-number-box v-model="deviceNum" @change="numChange" :min="1"/>
@ -96,15 +96,16 @@ import { basePath } from '../../public';
title: '请选择规格!' title: '请选择规格!'
}) })
} else { } else {
console.log(this.typeId, this.deviceNum, this.companyId, this.leftNum); console.log(this.typeId, this.deviceNum, this.companyId, this.leftNum, uni.getStorageSync('userInfo').userid);
// //
if (this.deviceNum > this.leftNum) { if (this.deviceNum > this.leftNum) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '当前领料数量大于库存数量!' title: '领料数量大于该规格库存数量!'
}) })
} else { } else {
that.$api.fetchMaterial.addItemToCart({ that.$api.fetchMaterial.addItemToCart({
userId: uni.getStorageSync('userInfo').userid,
typeId: this.typeId, typeId: this.typeId,
bookNum: this.deviceNum, bookNum: this.deviceNum,
companyId: this.companyId companyId: this.companyId