Browse Source

1、特价申请,添加更多按钮

2、特价申请,更多按钮相关功能逻辑
3、客户选择页面添加收藏功能,页面完成
master
chenxuhui 7 years ago
parent
commit
4cc9ee882e
7 changed files with 126 additions and 5 deletions
  1. +51
    -0
      pages/customerChooseTemplate/customerChooseTemplate.js
  2. +8
    -1
      pages/customerChooseTemplate/customerChooseTemplate.wxml
  3. +1
    -1
      pages/customerChooseTemplate/customerChooseTemplate.wxss
  4. +1
    -1
      pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml
  5. +33
    -0
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.js
  6. +24
    -2
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxml
  7. +8
    -0
      pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxss

+ 51
- 0
pages/customerChooseTemplate/customerChooseTemplate.js View File

@ -80,6 +80,57 @@ Page({
}, },
// 点击了收藏按钮
storegeBtnClick: function () {
var that = this;
// 获取收藏的存货信息
var oldCollectionArr = this.data.collectionArray;
var waitStorageArr = this.data.checkBoxArray;
var goodsNameArrayAll = this.data.goodsArray;
if (waitStorageArr.length <= 0) {
wx.showToast({
title: '请选择存货',
})
return;
} else {
// 对比所选存货是否已经存在于收藏中 有:不重复添加 返回未添加过的数组
for (var i = 0; i < waitStorageArr.length; i++) {
for (var j = 0; j < oldCollectionArr.length; j++) {
if (Number(waitStorageArr[i]) == Number(oldCollectionArr[j].SaleGoods_ID)) {
waitStorageArr.splice(i, 1);
}
}
}
// 对比原有数组和选中的数组 存在,将数组包含的其他值也取出加载
let choseCheck = [];
for (var i = 0; i < that.data.goodsArray.length; i++) {
for (var j = 0; j < waitStorageArr.length; j++) {
if (Number(goodsNameArrayAll[i].SaleGoods_ID) == waitStorageArr[j]) {
choseCheck.push(goodsNameArrayAll[i])
}
}
}
oldCollectionArr = oldCollectionArr.concat(choseCheck);
that.setData({
collectionArray: oldCollectionArr,
currentTab: 1,
});
wx.setStorage({
key: "storageGoodsKey",
data: oldCollectionArr,
success: function () {
wx.showToast({
title: '收藏成功',
});
},
})
}
},
/** /**
* 滑动切换tab * 滑动切换tab
*/ */


+ 8
- 1
pages/customerChooseTemplate/customerChooseTemplate.wxml View File

@ -1,8 +1,15 @@
<!--pages/customerChooseTemplate/customerChooseTemplate.wxml--> <!--pages/customerChooseTemplate/customerChooseTemplate.wxml-->
<swiper current="{{currentTab}}" class="swiper-box" style='height:{{winHeight}}px' duration="300" bindchange="bindChange">
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">全部</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">收藏夹</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" style='height:{{winHeight-50}}px' duration="300" bindchange="bindChange">
<swiper-item class="swiper-items1"> <swiper-item class="swiper-items1">
<view class='searchView'> <view class='searchView'>
<input class='imput_goodsName' bindinput='getCustomerBySearchString' type='text' placeholder='请输入搜索条件' placeholder-style='color:rgb(202, 202, 202)'></input> <input class='imput_goodsName' bindinput='getCustomerBySearchString' type='text' placeholder='请输入搜索条件' placeholder-style='color:rgb(202, 202, 202)'></input>
<view class='storageView' catchtap='storegeBtnClick'>收藏</view>
</view> </view>
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="unCheckedScrollUpper" bindscrolltolower="unCheckedScrollLower"> <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="unCheckedScrollUpper" bindscrolltolower="unCheckedScrollLower">
<view class='listBackGroundView'> <view class='listBackGroundView'>


+ 1
- 1
pages/customerChooseTemplate/customerChooseTemplate.wxss View File

@ -35,7 +35,6 @@ page{
margin-top: 3px; margin-top: 3px;
display: block; display: block;
width: 100%; width: 100%;
height: 100%;
overflow: hidden; overflow: hidden;
} }
@ -75,6 +74,7 @@ page{
} }
.scroll-views { .scroll-views {
position: absolute;
margin-top: 25rpx; margin-top: 25rpx;
height: calc(100% - 97px); height: calc(100% - 97px);
width: 100%; width: 100%;


+ 1
- 1
pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml View File

@ -5,7 +5,7 @@
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">收藏夹</view> <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">收藏夹</view>
</view> </view>
<swiper current="{{currentTab}}" class="swiper-box" style='height:{{winHeight - 50}}px' duration="300" bindchange="bindChange">
<swiper current="{{currentTab}}" class="swiper-box" style='height:{{winHeight-50}}px' duration="300" bindchange="bindChange">
<!-- 全部 --> <!-- 全部 -->
<swiper-item class="swiper-items1"> <swiper-item class="swiper-items1">
<view class='searchView'> <view class='searchView'>


+ 33
- 0
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.js View File

@ -166,6 +166,39 @@ Page({
} }
}, },
// 存货明细页面更多按钮
moreBtnClick:function(e){
var that = this;
var itemList = [
"审核",
"撤销"
];
wx.showActionSheet({
itemList: itemList,
itemColor: "#2689f8",
success: function (res) {
// res.cancel 用户是不是点击了取消按钮
// res.tapIndex 数组元素的序号,从0开始
that.moreBtnClickedDetailInfo(itemList[res.tapIndex]);
}
})
},
// 更多 -> 撤销 -> 审核
moreBtnClickedDetailInfo:function (item){
if (item == "审核"){
wx.showModal({
title: "提示",
content: "++++" + item + "++++",
})
} else {
wx.showModal({
title: "提示",
content: "++++" + item + "++++",
})
}
},
/** /**
* 滑动切换tab * 滑动切换tab
*/ */


+ 24
- 2
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxml View File

@ -118,13 +118,35 @@
</image> </image>
</view> </view>
<view class='imageViewNoMargin' catchtap='submitOrder'>
<view class='bottomGroupView'>
<view class='imageViewNoMargin' catchtap='moreBtnClick'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>更多</text>
</view>
</image>
</view>
<view class='imageViewNoMargin' catchtap='submitOrder'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>保存</text>
</view>
</image>
</view>
</view>
<!-- <view class='imageViewNoMargin' catchtap='submitOrder'>
<image class='currentImage' src="/imgs/longBlueBtn.png"> <image class='currentImage' src="/imgs/longBlueBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
<text class='btnText'>保存</text> <text class='btnText'>保存</text>
</view> </view>
</image> </image>
</view>
</view> -->
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>


+ 8
- 0
pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder.wxss View File

@ -226,6 +226,14 @@ page {
height: 100%; height: 100%;
} }
.bottomGroupView{
margin-top: -10rpx;
width: 100%;
height: 80px;
display: flex;
flex-direction: row;
}
.btnTextView { .btnTextView {
position: absolute; position: absolute;
width: 100%; width: 100%;


Loading…
Cancel
Save