From c348f3687d6936ecb556928a16c5a1909c62c181 Mon Sep 17 00:00:00 2001 From: chenxuhui Date: Thu, 22 Nov 2018 13:55:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=E8=8E=B7=E5=BE=97=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=AB=98=E5=BA=A6=E6=96=B9=E6=B3=95=EF=BC=8C=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=9C=A8=E5=BA=94=E7=94=A8=E5=8A=A0=E8=BD=BD=E5=A4=84?= =?UTF-8?q?=E5=8F=96=E5=80=BC=EF=BC=8C=E5=8A=A0=E8=BD=BD=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 12 +++- .../goodaNameChooseTemplate.js | 67 ++++++++++++------- .../goodaNameChooseTemplate.wxml | 41 ++++-------- .../goodaNameChooseTemplate.wxss | 25 ++++++- pages/guarantee/detail/detail.js | 11 +-- pages/guarantee/guarantee.js | 16 +---- pages/guarantee/newbill/newbill.js | 12 +--- pages/guarantee/selectbill/selectbill.js | 14 +--- pages/order/detail/detail.js | 16 +---- pages/order/newBill/newBill.js | 15 +---- pages/order/order.js | 11 +-- pages/saleForecastList/Detail/Detail.js | 16 +---- pages/saleForecastList/newBill/newBill.js | 16 +---- pages/saleForecastList/saleForecastList.js | 11 +-- 14 files changed, 100 insertions(+), 183 deletions(-) diff --git a/app.js b/app.js index 9e7258d..b0427db 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,18 @@ //app.js App({ - onLaunch: function() { - + onShow: function() { + var that = this; + wx.getSystemInfo({ + success: function (res) { + that.globalData.winWidth = res.windowWidth; + that.globalData.winHeight = res.windowHeight; + } + }); }, globalData: { + winHeight: 0, + winWidth: 0, phoneNum: "", openID: "", appName: "WeChat", diff --git a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js index 5c71778..aa9c9fa 100644 --- a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js +++ b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js @@ -1,19 +1,40 @@ // pages/goodaNameChooseTemplate/goodaNameChooseTemplate.js +var app = getApp() +var network = require("../../utils/net.js") +var dateTimePicker = require('../../utils/dateTimePicker.js'); +var utilll = require('../../utils/util.js'); + +var getAccountingUnit = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetAccountingUnit"; +var getCustomer = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomer"; + Page({ - /** - * 页面的初始数据 - */ data: { + winHeight: app.globalData.winHeight, currentTab: 0, - winHeight: 0, - winWidth: 0, - unCheckDataArr:[1,2,3,4,5,6,7,8,9,1], + customerCollectionArray:[], + customerArray:[], + unCheckDataArr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 1], + }, + + GetCustomer: function(inputValue) { + var that =this; + let method = getCustomer; + let params = [{ + "InputValue": inputValue, + "PageIndex": 0, + "PageSize": 100 + }]; + network.transfer_request(method, params, function(res) { + that.setData({ + customerArray: res.result + }) + }) }, /** - * 滑动切换tab - */ - bindChange: function (e) { + * 滑动切换tab + */ + bindChange: function(e) { var that = this; that.setData({ currentTab: e.detail.current @@ -23,7 +44,7 @@ Page({ /** * 点击tab切换 */ - swichNav: function (e) { + swichNav: function(e) { var that = this; if (this.data.currentTab === e.target.dataset.current) { return false; @@ -36,64 +57,58 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: function(options) { var that = this; - wx.getSystemInfo({ - success: function (res) { - that.setData({ - winWidth: res.windowWidth, - winHeight: res.windowHeight - }); - } - }); + this.GetCustomer(); + }, /** * 生命周期函数--监听页面初次渲染完成 */ - onReady: function () { + onReady: function() { }, /** * 生命周期函数--监听页面显示 */ - onShow: function () { + onShow: function() { }, /** * 生命周期函数--监听页面隐藏 */ - onHide: function () { + onHide: function() { }, /** * 生命周期函数--监听页面卸载 */ - onUnload: function () { + onUnload: function() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ - onPullDownRefresh: function () { + onPullDownRefresh: function() { }, /** * 页面上拉触底事件的处理函数 */ - onReachBottom: function () { + onReachBottom: function() { }, /** * 用户点击右上角分享 */ - onShareAppMessage: function () { + onShareAppMessage: function() { } }) \ No newline at end of file diff --git a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml index eea9bc2..1881308 100644 --- a/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml +++ b/pages/goodaNameChooseTemplate/goodaNameChooseTemplate.wxml @@ -13,9 +13,11 @@ 收藏 - -