Browse Source

存货页面checkBox事件

master
chenxuhui 7 years ago
parent
commit
a9c98cbe14
4 changed files with 30 additions and 18 deletions
  1. +1
    -0
      app.js
  2. +15
    -2
      pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js
  3. +12
    -9
      pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml
  4. +2
    -7
      pages/saleForecastList/newBill/newBill.wxml

+ 1
- 0
app.js View File

@ -11,6 +11,7 @@ App({
},
globalData: {
goodsNameArray:[],
winHeight: 0,
winWidth: 0,
phoneNum: "",


+ 15
- 2
pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js View File

@ -14,7 +14,7 @@ Page({
currentTab: 0,
customerCollectionArray:[],
customerArray:[],
unCheckDataArr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],
checkBoxArray:[],
},
GetCustomer: function(inputValue) {
@ -31,6 +31,19 @@ Page({
})
})
},
// 多选框数值变化
checkboxValueChange: function (e) {
this.setData({
checkBoxArray: e.detail.value,
})
},
// 点击添加存货明细按钮 存数据进入global
addGoodsName:function(){
app.globalData.goodsNameArray = this.data.checkBoxArray;
console.log("存货明细数组 == " + app.globalData.goodsNameArray);
},
/**
* 滑动切换tab
*/
@ -58,7 +71,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
this.GetCustomer();
},


+ 12
- 9
pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml View File

@ -13,11 +13,14 @@
<view class='storageView'>收藏</view>
</view>
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="unCheckedScrollUpper" bindscrolltolower="unCheckedScrollLower">
<view class='listBackGroundView'>
<block wx:for="{{customerArray}}" wx:key="item" wx:for-index="idx">
<template is="customerChoiceTemplate" data="{{item}}" />
</block>
<view class='listBackGroundView'>
<checkbox-group bindchange="checkboxValueChange">
<block wx:for="{{customerArray}}" wx:key="item" wx:for-index="idx">
<template is="customerChoiceTemplate" data="{{item}}" />
</block>
</checkbox-group>
</view>
</scroll-view>
<view class='addGoodsName' catchtap='addGoodsName'>添加存货明细</view>
@ -25,8 +28,8 @@
<!-- 收藏夹 -->
<swiper-item class="swiper-items2">
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="checkedScrollUpper" bindscrolltolower="CheckedScrollLower">
<checkbox-group bindchange="checkboxChange">
<block wx:for="{{checkedDataArr}}" wx:for-item="item">
<checkbox-group bindchange="checkboxValueChange">
<block wx:for="{{customerArray}}" wx:key="item" wx:for-index="idx">
<template is="customerChoiceTemplate" data="{{item}}" />
</block>
</checkbox-group>
@ -36,9 +39,9 @@
<template name="customerChoiceTemplate">
<view class='listItem' catchtap='transToOrderDetail' data-detailitemid='{{item.orderID}}' data-detailitemstate='{{item.orderState}}'>
<view class='itemClass'>你大吉大利看见噶说;{{item.name}}</view>
<checkbox value="{{item.ID}}" checked="{{item.checked}}" />
<view class='listItem'>
<view class='itemClass'>{{item.Name}}</view>
<checkbox value="{{item.ID}}"/>
</view>
<view class='horizontallineView'></view>
</template>

+ 2
- 7
pages/saleForecastList/newBill/newBill.wxml View File

@ -26,9 +26,7 @@
<view class='baseitem'>
<text class='baseitem_key'>会计单位</text>
<!-- <picker class='baseitem_value' mode='selector' bindchange='choseUnit' value='{{isUnit}}' range-key="Name" range='{{unit}}'>
<text>{{unit[isUnit].Name}}</text>
</picker> -->
<view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='会计部门' data-item='{{which}}'>
{{unit[isUnit].Name}}
</view>
@ -65,10 +63,7 @@
<input class='baseitem_value' bindinput='getAddrs' placeholder='请输入送货地址' placeholder-style='color:rgb(202, 202, 202)'></input>
</view>
<!-- <view class='baseitem'>
<text class='baseitem_key' space="emsp">摘 要</text>
<input class='baseitem_value' bindinput='getRemark' placeholder='请输入摘要' placeholder-style='color:rgb(202, 202, 202)'></input>
</view> -->
<button class='submit' catchtap='submitForm'>提交</button>
</scroll-view>
<view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view>


Loading…
Cancel
Save