commit b4774c380fd4e3e46180f416027111db57f58259 Author: chenxuhui Date: Thu Nov 29 11:14:38 2018 +0800 创建客户项目基本配置 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5a49f3 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +qqq \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..b571a2b --- /dev/null +++ b/app.js @@ -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" + + }, +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..0e2fd2d --- /dev/null +++ b/app.json @@ -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" + ] +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..0fef46a --- /dev/null +++ b/app.wxss @@ -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; +} diff --git a/imgs/133976891172587752.png b/imgs/133976891172587752.png new file mode 100644 index 0000000..7ee693c Binary files /dev/null and b/imgs/133976891172587752.png differ diff --git a/imgs/arrearsRecord.png b/imgs/arrearsRecord.png new file mode 100755 index 0000000..47a5221 Binary files /dev/null and b/imgs/arrearsRecord.png differ diff --git a/imgs/avatar.png b/imgs/avatar.png new file mode 100644 index 0000000..8be3be2 Binary files /dev/null and b/imgs/avatar.png differ diff --git a/imgs/beijingtu.png b/imgs/beijingtu.png new file mode 100644 index 0000000..f601cda Binary files /dev/null and b/imgs/beijingtu.png differ diff --git a/imgs/findDriver.png b/imgs/findDriver.png new file mode 100755 index 0000000..76bfaa5 Binary files /dev/null and b/imgs/findDriver.png differ diff --git a/imgs/jiantou.png b/imgs/jiantou.png new file mode 100644 index 0000000..6fbbc30 Binary files /dev/null and b/imgs/jiantou.png differ diff --git a/imgs/message.png b/imgs/message.png new file mode 100755 index 0000000..ca44958 Binary files /dev/null and b/imgs/message.png differ diff --git a/imgs/message1.png b/imgs/message1.png new file mode 100755 index 0000000..0aaf452 Binary files /dev/null and b/imgs/message1.png differ diff --git a/imgs/orderList.png b/imgs/orderList.png new file mode 100755 index 0000000..8a6079f Binary files /dev/null and b/imgs/orderList.png differ diff --git a/imgs/outStoreDetail.png b/imgs/outStoreDetail.png new file mode 100755 index 0000000..9314619 Binary files /dev/null and b/imgs/outStoreDetail.png differ diff --git a/imgs/saleForecast.png b/imgs/saleForecast.png new file mode 100755 index 0000000..8fcc314 Binary files /dev/null and b/imgs/saleForecast.png differ diff --git a/imgs/saleOutStore.png b/imgs/saleOutStore.png new file mode 100755 index 0000000..87b738b Binary files /dev/null and b/imgs/saleOutStore.png differ diff --git a/imgs/statementOfAccount.png b/imgs/statementOfAccount.png new file mode 100755 index 0000000..f48d12a Binary files /dev/null and b/imgs/statementOfAccount.png differ diff --git a/imgs/tianjia.png b/imgs/tianjia.png new file mode 100755 index 0000000..e3e0615 Binary files /dev/null and b/imgs/tianjia.png differ diff --git a/imgs/tuceng.png b/imgs/tuceng.png new file mode 100644 index 0000000..d8e2102 Binary files /dev/null and b/imgs/tuceng.png differ diff --git a/imgs/wode.png b/imgs/wode.png new file mode 100755 index 0000000..807e925 Binary files /dev/null and b/imgs/wode.png differ diff --git a/imgs/wode1.png b/imgs/wode1.png new file mode 100755 index 0000000..5ce2436 Binary files /dev/null and b/imgs/wode1.png differ diff --git a/imgs/xiaoxi.png b/imgs/xiaoxi.png new file mode 100755 index 0000000..5bca39b Binary files /dev/null and b/imgs/xiaoxi.png differ diff --git a/imgs/xiaoxi1.png b/imgs/xiaoxi1.png new file mode 100755 index 0000000..e15b272 Binary files /dev/null and b/imgs/xiaoxi1.png differ diff --git a/interface.md b/interface.md new file mode 100644 index 0000000..d718343 --- /dev/null +++ b/interface.md @@ -0,0 +1,59 @@ +# 客户易小程序接口文档 + +### 接口地址改成 https://******/Rest.aspx?appid=appid&phone=绑定的手机号 ### + + +> ## 1.绑定手机号 +> > /MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/AccountRpc/QinBindByPhone +> > > 参数: +> > >| 字段 | 说明 | 类型 | 是否必填 | +> > >|---------------|------|---|---| +> > >| OpenId | OpenId | str | 是 | +> > >| Phone | 手机号 | str | 是 | +> > >| NickName | 昵称 | str | 否 | +> > >| Sex | 性别 | str | 否 | +> > >| Province | 省 | str | 否 | +> > >| City | 城市 | str | 否 | +> > >| Country | 国家 | str | 否 | +> > >| HeadImgUrl | 头像 | str | 否 | +> > >| UnionId | UnionId | str | 否 | +> > > 返回值: +> > >| 字段 | 说明 |类型 | +> > >|---------------|------|---| +> > >| Customer_ID | 客户ID | long | +> > >| Customer_Name | 客户名称 | str | +------ + +> ## 2.订货查询 +> > /MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStore +> > > 参数: +> > >| 字段 | 说明 | 类型 | 是否必填 | +> > >|---------------|------|---|---| +> > >| 参数1 | 0:未发货 20:已发货 | int | 是 | +> > >| 参数2 | pageindex:当前页数,从0开始 | int | 是 | +> > >| 参数3 | pagesize:每页显示的条数 | int | 是 | +> > > 返回值: +> > >| 字段 | 说明 |类型 | +> > >|---------------|------|---| +> > >| ID | 出库单号 | long | +> > >| LoadTime | 发货时间 | datetime | +> > >| Money | 金额 | decimal | +> > >| Customer_Name | 客户名称 | str | +------ + +> ## 3.订货明细查询 +> > /MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStoreDetail +> > > 参数: +> > >| 字段 | 说明 | 类型 | 是否必填 | +> > >|---------------|------|---|---| +> > >| 参数1 | 出库单号:接口2.订货查询 获得到的ID | long | 是 | +> > > 返回值: +> > >| 字段 | 说明 |类型 | +> > >|---------------|------|---| +> > >| Goods_Name | 存货名称 | str | +> > >| Number | 数量 | decimal | +> > >| Price | 单价 | decimal | +> > >| Money | 金额 | decimal | +------ + + diff --git a/pages/fenxiang/fenxiang.js b/pages/fenxiang/fenxiang.js new file mode 100644 index 0000000..66620ee --- /dev/null +++ b/pages/fenxiang/fenxiang.js @@ -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) + }, + +}) \ No newline at end of file diff --git a/pages/fenxiang/fenxiang.json b/pages/fenxiang/fenxiang.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/pages/fenxiang/fenxiang.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pages/fenxiang/fenxiang.wxml b/pages/fenxiang/fenxiang.wxml new file mode 100644 index 0000000..9166d4c --- /dev/null +++ b/pages/fenxiang/fenxiang.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages/fenxiang/fenxiang.wxss b/pages/fenxiang/fenxiang.wxss new file mode 100644 index 0000000..e482740 --- /dev/null +++ b/pages/fenxiang/fenxiang.wxss @@ -0,0 +1 @@ +/* pages/fenxiang/fenxiang.wxss */ \ No newline at end of file diff --git a/pages/first/first.js b/pages/first/first.js new file mode 100644 index 0000000..7a8be66 --- /dev/null +++ b/pages/first/first.js @@ -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, + }) + } + }); +}, + +}) \ No newline at end of file diff --git a/pages/first/first.json b/pages/first/first.json new file mode 100644 index 0000000..786c3b4 --- /dev/null +++ b/pages/first/first.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "公众号绑定" +} \ No newline at end of file diff --git a/pages/first/first.wxml b/pages/first/first.wxml new file mode 100644 index 0000000..944bca6 --- /dev/null +++ b/pages/first/first.wxml @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/pages/first/first.wxss b/pages/first/first.wxss new file mode 100644 index 0000000..c250200 --- /dev/null +++ b/pages/first/first.wxss @@ -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; +} \ No newline at end of file diff --git a/pages/homePage/homePage.js b/pages/homePage/homePage.js new file mode 100644 index 0000000..6974c65 --- /dev/null +++ b/pages/homePage/homePage.js @@ -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, + }) + }, + + +}) \ No newline at end of file diff --git a/pages/homePage/homePage.json b/pages/homePage/homePage.json new file mode 100644 index 0000000..2983817 --- /dev/null +++ b/pages/homePage/homePage.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "客户易" +} \ No newline at end of file diff --git a/pages/homePage/homePage.wxml b/pages/homePage/homePage.wxml new file mode 100644 index 0000000..911324b --- /dev/null +++ b/pages/homePage/homePage.wxml @@ -0,0 +1,24 @@ + + + + + + + + + + 找司机 + + + + 对账单 + + + + 订单 + + + + 销售出库 + + \ No newline at end of file diff --git a/pages/homePage/homePage.wxss b/pages/homePage/homePage.wxss new file mode 100644 index 0000000..3d95c25 --- /dev/null +++ b/pages/homePage/homePage.wxss @@ -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; +} diff --git a/pages/login/login.js b/pages/login/login.js new file mode 100644 index 0000000..7099c31 --- /dev/null +++ b/pages/login/login.js @@ -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("--------------转发失败--------------------") + } + } + } + + + +}) \ No newline at end of file diff --git a/pages/login/login.json b/pages/login/login.json new file mode 100644 index 0000000..58857d8 --- /dev/null +++ b/pages/login/login.json @@ -0,0 +1 @@ +{"navigationBarTitleText": "禽客户易"} \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml new file mode 100644 index 0000000..8c11ae2 --- /dev/null +++ b/pages/login/login.wxml @@ -0,0 +1,19 @@ + + + + + + {{array[index].Name}} + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/login/login.wxss b/pages/login/login.wxss new file mode 100644 index 0000000..6fdf1ed --- /dev/null +++ b/pages/login/login.wxss @@ -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%; +} diff --git a/pages/my/my.js b/pages/my/my.js new file mode 100644 index 0000000..74f8818 --- /dev/null +++ b/pages/my/my.js @@ -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 () { + + } +}) \ No newline at end of file diff --git a/pages/my/my.json b/pages/my/my.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/pages/my/my.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pages/my/my.wxml b/pages/my/my.wxml new file mode 100644 index 0000000..4928c59 --- /dev/null +++ b/pages/my/my.wxml @@ -0,0 +1,16 @@ + + + + + + + {{meName}}李丽丽 + {{mePhone}}1234567890 + + + + +设置 + + + \ No newline at end of file diff --git a/pages/my/my.wxss b/pages/my/my.wxss new file mode 100644 index 0000000..70ffb4e --- /dev/null +++ b/pages/my/my.wxss @@ -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; +} \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.js b/pages/orderDetails/orderDetails.js new file mode 100644 index 0000000..500fd81 --- /dev/null +++ b/pages/orderDetails/orderDetails.js @@ -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, + }) + + }) + } + +}) \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.json b/pages/orderDetails/orderDetails.json new file mode 100644 index 0000000..da841c6 --- /dev/null +++ b/pages/orderDetails/orderDetails.json @@ -0,0 +1,2 @@ +{ + "navigationBarTitleText": "订单详情"} \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.wxml b/pages/orderDetails/orderDetails.wxml new file mode 100644 index 0000000..cfbd828 --- /dev/null +++ b/pages/orderDetails/orderDetails.wxml @@ -0,0 +1,22 @@ + + + 存货名称 + 存货数量 + 单价 + 金额 + + + + {{item.Goods_Name}} + {{item.Number}} + ¥{{item.Price}} + ¥{{item.Money}} + + + {{item.Goods_Name}} + {{item.Number}} + ¥{{item.Price}} + ¥{{item.Money}} + + + \ No newline at end of file diff --git a/pages/orderDetails/orderDetails.wxss b/pages/orderDetails/orderDetails.wxss new file mode 100644 index 0000000..6d6bbdb --- /dev/null +++ b/pages/orderDetails/orderDetails.wxss @@ -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; +} diff --git a/pages/orderInquiry/orderInquiry.js b/pages/orderInquiry/orderInquiry.js new file mode 100644 index 0000000..c2dd875 --- /dev/null +++ b/pages/orderInquiry/orderInquiry.js @@ -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(); + }, + + }) + + + + + + diff --git a/pages/orderInquiry/orderInquiry.json b/pages/orderInquiry/orderInquiry.json new file mode 100644 index 0000000..5727768 --- /dev/null +++ b/pages/orderInquiry/orderInquiry.json @@ -0,0 +1,6 @@ +{ +"enablePullDownRefresh": true, +"backgroundTextStyle": "dark", +"onReachBottomDistance": 50, + "navigationBarTitleText": "订单" +} \ No newline at end of file diff --git a/pages/orderInquiry/orderInquiry.wxml b/pages/orderInquiry/orderInquiry.wxml new file mode 100644 index 0000000..45382c1 --- /dev/null +++ b/pages/orderInquiry/orderInquiry.wxml @@ -0,0 +1,46 @@ + + 未审核 + 已审核 + + + + + + 莱西养护: + {{item.Customer_Name}} + + ¥ + {{item.Money}} + + NO: + {{item.ID}} + + 出库日期: + {{item.LoadTime}} + + + + + + + + + + + 莱西养护: + {{item.Customer_Name}} + + ¥ + {{item.Money}} + + NO: + {{item.ID}} + + 出库日期: + {{item.LoadTime}} + + + + + + \ No newline at end of file diff --git a/pages/orderInquiry/orderInquiry.wxss b/pages/orderInquiry/orderInquiry.wxss new file mode 100644 index 0000000..0c0603f --- /dev/null +++ b/pages/orderInquiry/orderInquiry.wxss @@ -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; +} diff --git a/pages/saleOutStore/outStoreDetail/outStoreDetail.js b/pages/saleOutStore/outStoreDetail/outStoreDetail.js new file mode 100644 index 0000000..ca823c9 --- /dev/null +++ b/pages/saleOutStore/outStoreDetail/outStoreDetail.js @@ -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 () { + + } +}) \ No newline at end of file diff --git a/pages/saleOutStore/outStoreDetail/outStoreDetail.json b/pages/saleOutStore/outStoreDetail/outStoreDetail.json new file mode 100644 index 0000000..968c624 --- /dev/null +++ b/pages/saleOutStore/outStoreDetail/outStoreDetail.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "出库单详情" +} \ No newline at end of file diff --git a/pages/saleOutStore/outStoreDetail/outStoreDetail.wxml b/pages/saleOutStore/outStoreDetail/outStoreDetail.wxml new file mode 100644 index 0000000..fb05798 --- /dev/null +++ b/pages/saleOutStore/outStoreDetail/outStoreDetail.wxml @@ -0,0 +1,42 @@ + + + + + 总金额 + + + ¥{{balance}} + + + + + + + + +