|
|
@ -22,7 +22,6 @@ |
|
|
:src="item.checkedGroup ? '/static/imgs/cart/shopping-cart-select.png' : '/static/imgs/cart/shopping-cart-not-select.png'" |
|
|
:src="item.checkedGroup ? '/static/imgs/cart/shopping-cart-select.png' : '/static/imgs/cart/shopping-cart-not-select.png'" |
|
|
mode="" |
|
|
mode="" |
|
|
></image> |
|
|
></image> |
|
|
<!-- <checkbox-group @change="onCheck"><checkbox value="cb" :checked="checked" color="#000000" style="transform: scale(0.7)" /></checkbox-group> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="">{{ item.supplierName }}</view> |
|
|
<view class="">{{ item.supplierName }}</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -33,7 +32,6 @@ |
|
|
:src="subItem.checked ? '/static/imgs/cart/shopping-cart-select.png' : '/static/imgs/cart/shopping-cart-not-select.png'" |
|
|
:src="subItem.checked ? '/static/imgs/cart/shopping-cart-select.png' : '/static/imgs/cart/shopping-cart-not-select.png'" |
|
|
mode="" |
|
|
mode="" |
|
|
></image> |
|
|
></image> |
|
|
<!-- <checkbox-group @change="onCheck"><checkbox value="cb" :checked="checked" color="#000000" style="transform: scale(0.7)" /></checkbox-group> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="list-row"> |
|
|
<view class="list-row"> |
|
|
<image |
|
|
<image |
|
|
@ -82,9 +80,9 @@ |
|
|
</view> |
|
|
</view> |
|
|
<uni-popup ref="popup" type="center" :mask-click="false"> |
|
|
<uni-popup ref="popup" type="center" :mask-click="false"> |
|
|
<view class="popup-box"> |
|
|
<view class="popup-box"> |
|
|
<view class="tip-title">{{ onlyQuantity ? '确定将当前纸品删除吗?' : (allSelected ? '确定将购物车纸品删除吗?' : '确定将当前纸品删除吗?') }}</view> |
|
|
|
|
|
|
|
|
<view class="tip-title">{{ onlyQuantity ? '确定将当前纸品删除吗?' : allSelected ? '确定将购物车纸品删除吗?' : '确定将当前纸品删除吗?' }}</view> |
|
|
<view class="operation-row"> |
|
|
<view class="operation-row"> |
|
|
<view class="cancel-text" @tap="cancelTap">{{onlyQuantity ? '我在想想' : '取消'}}</view> |
|
|
|
|
|
|
|
|
<view class="cancel-text" @tap="cancelTap">{{ onlyQuantity ? '我在想想' : '取消' }}</view> |
|
|
<view class="line"></view> |
|
|
<view class="line"></view> |
|
|
<view class="confirm-text" @tap="confirmTap">确定</view> |
|
|
<view class="confirm-text" @tap="confirmTap">确定</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -124,7 +122,7 @@ export default { |
|
|
checked: false, |
|
|
checked: false, |
|
|
list: [], |
|
|
list: [], |
|
|
idList: [], |
|
|
idList: [], |
|
|
onlyQuantity: false, |
|
|
|
|
|
|
|
|
onlyQuantity: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
@ -178,10 +176,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
go2, |
|
|
go2, |
|
|
// 跳转详情 |
|
|
|
|
|
seeDetailsTap(item) { |
|
|
|
|
|
// go2('paper-details', { id: '681179176769818624' }) |
|
|
|
|
|
}, |
|
|
|
|
|
// 结算 |
|
|
// 结算 |
|
|
closeAnAccountTap() { |
|
|
closeAnAccountTap() { |
|
|
let orderGoodsList = [] |
|
|
let orderGoodsList = [] |
|
|
@ -217,7 +211,6 @@ export default { |
|
|
// purchaserEnterpriseId: '677166943471538176', |
|
|
// purchaserEnterpriseId: '677166943471538176', |
|
|
// userId: '573244119569272832', |
|
|
// userId: '573244119569272832', |
|
|
} |
|
|
} |
|
|
// console.log('params', params) |
|
|
|
|
|
closePaperReserve(params).then((res) => { |
|
|
closePaperReserve(params).then((res) => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
go2('order-make', { orderId: res.orderId }) |
|
|
go2('order-make', { orderId: res.orderId }) |
|
|
@ -241,8 +234,6 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.list = this.list.concat(res.records) |
|
|
this.list = this.list.concat(res.records) |
|
|
} |
|
|
} |
|
|
// this.list = [] |
|
|
|
|
|
// this.list = [...this.list, ...[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]] |
|
|
|
|
|
resolve({ list: this.list, total: res.total }) |
|
|
resolve({ list: this.list, total: res.total }) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -291,8 +282,8 @@ export default { |
|
|
// 店铺中的商品是否全选 |
|
|
// 店铺中的商品是否全选 |
|
|
isShopSelectedAll(products) { |
|
|
isShopSelectedAll(products) { |
|
|
let tempArr = true |
|
|
let tempArr = true |
|
|
for (var j = 0; j < products.length; j++) { |
|
|
|
|
|
if (!products[j].checked) { |
|
|
|
|
|
|
|
|
for (let product of products) { |
|
|
|
|
|
if (product.checked) { |
|
|
tempArr = false |
|
|
tempArr = false |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
@ -306,11 +297,11 @@ export default { |
|
|
delTap() { |
|
|
delTap() { |
|
|
// idList |
|
|
// idList |
|
|
this.idList = [] |
|
|
this.idList = [] |
|
|
let quantity = 0 |
|
|
|
|
|
|
|
|
let quantity = 0 |
|
|
this.list.forEach((el) => { |
|
|
this.list.forEach((el) => { |
|
|
el.carItemList.forEach((good) => { |
|
|
el.carItemList.forEach((good) => { |
|
|
if (good.checked) { |
|
|
if (good.checked) { |
|
|
quantity = good.quantity |
|
|
|
|
|
|
|
|
quantity = good.quantity |
|
|
this.idList.push(good.id) |
|
|
this.idList.push(good.id) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -322,12 +313,12 @@ export default { |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// 单一纸品删除,数量为0时,提示用户确认后删除纸品 |
|
|
|
|
|
if(this.idList.length == 1 && quantity == 0) { |
|
|
|
|
|
this.onlyQuantity = true |
|
|
|
|
|
}else { |
|
|
|
|
|
this.onlyQuantity = false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 单一纸品删除,数量为0时,提示用户确认后删除纸品 |
|
|
|
|
|
if (this.idList.length == 1 && quantity == 0) { |
|
|
|
|
|
this.onlyQuantity = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.onlyQuantity = false |
|
|
|
|
|
} |
|
|
this.$refs.popup.open('center') |
|
|
this.$refs.popup.open('center') |
|
|
}, |
|
|
}, |
|
|
confirmTap() { |
|
|
confirmTap() { |
|
|
@ -356,8 +347,6 @@ export default { |
|
|
change(num, shop, good) { |
|
|
change(num, shop, good) { |
|
|
good.quantity = num |
|
|
good.quantity = num |
|
|
good.weight = round(good.gramWeight * good.width * good.length * good.quantity * 1e-12, 4) |
|
|
good.weight = round(good.gramWeight * good.width * good.length * good.quantity * 1e-12, 4) |
|
|
// let buyTon = Number(good.gramWeight) * Number(good.quantity) |
|
|
|
|
|
// good.weight = (buyTon / (1000 * 1000)).toFixed(4) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|