修复bug, 更新功能

This commit is contained in:
weipengfei 2023-10-25 15:14:06 +08:00
parent 3275130d80
commit e1305e5e42
8 changed files with 71 additions and 47 deletions

View File

@ -173,30 +173,21 @@
//
producrprice(e, i, item) {
this.bought[i].price = e.detail.value
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
// this.$set(item, 'check', false);
// for (let i in this.checkedArr) {
// if (this.checkedArr[i].product_id == item.product_id) {
// this.checkedArr.splice(i, 1)
// }
// }
},
incrementTotal(e, i, item) {
// console.log(e, i, item)
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
// this.$set(item, 'check', false);
// for (let i in this.checkedArr) {
// if (this.checkedArr[i].product_id == item.product_id) {
// this.checkedArr.splice(i, 1)
// }
// }
},
// picker
bindPickerChange: function(e, storage, num) {
@ -300,8 +291,6 @@
this.checked = []
this.checkedArr.forEach((item, index) => {
this.checkedArr.push(item)
})
},
/*点击选中与否*/
@ -318,7 +307,6 @@
this.checkedArr.push(item)
} else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
}
},

View File

@ -79,6 +79,12 @@
}
}
},
{
"path": "pages/nongKe/supply_chain/shopping_trolley",
"style": {
"navigationBarTitleText": "采购车"
}
},
{
"path": "pages/moreProject/moreProject",
"style": {
@ -1456,12 +1462,18 @@
"text": "消息"
},
{
"pagePath": "pages/product/list/index",
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "商品"
"pagePath": "pages/nongKe/supply_chain/shopping_trolley",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "采购车"
}
// {
// "pagePath": "pages/product/list/index",
// "iconPath": "static/tabbar_icon/c.png",
// "selectedIconPath": "static/tabbar_icon/c-a.png",
// "text": "商品"
// },
// {
// "pagePath": "pages/supply_chains/supply_chains",
// "iconPath": "static/tabbar_icon/d.png",
// "selectedIconPath": "static/tabbar_icon/d-a.png",

View File

@ -1018,7 +1018,7 @@
switch (item.type) {
case 1:
uni.switchTab({
uni.navigateTo({
url: '/pages/product/list/index'
})
break;
@ -1029,9 +1029,12 @@
})
break;
case 3:
// uni.navigateTo({
// url: '/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=' +
// this.userInfoData.mer_info.category_id
// })
uni.navigateTo({
url: '/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=' +
this.userInfoData.mer_info.category_id
url: `/pages/nongKe/supply_chain/supplierA?tit=1&type_id=12&isDetail=1&product_type=98&cate_id=${this.userInfoData.mer_info.category_id}`
})
break;
case 4:

View File

@ -38,7 +38,7 @@
</block>
<u-loadmore :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" />
<navigator class="bottom_purchase" url="./shopping_trolley" open-type="navigate">采购清单</navigator>
<navigator class="bottom_purchase" url="./shopping_trolley" open-type="switchTab">采购清单</navigator>
<goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup>
<u-popup :show="show" @close="close">

View File

@ -26,6 +26,7 @@
<text class="iconfont icon-xiangyou"></text>
</navigator>
<view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
<view class="coupon-btn" v-if="item.credit_buy==1" style="width: auto;padding: 0 10rpx;margin-left: 15rpx;" >支持先货后款</view>
</view>
<!-- <navigator v-for="goods in item.list" :key="goods.cart_id"
:url='"/pages/goods_details/index?id="+goods.product.product_id' hover-class='none'
@ -208,7 +209,7 @@
valid: [],
invalid: []
},
isAllSelect: false, //
isAllSelect: true, //
selectValue: [], //
selectCountPrice: 0.00,
isAuto: false, //
@ -278,6 +279,11 @@
}, 300);
}
},
watch:{
isAllSelect(n, o){
console.log(n);
}
},
methods: {
//
authColse: function(e) {
@ -674,8 +680,7 @@
getCartList: function(isChange) {
let that = this;
getCartList({ product_type: 98 }).then(res => {
console.log("购物车", res)
this.type_id=res.data.list[0].type_id
this.type_id=res.data?.list[0]?.type_id||[]
res.data.list.forEach((item, index) => {
item.allCheck = true
item.list.forEach((goods, j) => {
@ -703,7 +708,8 @@
this.recommend = false
}
const sku = {}
this.checkboxAllChange()
// this.checkboxAllChange()
this.cartAllCheck('cartCheck');
});
},
//
@ -967,8 +973,8 @@
display: flex;
align-items: center;
width: 100%;
padding: 0 30rpx;
height: 85rpx;
padding: 15rpx 30rpx;
min-height: 85rpx;
border-bottom: 1px solid #f0f0f0;
.checkbox {
@ -1220,9 +1226,9 @@
padding: 0 30rpx;
box-sizing: border-box;
border-top: 1px solid #eee;
bottom: 98rpx;
bottom: calc(98rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
bottom: var(--window-bottom, 0);
bottom: calc(var(--window-bottom, 0) + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(var(--window-bottom, 0) + env(safe-area-inset-bottom)); /// IOS>11.2/
}
.shoppingCart .footer.on {
@ -1276,7 +1282,7 @@
.allcheckbox {
display: flex;
align-items: center;
width: 260rpx;
max-width: 230rpx;
.iconfont {
margin-right: 20rpx;

View File

@ -16,7 +16,8 @@
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view>
</view>
<view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
{{titName}}
<!-- {{titName}} -->
供货采购
</view>
</view>
<view class="">
@ -30,6 +31,8 @@
</view>
</view>
<u-tabs :list="[{name: '先款后货'},{name: '先货后款'}]" :scrollable="false" lineColor="#ff6d20" lineWidth="30" :itemStyle="{height: '88rpx'}" @change="changeTabs">
</u-tabs>
</view>
<view class="content">
<view class="hot_serch">
@ -47,12 +50,12 @@
</view>
</u-scroll-list>
</view> -->
<view class="goods_list">
<view class="goods_card" @click="goStore(item.mer_id)" v-for="(item,index) in storeList"
:key="index">
<view class="left">
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
<u--image :showLoading="true" :src="item.mer_avatar" width="157.71rpx"
height="157.71rpx"></u--image>
</view>
<view class="right">
@ -433,6 +436,18 @@
}, mapGetters(['viewColor'])),
},
methods: {
//
changeTabs(e){
if(e.index==0){
this.credit_buy = ''
this.sotreParam.page = 1;
}else if(e.index==1){
this.credit_buy = 1
this.sotreParam.page = 1;
}
this.storeList = [];
this.storeMerchantList();
},
navGo(id) {
uni.navigateTo({
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&?merchant_category_id=${id}`
@ -877,9 +892,9 @@
margin: 20rpx 0;
flex-wrap: wrap;
// margin-top: 50rpx;
padding-top: 50rpx;
padding-top: 142rpx;
/* #ifdef H5 */
padding-top: 100rpx;
padding-top: 180rpx;
/* #endif */
text {

BIN
static/tabbar_icon/d-a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/tabbar_icon/d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB