| @ -0,0 +1 @@ | |||||
| qqq | |||||
| @ -0,0 +1,18 @@ | |||||
| App({ | |||||
| onLaunch: function () { | |||||
| }, | |||||
| globalData: { | |||||
| Phone: "", | |||||
| OpenId: "", | |||||
| AppName: "WeChat", | |||||
| AppId: "wx0b897783b2588147", | |||||
| BaseUrl: "https://miniprogram.food988.com/Rest.aspx", | |||||
| TranferBaseUrl:"https://miniprogram.food988.com/RequestTransfer.aspx", | |||||
| CustomerId:"", | |||||
| // 原测试路径 | |||||
| // BaseUrl: "https://weixintest.food988.com/Rest.aspx" | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1,51 @@ | |||||
| { | |||||
| "pages": [ | |||||
| "pages/homePage/homePage", | |||||
| "pages/login/login", | |||||
| "pages/sendCargo/sendCargo", | |||||
| "pages/orderDetails/orderDetails", | |||||
| "pages/orderInquiry/orderInquiry", | |||||
| "pages/statementOfAccount/statementOfAccount", | |||||
| "pages/sendTheDetails/sendTheDetails", | |||||
| "pages/my/my", | |||||
| "pages/fenxiang/fenxiang", | |||||
| "pages/saleOutStore/saleOutStore", | |||||
| "pages/saleOutStore/outStoreDetail/outStoreDetail", | |||||
| "pages/first/first" | |||||
| ], | |||||
| "window": { | |||||
| "backgroundTextStyle": "light", | |||||
| "navigationBarTitleText": "畜客户易", | |||||
| "navigationBarBackgroundColor": "#f98b29", | |||||
| "navigationBarTextStyle": "#FFFFFF", | |||||
| "disableScroll": true | |||||
| }, | |||||
| "tabBar": { | |||||
| "selectedColor": "#f98b29", | |||||
| "color": "#999999", | |||||
| "list": [ | |||||
| { | |||||
| "pagePath": "pages/homePage/homePage", | |||||
| "text": "主页", | |||||
| "iconPath": "/imgs/xiaoxi1.png", | |||||
| "selectedIconPath": "/imgs/xiaoxi.png" | |||||
| }, | |||||
| { | |||||
| "pagePath": "pages/homePage/homePage", | |||||
| "text": "主页", | |||||
| "iconPath": "/imgs/message1.png", | |||||
| "selectedIconPath": "/imgs/message.png" | |||||
| }, | |||||
| { | |||||
| "pagePath": "pages/my/my", | |||||
| "text": "我的", | |||||
| "iconPath": "/imgs/wode1.png", | |||||
| "selectedIconPath": "/imgs/wode.png" | |||||
| } | |||||
| ] | |||||
| }, | |||||
| "navigateToMiniProgramAppIdList": [ | |||||
| "wx0b897783b2588147" | |||||
| ] | |||||
| } | |||||
| @ -0,0 +1,10 @@ | |||||
| /**app.wxss**/ | |||||
| .container { | |||||
| height: 100%; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| align-items: center; | |||||
| justify-content: space-between; | |||||
| padding: 200rpx 0; | |||||
| box-sizing: border-box; | |||||
| } | |||||
| @ -0,0 +1,59 @@ | |||||
| # 客户易小程序接口文档 | |||||
| ### 接口地址改成 https://******/Rest.aspx?appid=appid&phone=绑定的手机号 ### | |||||
| > ## 1.绑定手机号 | |||||
| > > <font size=4 color=#FF0000>/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/AccountRpc/QinBindByPhone</font> | |||||
| > > > <font size=4 color=#FF0000>参数:</font> | |||||
| > > >| 字段 | 说明 | 类型 | 是否必填 | | |||||
| > > >|---------------|------|---|---| | |||||
| > > >| OpenId | OpenId | str | 是 | | |||||
| > > >| Phone | 手机号 | str | 是 | | |||||
| > > >| NickName | 昵称 | str | 否 | | |||||
| > > >| Sex | 性别 | str | 否 | | |||||
| > > >| Province | 省 | str | 否 | | |||||
| > > >| City | 城市 | str | 否 | | |||||
| > > >| Country | 国家 | str | 否 | | |||||
| > > >| HeadImgUrl | 头像 | str | 否 | | |||||
| > > >| UnionId | UnionId | str | 否 | | |||||
| > > > <font size=4 color=#FF0000>返回值:</font> | |||||
| > > >| 字段 | 说明 |类型 | | |||||
| > > >|---------------|------|---| | |||||
| > > >| Customer_ID | 客户ID | long | | |||||
| > > >| Customer_Name | 客户名称 | str | | |||||
| ------ | |||||
| > ## 2.订货查询 | |||||
| > > <font size=4 color=#FF0000>/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStore</font> | |||||
| > > > <font size=4 color=#FF0000>参数:</font> | |||||
| > > >| 字段 | 说明 | 类型 | 是否必填 | | |||||
| > > >|---------------|------|---|---| | |||||
| > > >| 参数1 | 0:未发货 20:已发货 | int | 是 | | |||||
| > > >| 参数2 | pageindex:当前页数,从0开始 | int | 是 | | |||||
| > > >| 参数3 | pagesize:每页显示的条数 | int | 是 | | |||||
| > > > <font size=4 color=#FF0000>返回值:</font> | |||||
| > > >| 字段 | 说明 |类型 | | |||||
| > > >|---------------|------|---| | |||||
| > > >| ID | 出库单号 | long | | |||||
| > > >| LoadTime | 发货时间 | datetime | | |||||
| > > >| Money | 金额 | decimal | | |||||
| > > >| Customer_Name | 客户名称 | str | | |||||
| ------ | |||||
| > ## 3.订货明细查询 | |||||
| > > <font size=4 color=#FF0000>/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStoreDetail</font> | |||||
| > > > <font size=4 color=#FF0000>参数:</font> | |||||
| > > >| 字段 | 说明 | 类型 | 是否必填 | | |||||
| > > >|---------------|------|---|---| | |||||
| > > >| 参数1 | 出库单号:接口2.订货查询 获得到的ID | long | 是 | | |||||
| > > > <font size=4 color=#FF0000>返回值:</font> | |||||
| > > >| 字段 | 说明 |类型 | | |||||
| > > >|---------------|------|---| | |||||
| > > >| Goods_Name | 存货名称 | str | | |||||
| > > >| Number | 数量 | decimal | | |||||
| > > >| Price | 单价 | decimal | | |||||
| > > >| Money | 金额 | decimal | | |||||
| ------ | |||||
| @ -0,0 +1,29 @@ | |||||
| // pages/fenxiang/fenxiang.js | |||||
| var ID; | |||||
| Page({ | |||||
| data: { | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| var that = this; | |||||
| ID = parseInt(options.ID); | |||||
| console.log("分享的ID???=="+ID) | |||||
| }, | |||||
| sijiyi: function (e) { | |||||
| var that = this | |||||
| var ID6 = ID; | |||||
| wx.navigateToMiniProgram({ | |||||
| appId:'wxa437748f46540519', | |||||
| // path:"pages/sendTheDetails/sendTheDetails?ID=" + ID, | |||||
| path: "", | |||||
| extraData:{ | |||||
| orderID : ID, | |||||
| }, | |||||
| }) | |||||
| console.log(ID5) | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1 @@ | |||||
| {} | |||||
| @ -0,0 +1 @@ | |||||
| <button catchtap='sijiyi'>点击跳到司机易</button> | |||||
| @ -0,0 +1 @@ | |||||
| /* pages/fenxiang/fenxiang.wxss */ | |||||
| @ -0,0 +1,26 @@ | |||||
| // pages/first/first.js | |||||
| const app = getApp(); | |||||
| var network = require("../../utils/net.js"); | |||||
| var openid; | |||||
| Page({ | |||||
| data: { | |||||
| url:"", | |||||
| }, | |||||
| onLoad: function(options) { | |||||
| // var code = options.code; | |||||
| var that = this; | |||||
| wx.login({ | |||||
| success: function (res) { | |||||
| var code = res.code; | |||||
| var itemUrl = "https://miniprogram.food988.com/WeixinBindPhonePage.aspx?code=" + code + "&state=bindphone"; | |||||
| that.setData({ | |||||
| url: itemUrl, | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "公众号绑定" | |||||
| } | |||||
| @ -0,0 +1,4 @@ | |||||
| <!--pages/first/first.wxml--> | |||||
| <!-- <button class='testOne' catchtap='firstBtnClicked'>测试按钮1</button> | |||||
| <button class='testTwo' catchtap='secondBtnClicked'>测试按钮2</button> --> | |||||
| <web-view src="{{url}}"></web-view> | |||||
| @ -0,0 +1,19 @@ | |||||
| /* pages/first/first.wxss */ | |||||
| .testOne{ | |||||
| color: #FFFFFF; | |||||
| background: #2E8CF5; | |||||
| margin-top: 20%; | |||||
| margin-left: 5%; | |||||
| width: 30%; | |||||
| float: left; | |||||
| } | |||||
| .testTwo{ | |||||
| color: #FFFFFF; | |||||
| background: #2E8CF5; | |||||
| margin-top: 20%; | |||||
| margin-right: 5%; | |||||
| width: 30%; | |||||
| float: right; | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| // pages/homePage/homePage.js | |||||
| var network = require("../../utils/net.js") | |||||
| function GetUserProfile(successtion) { | |||||
| let method = '/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetUserProfile'; | |||||
| let params = []; | |||||
| network.transfer_request(method, params, function (res) { | |||||
| successtion(); | |||||
| if (res.result.AccountingUnit_ID != null) { | |||||
| app.globalData.accountingUnit_ID = res.result.AccountingUnit_ID; | |||||
| app.globalData.accountingUnit_Name = res.result.AccountingUnit_Name | |||||
| } | |||||
| if (res.result.Department_ID != null) { | |||||
| app.globalData.department_ID = res.result.Department_ID; | |||||
| app.globalData.department_Name = res.result.Department_Name | |||||
| } | |||||
| }) | |||||
| } | |||||
| Page({ | |||||
| data: { | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| // GetUserProfile(function (res) { | |||||
| // }); | |||||
| }, | |||||
| /** | |||||
| * 点击页面按钮进行跳转 | |||||
| */ | |||||
| transBtnClicked: function (event) { | |||||
| var btnID = event.currentTarget.dataset.itemid; | |||||
| var transferURL = ''; | |||||
| switch (btnID) { | |||||
| // 找司机 | |||||
| case "1": | |||||
| transferURL = '/pages/sendCargo/sendCargo'; | |||||
| break; | |||||
| // 对账单 | |||||
| case "2": | |||||
| transferURL = '/pages/statementOfAccount/statementOfAccount'; | |||||
| break; | |||||
| // 订单 | |||||
| case "3": | |||||
| transferURL = '/pages/orderInquiry/orderInquiry'; | |||||
| break; | |||||
| // 销售出库 | |||||
| case "4": | |||||
| transferURL = '/pages/saleOutStore/saleOutStore'; | |||||
| break; | |||||
| // 担保单 | |||||
| case "5": | |||||
| transferURL = '/pages/guarantee/guarantee'; | |||||
| break; | |||||
| } | |||||
| wx.navigateTo({ | |||||
| url: transferURL, | |||||
| }) | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "客户易" | |||||
| } | |||||
| @ -0,0 +1,24 @@ | |||||
| <!--pages/homePage/homePage.wxml--> | |||||
| <view class='imageContainer'> | |||||
| <image class='beijingtu' src='/imgs/beijingtu.png'></image> | |||||
| </view> | |||||
| <view class="body-box"> | |||||
| <view class="ico" catchtap='transBtnClicked' data-itemid='1'> | |||||
| <image src="/imgs/findDriver.png"></image> | |||||
| <text class='text'>找司机</text> | |||||
| </view> | |||||
| <view class="ico" catchtap='transBtnClicked' data-itemid='2'> | |||||
| <image src="/imgs/statementOfAccount.png"></image> | |||||
| <text class='text'>对账单</text> | |||||
| </view> | |||||
| <view class="ico" catchtap='transBtnClicked' data-itemid='3'> | |||||
| <image src="/imgs/orderList.png"></image> | |||||
| <text class='text'>订单</text> | |||||
| </view> | |||||
| <view class="ico" catchtap='transBtnClicked' data-itemid='4'> | |||||
| <image src="/imgs/saleOutStore.png"></image> | |||||
| <text class='text'>销售出库</text> | |||||
| </view> | |||||
| </view> | |||||
| @ -0,0 +1,51 @@ | |||||
| /* pages/homePage/homePage.wxss */ | |||||
| page{ | |||||
| background:#EAF1F8; | |||||
| height: 100%; | |||||
| } | |||||
| .imageContainer{ | |||||
| width: 100%; | |||||
| height: 280rpx; | |||||
| background-color: #2E8CF5; | |||||
| } | |||||
| .beijingtu{ | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .body-box{ | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-wrap: wrap; | |||||
| background: white; | |||||
| background: #FEFFFF; | |||||
| overflow: hidden; | |||||
| margin-top: 1rpx; | |||||
| } | |||||
| .ico{ | |||||
| height: 190rpx; | |||||
| width:25%; | |||||
| text-align: center; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| padding-top: 15rpx; | |||||
| } | |||||
| .ico image{ | |||||
| display: block; | |||||
| width: 50%; | |||||
| height: 50%; | |||||
| margin-left: 25%; | |||||
| margin-top: 15rpx; | |||||
| } | |||||
| .text{ | |||||
| color: #353535; | |||||
| margin-top: 10rpx; | |||||
| font-size: 28rpx; | |||||
| } | |||||
| @ -0,0 +1,266 @@ | |||||
| const app = getApp(); | |||||
| //引用封装好的加密解密js | |||||
| // var Dec = require('../../utils/publicAES.js'); | |||||
| // console.log(Dec.Encrypt("需要加密的字符串")); | |||||
| // console.log(Dec.Decrypt("需要解密的字符串")); | |||||
| var network = require("../../utils/net.js"); | |||||
| var that = this; | |||||
| var openid; | |||||
| var Phone; | |||||
| var nickName; | |||||
| var gender; | |||||
| var province; | |||||
| var city; | |||||
| var country; | |||||
| var avatarUrl; | |||||
| var UnionId; | |||||
| var code; | |||||
| //获取openID 参数1、app.globalData.AppId 2、code | |||||
| function getOpenId(successaction) { | |||||
| wx.login({ | |||||
| success: function(res) { | |||||
| code = res.code; | |||||
| var method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetMiniOpenIdByCode'; | |||||
| var params = [app.globalData.AppId, code]; | |||||
| network.previousRequestLoading(method, params, function(res) { | |||||
| app.globalData.OpenId = res.result; | |||||
| successaction(app.globalData.OpenId) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| //获取绑定的客户ID 参数1:appid, 参数2:openid 返回用户电话 客户ID 客户Name | |||||
| function IsBind(openid, successaction) { | |||||
| var method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer'; | |||||
| var params = [app.globalData.AppId, openid]; | |||||
| network.previousRequestLoading(method, params, function(res) { | |||||
| app.globalData.CustomerId = res.result.ID; | |||||
| successaction(res.result.WeixinUser_Phone) | |||||
| }) | |||||
| } | |||||
| //绑定公众号 参数用户电话 返回true已关注 false未关注 | |||||
| function IsBindWeixinMP(phone) { | |||||
| let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/IsBindWeixinMP'; | |||||
| let params = [phone]; | |||||
| network.previousRequestLoading(method, params, function(res) { | |||||
| //添加假数据。方便登录测试,提交版本需更正注释 | |||||
| // res.result = false; | |||||
| if (res.result == true) { | |||||
| wx.switchTab({ | |||||
| url: '/pages/information/information', | |||||
| }) | |||||
| } else { | |||||
| wx.showModal({ | |||||
| title: '提示', | |||||
| content: '请关注公众号', | |||||
| showCancel: false, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| Page({ | |||||
| data: { | |||||
| //用户信息 | |||||
| userInfo: "", | |||||
| //新增选择客户 | |||||
| array: [{ | |||||
| ID: 0, | |||||
| Name: "请选择所属客户" | |||||
| }], | |||||
| index: 0, | |||||
| //根据customerID值判断是否隐藏选择框(默认显示) | |||||
| showCustomerChoise: true, | |||||
| }, | |||||
| // 客户列表变更选项信息 | |||||
| listenerPickerSelected: function(e) { | |||||
| this.setData({ | |||||
| index: e.detail.value, | |||||
| }); | |||||
| }, | |||||
| // 电话输入框 | |||||
| phoneNum: function(e) { | |||||
| Phone = e.detail.value | |||||
| app.globalData.Phone = Phone | |||||
| }, | |||||
| // 获取所有客户列表 | |||||
| choiceCustomer: function() { | |||||
| var that = this; | |||||
| var method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CustomerRpc/GetList'; | |||||
| var params = []; | |||||
| network.previousRequestLoading(method, params, function(res) { | |||||
| if (res.result.length > 0) { | |||||
| var lastArr = that.data.array.concat(res.result) | |||||
| that.setData({ | |||||
| array: lastArr, | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| // 用户绑定按钮操作 | |||||
| getUserInfo: function(e) { | |||||
| var that = this; | |||||
| if (e.detail.userInfo != null) { | |||||
| app.globalData.userInfo = e.detail.userInfo; | |||||
| nickName = app.globalData.userInfo.nickName; | |||||
| gender = app.globalData.userInfo.gender; | |||||
| province = app.globalData.userInfo.province; | |||||
| city = app.globalData.userInfo.city; | |||||
| country = app.globalData.userInfo.country; | |||||
| avatarUrl = app.globalData.userInfo.avatarUrl; | |||||
| //判断用户是否获取绑定信息 | |||||
| if (that.data.showCustomerChoise) { | |||||
| if (that.data.array[that.data.index].ID == 0) { | |||||
| wx.showToast({ | |||||
| image: '/imgs/avatar.png', | |||||
| title: '请选择所属客户', | |||||
| }) | |||||
| return false; | |||||
| } | |||||
| } | |||||
| if (app.globalData.Phone == "") { | |||||
| wx.showToast({ | |||||
| image: '/imgs/avatar.png', | |||||
| title: '手机号码不能为空', | |||||
| }) | |||||
| return false; | |||||
| } else if (!(/^1[34578]\d{9}$/.test(app.globalData.Phone))) { | |||||
| wx.showToast({ | |||||
| image: '/imgs/avatar.png', | |||||
| title: '号码不正确', | |||||
| }) | |||||
| return false; | |||||
| } | |||||
| } else { | |||||
| wx.showModal({ | |||||
| title: '授权提示', | |||||
| content: '请给予权限,不涉及个人隐私', | |||||
| showCancel: false | |||||
| }) | |||||
| } | |||||
| var method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/Bind'; | |||||
| var params = [{ | |||||
| OpenId: openid, | |||||
| Phone: app.globalData.Phone, | |||||
| NickName: app.globalData.userInfo.nickName, | |||||
| Sex: app.globalData.userInfo.gender, | |||||
| Province: app.globalData.userInfo.province, | |||||
| City: app.globalData.userInfo.city, | |||||
| Country: app.globalData.userInfo.country, | |||||
| HeadImgUrl: app.globalData.userInfo.avatarUrl, | |||||
| UnionId: "", | |||||
| //请求新增参数 | |||||
| AppId: app.globalData.AppId, | |||||
| CustomerId: that.data.array[that.data.index].ID, | |||||
| }]; | |||||
| var storageCustomerID = that.data.array[that.data.index].ID; | |||||
| // wx.setStorage({ | |||||
| // key: 'CustomerId', | |||||
| // data: storageCustomerID, | |||||
| // }) | |||||
| app.globalData.CustomerId = storageCustomerID; | |||||
| // 先绑定客户服务器 | |||||
| that.bindCustomerPreviousURL(function(res) { | |||||
| // 再绑定中转服务器 | |||||
| network.previousRequestLoading(method, params, function(res) { | |||||
| // 再判断是否关联公众号 | |||||
| IsBindWeixinMP(app.globalData.Phone); | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| // 进入公众号绑定页面 | |||||
| bindPublicNumber: function(event){ | |||||
| wx.navigateTo({ | |||||
| url: '/pages/first/first?code=' + code, | |||||
| }) | |||||
| }, | |||||
| // 绑定客户服务器 | |||||
| bindCustomerPreviousURL: function(successaction) { | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/AccountRpc/QinBindByPhone'; | |||||
| var previousParams = [{ | |||||
| OpenId: openid, | |||||
| Phone: app.globalData.Phone, | |||||
| NickName: app.globalData.userInfo.nickName, | |||||
| Sex: app.globalData.userInfo.gender, | |||||
| Province: app.globalData.userInfo.province, | |||||
| City: app.globalData.userInfo.city, | |||||
| Country: app.globalData.userInfo.country, | |||||
| HeadImgUrl: app.globalData.userInfo.avatarUrl, | |||||
| UnionId: "", | |||||
| }]; | |||||
| network.requestLoading(method, previousParams, function(res) { | |||||
| successaction(res.result); | |||||
| }) | |||||
| }, | |||||
| // 页面初始化 静默登录相关判断 | |||||
| onShow: function() { | |||||
| var that = this; | |||||
| // wx.getStorage({ | |||||
| // key: 'CustomerId', | |||||
| // success: function(res) { | |||||
| // app.globalData.CustomerId = res.data; | |||||
| // if (app.globalData.CustomerId) { | |||||
| // that.setData({ | |||||
| // showCustomerChoise: false, | |||||
| // }) | |||||
| // } | |||||
| // }, | |||||
| // fail: function(res) { | |||||
| // that.choiceCustomer(); | |||||
| // } | |||||
| // }) | |||||
| that.choiceCustomer(); | |||||
| getOpenId(function(res) { | |||||
| openid = res; | |||||
| IsBind(openid, function(res) { | |||||
| app.globalData.Phone = res; | |||||
| if (res == "") { | |||||
| } else { | |||||
| //跳转到指定页面 | |||||
| IsBindWeixinMP(app.globalData.Phone) | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function() { | |||||
| var that = this | |||||
| if (res.from === 'button') { | |||||
| // 来自页面内转发按钮 | |||||
| console.log(res.target) | |||||
| } | |||||
| return { | |||||
| title: '分享页面的标题', | |||||
| path: "/pages/login/login", | |||||
| //分享成功后执行 | |||||
| success: function(res) { | |||||
| console.log("--------------转发成功--------------------") | |||||
| }, | |||||
| fail: function(res) { | |||||
| console.log("--------------转发失败--------------------") | |||||
| } | |||||
| } | |||||
| } | |||||
| }) | |||||
| @ -0,0 +1 @@ | |||||
| {"navigationBarTitleText": "禽客户易"} | |||||
| @ -0,0 +1,19 @@ | |||||
| <image class='img1' src='/imgs/tuceng.png'> | |||||
| </image> | |||||
| <view class='view2' wx:if="{{showCustomerChoise}}"> | |||||
| <picker class='customerPicker' mode="selector" range="{{array}}" value="{{array[index].Name}}" range-key="Name" bindchange="listenerPickerSelected"> | |||||
| <text>{{array[index].Name}}</text> | |||||
| </picker> | |||||
| </view> | |||||
| <view class='view2'> | |||||
| <input class='input' placeholder='请输入手机号' type='number' bindinput="phoneNum" maxlength="11"></input> | |||||
| </view> | |||||
| <!-- <button class='denglu' >获取授权</button> --> | |||||
| <button open-type="getUserInfo" bindgetuserinfo="getUserInfo" class='denglu'>绑定</button> | |||||
| <!-- <button catchtap='bindPublicNumber' class='denglu'>关注公众号</button> --> | |||||
| <official-account class="wxmp"></official-account> | |||||
| @ -0,0 +1,52 @@ | |||||
| page { | |||||
| background: #fff; | |||||
| } | |||||
| .img1 { | |||||
| margin-left: 35%; | |||||
| height: 150px; | |||||
| width: 150px; | |||||
| margin-top: 20%; | |||||
| } | |||||
| .customerPicker { | |||||
| width: 100%; | |||||
| height: 40px; | |||||
| line-height: 40px; | |||||
| text-align: center; | |||||
| background: #fafafa; | |||||
| } | |||||
| .view2 { | |||||
| border-top: 1px solid #fafafa; | |||||
| border-right: 1px solid #fafafa; | |||||
| border-left: 1px solid #fafafa; | |||||
| border-bottom: 1px solid #fafafa; | |||||
| width: 90%; | |||||
| height: 40px; | |||||
| margin-left: 5%; | |||||
| margin-right: 5%; | |||||
| border-radius: 0.2em; | |||||
| margin-top: 5%; | |||||
| } | |||||
| .input { | |||||
| text-align: center; | |||||
| height: 40px; | |||||
| background: #fafafa; | |||||
| } | |||||
| .denglu { | |||||
| margin-left: 5%; | |||||
| margin-top: 10%; | |||||
| width: 90%; | |||||
| margin-right: 5%; | |||||
| background: #2e8cf5; | |||||
| color: #fff; | |||||
| } | |||||
| .wxmp { | |||||
| position: fixed; | |||||
| bottom: 0rpx; | |||||
| width: 100%; | |||||
| } | |||||
| @ -0,0 +1,69 @@ | |||||
| // pages/my/my.js | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| meName: "", | |||||
| mePhone: 0, | |||||
| avatarUrl: "../../imgs/avatar.png" | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @ -0,0 +1 @@ | |||||
| {} | |||||
| @ -0,0 +1,16 @@ | |||||
| <!--pages/my/my.wxml--> | |||||
| <view class='view_me_main'> | |||||
| <image class="userinfo-avatar" src="{{avatarUrl}}" mode="cover"></image> | |||||
| <view class='view_me_infos'> | |||||
| <text class='view_me_text'>{{meName}}李丽丽</text> | |||||
| <text class='view_me_text'>{{mePhone}}1234567890</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class='unregirst'>设置 | |||||
| <image class='unregirstImage' src='/imgs/jiantou.png'> | |||||
| </image> | |||||
| </view> | |||||
| @ -0,0 +1,53 @@ | |||||
| /* pages/my/my.wxss */ | |||||
| page { | |||||
| background:#EAF1F8; | |||||
| } | |||||
| .view_me_main { | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| background: #f98b29; | |||||
| padding-top: 40rpx; | |||||
| padding-left: 5%; | |||||
| padding-bottom: 40rpx; | |||||
| } | |||||
| .userinfo-avatar { | |||||
| width: 128rpx; | |||||
| height: 128rpx; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .view_me_infos { | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| justify-content: center; | |||||
| padding-left: 30rpx; | |||||
| } | |||||
| .view_me_text { | |||||
| font-size: 32rpx; | |||||
| color: white; | |||||
| margin-top: 10rpx; | |||||
| } | |||||
| .unregirst { | |||||
| font-size: 32rpx; | |||||
| text-align: left; | |||||
| background: white; | |||||
| padding-left: 20rpx; | |||||
| padding-top: 20rpx; | |||||
| padding-bottom: 20rpx; | |||||
| margin-top: 20rpx; | |||||
| color: #353535; | |||||
| } | |||||
| .unregirstImage{ | |||||
| height: 30rpx; | |||||
| width: 30rpx; | |||||
| padding-top: 10rpx; | |||||
| padding-bottom: 15rpx; | |||||
| position: absolute; | |||||
| right: 20rpx; | |||||
| } | |||||
| @ -0,0 +1,33 @@ | |||||
| var ID=0; | |||||
| const app = getApp(); | |||||
| var network = require("../../utils/net.js"); | |||||
| var Goods_Name; | |||||
| var Number; | |||||
| var Price; | |||||
| var Money; | |||||
| Page({ | |||||
| data: { | |||||
| //{ "code": "鸡腿", "text": "30箱", "type": "500", "sum": "15000" } | |||||
| list: [], | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| ID = parseInt(options.ID); | |||||
| console.log(ID) | |||||
| var that = this; | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrderDetail'; | |||||
| var params = [ID]; | |||||
| network.requestLoading(method, params, function (res) { | |||||
| that.setData({ | |||||
| list: res.result, | |||||
| }) | |||||
| }) | |||||
| } | |||||
| }) | |||||
| @ -0,0 +1,2 @@ | |||||
| { | |||||
| "navigationBarTitleText": "订单详情"} | |||||
| @ -0,0 +1,22 @@ | |||||
| <view class="table"> | |||||
| <view class="tr bg-w"> | |||||
| <view class="th">存货名称</view> | |||||
| <view class="th">存货数量</view> | |||||
| <view class="th ">单价</view> | |||||
| <view class="th ">金额</view> | |||||
| </view> | |||||
| <block wx:for="{{list}}" wx:key="{{code}}"> | |||||
| <view class="tr bg-g" wx:if="{{index % 2 == 0}}"> | |||||
| <view class="td">{{item.Goods_Name}}</view> | |||||
| <view class="td">{{item.Number}}</view> | |||||
| <view class="td">¥{{item.Price}}</view> | |||||
| <view class="td">¥{{item.Money}}</view> | |||||
| </view> | |||||
| <view class="tr" wx:else> | |||||
| <view class="td">{{item.Goods_Name}}</view> | |||||
| <view class="td">{{item.Number}}</view> | |||||
| <view class="td">¥{{item.Price}}</view> | |||||
| <view class="td">¥{{item.Money}}</view> | |||||
| </view> | |||||
| </block> | |||||
| </view> | |||||
| @ -0,0 +1,43 @@ | |||||
| page { | |||||
| background: #f0eff5; | |||||
| } | |||||
| .table { | |||||
| margin-top: 1.5px; | |||||
| } | |||||
| .tr bg-w { | |||||
| background: #fff; | |||||
| color: #fff; | |||||
| } | |||||
| .tr { | |||||
| display: flex; | |||||
| width: 100%; | |||||
| justify-content: center; | |||||
| height: 3rem; | |||||
| align-items: center; | |||||
| border-bottom: 1px solid #e1e1e1; | |||||
| background: #fff; | |||||
| } | |||||
| .td { | |||||
| width: 40%; | |||||
| justify-content: center; | |||||
| text-align: center; | |||||
| } | |||||
| .bg-g { | |||||
| background: #fff; | |||||
| border-bottom: 1px solid #e1e1e1; | |||||
| } | |||||
| .th { | |||||
| width: 40%; | |||||
| justify-content: center; | |||||
| background: #fff; | |||||
| display: flex; | |||||
| height: 3rem; | |||||
| align-items: center; | |||||
| color: #000; | |||||
| } | |||||
| @ -0,0 +1,155 @@ | |||||
| const app = getApp(); | |||||
| var network = require("../../utils/net.js"); | |||||
| const util = require('../../utils/util.js') | |||||
| var timechage = require("../../utils/dateTimeUtil.js") | |||||
| var baseUrl = app.globalData.baseUrl; | |||||
| var Customer_Name; | |||||
| var Money; | |||||
| var ID; | |||||
| var LoadTime; | |||||
| var AppID; | |||||
| var Phone; | |||||
| var pageindex=0; | |||||
| var pagesize=10; | |||||
| Page({ | |||||
| data: { | |||||
| //页面高度 | |||||
| winHeight: 0, | |||||
| currentData: 0, | |||||
| dates: "请选择日期", | |||||
| index: 0, | |||||
| list: [], | |||||
| list1: [], | |||||
| LoadTime: "", | |||||
| ID:"", | |||||
| }, | |||||
| bindDateChange: function (e) { | |||||
| this.setData({ | |||||
| dates: e.detail.value | |||||
| }) | |||||
| this.arr(); | |||||
| }, | |||||
| onLoad: function(options) { | |||||
| var that = this; | |||||
| // 获取系统信息 | |||||
| wx.getSystemInfo({ | |||||
| success: function (res) { | |||||
| that.setData({ | |||||
| winWidth: res.windowWidth, | |||||
| winHeight: res.windowHeight | |||||
| }); | |||||
| } | |||||
| }); | |||||
| var reslut = []; | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrder'; | |||||
| var params = [0, pageindex, pagesize]; | |||||
| network.requestLoading(method, params, function(res) { | |||||
| for (var i = 0; i < res.result.length; i++) { | |||||
| let dmo = { | |||||
| LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), | |||||
| ID: res.result[i].ID, | |||||
| Customer_Name: res.result[i].Customer_Name, | |||||
| Money:res.result[i].Money, | |||||
| } | |||||
| reslut.push(dmo) | |||||
| } | |||||
| that.setData({ | |||||
| list: reslut, | |||||
| }) | |||||
| }) | |||||
| var reslut1=[]; | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrder'; | |||||
| var params = [20, pageindex, pagesize]; | |||||
| network.requestLoading(method, params, function (res) { | |||||
| for (var i = 0; i < res.result.length; i++) { | |||||
| let dmo = { | |||||
| LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), | |||||
| ID: res.result[i].ID, | |||||
| Customer_Name: res.result[i].Customer_Name, | |||||
| Money: res.result[i].Money, | |||||
| } | |||||
| reslut1.push(dmo) | |||||
| } | |||||
| that.setData({ | |||||
| list1: reslut1, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| orderDetails: function (event) { | |||||
| let that=this | |||||
| var parm = event.currentTarget.dataset; | |||||
| wx.navigateTo({ | |||||
| url: '/pages/orderDetails/orderDetails?ID=' + parm.id, | |||||
| }) | |||||
| }, | |||||
| //点击切换,滑块index赋值 | |||||
| bindchange: function (e) { | |||||
| const that = this; | |||||
| that.setData({ | |||||
| currentData: e.detail.current | |||||
| }) | |||||
| }, | |||||
| checkCurrent: function (e) { | |||||
| const that = this; | |||||
| if (that.data.currentData === e.target.dataset.current) { | |||||
| return false; | |||||
| } else { | |||||
| that.setData({ | |||||
| currentData: e.target.dataset.current | |||||
| }) | |||||
| } | |||||
| }, | |||||
| jiazai:function(){ | |||||
| console.log("323") | |||||
| var reslut = []; | |||||
| var that = this; | |||||
| // 显示加载图标 | |||||
| wx.showLoading({ | |||||
| title: '玩命加载中', | |||||
| }) | |||||
| // 页数+1 | |||||
| pageindex = pageindex + 1; | |||||
| var myDate = new Date(); | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetOrder'; | |||||
| var params = [0, pageindex, pagesize]; | |||||
| network.requestLoading(method, params, function (res) { | |||||
| for (var i = 0; i < res.result.length; i++) { | |||||
| let dmo = { | |||||
| LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), | |||||
| ID: res.result[i].ID, | |||||
| Customer_Name: res.result[i].Customer_Name, | |||||
| Money: res.result[i].Money, | |||||
| } | |||||
| reslut.push(dmo) | |||||
| console.log(dmo) | |||||
| } | |||||
| that.setData({ | |||||
| list: that.data.list.concat(reslut) | |||||
| }) | |||||
| }) | |||||
| wx.stopPullDownRefresh(); | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1,6 @@ | |||||
| { | |||||
| "enablePullDownRefresh": true, | |||||
| "backgroundTextStyle": "dark", | |||||
| "onReachBottomDistance": 50, | |||||
| "navigationBarTitleText": "订单" | |||||
| } | |||||
| @ -0,0 +1,46 @@ | |||||
| <view class='topTabSwiper'> | |||||
| <view class='tab {{currentData == 0 ? "tabBorer" : ""}}' data-current="0" bindtap='checkCurrent'>未审核</view> | |||||
| <view class='tab {{currentData == 1 ? "tabBorer" : ""}}' data-current="1" bindtap='checkCurrent'>已审核</view> | |||||
| </view> | |||||
| <swiper current="{{currentData}}" class='swiper-box' style="height:{{winHeight - 45}}px" duration="300" bindchange="bindchange"> | |||||
| <swiper-item catchtap='siliaohaoyong' class="swiper-items1"> | |||||
| <scroll-view scroll-y="true" class='scroll-views'> | |||||
| <view class='yonghu1' catchtap='orderDetails' wx:for="{{list}}" wx:key="item" data-Id="{{item.ID}}" data-Date="{{item.Date}}"> | |||||
| <view class='view1'>莱西养护: | |||||
| <text class='text1'>{{item.Customer_Name}}</text> | |||||
| </view> | |||||
| <view class='view2'>¥ | |||||
| <text class='text2'>{{item.Money}}</text> | |||||
| </view> | |||||
| <view class='view3'>NO: | |||||
| <text class='text3'>{{item.ID}}</text> | |||||
| </view> | |||||
| <view class='view4'>出库日期: | |||||
| <text class='text4'>{{item.LoadTime}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <!-- </view> --> | |||||
| <button bindtap='jiazai'>点击加载更多</button> | |||||
| </scroll-view> | |||||
| </swiper-item> | |||||
| <swiper-item class="swiper-items2"> | |||||
| <scroll-view scroll-y="true" class='scroll-views'> | |||||
| <view class='yonghu1' catchtap='orderDetails' wx:for="{{list1}}" wx:key="item" data-Id="{{item.ID}}" data-Date="{{item.Date}}"> | |||||
| <view class='view1'>莱西养护: | |||||
| <text class='text1'>{{item.Customer_Name}}</text> | |||||
| </view> | |||||
| <view class='view2'>¥ | |||||
| <text class='text2'>{{item.Money}}</text> | |||||
| </view> | |||||
| <view class='view3'>NO: | |||||
| <text class='text3'>{{item.ID}}</text> | |||||
| </view> | |||||
| <view class='view4'>出库日期: | |||||
| <text class='text4'>{{item.LoadTime}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </scroll-view> | |||||
| </swiper-item> | |||||
| </swiper> | |||||
| @ -0,0 +1,120 @@ | |||||
| page { | |||||
| background: #f4f4f4; | |||||
| } | |||||
| .topTabSwiper { | |||||
| width: 100%; | |||||
| text-align: center; | |||||
| line-height: 45px; | |||||
| background: white; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| justify-content: space-around; | |||||
| border-bottom: 0.2rpx solid rgb(223, 218, 218); | |||||
| } | |||||
| .tab { | |||||
| font-size: 30rpx; | |||||
| width: 25%; | |||||
| color: #777; | |||||
| } | |||||
| .swiper-box { | |||||
| display: block; | |||||
| width: 100%; | |||||
| overflow: hidden; | |||||
| margin-top: 3px; | |||||
| } | |||||
| .tabBorer { | |||||
| color: #2788f8; | |||||
| border-bottom: 2rpx solid #2788f8; | |||||
| } | |||||
| .swiper-items1 { | |||||
| height: 100%; | |||||
| } | |||||
| .swiper-items2 { | |||||
| height: 100%; | |||||
| } | |||||
| .scroll-views { | |||||
| height: 100%; | |||||
| } | |||||
| .yonghu1 { | |||||
| background: #fff; | |||||
| border-bottom: 0.5px solid #ccc; | |||||
| border-top: 0.5px solid #ccc; | |||||
| } | |||||
| .yonghu2 { | |||||
| background: #fff; | |||||
| border-bottom: 0.5px solid #ccc; | |||||
| margin-top: 10px; | |||||
| border-top: 0.5px solid #ccc; | |||||
| } | |||||
| .view1 { | |||||
| margin-top: 3%; | |||||
| margin-left: 17px; | |||||
| color: #464646; | |||||
| } | |||||
| .view2 { | |||||
| float: right; | |||||
| margin-right: 17px; | |||||
| color: #464646; | |||||
| margin-top: -6.5%; | |||||
| } | |||||
| .view3 { | |||||
| margin-top: 5%; | |||||
| margin-left: 17px; | |||||
| margin-bottom: 3%; | |||||
| color: #888; | |||||
| font-size: 14px; | |||||
| } | |||||
| .view4 { | |||||
| float: right; | |||||
| margin-right: 17px; | |||||
| color: #888; | |||||
| margin-top: -8.8%; | |||||
| font-size: 14px; | |||||
| margin-bottom: 3%; | |||||
| } | |||||
| .text1 { | |||||
| margin-left: 10px; | |||||
| } | |||||
| .text3 { | |||||
| margin-left: 10px; | |||||
| } | |||||
| .section { | |||||
| background: #fff; | |||||
| /* margin-top: 10px; */ | |||||
| margin-bottom: 10px; | |||||
| width: 80%; | |||||
| text-align: center; | |||||
| height: 30px; | |||||
| margin-left: 10%; | |||||
| margin-right: 10%; | |||||
| border-radius: 10rpx; | |||||
| font-size: 16px; | |||||
| color: #ccc; | |||||
| border: 1rpx solid #ccc; | |||||
| } | |||||
| .picker { | |||||
| line-height: 30px; | |||||
| } | |||||
| :-webkit-scrollbar { | |||||
| width: 0; | |||||
| height: 0; | |||||
| color: transparent; | |||||
| } | |||||
| @ -0,0 +1,93 @@ | |||||
| // pages/saleOutStore/outStoreDetail/outStoreDetail.js | |||||
| var network = require("../../../utils/net.js"); | |||||
| Page({ | |||||
| data: { | |||||
| dataArr : [ ], | |||||
| balance : 0, | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| var that =this; | |||||
| var detailItemID = parseInt(options.detailItemID); | |||||
| let arrayLast = []; | |||||
| let totalMoney = 0; | |||||
| let method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStoreDetail'; | |||||
| let params = [detailItemID]; | |||||
| network.requestLoading(method, params, function (res) { | |||||
| var array = res.result; | |||||
| for (var i = 0; i < array.length; i++) { | |||||
| if (array[i].Money) { | |||||
| totalMoney = totalMoney + parseFloat(array[i].Money); | |||||
| } | |||||
| var dmo = { | |||||
| goodsName: array[i].Goods_Name, | |||||
| goodsMoney: array[i].Money, | |||||
| goodsNum: array[i].Number, | |||||
| goodsPrice: array[i].Price, | |||||
| } | |||||
| arrayLast.push(dmo); | |||||
| } | |||||
| if (!totalMoney){ | |||||
| totalMoney = 0; | |||||
| } | |||||
| that.setData({ | |||||
| dataArr : arrayLast, | |||||
| balance : totalMoney, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "出库单详情" | |||||
| } | |||||
| @ -0,0 +1,42 @@ | |||||
| <!--pages/saleOutStore/outStoreDetail/outStoreDetail.wxml--> | |||||
| <view class='imageView'> | |||||
| <image class='currentImage' src="/imgs/outStoreDetail.png"> | |||||
| <view class='totalMoneyView'> | |||||
| <text class='totalMoney'>总金额</text> | |||||
| </view> | |||||
| <view class='balanceView'> | |||||
| <text class='balance'>¥{{balance}}</text> | |||||
| </view> | |||||
| </image> | |||||
| </view> | |||||
| <view class='listContainer'> | |||||
| <scroll-view scroll-x="false" scroll-y="true" class='scrollView'> | |||||
| <block wx:for="{{dataArr}}" wx:for-item="item"> | |||||
| <template is="outStoreDetailTemplate" data="{{item}}" /> | |||||
| </block> | |||||
| </scroll-view> | |||||
| </view> | |||||
| <template name="outStoreDetailTemplate"> | |||||
| <view class='listItem'> | |||||
| <view class='topView'> | |||||
| <view class='goodsNameView'> | |||||
| <text>{{item.goodsName}}</text> | |||||
| </view> | |||||
| <view class='priceView'> | |||||
| <text>单价:{{item.goodsPrice}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class='bottomView'> | |||||
| <view class='goodsNum'> | |||||
| <text class='goodsNumText'>数量:{{item.goodsNum}}</text> | |||||
| </view> | |||||
| <view class='goodsMoney'> | |||||
| <text class='goodsMoneyText'>金额:{{item.goodsMoney}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| @ -0,0 +1,124 @@ | |||||
| /* pages/saleOutStore/outStoreDetail/outStoreDetail.wxss */ | |||||
| .imageView { | |||||
| height: 150px; | |||||
| margin-top: 10px; | |||||
| margin-left: 15px; | |||||
| margin-right: 15px; | |||||
| margin-bottom: 10px; | |||||
| position: relative; | |||||
| align-items: center; | |||||
| } | |||||
| .currentImage { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .totalMoneyView { | |||||
| position: absolute; | |||||
| width: 100%; | |||||
| /* height: 100%; */ | |||||
| top: 100rpx; | |||||
| text-align: center; | |||||
| } | |||||
| .balanceView { | |||||
| position: absolute; | |||||
| width: 100%; | |||||
| /* height: 100%; */ | |||||
| top: 150rpx; | |||||
| text-align: center; | |||||
| } | |||||
| .totalMoney { | |||||
| color: white; | |||||
| font-size: 20px; | |||||
| } | |||||
| .balance { | |||||
| color: white; | |||||
| font-size: 30px; | |||||
| } | |||||
| .listContainer { | |||||
| width: 100%; | |||||
| /* height: 100%; */ | |||||
| height: calc(100% - 170px); | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| } | |||||
| .scrollView{ | |||||
| height: 100%; | |||||
| } | |||||
| .listItem { | |||||
| /* width: 100%; */ | |||||
| height: 150rpx; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| background-color: #fff; | |||||
| padding: 0 20rpx 20rpx 20rpx; | |||||
| border-bottom: 1rpx solid #ddd; | |||||
| background: white; | |||||
| } | |||||
| .topView{ | |||||
| height: 50%; | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| .goodsNameView { | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| } | |||||
| .priceView{ | |||||
| /* padding-right: 20px; */ | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| text-align: right; | |||||
| } | |||||
| .bottomView { | |||||
| height: 50%; | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| .goodsNum { | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| /* padding-top: 20rpx; */ | |||||
| } | |||||
| .goodsNumText { | |||||
| font-size: 16px; | |||||
| color: #666; | |||||
| } | |||||
| .goodsMoney { | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| /* padding-right: 20px; */ | |||||
| text-align: right; | |||||
| } | |||||
| .goodsMoneyText { | |||||
| font-size: 16px; | |||||
| color: #666; | |||||
| } | |||||
| page { | |||||
| background-color: #f0eff5; | |||||
| height: 100%; | |||||
| width: 100%; | |||||
| } | |||||
| @ -0,0 +1,182 @@ | |||||
| // pages/saleOutStore/saleOutStore.js | |||||
| const app = getApp(); | |||||
| var network = require("../../utils/net.js"); | |||||
| var timechage = require("../../utils/dateTimeUtil.js"); | |||||
| var UnCheckPageIndex = 0 | |||||
| var UnCheckPageSize = 10 | |||||
| var CheckedPageIndex = 0 | |||||
| var CheckedPageSize = 10 | |||||
| var outStoreMethod = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStore' | |||||
| // 未审核订单列表 | |||||
| function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize) { | |||||
| let getArr = []; | |||||
| let method = outStoreMethod; | |||||
| let params = [0, UnCheckPageIndex, UnCheckPageSize]; | |||||
| network.requestLoading(method, params, function(res) { | |||||
| var array = res.result; | |||||
| if (array.length <= 0) { | |||||
| wx.showToast({ | |||||
| title: '无数据更新', | |||||
| }) | |||||
| return; | |||||
| } | |||||
| for (var i = 0; i < array.length; i++) { | |||||
| var dmo = { | |||||
| orderID: array[i].ID, | |||||
| money: array[i].Customer_Name, | |||||
| // money: array[i].Money, | |||||
| time: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19), 'Y/M/D') | |||||
| } | |||||
| getArr.push(dmo); | |||||
| } | |||||
| let arrLast = that.data.unCheckDataArr.concat(getArr); | |||||
| // if (arrLast.length == that.data.unCheckDataArr.length){ | |||||
| // wx.showToast({ | |||||
| // title: '已加载全部数据', | |||||
| // }) | |||||
| // return; | |||||
| // } else { | |||||
| that.setData({ | |||||
| unCheckDataArr: arrLast, | |||||
| }) | |||||
| // } | |||||
| }) | |||||
| } | |||||
| // 已审核订单列表 | |||||
| function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) { | |||||
| let getArr = []; | |||||
| let method = outStoreMethod; | |||||
| let params = [20, CheckedPageIndex, CheckedPageSize]; | |||||
| network.requestLoading(method, params, function(res) { | |||||
| var array = res.result; | |||||
| if (array.length <= 0) { | |||||
| wx.showToast({ | |||||
| title: '无数据更新', | |||||
| }) | |||||
| return; | |||||
| } | |||||
| for (var i = 0; i < array.length; i++) { | |||||
| var dmo = { | |||||
| orderID: array[i].ID, | |||||
| money: array[i].Customer_Name, | |||||
| // money: array[i].Money, | |||||
| time: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19), 'Y/M/D') | |||||
| } | |||||
| getArr.push(dmo); | |||||
| } | |||||
| let arrLast = that.data.checkedDataArr.concat(getArr); | |||||
| that.setData({ | |||||
| checkedDataArr: arrLast, | |||||
| }) | |||||
| }) | |||||
| } | |||||
| Page({ | |||||
| data: { | |||||
| checkedDataArr: [], | |||||
| unCheckDataArr: [], | |||||
| currentTab: 0, | |||||
| winHeight: 0, | |||||
| winWidth: 0, | |||||
| }, | |||||
| /** | |||||
| * 滑动切换tab | |||||
| */ | |||||
| bindChange: function(e) { | |||||
| var that = this; | |||||
| that.setData({ | |||||
| currentTab: e.detail.current | |||||
| }); | |||||
| }, | |||||
| /** | |||||
| * 点击tab切换 | |||||
| */ | |||||
| swichNav: function(e) { | |||||
| var that = this; | |||||
| if (this.data.currentTab === e.target.dataset.current) { | |||||
| return false; | |||||
| } else { | |||||
| that.setData({ | |||||
| currentTab: e.target.dataset.current | |||||
| }) | |||||
| } | |||||
| }, | |||||
| //点击进入详情页面 | |||||
| transToOrderDetail: function(event) { | |||||
| var itemID = event.currentTarget.dataset.detailitemid; | |||||
| console.log("获取到的详情ID = " + itemID); | |||||
| wx.navigateTo({ | |||||
| url: 'outStoreDetail/outStoreDetail?detailItemID=' + itemID, | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function(options) { | |||||
| var that = this; | |||||
| wx.getSystemInfo({ | |||||
| success: function(res) { | |||||
| that.setData({ | |||||
| winWidth: res.windowWidth, | |||||
| winHeight: res.windowHeight | |||||
| }); | |||||
| } | |||||
| }); | |||||
| UnCheckPageIndex = 0; | |||||
| CheckedPageIndex = 0; | |||||
| getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize); | |||||
| getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); | |||||
| }, | |||||
| // getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize); | |||||
| // getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); | |||||
| // } | |||||
| //未审核订单滑动 | |||||
| // unCheckedScrollUpper : function (){ | |||||
| // this.data.unCheckDataArr = []; | |||||
| // var that = this; | |||||
| // UnCheckPageIndex = 0; | |||||
| // getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize); | |||||
| // }, | |||||
| //审核订单滑动 | |||||
| // checkedScrollUpper: function () { | |||||
| // var that = this; | |||||
| // CheckedPageIndex = 0; | |||||
| // getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); | |||||
| // }, | |||||
| //未审核订单滑动到底部加载 | |||||
| unCheckedScrollLower: function(event) { | |||||
| var that = this; | |||||
| UnCheckPageIndex = UnCheckPageIndex + 1; | |||||
| getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize); | |||||
| }, | |||||
| //已审核订单滑动到底部加载 | |||||
| CheckedScrollLower: function (event) { | |||||
| var that = this; | |||||
| CheckedPageIndex = CheckedPageIndex + 1; | |||||
| getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); | |||||
| }, | |||||
| /** | |||||
| * scrollView不会调用此函数 | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function() { | |||||
| var that = this; | |||||
| if (this.data.currentTab === 0) { | |||||
| UnCheckPageIndex = UnCheckPageIndex + 1; | |||||
| getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize); | |||||
| } else { | |||||
| CheckedPageIndex = CheckedPageIndex + 1; | |||||
| getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize); | |||||
| } | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1,4 @@ | |||||
| { | |||||
| "navigationBarTitleText": "销售出库", | |||||
| "enablePullDownRefresh": true | |||||
| } | |||||
| @ -0,0 +1,45 @@ | |||||
| <!--pages/saleOutStore/saleOutStore.wxml--> | |||||
| <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 -45}}px' duration="300" bindchange="bindChange"> | |||||
| <!-- 未审核 --> | |||||
| <swiper-item class="swiper-items1"> | |||||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="unCheckedScrollUpper" bindscrolltolower="unCheckedScrollLower"> | |||||
| <!-- <view class='listContainer'> --> | |||||
| <block wx:for="{{unCheckDataArr}}" wx:for-item="item"> | |||||
| <template is="outStoreOrderTemplate" data="{{item}}" /> | |||||
| </block> | |||||
| <!-- </view> --> | |||||
| </scroll-view> | |||||
| </swiper-item> | |||||
| <!-- 已审核 --> | |||||
| <swiper-item class="swiper-items2"> | |||||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="checkedScrollUpper" bindscrolltolower = "CheckedScrollLower"> | |||||
| <!-- <view class='listContainer'> --> | |||||
| <block wx:for="{{checkedDataArr}}" wx:for-item="item"> | |||||
| <template is="outStoreOrderTemplate" data="{{item}}" /> | |||||
| </block> | |||||
| <!-- </view> --> | |||||
| </scroll-view> | |||||
| </swiper-item> | |||||
| </swiper> | |||||
| <template name="outStoreOrderTemplate"> | |||||
| <view class='listItem' catchtap='transToOrderDetail' data-detailitemid='{{item.orderID}}'> | |||||
| <view class='orderID'> | |||||
| <text class='goodsIDText'>单号:{{item.orderID}}</text> | |||||
| </view> | |||||
| <view class='bottomView'> | |||||
| <view class='goodsNum'> | |||||
| <text class='goodsNumText'>{{item.money}}</text> | |||||
| </view> | |||||
| <view class='goodsMoney'> | |||||
| <text class='goodsMoneyText'>发货日期:{{item.time}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| @ -0,0 +1,101 @@ | |||||
| /* pages/saleOutStore/saleOutStore.wxss */ | |||||
| .swiper-tab { | |||||
| width: 100%; | |||||
| text-align: center; | |||||
| line-height: 45px; | |||||
| background: white; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| justify-content: space-around; | |||||
| border-bottom: 0.2rpx solid rgb(223, 218, 218); | |||||
| } | |||||
| .swiper-tab-list { | |||||
| font-size: 30rpx; | |||||
| /* display: inline-block; */ | |||||
| width: 25%; | |||||
| color: #777; | |||||
| } | |||||
| .on { | |||||
| border-bottom: 1px solid #2E8CF5 ; | |||||
| color: #2E8CF5; | |||||
| } | |||||
| .swiper-box { | |||||
| margin-top: 1.5px; | |||||
| display: block; | |||||
| width: 100%; | |||||
| overflow: hidden; | |||||
| } | |||||
| .swiper-items1 { | |||||
| height: 100%; | |||||
| padding-top: 8rpx; | |||||
| padding-bottom: 5rpx; | |||||
| } | |||||
| .swiper-items2 { | |||||
| height: 100%; | |||||
| padding-top: 8rpx; | |||||
| padding-bottom: 5rpx; | |||||
| } | |||||
| .scroll-views { | |||||
| height: 100%; | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| } | |||||
| .listItem{ | |||||
| /* width: 100%; */ | |||||
| /* height: 200rpx; */ | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| background-color: #fff; | |||||
| padding: 20rpx 20rpx 20rpx 20rpx; | |||||
| border-bottom: 1rpx solid #ddd; | |||||
| background: white; | |||||
| } | |||||
| .orderID{ | |||||
| height: 50%; | |||||
| width: 100%; | |||||
| } | |||||
| .bottomView{ | |||||
| height: 50%; | |||||
| width: 100%; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| } | |||||
| .goodsNum{ | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| } | |||||
| .goodsIDText{ | |||||
| font-size: 16px; | |||||
| } | |||||
| .goodsNumText{ | |||||
| font-size: 14px; | |||||
| color: #666; | |||||
| } | |||||
| .goodsMoney{ | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| } | |||||
| .goodsMoneyText{ | |||||
| font-size: 14px; | |||||
| color: #666; | |||||
| } | |||||
| page{ | |||||
| background-color: #F0EFF5; | |||||
| height: (100% - 48px); | |||||
| } | |||||
| @ -0,0 +1,118 @@ | |||||
| const app = getApp(); | |||||
| var baseUrl = app.globalData.baseUrl; | |||||
| var network = require("../../utils/net.js"); | |||||
| var timechage = require("../../utils/dateTimeUtil.js"); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| currentData: 0, | |||||
| dates: "请选择日期", | |||||
| index: 0, | |||||
| showView: false, | |||||
| list:[], | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| // 生命周期函数--监听页面加载 | |||||
| }, | |||||
| sendTheDetails: function (event) { | |||||
| let that = this | |||||
| var parm1 = event.currentTarget.dataset; | |||||
| wx.navigateTo({ | |||||
| url: '/pages/sendTheDetails/sendTheDetails?ID=' + parm1.id | |||||
| }) | |||||
| console.log(parm1.id) | |||||
| }, | |||||
| onChangeShowState: function () { | |||||
| }, | |||||
| onChangeShowState: function () { | |||||
| var that = this; | |||||
| that.setData({ | |||||
| showView: (!that.data.showView) | |||||
| }) | |||||
| }, | |||||
| checkboxgroupBindchange: function (e) { | |||||
| var temp1 = e.detail.value | |||||
| var temp2 = '' | |||||
| console.log(temp1) | |||||
| if (temp1.length != 0) { | |||||
| for (var i = 0, len = temp1.length; i < len; i++) { | |||||
| temp2 = temp2 + temp1[i] + ',' | |||||
| } | |||||
| } | |||||
| }, | |||||
| bindDateChange: function (e) { | |||||
| this.setData({ | |||||
| dates: e.detail.value | |||||
| }) | |||||
| this.arr(); | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| showView: (options.showView == "true" ? true : false) | |||||
| }, | |||||
| onShow: function (e) { | |||||
| var that = this; | |||||
| var reslut = []; | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/GetNoDriverOrder'; | |||||
| var params = []; | |||||
| network.requestLoading(method, params, function (res) { | |||||
| for (var i = 0; i < res.result.length; i++) { | |||||
| let dmo = { | |||||
| LoadTime: timechage.formatTimeTwo(res.result[i].LoadTime.substring(6, 19), "Y/M/D h:m"), | |||||
| ID: res.result[i].ID, | |||||
| Customer_Name: res.result[i].Customer_Name, | |||||
| Money: res.result[i].Money, | |||||
| } | |||||
| reslut.push(dmo) | |||||
| console.log(dmo) | |||||
| } | |||||
| //res就是我们请求接口返回的数据 | |||||
| that.setData({ | |||||
| list: reslut, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| //获取当前滑块的index | |||||
| bindchange: function (e) { | |||||
| const that = this; | |||||
| that.setData({ | |||||
| currentData: e.detail.current | |||||
| }) | |||||
| }, | |||||
| //点击切换,滑块index赋值 | |||||
| checkCurrent: function (e) { | |||||
| const that = this; | |||||
| if (that.data.currentData === e.target.dataset.current) { | |||||
| return false; | |||||
| } else { | |||||
| that.setData({ | |||||
| currentData: e.target.dataset.current | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| @ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "司机派工" | |||||
| } | |||||
| @ -0,0 +1,14 @@ | |||||
| <scroll-view scroll-y="true" style="height:550px"> | |||||
| <view class='yonghu' wx:for="{{list}}" wx:key="item" data-Id="{{item.ID}}" data-Date="{{item.Date}}" bindtap='sendTheDetails'> | |||||
| <view class='view1'>莱西养护:<text class='text1'>{{item. | |||||
| Customer_Name}}</text></view> | |||||
| <view class='view2'>¥<text class='text2'>{{item.Money}}</text></view> | |||||
| <view class='view3'>NO:<text class='text3'>{{item. | |||||
| ID}}</text></view> | |||||
| <view class='view4'>出库日期:<text class='text4'>{{item. | |||||
| LoadTime}}</text></view> | |||||
| </view> | |||||
| </scroll-view> | |||||
| @ -0,0 +1,231 @@ | |||||
| page{ | |||||
| background: #F4F4F4; | |||||
| } | |||||
| .tab{ | |||||
| float: left; | |||||
| width: 50%; | |||||
| text-align: center; | |||||
| padding: 13rpx 0; | |||||
| margin-top: 4.5px; | |||||
| } | |||||
| .topTabSwiper{ | |||||
| width: 100%; | |||||
| border-top: 0.5px solid #ccc; | |||||
| border-bottom: 0.5px solid #ccc; | |||||
| zoom: 1; | |||||
| background: #FFFFFF; | |||||
| } | |||||
| .topTabSwiper:after{ | |||||
| content: ""; | |||||
| clear: both; | |||||
| display: block; | |||||
| } | |||||
| .tabBorer{ | |||||
| border-bottom: 1px solid #2E8CF5 ; | |||||
| color: #2E8CF5; | |||||
| } | |||||
| .swiper_con{ | |||||
| text-align: center; | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| padding: 80rpx 0; | |||||
| } | |||||
| .yonghu{ | |||||
| background: #FFFFFF; | |||||
| border-bottom: 0.5px solid #ccc; | |||||
| border-top: 0.5px solid #ccc; | |||||
| height:80px; | |||||
| } | |||||
| .yonghu1{ | |||||
| background: #FFFFFF; | |||||
| border-bottom: 0.5px solid #ccc; | |||||
| border-top: 0.5px solid #ccc; | |||||
| height: 120px; | |||||
| } | |||||
| .yonghu2{ | |||||
| background: #FFFFFF; | |||||
| height: 150px; | |||||
| } | |||||
| .view1{ | |||||
| margin-top: 3%; | |||||
| margin-left: 17px; | |||||
| color: #464646; | |||||
| } | |||||
| .view2{ | |||||
| color: #464646; | |||||
| margin-top: -6.5%; | |||||
| float: right; | |||||
| margin-right: 17px; | |||||
| } | |||||
| .view3{ | |||||
| margin-top: 5%; | |||||
| margin-left: 17px; | |||||
| margin-bottom: 3%; | |||||
| color: #888888; | |||||
| font-size: 14px; | |||||
| } | |||||
| .view4{ | |||||
| float: right; | |||||
| margin-right: 17px; | |||||
| color: #888888; | |||||
| margin-top: -8.8%; | |||||
| font-size: 14px; | |||||
| margin-bottom: 3%; | |||||
| } | |||||
| .view5{ | |||||
| margin-left: 17px; | |||||
| color: #464646; | |||||
| } | |||||
| .text5{ | |||||
| line-height: 150rpx; | |||||
| } | |||||
| .view6{ | |||||
| margin-left: 53%; | |||||
| color: #464646; | |||||
| margin-top: -13.2%; | |||||
| } | |||||
| .view7{ | |||||
| margin-top: 5%; | |||||
| margin-left: 17px; | |||||
| margin-bottom: 3%; | |||||
| color: #888888; | |||||
| font-size: 14px; | |||||
| } | |||||
| .view8{ | |||||
| margin-left: 53%; | |||||
| color: #888888; | |||||
| margin-top: -8%; | |||||
| font-size: 14px; | |||||
| margin-bottom: 3%; | |||||
| } | |||||
| .text1{ | |||||
| margin-left: 10px; | |||||
| } | |||||
| .text3{ | |||||
| margin-left: 10px; | |||||
| } | |||||
| /* .section{ | |||||
| ======= | |||||
| .section{ | |||||
| >>>>>>> 67a5a393b46de98ccc6ec6470b3973f1bd81d7ab | |||||
| background:#FFFFFF; | |||||
| margin-top: 10px; | |||||
| margin-bottom: 10px; | |||||
| width:80%; | |||||
| text-align: center; | |||||
| height: 30px; | |||||
| margin-left: 2%; | |||||
| border-radius: 10rpx; | |||||
| font-size: 16px; | |||||
| border: 1rpx solid #ccc; | |||||
| <<<<<<< HEAD | |||||
| } */ | |||||
| .tianjia{ | |||||
| width: 15%; | |||||
| height: 6%; | |||||
| color: #FFFFFF; | |||||
| background: #2E8CF5; | |||||
| margin-left:83.5%; | |||||
| font-size: 14px; | |||||
| margin-top: -12%; | |||||
| margin-bottom: 10px; | |||||
| } | |||||
| .section1{ | |||||
| background:#FFFFFF; | |||||
| margin-top: 10px; | |||||
| margin-bottom: 10px; | |||||
| width:80%; | |||||
| text-align: center; | |||||
| height: 30px; | |||||
| margin-left: 10%; | |||||
| margin-right: 10%; | |||||
| border-radius: 10rpx; | |||||
| font-size: 16px; | |||||
| color: #CCCCCC; | |||||
| border: 1rpx solid #ccc; | |||||
| } | |||||
| .picker{ | |||||
| line-height: 30px; | |||||
| } | |||||
| .xian{ | |||||
| width: 80%; | |||||
| height: 1px; | |||||
| margin-left: 10%; | |||||
| margin-right: 10%; | |||||
| background: #888888; | |||||
| } | |||||
| .siji{ | |||||
| color: #2E8CF5; | |||||
| margin-left: 25%; | |||||
| margin-top: 2%; | |||||
| } | |||||
| .hide{ | |||||
| display: none; | |||||
| } | |||||
| .show{ | |||||
| display: block; | |||||
| } | |||||
| .xuanze{ | |||||
| background: #FFFFFF; | |||||
| text-align: center; | |||||
| color: #2E8CF5; | |||||
| margin-top: 30%; | |||||
| } | |||||
| .xuanze1{ | |||||
| width: 80%; | |||||
| margin-top: 10%; | |||||
| text-align: center; | |||||
| color: #2E8CF5; | |||||
| } | |||||
| .xuanze1{ | |||||
| line-height:100rpx; | |||||
| } | |||||
| .checkbox1{ | |||||
| margin-left: 3%; | |||||
| width: 1%; | |||||
| height: 5%; | |||||
| margin-top: 2.5%; | |||||
| } | |||||
| @ -0,0 +1,262 @@ | |||||
| const app = getApp(); | |||||
| var baseUrl = app.globalData.baseUrl; | |||||
| var network = require("../../utils/net.js"); | |||||
| var timechage = require("../../utils/dateTimeUtil.js"); | |||||
| var ID = 0; | |||||
| var ID1; | |||||
| var LoadTime1; | |||||
| var Number; | |||||
| var SecondNumber; | |||||
| var Phone; | |||||
| var ID4; | |||||
| Page({ | |||||
| data: { | |||||
| name1: [], | |||||
| countsArraydrug: [], | |||||
| index: null, | |||||
| btnnum: 1 | |||||
| }, | |||||
| phoneNum: function(e) { | |||||
| Phone = e.detail.value | |||||
| var that = this; | |||||
| var method2 = '/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDriver'; | |||||
| var params2 = [{ | |||||
| "InputValue": Phone, | |||||
| "PageIndex": 0, | |||||
| "PageSize": 100 | |||||
| }]; | |||||
| network.requestLoading(method2, params2, function(res) { | |||||
| that.setData({ | |||||
| name1: res.result, | |||||
| }) | |||||
| }) | |||||
| console.log(Phone) | |||||
| }, | |||||
| onLoad: function(options) { | |||||
| var that = this; | |||||
| ID = parseInt(options.ID); | |||||
| var num = this.data.btnnum; | |||||
| this.setData({ | |||||
| btnnum: num, | |||||
| obj: { | |||||
| 1: { | |||||
| "yaopin": "请选择司机", | |||||
| num: num, | |||||
| countsArraydrug: [], | |||||
| } | |||||
| }, | |||||
| }) | |||||
| var method1 = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/LoadForDriver'; | |||||
| var params1 = [ID]; | |||||
| network.requestLoading(method1, params1, function(res) { | |||||
| that.setData({ | |||||
| ID1: res.result.ID, | |||||
| LoadTime1: timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), "Y/M/D"), | |||||
| Number: res.result.Number, | |||||
| SecondNumber: res.result.SecondNumber, | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| powerDrawer1: function(e) { | |||||
| console.log("12") | |||||
| var that = this; | |||||
| var method2 = '/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetDriver'; | |||||
| var params2 = [{ | |||||
| "InputValue": Phone, | |||||
| "PageIndex": 0, | |||||
| "PageSize": 100 | |||||
| }]; | |||||
| network.requestLoading(method2, params2, function(res) { | |||||
| //res就是我们请求接口返回的数据 | |||||
| console.log(res.result) | |||||
| that.setData({ | |||||
| name1: res.result, | |||||
| countsArraydrug: res.result, | |||||
| obj: { | |||||
| 1: { | |||||
| "yaopin": "请选择司机", | |||||
| } | |||||
| } | |||||
| }) | |||||
| // console.log(ID2+"+cccccccccc") | |||||
| }) | |||||
| var currentStatu = e.currentTarget.dataset.statu; | |||||
| var i = e.currentTarget.dataset.index; | |||||
| console.log(i) | |||||
| console.log(currentStatu) | |||||
| this.util(currentStatu) | |||||
| this.setData({ | |||||
| thatIndex: i | |||||
| }) | |||||
| }, | |||||
| a: function(event) { | |||||
| var ID3; | |||||
| var that = this; | |||||
| var index = event.currentTarget.dataset.index | |||||
| let indexNum = this.data.thatIndex; | |||||
| let obj = this.data.obj; | |||||
| // console.log(that.data.name1[index]); | |||||
| ID3 = that.data.name1[index].ID | |||||
| console.log(ID3 + "dddd"); | |||||
| ID4 = ID3; | |||||
| console.log(ID4); | |||||
| obj[indexNum] = { | |||||
| "yaopin": that.data.name1[index].Name, | |||||
| indexNum: indexNum, | |||||
| } | |||||
| that.setData({ | |||||
| obj: obj, | |||||
| showModalStatus: false, | |||||
| }) | |||||
| }, | |||||
| paiche: function(event) { | |||||
| var that = this; | |||||
| that.setData({ | |||||
| ID4:ID4, | |||||
| }) | |||||
| console.log("高树凯"+ID4) | |||||
| if (ID4 == null) { | |||||
| wx.showModal({ | |||||
| title: '提示', | |||||
| content: '不能为空', | |||||
| }) | |||||
| console.log("11111111111111") | |||||
| } else { | |||||
| console.log("222222222222") | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/OrderRpc/SetDriverToOrder'; | |||||
| var params = [ID, ID4]; | |||||
| console.log(params + "999999999999") | |||||
| network.requestLoading(method, params, function(res) { | |||||
| if (ID4 != null) { | |||||
| console.log("333333333333") | |||||
| wx.navigateBack({ | |||||
| delta: "/pages/theDriverSend/theDriverSend" | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function() { | |||||
| ID4=null | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function() { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function() { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function() { | |||||
| var that = this | |||||
| var ID5=ID; | |||||
| return { | |||||
| title: '', | |||||
| path: "/pages/fenxiang/fenxiang?ID=" + ID5, | |||||
| //分享成功后执行 | |||||
| success: function(res) { | |||||
| wx.showModal({ | |||||
| showCancel : false, | |||||
| title: '转发成功', | |||||
| }) | |||||
| }, | |||||
| fail: function(res) { | |||||
| } | |||||
| } | |||||
| }, | |||||
| powerDrawer: function(e) { | |||||
| var currentStatu = e.currentTarget.dataset.statu; | |||||
| console.log(currentStatu) | |||||
| this.util(currentStatu) | |||||
| }, | |||||
| util: function(currentStatu) { | |||||
| /* 动画部分 */ | |||||
| // 第1步:创建动画实例 | |||||
| var animation = wx.createAnimation({ | |||||
| duration: 200, //动画时长 | |||||
| timingFunction: "linear", //线性 | |||||
| delay: 0 //0则不延迟 | |||||
| }); | |||||
| // 第2步:这个动画实例赋给当前的动画实例 | |||||
| this.animation = animation; | |||||
| // 第3步:执行第一组动画 | |||||
| animation.opacity(0).rotateX(-100).step(); | |||||
| // 第4步:导出动画对象赋给数据对象储存 | |||||
| this.setData({ | |||||
| animationData: animation.export() | |||||
| }) | |||||
| // 第5步:设置定时器到指定时候后,执行第二组动画 | |||||
| setTimeout(function() { | |||||
| // 执行第二组动画 | |||||
| animation.opacity(1).rotateX(0).step(); | |||||
| // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象 | |||||
| this.setData({ | |||||
| animationData: animation | |||||
| }) | |||||
| //关闭 | |||||
| if (currentStatu == "close") { | |||||
| this.setData({ | |||||
| showModalStatus: false | |||||
| }); | |||||
| } | |||||
| }.bind(this), 200) | |||||
| // 显示 | |||||
| if (currentStatu == "open") { | |||||
| this.setData({ | |||||
| showModalStatus: true | |||||
| }); | |||||
| } | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1 @@ | |||||
| {} | |||||
| @ -0,0 +1,75 @@ | |||||
| <view> | |||||
| <view class='yonghu' catchtap='sendTheDetails'> | |||||
| <view class='view1'>订单: | |||||
| <text class='text1'>{{ID1}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class='yonghu1' catchtap='sendTheDetails'> | |||||
| <view class='view1'>发货时间: | |||||
| <text class='text1'>{{LoadTime1}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class='yonghu1' catchtap='sendTheDetails'> | |||||
| <view class='view1'>重量: | |||||
| <text class='text1'>{{Number}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class='yonghu1' catchtap='sendTheDetails'> | |||||
| <view class='view1'>箱数: | |||||
| <text class='text1'>{{SecondNumber}}</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class='yonghu1' catchtap='sendTheDetails'> | |||||
| <view class='view1'>司机: | |||||
| <view class='main-body'> | |||||
| <block wx:for="{{obj}}" wx:key="item"> | |||||
| <view class='client'> | |||||
| <view class='select-drug' bindtap="powerDrawer1" data-statu="open" data-index="{{index}}"> | |||||
| <view class='drug' bindtap='drug'> | |||||
| {{item.yaopin}} | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </block> | |||||
| <!-- <view class='btn1' catchtap='btn1'> 添加</view> --> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}"> | |||||
| <!--drawer content--> | |||||
| <view class='top'> | |||||
| <input class="sousuo" placeholder='请搜索' bindinput="phoneNum"></input> | |||||
| </view> | |||||
| <view class="drawer_content"> | |||||
| <block wx:for="{{name1}}"> | |||||
| <view class="top grid" catchtap='a' data-index="{{index}}" range="{{name1}}" data-id="{{name1}}"> | |||||
| <text class="title col-0">{{name1[index].Name}}</text> | |||||
| </view> | |||||
| </block> | |||||
| </view> | |||||
| <view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view> | |||||
| </view> | |||||
| <button class='paiche' bindtap='paiche'>派车</button> | |||||
| <button class='fenxiang' open-type='share'>分享</button> | |||||
| @ -0,0 +1,178 @@ | |||||
| page{ | |||||
| background: rgb(240, 239, 245) | |||||
| } | |||||
| .yonghu{ | |||||
| background: #FFFFFF; | |||||
| height: 50px; | |||||
| /* border-bottom: 0.1px ; */ | |||||
| margin-top: 10px; | |||||
| border-top: 0.5px solid rgb(240, 239, 245); | |||||
| } | |||||
| .yonghu1{ | |||||
| background: #FFFFFF; | |||||
| height: 50px; | |||||
| /* border-bottom: 0.1px ; */ | |||||
| border-top: 0.5px solid rgb(240, 239, 245); | |||||
| } | |||||
| .yonghu2{ | |||||
| background: #FFFFFF; | |||||
| height: 50px; | |||||
| border-bottom: 0.1px ; | |||||
| border-top: 1px solid #bebdbd; | |||||
| } | |||||
| .view1{ | |||||
| margin-top: 3%; | |||||
| margin-left: 17px; | |||||
| color: #464646; | |||||
| } | |||||
| .text1{ | |||||
| margin-right: 5%; | |||||
| float: right; | |||||
| } | |||||
| .picker{ | |||||
| float: right; | |||||
| margin-right: 20%; | |||||
| } | |||||
| .paiche{ | |||||
| color: #FFFFFF; | |||||
| background: #2E8CF5; | |||||
| margin-top: 20%; | |||||
| margin-left: 5%; | |||||
| width: 30%; | |||||
| float: left; | |||||
| } | |||||
| .fenxiang{ | |||||
| color: #FFFFFF; | |||||
| background: #2E8CF5; | |||||
| margin-top: 20%; | |||||
| margin-right: 5%; | |||||
| width: 30%; | |||||
| float: right; | |||||
| } | |||||
| /*mask*/ | |||||
| .drawer_screen { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| z-index: 1000; | |||||
| background: #000; | |||||
| opacity: 0.5; | |||||
| overflow: hidden; | |||||
| } | |||||
| /*content*/ | |||||
| .drawer_box { | |||||
| width: 650rpx; | |||||
| overflow: hidden; | |||||
| position: fixed; | |||||
| top: 50%; | |||||
| left: 0; | |||||
| z-index: 1001; | |||||
| background: #FAFAFA; | |||||
| margin: -150px 50rpx 0 50rpx; | |||||
| border-radius: 3px; | |||||
| } | |||||
| .drawer_title{ | |||||
| padding:15px; | |||||
| font: 20px "microsoft yahei"; | |||||
| text-align: center; | |||||
| } | |||||
| .drawer_content { | |||||
| height: 210px; | |||||
| overflow-y: scroll; /*超出父盒子高度可滚动*/ | |||||
| } | |||||
| .btn_ok{ | |||||
| padding: 10px; | |||||
| font: 20px "microsoft yahei"; | |||||
| text-align: center; | |||||
| border-top: 1px solid #E8E8EA; | |||||
| color: #2E8CF5; | |||||
| } | |||||
| .top{ | |||||
| padding-top:8px; | |||||
| } | |||||
| .bottom { | |||||
| padding-bottom:8px; | |||||
| } | |||||
| .title { | |||||
| height: 30px; | |||||
| line-height: 30px; | |||||
| width: 160rpx; | |||||
| text-align: center; | |||||
| display: inline-block; | |||||
| font: 300 28rpx/30px "microsoft yahei"; | |||||
| } | |||||
| .input_view{ | |||||
| font: 12px "microsoft yahei"; | |||||
| background: #fff; | |||||
| color:#000; | |||||
| line-height: 30px; | |||||
| } | |||||
| input { | |||||
| font: 12px "microsoft yahei"; | |||||
| background: #fff; | |||||
| color:#000 ; | |||||
| } | |||||
| radio{ | |||||
| margin-right: 20px; | |||||
| } | |||||
| .grid { display: -webkit-box; display: box; } | |||||
| .col-0 {-webkit-box-flex:0;box-flex:0;} | |||||
| .col-1 {-webkit-box-flex:1;box-flex:1;} | |||||
| .fl { float: left;} | |||||
| .fr { float: right;} | |||||
| .main-body{ | |||||
| color: #C9C9C9; | |||||
| margin-top: -1%; | |||||
| height: 35px; | |||||
| float: right; | |||||
| } | |||||
| .btn1{ | |||||
| margin-left: 9.4%; | |||||
| background: #ffffff; | |||||
| height: 44px; | |||||
| margin-right: 57px; | |||||
| color: #2E8CF5; | |||||
| line-height: 2.2rem; | |||||
| text-align: center; | |||||
| } | |||||
| .client{ | |||||
| height: 44px; | |||||
| background: #ffffff; | |||||
| margin-left: 40px; | |||||
| margin-right: 58px; | |||||
| } | |||||
| .drug{ | |||||
| text-align: center; | |||||
| line-height: 30px; | |||||
| } | |||||
| @ -0,0 +1,157 @@ | |||||
| // pages/statementOfAccount/statementOfAccount.js | |||||
| var network = require("../../utils/net.js"); | |||||
| var timechage = require("../../utils/dateTimeUtil.js"); | |||||
| var pageindex = 0; | |||||
| var pagesize = 10; | |||||
| var year; | |||||
| var month; | |||||
| var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/GatheringRpc/GetGatheringList'; | |||||
| Page({ | |||||
| data: { | |||||
| dates: new Date().getFullYear() + '-' + (new Date().getMonth() + 1), | |||||
| list:[], | |||||
| delBtnWidth: 90, | |||||
| startX: "" | |||||
| }, | |||||
| bindDateChange: function (e) { | |||||
| this.setData({ | |||||
| dates: e.detail.value, | |||||
| list: [], | |||||
| }) | |||||
| var year=this.data.dates.split('-')[0]; | |||||
| var month = this.data.dates.split('-')[1]; | |||||
| // var day = this.data.dates.split('-')[2]; | |||||
| var i1 = parseInt(year) | |||||
| var i2 = parseInt(month) | |||||
| // var i3 = parseInt(day) | |||||
| var that=this; | |||||
| pageindex = 0; | |||||
| var params = [i1, i2, pageindex,pagesize]; | |||||
| this.getGatheringList(that, params); | |||||
| }, | |||||
| //滑动到底部加载 | |||||
| addOtherTenOrder: function (event) { | |||||
| var that = this; | |||||
| pageindex = pageindex + 1; | |||||
| var year = this.data.dates.split('-')[0]; | |||||
| var month = this.data.dates.split('-')[1]; | |||||
| var params = [year, month, pageindex, pagesize]; | |||||
| this.getGatheringList(that, params); | |||||
| }, | |||||
| onLoad: function (options) { | |||||
| this.setData({ | |||||
| list: [], | |||||
| }); | |||||
| var that = this; | |||||
| pageindex = 0; | |||||
| var year = this.data.dates.split('-')[0]; | |||||
| var month = this.data.dates.split('-')[1]; | |||||
| var params = [year, month, pageindex, pagesize]; | |||||
| this.getGatheringList(that, params); | |||||
| }, | |||||
| getGatheringList : function (that,params) { | |||||
| var reslut = []; | |||||
| network.requestLoading(method, params, function (res) { | |||||
| var array = res.result; | |||||
| if (array.length <= 0) { | |||||
| wx.showToast({ | |||||
| title: '无数据更新', | |||||
| }) | |||||
| if (pageindex > 0) { | |||||
| pageindex = pageindex - 1; | |||||
| } | |||||
| return; | |||||
| } | |||||
| for (var i = 0; i < array.length; i++) { | |||||
| let dmo = { | |||||
| GatheringTime: timechage.formatTimeTwo(res.result[i].GatheringTime.substring(6, 19), "Y/M/D"), | |||||
| GatheringMoney: res.result[i].GatheringMoney, | |||||
| } | |||||
| reslut.push(dmo) | |||||
| } | |||||
| let arrLast = that.data.list.concat(reslut); | |||||
| that.setData({ | |||||
| list: arrLast | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| touchS: function (e) { | |||||
| if (e.touches.length == 1) { | |||||
| this.setData({ | |||||
| //设置触摸起始点水平方向位置 | |||||
| startX: e.touches[0].clientX | |||||
| }); | |||||
| } | |||||
| }, | |||||
| touchM: function (e) { | |||||
| if (e.touches.length == 1) { | |||||
| //手指移动时水平方向位置 | |||||
| var moveX = e.touches[0].clientX; | |||||
| //手指起始点位置与移动期间的差值 | |||||
| var disX = this.data.startX - moveX; | |||||
| var delBtnWidth = this.data.delBtnWidth; | |||||
| var txtStyle = ""; | |||||
| if (disX == 0 || disX < 0) {//如果移动距离小于等于0,说明向右滑动,文本层位置不变 | |||||
| txtStyle = "left:0px"; | |||||
| } else if (disX > 0) {//移动距离大于0,文本层left值等于手指移动距离 | |||||
| txtStyle = "left:-" + disX + "px"; | |||||
| if (disX >= delBtnWidth) { | |||||
| //控制手指移动距离最大值为删除按钮的宽度 | |||||
| txtStyle = "left:-" + delBtnWidth + "px"; | |||||
| } | |||||
| } | |||||
| //获取手指触摸的是哪一项 | |||||
| var index = e.currentTarget.dataset.index; | |||||
| var list = this.data.list; | |||||
| list[index].txtStyle = txtStyle; | |||||
| //更新列表的状态 | |||||
| this.setData({ | |||||
| list: list | |||||
| }); | |||||
| } | |||||
| }, | |||||
| touchE: function (e) { | |||||
| if (e.changedTouches.length == 1) { | |||||
| //手指移动结束后水平位置 | |||||
| var endX = e.changedTouches[0].clientX; | |||||
| //触摸开始与结束,手指移动的距离 | |||||
| var disX = this.data.startX - endX; | |||||
| var delBtnWidth = this.data.delBtnWidth; | |||||
| //如果距离小于删除按钮的1/2,不显示删除按钮 | |||||
| var txtStyle = disX > delBtnWidth / 2 ? "left:-" + delBtnWidth + "px" : "left:0px"; | |||||
| //获取手指触摸的是哪一项 | |||||
| var index = e.currentTarget.dataset.index; | |||||
| var list = this.data.list; | |||||
| list[index].txtStyle = txtStyle; | |||||
| //更新列表的状态 | |||||
| this.setData({ | |||||
| list: list | |||||
| }); | |||||
| } | |||||
| }, | |||||
| //点击删除按钮事件 | |||||
| delItem: function (e) { | |||||
| //获取列表中要删除项的下标 | |||||
| var index = e.currentTarget.dataset.index; | |||||
| var list = this.data.list; | |||||
| //移除列表中下标为index的项 | |||||
| list.splice(index, 1); | |||||
| //更新列表的状态 | |||||
| this.setData({ | |||||
| list: list | |||||
| }); | |||||
| }, | |||||
| }) | |||||
| @ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "对账单" | |||||
| } | |||||
| @ -0,0 +1,41 @@ | |||||
| <view class="section"> | |||||
| <picker mode="date" value="{{date}}" start="2018-01-01" end="2037-12-31" bindchange="bindDateChange" fields='month'> | |||||
| <view class="picker"> | |||||
| {{dates}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class='listContainer'> | |||||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltolower="addOtherTenOrder"> | |||||
| <block wx:for="{{list}}" wx:for-item="item" wx:for-index="idx"> | |||||
| <template is="statementTemplate" data="{{item,idx}}" /> | |||||
| </block> | |||||
| </scroll-view> | |||||
| </view> | |||||
| <!-- <view class='listContainer'> | |||||
| <scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltolower="addOtherTenOrder"> | |||||
| <block wx:for="{{list}}" wx:for-item="item" wx:for-index="idx"> | |||||
| <template is="statementTemplate" data="{{item}}" /> | |||||
| </block> | |||||
| </scroll-view> | |||||
| </view> --> | |||||
| <!-- 原界面 --> | |||||
| <!-- <template name="statementTemplate"> | |||||
| <view class='yonghu'> | |||||
| <view class='view1'>日期:{{item.GatheringTime}}</view> | |||||
| <view class='view2'>收款:{{item.GatheringMoney}}</view> | |||||
| </view> | |||||
| </template> --> | |||||
| <template name="statementTemplate"> | |||||
| <view class="item"> | |||||
| <view bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" data-index="{{idx}}" style="{{item.txtStyle}}" class="inner txt"> | |||||
| <view class='view1'>日期:{{item.GatheringTime}}</view> | |||||
| <view class='view2'>收款:{{item.GatheringMoney}}</view> | |||||
| </view> | |||||
| <view data-index="{{idx}}" bindtap="delItem" class="inner del">删除</view> | |||||
| </view> | |||||
| </template> | |||||
| @ -0,0 +1,101 @@ | |||||
| page { | |||||
| background: #f4f4f4; | |||||
| height: 100%; | |||||
| } | |||||
| .section { | |||||
| background: #fff; | |||||
| margin-top: 10px; | |||||
| width: 80%; | |||||
| text-align: center; | |||||
| height: 30px; | |||||
| margin-left: 10%; | |||||
| margin-right: 10%; | |||||
| border-radius: 10rpx; | |||||
| font-size: 16px; | |||||
| color: #ccc; | |||||
| border: 1rpx solid #ccc; | |||||
| } | |||||
| .picker { | |||||
| line-height: 30px; | |||||
| } | |||||
| .listContainer { | |||||
| width: 100%; | |||||
| height: calc(100% - 50px); | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| } | |||||
| .scroll-views { | |||||
| height: 100%; | |||||
| } | |||||
| /* .yonghu { | |||||
| background: #fff; | |||||
| height: 50px; | |||||
| border-bottom: 0.5px solid #ccc; | |||||
| margin-top: 10px; | |||||
| border-top: 0.5px solid #ccc; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| } */ | |||||
| .view1 { | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| color: #464646; | |||||
| line-height: 50px; | |||||
| text-align: center; | |||||
| } | |||||
| .view2 { | |||||
| height: 100%; | |||||
| width: 50%; | |||||
| color: #464646; | |||||
| line-height: 50px; | |||||
| padding-right: 20rpx; | |||||
| text-align: center; | |||||
| } | |||||
| .item { | |||||
| position: relative; | |||||
| margin-top: 10rpx; | |||||
| border-top: 2rpx solid #eee; | |||||
| height: 50px; | |||||
| line-height: 50rpx; | |||||
| overflow: hidden; | |||||
| } | |||||
| .inner { | |||||
| position: absolute; | |||||
| top: 0; | |||||
| } | |||||
| .inner.txt { | |||||
| background-color: #fff; | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| z-index: 5; | |||||
| padding: 0 10rpx; | |||||
| transition: left 0.2s ease-in-out; | |||||
| white-space: nowrap; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| } | |||||
| .inner.del { | |||||
| background-color: red; | |||||
| font-family: Monaco; | |||||
| width: 90px; | |||||
| height: 50px; | |||||
| line-height: 50px; | |||||
| text-align: center; | |||||
| z-index: 4; | |||||
| right: 0; | |||||
| color: #fff; | |||||
| } | |||||
| @ -0,0 +1,45 @@ | |||||
| { | |||||
| "description": "项目配置文件。", | |||||
| "setting": { | |||||
| "urlCheck": false, | |||||
| "es6": true, | |||||
| "postcss": true, | |||||
| "minified": true, | |||||
| "newFeature": true | |||||
| }, | |||||
| "compileType": "miniprogram", | |||||
| "libVersion": "2.3.0", | |||||
| "appid": "wx0b897783b2588147", | |||||
| "projectname": "%E7%95%9C%E5%AE%A2%E6%88%B7", | |||||
| "isGameTourist": false, | |||||
| "condition": { | |||||
| "search": { | |||||
| "current": -1, | |||||
| "list": [] | |||||
| }, | |||||
| "conversation": { | |||||
| "current": -1, | |||||
| "list": [] | |||||
| }, | |||||
| "plugin": { | |||||
| "current": -1, | |||||
| "list": [] | |||||
| }, | |||||
| "game": { | |||||
| "currentL": -1, | |||||
| "list": [] | |||||
| }, | |||||
| "miniprogram": { | |||||
| "current": 0, | |||||
| "list": [ | |||||
| { | |||||
| "id": 0, | |||||
| "name": "小程序码", | |||||
| "pathName": "pages/login/login", | |||||
| "query": "", | |||||
| "scene": "1011" | |||||
| } | |||||
| ] | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,112 @@ | |||||
| /* | |||||
| CryptoJS v3.1.2 | |||||
| code.google.com/p/crypto-js | |||||
| (c) 2009-2013 by Jeff Mott. All rights reserved. | |||||
| code.google.com/p/crypto-js/wiki/License | |||||
| */ | |||||
| var CryptoJS = CryptoJS || function (u, p) { | |||||
| var d = {}, l = d.lib = {}, s = function () { }, t = l.Base = { extend: function (a) { s.prototype = this; var c = new s; a && c.mixIn(a); c.hasOwnProperty("init") || (c.init = function () { c.$super.init.apply(this, arguments) }); c.init.prototype = c; c.$super = this; return c }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var c in a) a.hasOwnProperty(c) && (this[c] = a[c]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, | |||||
| r = l.WordArray = t.extend({ | |||||
| init: function (a, c) { a = this.words = a || []; this.sigBytes = c != p ? c : 4 * a.length }, toString: function (a) { return (a || v).stringify(this) }, concat: function (a) { var c = this.words, e = a.words, j = this.sigBytes; a = a.sigBytes; this.clamp(); if (j % 4) for (var k = 0; k < a; k++)c[j + k >>> 2] |= (e[k >>> 2] >>> 24 - 8 * (k % 4) & 255) << 24 - 8 * ((j + k) % 4); else if (65535 < e.length) for (k = 0; k < a; k += 4)c[j + k >>> 2] = e[k >>> 2]; else c.push.apply(c, e); this.sigBytes += a; return this }, clamp: function () { | |||||
| var a = this.words, c = this.sigBytes; a[c >>> 2] &= 4294967295 << | |||||
| 32 - 8 * (c % 4); a.length = u.ceil(c / 4) | |||||
| }, clone: function () { var a = t.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (var c = [], e = 0; e < a; e += 4)c.push(4294967296 * u.random() | 0); return new r.init(c, a) } | |||||
| }), w = d.enc = {}, v = w.Hex = { | |||||
| stringify: function (a) { var c = a.words; a = a.sigBytes; for (var e = [], j = 0; j < a; j++) { var k = c[j >>> 2] >>> 24 - 8 * (j % 4) & 255; e.push((k >>> 4).toString(16)); e.push((k & 15).toString(16)) } return e.join("") }, parse: function (a) { | |||||
| for (var c = a.length, e = [], j = 0; j < c; j += 2)e[j >>> 3] |= parseInt(a.substr(j, | |||||
| 2), 16) << 24 - 4 * (j % 8); return new r.init(e, c / 2) | |||||
| } | |||||
| }, b = w.Latin1 = { stringify: function (a) { var c = a.words; a = a.sigBytes; for (var e = [], j = 0; j < a; j++)e.push(String.fromCharCode(c[j >>> 2] >>> 24 - 8 * (j % 4) & 255)); return e.join("") }, parse: function (a) { for (var c = a.length, e = [], j = 0; j < c; j++)e[j >>> 2] |= (a.charCodeAt(j) & 255) << 24 - 8 * (j % 4); return new r.init(e, c) } }, x = w.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(b.stringify(a))) } catch (c) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return b.parse(unescape(encodeURIComponent(a))) } }, | |||||
| q = l.BufferedBlockAlgorithm = t.extend({ | |||||
| reset: function () { this._data = new r.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = x.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var c = this._data, e = c.words, j = c.sigBytes, k = this.blockSize, b = j / (4 * k), b = a ? u.ceil(b) : u.max((b | 0) - this._minBufferSize, 0); a = b * k; j = u.min(4 * a, j); if (a) { for (var q = 0; q < a; q += k)this._doProcessBlock(e, q); q = e.splice(0, a); c.sigBytes -= j } return new r.init(q, j) }, clone: function () { | |||||
| var a = t.clone.call(this); | |||||
| a._data = this._data.clone(); return a | |||||
| }, _minBufferSize: 0 | |||||
| }); l.Hasher = q.extend({ | |||||
| cfg: t.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { q.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, e) { return (new a.init(e)).finalize(b) } }, _createHmacHelper: function (a) { | |||||
| return function (b, e) { | |||||
| return (new n.HMAC.init(a, | |||||
| e)).finalize(b) | |||||
| } | |||||
| } | |||||
| }); var n = d.algo = {}; return d | |||||
| }(Math); | |||||
| (function () { | |||||
| var u = CryptoJS, p = u.lib.WordArray; u.enc.Base64 = { | |||||
| stringify: function (d) { var l = d.words, p = d.sigBytes, t = this._map; d.clamp(); d = []; for (var r = 0; r < p; r += 3)for (var w = (l[r >>> 2] >>> 24 - 8 * (r % 4) & 255) << 16 | (l[r + 1 >>> 2] >>> 24 - 8 * ((r + 1) % 4) & 255) << 8 | l[r + 2 >>> 2] >>> 24 - 8 * ((r + 2) % 4) & 255, v = 0; 4 > v && r + 0.75 * v < p; v++)d.push(t.charAt(w >>> 6 * (3 - v) & 63)); if (l = t.charAt(64)) for (; d.length % 4;)d.push(l); return d.join("") }, parse: function (d) { | |||||
| var l = d.length, s = this._map, t = s.charAt(64); t && (t = d.indexOf(t), -1 != t && (l = t)); for (var t = [], r = 0, w = 0; w < | |||||
| l; w++)if (w % 4) { var v = s.indexOf(d.charAt(w - 1)) << 2 * (w % 4), b = s.indexOf(d.charAt(w)) >>> 6 - 2 * (w % 4); t[r >>> 2] |= (v | b) << 24 - 8 * (r % 4); r++ } return p.create(t, r) | |||||
| }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |||||
| } | |||||
| })(); | |||||
| (function (u) { | |||||
| function p(b, n, a, c, e, j, k) { b = b + (n & a | ~n & c) + e + k; return (b << j | b >>> 32 - j) + n } function d(b, n, a, c, e, j, k) { b = b + (n & c | a & ~c) + e + k; return (b << j | b >>> 32 - j) + n } function l(b, n, a, c, e, j, k) { b = b + (n ^ a ^ c) + e + k; return (b << j | b >>> 32 - j) + n } function s(b, n, a, c, e, j, k) { b = b + (a ^ (n | ~c)) + e + k; return (b << j | b >>> 32 - j) + n } for (var t = CryptoJS, r = t.lib, w = r.WordArray, v = r.Hasher, r = t.algo, b = [], x = 0; 64 > x; x++)b[x] = 4294967296 * u.abs(u.sin(x + 1)) | 0; r = r.MD5 = v.extend({ | |||||
| _doReset: function () { this._hash = new w.init([1732584193, 4023233417, 2562383102, 271733878]) }, | |||||
| _doProcessBlock: function (q, n) { | |||||
| for (var a = 0; 16 > a; a++) { var c = n + a, e = q[c]; q[c] = (e << 8 | e >>> 24) & 16711935 | (e << 24 | e >>> 8) & 4278255360 } var a = this._hash.words, c = q[n + 0], e = q[n + 1], j = q[n + 2], k = q[n + 3], z = q[n + 4], r = q[n + 5], t = q[n + 6], w = q[n + 7], v = q[n + 8], A = q[n + 9], B = q[n + 10], C = q[n + 11], u = q[n + 12], D = q[n + 13], E = q[n + 14], x = q[n + 15], f = a[0], m = a[1], g = a[2], h = a[3], f = p(f, m, g, h, c, 7, b[0]), h = p(h, f, m, g, e, 12, b[1]), g = p(g, h, f, m, j, 17, b[2]), m = p(m, g, h, f, k, 22, b[3]), f = p(f, m, g, h, z, 7, b[4]), h = p(h, f, m, g, r, 12, b[5]), g = p(g, h, f, m, t, 17, b[6]), m = p(m, g, h, f, w, 22, b[7]), | |||||
| f = p(f, m, g, h, v, 7, b[8]), h = p(h, f, m, g, A, 12, b[9]), g = p(g, h, f, m, B, 17, b[10]), m = p(m, g, h, f, C, 22, b[11]), f = p(f, m, g, h, u, 7, b[12]), h = p(h, f, m, g, D, 12, b[13]), g = p(g, h, f, m, E, 17, b[14]), m = p(m, g, h, f, x, 22, b[15]), f = d(f, m, g, h, e, 5, b[16]), h = d(h, f, m, g, t, 9, b[17]), g = d(g, h, f, m, C, 14, b[18]), m = d(m, g, h, f, c, 20, b[19]), f = d(f, m, g, h, r, 5, b[20]), h = d(h, f, m, g, B, 9, b[21]), g = d(g, h, f, m, x, 14, b[22]), m = d(m, g, h, f, z, 20, b[23]), f = d(f, m, g, h, A, 5, b[24]), h = d(h, f, m, g, E, 9, b[25]), g = d(g, h, f, m, k, 14, b[26]), m = d(m, g, h, f, v, 20, b[27]), f = d(f, m, g, h, D, 5, b[28]), h = d(h, f, | |||||
| m, g, j, 9, b[29]), g = d(g, h, f, m, w, 14, b[30]), m = d(m, g, h, f, u, 20, b[31]), f = l(f, m, g, h, r, 4, b[32]), h = l(h, f, m, g, v, 11, b[33]), g = l(g, h, f, m, C, 16, b[34]), m = l(m, g, h, f, E, 23, b[35]), f = l(f, m, g, h, e, 4, b[36]), h = l(h, f, m, g, z, 11, b[37]), g = l(g, h, f, m, w, 16, b[38]), m = l(m, g, h, f, B, 23, b[39]), f = l(f, m, g, h, D, 4, b[40]), h = l(h, f, m, g, c, 11, b[41]), g = l(g, h, f, m, k, 16, b[42]), m = l(m, g, h, f, t, 23, b[43]), f = l(f, m, g, h, A, 4, b[44]), h = l(h, f, m, g, u, 11, b[45]), g = l(g, h, f, m, x, 16, b[46]), m = l(m, g, h, f, j, 23, b[47]), f = s(f, m, g, h, c, 6, b[48]), h = s(h, f, m, g, w, 10, b[49]), g = s(g, h, f, m, | |||||
| E, 15, b[50]), m = s(m, g, h, f, r, 21, b[51]), f = s(f, m, g, h, u, 6, b[52]), h = s(h, f, m, g, k, 10, b[53]), g = s(g, h, f, m, B, 15, b[54]), m = s(m, g, h, f, e, 21, b[55]), f = s(f, m, g, h, v, 6, b[56]), h = s(h, f, m, g, x, 10, b[57]), g = s(g, h, f, m, t, 15, b[58]), m = s(m, g, h, f, D, 21, b[59]), f = s(f, m, g, h, z, 6, b[60]), h = s(h, f, m, g, C, 10, b[61]), g = s(g, h, f, m, j, 15, b[62]), m = s(m, g, h, f, A, 21, b[63]); a[0] = a[0] + f | 0; a[1] = a[1] + m | 0; a[2] = a[2] + g | 0; a[3] = a[3] + h | 0 | |||||
| }, _doFinalize: function () { | |||||
| var b = this._data, n = b.words, a = 8 * this._nDataBytes, c = 8 * b.sigBytes; n[c >>> 5] |= 128 << 24 - c % 32; var e = u.floor(a / | |||||
| 4294967296); n[(c + 64 >>> 9 << 4) + 15] = (e << 8 | e >>> 24) & 16711935 | (e << 24 | e >>> 8) & 4278255360; n[(c + 64 >>> 9 << 4) + 14] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360; b.sigBytes = 4 * (n.length + 1); this._process(); b = this._hash; n = b.words; for (a = 0; 4 > a; a++)c = n[a], n[a] = (c << 8 | c >>> 24) & 16711935 | (c << 24 | c >>> 8) & 4278255360; return b | |||||
| }, clone: function () { var b = v.clone.call(this); b._hash = this._hash.clone(); return b } | |||||
| }); t.MD5 = v._createHelper(r); t.HmacMD5 = v._createHmacHelper(r) | |||||
| })(Math); | |||||
| (function () { | |||||
| var u = CryptoJS, p = u.lib, d = p.Base, l = p.WordArray, p = u.algo, s = p.EvpKDF = d.extend({ cfg: d.extend({ keySize: 4, hasher: p.MD5, iterations: 1 }), init: function (d) { this.cfg = this.cfg.extend(d) }, compute: function (d, r) { for (var p = this.cfg, s = p.hasher.create(), b = l.create(), u = b.words, q = p.keySize, p = p.iterations; u.length < q;) { n && s.update(n); var n = s.update(d).finalize(r); s.reset(); for (var a = 1; a < p; a++)n = s.finalize(n), s.reset(); b.concat(n) } b.sigBytes = 4 * q; return b } }); u.EvpKDF = function (d, l, p) { | |||||
| return s.create(p).compute(d, | |||||
| l) | |||||
| } | |||||
| })(); | |||||
| CryptoJS.lib.Cipher || function (u) { | |||||
| var p = CryptoJS, d = p.lib, l = d.Base, s = d.WordArray, t = d.BufferedBlockAlgorithm, r = p.enc.Base64, w = p.algo.EvpKDF, v = d.Cipher = t.extend({ | |||||
| cfg: l.extend(), createEncryptor: function (e, a) { return this.create(this._ENC_XFORM_MODE, e, a) }, createDecryptor: function (e, a) { return this.create(this._DEC_XFORM_MODE, e, a) }, init: function (e, a, b) { this.cfg = this.cfg.extend(b); this._xformMode = e; this._key = a; this.reset() }, reset: function () { t.reset.call(this); this._doReset() }, process: function (e) { this._append(e); return this._process() }, | |||||
| finalize: function (e) { e && this._append(e); return this._doFinalize() }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function (e) { return { encrypt: function (b, k, d) { return ("string" == typeof k ? c : a).encrypt(e, b, k, d) }, decrypt: function (b, k, d) { return ("string" == typeof k ? c : a).decrypt(e, b, k, d) } } } | |||||
| }); d.StreamCipher = v.extend({ _doFinalize: function () { return this._process(!0) }, blockSize: 1 }); var b = p.mode = {}, x = function (e, a, b) { | |||||
| var c = this._iv; c ? this._iv = u : c = this._prevBlock; for (var d = 0; d < b; d++)e[a + d] ^= | |||||
| c[d] | |||||
| }, q = (d.BlockCipherMode = l.extend({ createEncryptor: function (e, a) { return this.Encryptor.create(e, a) }, createDecryptor: function (e, a) { return this.Decryptor.create(e, a) }, init: function (e, a) { this._cipher = e; this._iv = a } })).extend(); q.Encryptor = q.extend({ processBlock: function (e, a) { var b = this._cipher, c = b.blockSize; x.call(this, e, a, c); b.encryptBlock(e, a); this._prevBlock = e.slice(a, a + c) } }); q.Decryptor = q.extend({ | |||||
| processBlock: function (e, a) { | |||||
| var b = this._cipher, c = b.blockSize, d = e.slice(a, a + c); b.decryptBlock(e, a); x.call(this, | |||||
| e, a, c); this._prevBlock = d | |||||
| } | |||||
| }); b = b.CBC = q; q = (p.pad = {}).Pkcs7 = { pad: function (a, b) { for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, l = [], n = 0; n < c; n += 4)l.push(d); c = s.create(l, c); a.concat(c) }, unpad: function (a) { a.sigBytes -= a.words[a.sigBytes - 1 >>> 2] & 255 } }; d.BlockCipher = v.extend({ | |||||
| cfg: v.cfg.extend({ mode: b, padding: q }), reset: function () { | |||||
| v.reset.call(this); var a = this.cfg, b = a.iv, a = a.mode; if (this._xformMode == this._ENC_XFORM_MODE) var c = a.createEncryptor; else c = a.createDecryptor, this._minBufferSize = 1; this._mode = c.call(a, | |||||
| this, b && b.words) | |||||
| }, _doProcessBlock: function (a, b) { this._mode.processBlock(a, b) }, _doFinalize: function () { var a = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { a.pad(this._data, this.blockSize); var b = this._process(!0) } else b = this._process(!0), a.unpad(b); return b }, blockSize: 4 | |||||
| }); var n = d.CipherParams = l.extend({ init: function (a) { this.mixIn(a) }, toString: function (a) { return (a || this.formatter).stringify(this) } }), b = (p.format = {}).OpenSSL = { | |||||
| stringify: function (a) { | |||||
| var b = a.ciphertext; a = a.salt; return (a ? s.create([1398893684, | |||||
| 1701076831]).concat(a).concat(b) : b).toString(r) | |||||
| }, parse: function (a) { a = r.parse(a); var b = a.words; if (1398893684 == b[0] && 1701076831 == b[1]) { var c = s.create(b.slice(2, 4)); b.splice(0, 4); a.sigBytes -= 16 } return n.create({ ciphertext: a, salt: c }) } | |||||
| }, a = d.SerializableCipher = l.extend({ | |||||
| cfg: l.extend({ format: b }), encrypt: function (a, b, c, d) { d = this.cfg.extend(d); var l = a.createEncryptor(c, d); b = l.finalize(b); l = l.cfg; return n.create({ ciphertext: b, key: c, iv: l.iv, algorithm: a, mode: l.mode, padding: l.padding, blockSize: a.blockSize, formatter: d.format }) }, | |||||
| decrypt: function (a, b, c, d) { d = this.cfg.extend(d); b = this._parse(b, d.format); return a.createDecryptor(c, d).finalize(b.ciphertext) }, _parse: function (a, b) { return "string" == typeof a ? b.parse(a, this) : a } | |||||
| }), p = (p.kdf = {}).OpenSSL = { execute: function (a, b, c, d) { d || (d = s.random(8)); a = w.create({ keySize: b + c }).compute(a, d); c = s.create(a.words.slice(b), 4 * c); a.sigBytes = 4 * b; return n.create({ key: a, iv: c, salt: d }) } }, c = d.PasswordBasedCipher = a.extend({ | |||||
| cfg: a.cfg.extend({ kdf: p }), encrypt: function (b, c, d, l) { | |||||
| l = this.cfg.extend(l); d = l.kdf.execute(d, | |||||
| b.keySize, b.ivSize); l.iv = d.iv; b = a.encrypt.call(this, b, c, d.key, l); b.mixIn(d); return b | |||||
| }, decrypt: function (b, c, d, l) { l = this.cfg.extend(l); c = this._parse(c, l.format); d = l.kdf.execute(d, b.keySize, b.ivSize, c.salt); l.iv = d.iv; return a.decrypt.call(this, b, c, d.key, l) } | |||||
| }) | |||||
| }(); | |||||
| (function () { | |||||
| for (var u = CryptoJS, p = u.lib.BlockCipher, d = u.algo, l = [], s = [], t = [], r = [], w = [], v = [], b = [], x = [], q = [], n = [], a = [], c = 0; 256 > c; c++)a[c] = 128 > c ? c << 1 : c << 1 ^ 283; for (var e = 0, j = 0, c = 0; 256 > c; c++) { var k = j ^ j << 1 ^ j << 2 ^ j << 3 ^ j << 4, k = k >>> 8 ^ k & 255 ^ 99; l[e] = k; s[k] = e; var z = a[e], F = a[z], G = a[F], y = 257 * a[k] ^ 16843008 * k; t[e] = y << 24 | y >>> 8; r[e] = y << 16 | y >>> 16; w[e] = y << 8 | y >>> 24; v[e] = y; y = 16843009 * G ^ 65537 * F ^ 257 * z ^ 16843008 * e; b[k] = y << 24 | y >>> 8; x[k] = y << 16 | y >>> 16; q[k] = y << 8 | y >>> 24; n[k] = y; e ? (e = z ^ a[a[a[G ^ z]]], j ^= a[a[j]]) : e = j = 1 } var H = [0, 1, 2, 4, 8, | |||||
| 16, 32, 64, 128, 27, 54], d = d.AES = p.extend({ | |||||
| _doReset: function () { | |||||
| for (var a = this._key, c = a.words, d = a.sigBytes / 4, a = 4 * ((this._nRounds = d + 6) + 1), e = this._keySchedule = [], j = 0; j < a; j++)if (j < d) e[j] = c[j]; else { var k = e[j - 1]; j % d ? 6 < d && 4 == j % d && (k = l[k >>> 24] << 24 | l[k >>> 16 & 255] << 16 | l[k >>> 8 & 255] << 8 | l[k & 255]) : (k = k << 8 | k >>> 24, k = l[k >>> 24] << 24 | l[k >>> 16 & 255] << 16 | l[k >>> 8 & 255] << 8 | l[k & 255], k ^= H[j / d | 0] << 24); e[j] = e[j - d] ^ k } c = this._invKeySchedule = []; for (d = 0; d < a; d++)j = a - d, k = d % 4 ? e[j] : e[j - 4], c[d] = 4 > d || 4 >= j ? k : b[l[k >>> 24]] ^ x[l[k >>> 16 & 255]] ^ q[l[k >>> | |||||
| 8 & 255]] ^ n[l[k & 255]] | |||||
| }, encryptBlock: function (a, b) { this._doCryptBlock(a, b, this._keySchedule, t, r, w, v, l) }, decryptBlock: function (a, c) { var d = a[c + 1]; a[c + 1] = a[c + 3]; a[c + 3] = d; this._doCryptBlock(a, c, this._invKeySchedule, b, x, q, n, s); d = a[c + 1]; a[c + 1] = a[c + 3]; a[c + 3] = d }, _doCryptBlock: function (a, b, c, d, e, j, l, f) { | |||||
| for (var m = this._nRounds, g = a[b] ^ c[0], h = a[b + 1] ^ c[1], k = a[b + 2] ^ c[2], n = a[b + 3] ^ c[3], p = 4, r = 1; r < m; r++)var q = d[g >>> 24] ^ e[h >>> 16 & 255] ^ j[k >>> 8 & 255] ^ l[n & 255] ^ c[p++], s = d[h >>> 24] ^ e[k >>> 16 & 255] ^ j[n >>> 8 & 255] ^ l[g & 255] ^ c[p++], t = | |||||
| d[k >>> 24] ^ e[n >>> 16 & 255] ^ j[g >>> 8 & 255] ^ l[h & 255] ^ c[p++], n = d[n >>> 24] ^ e[g >>> 16 & 255] ^ j[h >>> 8 & 255] ^ l[k & 255] ^ c[p++], g = q, h = s, k = t; q = (f[g >>> 24] << 24 | f[h >>> 16 & 255] << 16 | f[k >>> 8 & 255] << 8 | f[n & 255]) ^ c[p++]; s = (f[h >>> 24] << 24 | f[k >>> 16 & 255] << 16 | f[n >>> 8 & 255] << 8 | f[g & 255]) ^ c[p++]; t = (f[k >>> 24] << 24 | f[n >>> 16 & 255] << 16 | f[g >>> 8 & 255] << 8 | f[h & 255]) ^ c[p++]; n = (f[n >>> 24] << 24 | f[g >>> 16 & 255] << 16 | f[h >>> 8 & 255] << 8 | f[k & 255]) ^ c[p++]; a[b] = q; a[b + 1] = s; a[b + 2] = t; a[b + 3] = n | |||||
| }, keySize: 8 | |||||
| }); u.AES = p._createHelper(d) | |||||
| })(); | |||||
| module.exports = { | |||||
| CryptoJS: CryptoJS | |||||
| } | |||||
| @ -0,0 +1,35 @@ | |||||
| function formatNumber(n) { | |||||
| n = n.toString() | |||||
| return n[1] ? n : '0' + n | |||||
| } | |||||
| /** | |||||
| * 时间戳转化为年 月 日 时 分 秒 | |||||
| * number: 传入时间戳 | |||||
| * format:返回格式,支持自定义,但参数必须与formateArr里保持一致 | |||||
| */ | |||||
| function formatTimeTwo(number, format) { | |||||
| var formateArr = ['Y', 'M', 'D', 'h', 'm', 's']; | |||||
| var returnArr = []; | |||||
| var date = new Date(number*1); | |||||
| returnArr.push(date.getFullYear()); | |||||
| returnArr.push(formatNumber(date.getMonth() + 1)); | |||||
| returnArr.push(formatNumber(date.getDate())); | |||||
| returnArr.push(formatNumber(date.getHours())); | |||||
| returnArr.push(formatNumber(date.getMinutes())); | |||||
| returnArr.push(formatNumber(date.getSeconds())); | |||||
| for (var i in returnArr) { | |||||
| format = format.replace(formateArr[i], returnArr[i]); | |||||
| } | |||||
| return format; | |||||
| } | |||||
| module.exports = { | |||||
| formatTimeTwo: formatTimeTwo | |||||
| } | |||||
| @ -0,0 +1,109 @@ | |||||
| //不显示对话框的请求 | |||||
| const app = getApp() | |||||
| function request(url, params, success, fail) { | |||||
| this.requestLoading(url, params, "", success, fail) | |||||
| } | |||||
| //原来的请求方式 。现在首页五个接口沿用,直接在中转服务器获取数据 | |||||
| function previousRequestLoading(method, params, successaction) { | |||||
| wx.showLoading({ | |||||
| title: "加载中", | |||||
| }) | |||||
| var data = { | |||||
| 'id': 1, | |||||
| 'method': method, | |||||
| 'params': params | |||||
| }; | |||||
| var baseUrl = app.globalData.BaseUrl; | |||||
| console.log("params == " + params); | |||||
| console.log("method == " + method); | |||||
| wx.request({ | |||||
| url: baseUrl, | |||||
| data: data, | |||||
| header: { | |||||
| 'content-type': 'application/json' | |||||
| }, | |||||
| method: 'post', | |||||
| success: function(res) { | |||||
| console.log(res) | |||||
| if (res.data.error != null) { | |||||
| wx.showModal({ | |||||
| showCancel: false, | |||||
| title: '执行出错', | |||||
| content: res.data.error.message, | |||||
| }) | |||||
| } else { | |||||
| successaction(res.data) | |||||
| } | |||||
| }, | |||||
| fail: function(res) { | |||||
| console.log(res) | |||||
| wx.showModal({ | |||||
| title: '执行出错', | |||||
| content: res, | |||||
| }) | |||||
| }, | |||||
| complete: function(res) { | |||||
| wx.hideLoading() | |||||
| }, | |||||
| }) | |||||
| } | |||||
| // 新请求方式,添加中转服务器 | |||||
| function requestLoading(method, params, successaction) { | |||||
| wx.showLoading({ | |||||
| title: "加载中", | |||||
| }) | |||||
| //{"DecryptCookie":"","CustomerId":1,"Method":"/MainSystem/MainSystem/Auth/Login","Data":["栾慧",""]} | |||||
| var newData = { | |||||
| // 客户和司机不添加cookie请求 | |||||
| "DecryptCookie": "",//EasyAuth=72335493ecb14015be2db57fc364dc84 | |||||
| // 小程序所在客户ID(仙坛,万福,和美) | |||||
| "CustomerId": app.globalData.CustomerId, | |||||
| // 代替url原来后边拼接的方式,提取到data内 | |||||
| "AppendUrlString": "?appid=" + app.globalData.AppId + "&phone=" + app.globalData.Phone, | |||||
| // 请求路径 | |||||
| "Method": method, | |||||
| // 请求数据 | |||||
| "Data": params, | |||||
| }; | |||||
| // 中转服务器地址 | |||||
| var baseUrl = app.globalData.TranferBaseUrl; | |||||
| wx.request({ | |||||
| url: baseUrl, | |||||
| data: newData, | |||||
| header: { | |||||
| 'content-type': 'application/json' | |||||
| }, | |||||
| method: 'post', | |||||
| success: function(res) { | |||||
| console.log(res) | |||||
| if (res.data.error != null) { | |||||
| wx.showModal({ | |||||
| showCancel: false, | |||||
| title: '执行出错', | |||||
| content: res.data.error.message, | |||||
| }) | |||||
| } else { | |||||
| successaction(res.data) | |||||
| } | |||||
| }, | |||||
| fail: function(res) { | |||||
| console.log(res) | |||||
| wx.showModal({ | |||||
| title: '执行出错', | |||||
| content: res, | |||||
| }) | |||||
| }, | |||||
| complete: function(res) { | |||||
| wx.hideLoading() | |||||
| }, | |||||
| }) | |||||
| } | |||||
| module.exports = { | |||||
| request: request, | |||||
| requestLoading: requestLoading, | |||||
| previousRequestLoading: previousRequestLoading | |||||
| } | |||||
| @ -0,0 +1,62 @@ | |||||
| // //引用AES源码js | |||||
| // var CryptoJS = require('aes.js'); | |||||
| // //十六位十六进制数作为秘钥 | |||||
| // var key = CryptoJS.enc.Utf8.parse("1234123412ABCDEF"); | |||||
| // //十六位十六进制数作为秘钥偏移量 | |||||
| // var iv = CryptoJS.enc.Utf8.parse('ABCDEF1234123412'); | |||||
| // //解密方法 | |||||
| // function Decrypt(word) { | |||||
| // var encryptedHexStr = CryptoJS.enc.Hex.parse(word); | |||||
| // var srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr); | |||||
| // var decrypt = CryptoJS.AES.decrypt(srcs, key, { | |||||
| // iv: iv, | |||||
| // mode: CryptoJS.mode.CBC, | |||||
| // padding: CryptoJS.pad.Pkcs7 | |||||
| // }); | |||||
| // var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); | |||||
| // return decryptedStr.toString(); | |||||
| // } | |||||
| // //加密方法 | |||||
| // function Encrypt(word) { | |||||
| // var srcs = CryptoJS.enc.Utf8.parse(word); | |||||
| // var encrypted = CryptoJS.AES.encrypt(srcs, key, { | |||||
| // iv: iv, | |||||
| // mode: CryptoJS.mode.CBC, | |||||
| // padding: CryptoJS.pad.Pkcs7 | |||||
| // }); | |||||
| // return encrypted.ciphertext.toString().toUpperCase(); | |||||
| // } | |||||
| // //暴露接口 | |||||
| // module.exports = { | |||||
| // Decrypt : Decrypt, | |||||
| // Encrypt : Encrypt, | |||||
| // } | |||||
| // module.exports.Decrypt = Decrypt; | |||||
| // module.exports.Encrypt = Encrypt; | |||||
| var CryptoJS = require('aes.js'); | |||||
| var key = CryptoJS.enc.Utf8.parse("十六进制数作为秘钥"); | |||||
| var iv = CryptoJS.enc.Utf8.parse('十六进制数作为秘钥偏移量'); | |||||
| // AES加密 | |||||
| function Encrypt(word) { | |||||
| var srcs = CryptoJS.enc.Utf8.parse(word); | |||||
| var encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); | |||||
| return encrypted.ciphertext.toString().toUpperCase(); | |||||
| //toString() 转字符串 toUpperCase() 转换成大写 | |||||
| } | |||||
| // AES解密 | |||||
| function Decrypt(word) { | |||||
| var encryptedHexStr = CryptoJS.enc.Hex.parse(word); | |||||
| var srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr); | |||||
| var decrypt = CryptoJS.AES.decrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 }); | |||||
| var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); | |||||
| return decryptedStr.toString(); | |||||
| } | |||||
| module.exports = { | |||||
| Encrypt: Encrypt, | |||||
| Decrypt: Decrypt, | |||||
| } | |||||
| @ -0,0 +1,30 @@ | |||||
| function formatTime(timestamp, format) { | |||||
| const formateArr = ['Y', 'M', 'D', 'h', 'm', 's']; | |||||
| let returnArr = []; | |||||
| let date = new Date(timestamp); //13λ��ʱ���, �������13λ��, ��Ҫ��1000,�������� let date = new Date(timestamp*1000) | |||||
| let year = date.getFullYear() | |||||
| let month = date.getMonth() + 1 | |||||
| let day = date.getDate() | |||||
| let hour = date.getHours() | |||||
| let minute = date.getMinutes() | |||||
| let second = date.getSeconds() | |||||
| returnArr.push(year, month, day, hour, minute, second); | |||||
| returnArr = returnArr.map(formatNumber); | |||||
| for (var i in returnArr) { | |||||
| format = format.replace(formateArr[i], returnArr[i]); | |||||
| } | |||||
| return format; | |||||
| } | |||||
| const formatNumber = n => { | |||||
| n = n.toString() | |||||
| return n[1] ? n : '0' + n | |||||
| } | |||||
| module.exports = { | |||||
| formatTime: formatTime | |||||
| } | |||||