Browse Source

出货品类

featrue/v4.2
huziyuan 5 years ago
parent
commit
33f024e224
7 changed files with 256 additions and 1 deletions
  1. 1
      app.json
  2. 5
      pages/home/info/index.js
  3. 2
      pages/home/info/index.wxml
  4. 143
      pages/home/tab5/index.js
  5. 7
      pages/home/tab5/index.json
  6. 35
      pages/home/tab5/index.wxml
  7. 64
      pages/home/tab5/index.wxss

1
app.json

@ -17,6 +17,7 @@
"pages/home/tab2/index",
"pages/home/tab3/index",
"pages/home/tab4/index",
"pages/home/tab5/index",
"pages/home/attentionPaperList/index",
"pages/home/businessLicense/index",
"pages/shop/create/index",

5
pages/home/info/index.js

@ -395,6 +395,11 @@ Page({
url: '/pages/home/tab4/index'
})
},
toTab5: function () {
wx.navigateTo({
url: '/pages/home/tab5/index'
})
},
toTab3: function () {
wx.navigateTo({
url: '/pages/home/tab3/index'

2
pages/home/info/index.wxml

@ -75,7 +75,7 @@
<view slot="header" class="text-gray">希望采购品类</view>
<view slot="footer" class="{{userInfo.numberOfPurchaseCategoriesTag? 'text-black':'text-gray'}}">{{userInfo.numberOfPurchaseCategoriesTag || '点击修改希望采购品类'}}</view>
</wux-cell>
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bind:click="showDialog">
<wux-cell wx:if="{{userType == 1}}" is-link data-cid='type2' data-tag='希望出货品类' bindtap="toTab5">
<view slot="header" class="text-gray">希望出货品类</view>
<view slot="footer" class="{{userInfo.numberOfProxyCategoriesTag? 'text-black':'text-gray'}}">{{userInfo.numberOfProxyCategoriesTag || '点击修改希望出货品类'}}</view>
</wux-cell>

143
pages/home/tab5/index.js

@ -0,0 +1,143 @@
// pages/home/tab5/index.js
import {
getLategoriesList,
updateUserInfo
} from '../../api/ztb'
const storage = require('../../../utils/storage')
Page({
/**
* 页面的初始数据
*/
data: {
loopRequesting:false,
form: {
proxyCategoriesTag: []
},
categoryListone: [{
name: '黑卡',
id: '1',
array: [{
name: '黄纸边',
sid: '1'
}, {
name: '坑卡A',
sid: '2'
}]
}, {
name: '白费',
id: '2',
array: [{
name: '坑卡B',
sid: '3'
}, {
name: '黄皮纸',
sid: '4'
}]
}, {
name: '特种纸',
id: '3',
array: [{
name: '坑卡B',
sid: '3'
}, {
name: '黄皮纸',
sid: '4'
}]
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getLategoriesListFct()
},
toMyInfo: function () {
wx.redirectTo({
url: '/pages/index/index'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
backspace: function () {
// console.log('点击返回被触发4')
wx.redirectTo({
url: '/pages/home/tab3/index'
})
},
getLategoriesListFct: function () {
getLategoriesList({categoryType:1}).then(res => {
this.setData({
categoryListone:res.data
})
})
},
checkboxChange: function (e) {
console.log(e)
this.setData({
'form.proxyCategoriesTag':e.detail.value
})
},
bindtap: function (e) {
console.log(e)
},
submitForm:function(){
updateUserInfo(this.data.form).then(result => {
this.data.loopRequesting = false
setTimeout(() => this.toMyInfo(), 1000)
}).catch(err => {
this.data.loopRequesting = false
})
}
})

7
pages/home/tab5/index.json

@ -0,0 +1,7 @@
{
"usingComponents": {
"wux-cascader": "/components/cascader/index",
"wux-accordion-group": "/components/accordion-group/index",
"wux-accordion": "/components/accordion/index"
}
}

35
pages/home/tab5/index.wxml

@ -0,0 +1,35 @@
<!--pages/home/tab5/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">采购品类</view>
</cu-custom>
<view class="bj">
<view style="width:100%;height:130rpx;padding-top:10rpx;padding-right:10rpx">
<button class="cu-btn bg-red round shadow-blur vip-btn" bindtap="toMyInfo">跳出</button>
</view>
<view class="top">
<view class="topText">
<text>HI,\n欢迎使用纸通宝\n开启一站式废纸交易</text>
</view>
<view style="width:310rpx;height:258rpx;float:right">
<image src="/assets/image/tabBj.png" style="width:310rpx;height:258rpx"></image>
</view>
</view>
<view class="mid">
<text>你希望卖品类是?</text>
</view>
<view class="bottom">
<view>
<wux-accordion-group title="">
<checkbox-group bindchange="checkboxChange">
<wux-accordion wx:for="{{ categoryListone }}" wx:key="index" title="{{index+1+'、'+item.categoryName}}">
<checkbox style="width:100%;margin-top:15rpx" wx:for="{{ item.childCategoryDtoList }}" wx:for-item="cell" wx:key="index" value="{{cell.categoryId}}" checked="{{cell.isSelected}}">{{cell.categoryName}}</checkbox>
</wux-accordion>
</checkbox-group>
</wux-accordion-group>
</view>
</view>
<view style="width:100%;height:130rpx;padding-top:10rpx;padding-right:10rpx">
<button class="cu-btn offer-btn" disabled="{{loopRequesting}}" bindtap="submitForm">确认</button>
</view>
</view>

64
pages/home/tab5/index.wxss

@ -0,0 +1,64 @@
/* pages/home/tab1/index.wxss */
page{
background-color: white;
}
.bj {
background-color: white;
min-height: 900rpx;
}
.vip-btn {
/* height: 90rpx; */
width: 180rpx;
background: #F5F5F5;
float: right;
color: rgba(0, 0, 0, 0.45);
font-size: 28rpx;
}
.top {
height: 258rpx;
width: 100%;
}
.topText {
width: 440rpx;
height: 258rpx;
float: left;
padding-left: 48rpx;
padding-top: 60rpx;
font-size: 44rpx;
color: #000000;
font-family: PingFangSC-Medium;
}
.mid {
height: 150rpx;
padding-top: 100rpx;
padding-left: 48rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #000000;
letter-spacing: 2px;
}
.bottom {
height: 410rpx;
padding: 48rpx;
}
.bg-blue{
color: #FFFFFF;
background-color: #008AFF;
}
.offer-btn {
width: 90%;
height: 90rpx;
background: linear-gradient(312deg, rgba(38, 125, 214, 1) 0%, rgba(0, 138, 255, 1) 100%);
box-shadow: 0px 10px 13px -8px rgba(35, 126, 217, 0.53);
border-radius: 23px;
color: white;
font-size: 32rpx;
margin-left: 32rpx;
}
Loading…
Cancel
Save