修复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) { producrprice(e, i, item) {
this.bought[i].price = e.detail.value this.bought[i].price = e.detail.value
this.$set(item, 'check', false); // this.$set(item, 'check', false);
for (let i in this.checkedArr) { // for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) { // if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1) // this.checkedArr.splice(i, 1)
// }
} // }
}
}, },
incrementTotal(e, i, item) { incrementTotal(e, i, item) {
// console.log(e, i, item) // console.log(e, i, item)
this.$set(item, 'check', false); // this.$set(item, 'check', false);
for (let i in this.checkedArr) { // for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) { // if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1) // this.checkedArr.splice(i, 1)
} // }
} // }
}, },
// picker // picker
bindPickerChange: function(e, storage, num) { bindPickerChange: function(e, storage, num) {
@ -300,8 +291,6 @@
this.checked = [] this.checked = []
this.checkedArr.forEach((item, index) => { this.checkedArr.forEach((item, index) => {
this.checkedArr.push(item) this.checkedArr.push(item)
}) })
}, },
/*点击选中与否*/ /*点击选中与否*/
@ -318,7 +307,6 @@
this.checkedArr.push(item) this.checkedArr.push(item)
} else { } else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1) 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", "path": "pages/moreProject/moreProject",
"style": { "style": {
@ -1456,12 +1462,18 @@
"text": "消息" "text": "消息"
}, },
{ {
"pagePath": "pages/product/list/index", "pagePath": "pages/nongKe/supply_chain/shopping_trolley",
"iconPath": "static/tabbar_icon/c.png", "iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/c-a.png", "selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "商品" "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", // "pagePath": "pages/supply_chains/supply_chains",
// "iconPath": "static/tabbar_icon/d.png", // "iconPath": "static/tabbar_icon/d.png",
// "selectedIconPath": "static/tabbar_icon/d-a.png", // "selectedIconPath": "static/tabbar_icon/d-a.png",

View File

@ -1018,7 +1018,7 @@
switch (item.type) { switch (item.type) {
case 1: case 1:
uni.switchTab({ uni.navigateTo({
url: '/pages/product/list/index' url: '/pages/product/list/index'
}) })
break; break;
@ -1029,9 +1029,12 @@
}) })
break; break;
case 3: 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({ uni.navigateTo({
url: '/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_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}`
this.userInfoData.mer_info.category_id
}) })
break; break;
case 4: case 4:

View File

@ -38,7 +38,7 @@
</block> </block>
<u-loadmore :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" /> <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> <goodsPopup :goodsStatu="isPopupShow" @colses="isPopupShow=false" :goods_info="goodsInfo"></goodsPopup>
<u-popup :show="show" @close="close"> <u-popup :show="show" @close="close">

View File

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

View File

@ -16,7 +16,8 @@
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view> <view class="iconfont icon-xiangzuo" style="color: #333333;"></view>
</view> </view>
<view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);"> <view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
{{titName}} <!-- {{titName}} -->
供货采购
</view> </view>
</view> </view>
<view class=""> <view class="">
@ -30,6 +31,8 @@
</view> </view>
</view> </view>
<u-tabs :list="[{name: '先款后货'},{name: '先货后款'}]" :scrollable="false" lineColor="#ff6d20" lineWidth="30" :itemStyle="{height: '88rpx'}" @change="changeTabs">
</u-tabs>
</view> </view>
<view class="content"> <view class="content">
<view class="hot_serch"> <view class="hot_serch">
@ -433,6 +436,18 @@
}, mapGetters(['viewColor'])), }, mapGetters(['viewColor'])),
}, },
methods: { 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) { navGo(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/nongKe/supply_chain/supplierA?type_id=10&?merchant_category_id=${id}` url: `/pages/nongKe/supply_chain/supplierA?type_id=10&?merchant_category_id=${id}`
@ -877,9 +892,9 @@
margin: 20rpx 0; margin: 20rpx 0;
flex-wrap: wrap; flex-wrap: wrap;
// margin-top: 50rpx; // margin-top: 50rpx;
padding-top: 50rpx; padding-top: 142rpx;
/* #ifdef H5 */ /* #ifdef H5 */
padding-top: 100rpx; padding-top: 180rpx;
/* #endif */ /* #endif */
text { 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