diff --git a/app.js b/app.js index b0427db..1e4fa17 100644 --- a/app.js +++ b/app.js @@ -11,6 +11,7 @@ App({ }, globalData: { + goodsNameArray:[], winHeight: 0, winWidth: 0, phoneNum: "", diff --git a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js index aa9c9fa..91fd30a 100644 --- a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js +++ b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js @@ -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(); }, diff --git a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml index 1881308..2315653 100644 --- a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml +++ b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml @@ -13,11 +13,14 @@ 收藏 - - -