| | |
| | |
|
| | | } else {
|
| | | if (!item.stock || t > item.stock) {
|
| | | this.$message.showToast('库存不足无法修改')
|
| | | this.$message.showToast('库存不足无法修改') |
| | | return
|
| | | }
|
| | | this.addnum(item, (t - item.shopnum))
|
| | |
| | | if (!item.stock) {
|
| | | item.stock = 0
|
| | | }
|
| | | if (item.shopnum + addnum > item.stock) {
|
| | | if (addnum > 0 & item.shopnum + addnum > item.stock) {
|
| | | this.$message.showToast('库存不足,无法修改')
|
| | | return
|
| | | }
|
| | |
| | | },
|
| | |
|
| | | async refreshShopNum() {
|
| | | this.shopnum = await this.$store.dispatch('countShopping');
|
| | | this.shopnum = await this.$store.dispatch('countShopping'); |
| | | this.$store.dispatch('sign_add','shopnum') |
| | | |
| | | },
|
| | | async collectItem(dto) {
|
| | | if (!this.currentInfo.id) {
|