diff --git a/app.json b/app.json index 433fdf2..4f59e15 100644 --- a/app.json +++ b/app.json @@ -4,15 +4,23 @@ "pages/index/index", "pages/home/mobile/index", "pages/home/employee/index", - "pages/home/customer/index", + "pages/home/customer-list/index", + "pages/home/customer-info/index", "pages/home/authory/index", + "pages/home/qrcode/index", "pages/process/order-list/index", "pages/process/order-price/index", "pages/process/order-info/index", "pages/process/payment-list/index", "pages/process/payment/index", "pages/htmls/agreement/index", - "pages/message/detail/index" + "pages/htmls/auths/index", + "pages/message/detail/index", + "pages/client/index/index", + "pages/client/home/index", + "pages/client/bank-list/index", + "pages/client/bank-add/index", + "pages/client/withdrawal/index" ], "window":{ "backgroundTextStyle":"light", diff --git a/assets/image/icon-banner.png b/assets/image/icon-banner.png new file mode 100644 index 0000000..a02c22d Binary files /dev/null and b/assets/image/icon-banner.png differ diff --git a/colorui/main.wxss b/colorui/main.wxss index 21dd2d1..1961bf8 100644 --- a/colorui/main.wxss +++ b/colorui/main.wxss @@ -1438,109 +1438,4 @@ swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active { .flex-sub { flex: 1; } -/* grid布局 */ -.grid { - display: flex; - flex-wrap: wrap; -} - -.grid.grid-square { - overflow: hidden; -} - -.grid.grid-square .cu-tag { - position: absolute; - right: 0; - top: 0; - border-bottom-left-radius: 6rpx; - padding: 6rpx 12rpx; - height: auto; - background-color: rgba(0, 0, 0, 0.5); -} - -.grid.grid-square>view>text[class*="cuIcon-"] { - font-size: 52rpx; - position: absolute; - color: var(--grey); - margin: auto; - top: 0; - bottom: 0; - left: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; -} - -.grid.grid-square>view { - margin-right: 20rpx; - margin-bottom: 20rpx; - border-radius: 6rpx; - position: relative; - overflow: hidden; -} - -.grid.grid-square>view.bg-img image { - width: 100%; - height: 100%; - position: absolute; -} - -.grid.col-1.grid-square>view { - padding-bottom: 100%; - height: 0; - margin-right: 0; -} - -.grid.col-2.grid-square>view { - /* padding-bottom: calc((100% - 20rpx)/2); */ - height: 0; - width: calc((100% - 20rpx)/2); -} - -.grid.col-3.grid-square>view { - padding-bottom: calc((100% - 40rpx)/3); - height: 0; - width: calc((100% - 40rpx)/3); -} - -.grid.col-4.grid-square>view { - padding-bottom: calc((100% - 60rpx)/4); - height: 0; - width: calc((100% - 60rpx)/4); -} - -.grid.col-5.grid-square>view { - padding-bottom: calc((100% - 80rpx)/5); - height: 0; - width: calc((100% - 80rpx)/5); -} - -.grid.col-2.grid-square>view:nth-child(2n), -.grid.col-3.grid-square>view:nth-child(3n), -.grid.col-4.grid-square>view:nth-child(4n), -.grid.col-5.grid-square>view:nth-child(5n){ - margin-right: 0; -} - -.grid.col-1>view { - width: 100%; -} - -.grid.col-2>view { - width: 50%; -} - -.grid.col-3>view { - width: 33.33%; -} - -.grid.col-4>view { - width: 25%; -} - -.grid.col-5>view { - width: 20%; -} diff --git a/pages/client/bank-add/index.js b/pages/client/bank-add/index.js new file mode 100644 index 0000000..721f3cc --- /dev/null +++ b/pages/client/bank-add/index.js @@ -0,0 +1,66 @@ +// pages/client/bank-add/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/client/bank-add/index.json b/pages/client/bank-add/index.json new file mode 100644 index 0000000..896f4a4 --- /dev/null +++ b/pages/client/bank-add/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-button": "/components/button/index" + } +} \ No newline at end of file diff --git a/pages/client/bank-add/index.wxml b/pages/client/bank-add/index.wxml new file mode 100644 index 0000000..38a10d4 --- /dev/null +++ b/pages/client/bank-add/index.wxml @@ -0,0 +1,35 @@ + + + 添加银行卡 + + + + 安全绑卡,快捷支付 + + + + 持卡人姓名: + + + + 银行卡卡号: + + + + + {{bankName}} + {{cardType}} + + + + 手机号: + + + + 验证码: + + + + + {{form.type == 4 ? '提交' : '下一步'}} + \ No newline at end of file diff --git a/pages/client/bank-add/index.wxss b/pages/client/bank-add/index.wxss new file mode 100644 index 0000000..512b5ab --- /dev/null +++ b/pages/client/bank-add/index.wxss @@ -0,0 +1 @@ +/* pages/client/bank-add/index.wxss */ \ No newline at end of file diff --git a/pages/client/bank-list/index.js b/pages/client/bank-list/index.js new file mode 100644 index 0000000..7ea58c2 --- /dev/null +++ b/pages/client/bank-list/index.js @@ -0,0 +1,44 @@ +// pages/client/bank-list/index.js +import Dialog from '../../../components/dialog/dialog' +import { getBankCardList, deleteBankCard, checkPayPassword, bankCardDefault } from "../../../api/saas" +const util = require('../../../utils/util') +const app = getApp() + +Page({ + /** + * 页面的初始数据 + */ + data: { + show: false, + actions: [ + { id: 1, name: '设为默认' }, + { id: 2, name: '解除绑定' } + ], + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + showActionSheet(e) { + this.data.nowIndex = e.currentTarget.dataset.index + if (this.data.nowIndex < 0) { + // if(!app.userInfo.isAuth){ + // Dialog.alert({ title: '温馨提示', message: '您还没有进行个人信息认证,无法绑定银行卡,现在去进行个人信息认证?' }).then(() => { + // wx.navigateTo({ url: '/pages/home/authory/index' }) + // }) + // return + // } + wx.navigateTo({url: '/pages/client/bank-add/index'}) + return + } + this.setData({ show: true }) + }, + onClose: function() { + this.setData({ show: false }) + }, + onSelect: function({detail}) { + console.log(detail) + }, +}) \ No newline at end of file diff --git a/pages/client/bank-list/index.json b/pages/client/bank-list/index.json new file mode 100644 index 0000000..919af10 --- /dev/null +++ b/pages/client/bank-list/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "van-dialog": "/components/dialog/index", + "van-action-sheet": "/components/action-sheet/index" + } +} \ No newline at end of file diff --git a/pages/client/bank-list/index.wxml b/pages/client/bank-list/index.wxml new file mode 100644 index 0000000..956d8d5 --- /dev/null +++ b/pages/client/bank-list/index.wxml @@ -0,0 +1,30 @@ + + + 我的银行卡 + + + + + + + + {{item.bankName ? item.bankName : item.cardName}} + {{item.cardType=='PC'?'"预付费卡':(item.cardType=='SCC'?'准贷记卡':(item.cardType=='CC'?'信用卡':'储蓄卡'))}} + + + + + **** + **** + **** + {{item.cardNoSuffix}} + + + + + 添加银行卡 + + + + + diff --git a/pages/client/bank-list/index.wxss b/pages/client/bank-list/index.wxss new file mode 100644 index 0000000..155fedf --- /dev/null +++ b/pages/client/bank-list/index.wxss @@ -0,0 +1,40 @@ +/* pages/client/bank-list/index.wxss */ +.add-bank { + height: 150rpx; + width: 100%; + margin-top: 32rpx; + margin-bottom: 32rpx; + background: rgba(255, 255, 255, 1); + box-shadow: 0px 0px 15px -6px rgba(0, 0, 0, 0.32); + border-radius: 6px; +} + +.item-bank { + margin-top: 32rpx; + padding: 32rpx; + background: rgba(198, 79, 85, 1); + border-radius: 4px; +} + +.bank-name { + font-size: 32rpx; + font-family: PingFang-SC-Medium, PingFang-SC; + font-weight: 500; + color: rgba(255, 255, 255, 1); +} + +.bank-type { + font-size: 24rpx; + font-family: PingFang-SC-Regular, PingFang-SC; + font-weight: 400; + color: rgba(255, 255, 255, 0.6); +} + +.bank-suffix { + font-size: 56rpx; + font-family: SFProDisplay-Regular, SFProDisplay; + font-weight: 400; + color: rgba(255, 255, 255, 1); + line-height: 34px; + letter-spacing: 1px; +} \ No newline at end of file diff --git a/pages/client/home/index.js b/pages/client/home/index.js new file mode 100644 index 0000000..82864f5 --- /dev/null +++ b/pages/client/home/index.js @@ -0,0 +1,91 @@ +// pages/stock/index.js +import Dialog from '../../../components/dialog/dialog' +import { finalizeToken } from "../../../api/user" +import { getBaseInfo } from "../../../api/saas" +const util = require('../../../utils/util') +const event = require('../../../utils/event') +const storage = require('../../../utils/storage') +const app = getApp() + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + /** + * 页面的初始数据 + */ + data: { + height: app.globalData.safeFragmentHeight, + firstShow: false, + userInfo: null, + avatarUrl: '/assets/image/ygImg.png', + creditInfo: { availableCreditLine: 0, creditLine: 0, usedCreditLine: 0.00 } + }, + lifetimes: { + // 生命周期函数,可以为函数,或一个在methods段中定义的方法名 + attached: function () { + event.on('EventMessage', this, this.onEvent) + }, + detached: function () { + event.remove('EventMessage', this) + } + }, + methods: { + // resume的处理; + onRestart: function () { + this.setUserInfo() + this.data.firstShow = true + }, + onEvent: function (message) { + if (message.what == 82) { + // 认证成功 + } + }, + setUserInfo: function(){ + if(!app.userInfo){ + return + } + + var nickname = '' + if(app.userInfo.isAuth) { + nickname = app.userInfo.realName.substring(0, 14) + } else if(!util.isEmpty(app.userInfo.nickname)){ + nickname = app.userInfo.nickname.substring(0, 14) + } else if(!util.isEmpty(app.userInfo.realName)){ + nickname = app.userInfo.realName.substring(0, 14) + } + this.setData({ + avatarUrl: util.isEmpty(app.userInfo.avatarUrl) ? '/assets/image/ygImg.png' : app.userInfo.avatarUrl, + userInfo: app.userInfo, + userName: nickname, + height: app.globalData.safeFragmentHeight- 100 + }) + }, + toUserInfo: function(){ + if(!app.userInfo){ + return + } + if(!app.userInfo.isAuth){ + wx.navigateTo({ url: '/pages/home/authory/index' }) + } + }, + orderList: function(){ + wx.navigateTo({ url: '/pages/mall/order-list/index' }) + }, + tipApply: function(){ + wx.navigateTo({ url: '/pages/htmls/auths/index' }) + }, + loginOut: function () { + Dialog.confirm({ title: '温馨提示', message: '确定退出纸通宝账号?' }).then(() => { + storage.remove('Authorization') + app.globalData.token = null + app.userInfo = null + this.setData({ userInfo: null, avatarUrl: '/assets/image/ygImg.png' }) + finalizeToken() + wx.redirectTo({ url: '/pages/login/index' }) + event.emit('EventMessage', { what: 888, desc: 'Logout' }) + }) + } + } +}) \ No newline at end of file diff --git a/pages/client/home/index.json b/pages/client/home/index.json new file mode 100644 index 0000000..0a12914 --- /dev/null +++ b/pages/client/home/index.json @@ -0,0 +1,12 @@ +{ + "component": true, + "usingComponents": { + "van-image": "/components/image/index", + "van-grid": "/components/grid/index", + "van-grid-item": "/components/grid-item/index", + "van-cell": "/components/cell/index", + "van-cell-group": "/components/cell-group/index", + "van-info": "/components/info/index", + "van-icon": "/components/icon/index" + } +} \ No newline at end of file diff --git a/pages/client/home/index.wxml b/pages/client/home/index.wxml new file mode 100644 index 0000000..46a14e7 --- /dev/null +++ b/pages/client/home/index.wxml @@ -0,0 +1,68 @@ + + + 我的 + + + + + + + + + + + + + + + {{userName || ''}} + + {{userInfo.isAuth == 1 ? '已认证' : '未实名认证'}} + 去认证 + + + + {{userInfo.mobile || ''}} + + + + + + + + + 账户余额 + + + + + 我的余额 + {{formate.formateAmount(creditInfo.availableCreditLine)}} + 账单明细 + + + 待收款 + {{formate.formateAmount(creditInfo.usedCreditLine)}} + 查看详情 + + + + + + + + + 提现 + + + + + + 我的银行卡 + + + + + + \ No newline at end of file diff --git a/pages/client/home/index.wxss b/pages/client/home/index.wxss new file mode 100644 index 0000000..d85ac49 --- /dev/null +++ b/pages/client/home/index.wxss @@ -0,0 +1,9 @@ +/* pages/home/index.wxss */ +.image-load { + width: 60px; + height: 60px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 60rpx; +} \ No newline at end of file diff --git a/pages/client/index/index.js b/pages/client/index/index.js new file mode 100644 index 0000000..ac91acd --- /dev/null +++ b/pages/client/index/index.js @@ -0,0 +1,53 @@ +// pages/administ/index.js +const event = require('../../../utils/event') +const app = getApp() + +Page({ + /** + * 页面的初始数据 + */ + data: { + safeBottom: app.globalData.safeBottom, + fragment: app.globalData.safeFragmentHeight, + tabList: [ + { index: 0, value: 'message', badge: 0, name: '消息', blue: '/assets/image/tabbar/mall-blue.png', gray: '/assets/image/tabbar/mall-gray.png' }, + { index: 1, value: 'work', badge: 0, name: '工作台', blue: '/assets/image/tabbar/process-blue.png', gray: '/assets/image/tabbar/process-gray.png' }, + { index: 2, value: 'home', badge: 0, name: '我的', blue: '/assets/image/tabbar/home-blue.png', gray: '/assets/image/tabbar/home-gray.png' } + ], + tabIndex: 1, + visiable: true + }, + /************************************** 初始化流程 ********************************************/ + onLoad: function (options) { + const updateManager = wx.getUpdateManager() + updateManager.onCheckForUpdate() + updateManager.onUpdateReady(function () { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate() + }) + event.on('TabMessage', this, this.onEvent) + this.setData({fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight), safeBottom: app.globalData.safeBottom }) + }, + /************************************** 生命周期函数--监听页面初次渲染完成 ********************************************/ + onShow: function () { + var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value) + if (pageView) { + pageView.onRestart() + } + }, + onChange: function ({detail}) { + this.setData({ tabIndex: detail }) + this.onShow() + }, + stopTouchMove: function(e){ + return false + }, + onEvent: function (message) { + if (message.what == 99) { + this.setData({ visiable: message.visiable }) + } + }, + onUnload: function(){ + event.remove('TabMessage', this) + } +}) \ No newline at end of file diff --git a/pages/client/index/index.json b/pages/client/index/index.json new file mode 100644 index 0000000..1d4a0c3 --- /dev/null +++ b/pages/client/index/index.json @@ -0,0 +1,11 @@ +{ + "usingComponents": { + "van-icon": "/components/icon/index", + "van-tabbar": "/components/tabbar/index", + "van-tabbar-item": "/components/tabbar-item/index", + "message": "/pages/message/index/index", + "workbench": "/pages/client/workbench/index", + "home": "/pages/client/home/index", + "van-dialog": "/components/dialog/index" + } +} \ No newline at end of file diff --git a/pages/client/index/index.wxml b/pages/client/index/index.wxml new file mode 100644 index 0000000..63c90cd --- /dev/null +++ b/pages/client/index/index.wxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + {{item.name}} + + + + + \ No newline at end of file diff --git a/pages/client/index/index.wxss b/pages/client/index/index.wxss new file mode 100644 index 0000000..feead45 --- /dev/null +++ b/pages/client/index/index.wxss @@ -0,0 +1 @@ +/* pages/administ/index.wxss */ \ No newline at end of file diff --git a/pages/client/withdrawal/index.js b/pages/client/withdrawal/index.js new file mode 100644 index 0000000..82c3228 --- /dev/null +++ b/pages/client/withdrawal/index.js @@ -0,0 +1,66 @@ +// pages/client/withdrawal/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/client/withdrawal/index.json b/pages/client/withdrawal/index.json new file mode 100644 index 0000000..5630f65 --- /dev/null +++ b/pages/client/withdrawal/index.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-cell": "/components/cell/index", + "van-cell-group": "/components/cell-group/index", + "van-button": "/components/button/index" + } +} \ No newline at end of file diff --git a/pages/client/withdrawal/index.wxml b/pages/client/withdrawal/index.wxml new file mode 100644 index 0000000..445be01 --- /dev/null +++ b/pages/client/withdrawal/index.wxml @@ -0,0 +1,27 @@ + + + 申请提现 + + + + 提现金额 + + + + + + + + 账户余额¥{{formate.numberFormat2(xsaccountMoney)}} + 全部提现 + + + + + 到账银行卡 + + + + + 提现 + \ No newline at end of file diff --git a/pages/client/withdrawal/index.wxss b/pages/client/withdrawal/index.wxss new file mode 100644 index 0000000..96d3d59 --- /dev/null +++ b/pages/client/withdrawal/index.wxss @@ -0,0 +1 @@ +/* pages/client/withdrawal/index.wxss */ \ No newline at end of file diff --git a/pages/client/workbench/index.js b/pages/client/workbench/index.js new file mode 100644 index 0000000..6ba693a --- /dev/null +++ b/pages/client/workbench/index.js @@ -0,0 +1,90 @@ +// pages/index/index.js +import Dialog from '../../../components/dialog/dialog' +import { getStatisticsInfo } from "../../../api/saas" +const event = require('../../../utils/event') +const app = getApp() + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + /** + * 页面的初始数据 + */ + data: { + userInfo: app.userInfo, + height: app.globalData.safeFragmentHeight, + tabList: [ + { status: 1, badge: '', name: '打包站', icon: '/assets/image/icon_pricing.png' }, + { status: 2, badge: '', name: '我的订单', icon: '/assets/image/icon_checking.png' } + ], + show: false, + actions: [ + { name: '选项1' }, + { name: '选项2' }, + { name: '选项3' }, + ], + form: {}, + totalInfo: { + totalMoney: 0, + totalWeight: 0, + } + }, + lifetimes: { + // 生命周期函数,可以为函数,或一个在methods段中定义的方法名 + attached: function () { + this.setData({userInfo: app.userInfo, height: app.globalData.safeFragmentHeight - 100 }) + event.on('EventMessage', this, this.onEvent) + }, + detached: function () { + event.remove('EventMessage', this) + } + }, + methods: { + onRestart: function () { + this.fetchStatisticsInfo() + }, + onEvent: function (message) { + if (message.what == 888) { + } + }, + orderList: function (e) { + if(e.currentTarget.dataset.status == 3){ + wx.navigateTo({ url: '/pages/process/payment-list/index?status=' + e.currentTarget.dataset.status }) + } else { + wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status }) + } + }, + fetchStatisticsInfo: function(){ + getStatisticsInfo(this.data.form).then(result => { + if(Number(result.data.priceOrderNum) > 0){ + this.data.tabList[0].badge = Number(result.data.priceOrderNum) + } else { + this.data.tabList[0].badge = '' + } + if(Number(result.data.waitAuditOrderNum) > 0){ + this.data.tabList[1].badge = Number(result.data.waitAuditOrderNum) + } else { + this.data.tabList[1].badge = '' + } + this.setData({ tabList: this.data.tabList, totalInfo: result.data }) + }).catch(err => { + console.log(err) + }) + }, + showSheet: function(){ + // this.setData({ show: true }) + // event.emit('TabMessage', { what: 99, visiable: false }) + }, + onClose: function() { + this.setData({ show: false }) + setTimeout(function(){ + event.emit('TabMessage', { what: 99, visiable: true }) + }, 100) + }, + onSelect: function({detail}) { + console.log(detail) + } + } +}) \ No newline at end of file diff --git a/pages/client/workbench/index.json b/pages/client/workbench/index.json new file mode 100644 index 0000000..466d012 --- /dev/null +++ b/pages/client/workbench/index.json @@ -0,0 +1,12 @@ +{ + "component": true, + "usingComponents": { + "van-grid": "/components/grid/index", + "van-grid-item": "/components/grid-item/index", + "van-cell": "/components/cell/index", + "van-cell-group": "/components/cell-group/index", + "van-info": "/components/info/index", + "van-icon": "/components/icon/index", + "van-action-sheet": "/components/action-sheet/index" + } +} \ No newline at end of file diff --git a/pages/client/workbench/index.wxml b/pages/client/workbench/index.wxml new file mode 100644 index 0000000..b9baed7 --- /dev/null +++ b/pages/client/workbench/index.wxml @@ -0,0 +1,49 @@ + + + + 工作台 + + + + + + 卖货统计 + + 今日 + + + + + + + + 卖货重量 + + {{formate.formateWeight(totalInfo.totalWeight)}}吨 + + + + + + 卖货金额 + + + {{formate.formateAmount(totalInfo.totalMoney)}} + + + + + + + 收货订单 + + + + + + + + + + \ No newline at end of file diff --git a/pages/client/workbench/index.wxss b/pages/client/workbench/index.wxss new file mode 100644 index 0000000..0e998ca --- /dev/null +++ b/pages/client/workbench/index.wxss @@ -0,0 +1,12 @@ +/* pages/index/index.wxss */ +.menu:active { + opacity: .5 +} + +.name{ + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + color:white; + margin-left:32rpx; +} \ No newline at end of file diff --git a/pages/home/customer-info/index.js b/pages/home/customer-info/index.js new file mode 100644 index 0000000..0a2e069 --- /dev/null +++ b/pages/home/customer-info/index.js @@ -0,0 +1,66 @@ +// pages/home/customer-info/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/home/customer-info/index.json b/pages/home/customer-info/index.json new file mode 100644 index 0000000..d8da97c --- /dev/null +++ b/pages/home/customer-info/index.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-button": "/components/button/index", + "van-cell": "/components/cell/index", + "van-notice-bar": "/components/notice-bar/index" + } +} \ No newline at end of file diff --git a/pages/home/customer-info/index.wxml b/pages/home/customer-info/index.wxml new file mode 100644 index 0000000..9dc2314 --- /dev/null +++ b/pages/home/customer-info/index.wxml @@ -0,0 +1,47 @@ + + + 客户资料 + + + + + + + + 客户姓名 + {{form.factoryCustomerName}} + + + + + 手机号码 + {{form.factoryCustomerName}} + + + + + 付款方式 + {{form.factoryCustomerName}} + + + + + 银行名称 + {{form.factoryCustomerName}} + + + + + 银行卡号 + {{form.factoryCustomerName}} + + + + + + 邀请注册纸通宝 + + 保存 + + + \ No newline at end of file diff --git a/pages/home/customer-info/index.wxss b/pages/home/customer-info/index.wxss new file mode 100644 index 0000000..db91716 --- /dev/null +++ b/pages/home/customer-info/index.wxss @@ -0,0 +1 @@ +/* pages/home/customer-info/index.wxss */ \ No newline at end of file diff --git a/pages/home/customer/index.js b/pages/home/customer-list/index.js similarity index 92% rename from pages/home/customer/index.js rename to pages/home/customer-list/index.js index 12f429e..e502e85 100644 --- a/pages/home/customer/index.js +++ b/pages/home/customer-list/index.js @@ -1,5 +1,5 @@ // pages/home/customer/index.js -import { getCustomerList, cancelOrder } from "../../../api/saas" +import { getCustomerList } from "../../../api/saas" const util = require('../../../utils/util') const app = getApp() @@ -83,5 +83,8 @@ Page({ }, onSearch:function(){ this.onRefreshList() + }, + customerInfo: function(e){ + wx.navigateTo({ url: '/pages/process/customer-info/index?id=' + e.currentTarget.dataset.id }) } }) \ No newline at end of file diff --git a/pages/home/customer/index.json b/pages/home/customer-list/index.json similarity index 100% rename from pages/home/customer/index.json rename to pages/home/customer-list/index.json diff --git a/pages/home/customer/index.wxml b/pages/home/customer-list/index.wxml similarity index 92% rename from pages/home/customer/index.wxml rename to pages/home/customer-list/index.wxml index 05eb022..6e3512d 100644 --- a/pages/home/customer/index.wxml +++ b/pages/home/customer-list/index.wxml @@ -7,8 +7,7 @@ 搜索 - + @@ -18,7 +17,7 @@ - + {{item.name || ''}} diff --git a/pages/home/customer/index.wxss b/pages/home/customer-list/index.wxss similarity index 100% rename from pages/home/customer/index.wxss rename to pages/home/customer-list/index.wxss diff --git a/pages/home/employee/index.js b/pages/home/employee/index.js index bc7b737..d317a5a 100644 --- a/pages/home/employee/index.js +++ b/pages/home/employee/index.js @@ -14,7 +14,12 @@ Page({ checkList: [], memberList: [], eemidList: [], - showEmbedded: false + showEmbedded: false, + show: false, + actions: [ + { id: 1, name: '删除该员工' } + ], + nowIndex: -1 }, /** * 生命周期函数--监听页面加载 @@ -46,17 +51,22 @@ Page({ util.showToast(err) }) }, - lookItem: function(event){ - var item = this.data.memberList[event.currentTarget.dataset.index] - var that = this - wx.showActionSheet({ - itemList: ['删除该员工'], - success(res){ - if (res.tapIndex === 0){ - that.deleteItem(event.currentTarget.dataset.index, item) - } - } - }) + lookItem: function(e){ + this.data.nowIndex = e.currentTarget.dataset.index + this.setData({ show: true }) + }, + showSheet: function(){ + this.setData({ show: true }) + }, + onClose() { + this.setData({ show: false }) + }, + onSelect({detail}) { + if(detail.id === 1){ + var item = this.data.memberList[this.data.nowIndex] + this.deleteItem(this.data.nowIndex, item) + this.data.nowIndex = -1 + } }, setAdmin: function(index, item){ wx.showLoading({ title: '加载中', mask: true }) diff --git a/pages/home/employee/index.json b/pages/home/employee/index.json index 3190622..56c48a4 100644 --- a/pages/home/employee/index.json +++ b/pages/home/employee/index.json @@ -7,6 +7,7 @@ "van-index-anchor": "/components/index-anchor/index", "van-tag": "/components/tag/index", "van-icon": "/components/icon/index", - "van-overlay": "/components/overlay/index" + "van-overlay": "/components/overlay/index", + "van-action-sheet": "/components/action-sheet/index" } } \ No newline at end of file diff --git a/pages/home/employee/index.wxml b/pages/home/employee/index.wxml index ff7caaf..fca75c5 100644 --- a/pages/home/employee/index.wxml +++ b/pages/home/employee/index.wxml @@ -72,4 +72,6 @@ 为保证企业账户安全,二维码仅在3小时内有效,失效后,可重新生成。 - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/home/index/index.js b/pages/home/index/index.js index ca55b6b..5e28352 100644 --- a/pages/home/index/index.js +++ b/pages/home/index/index.js @@ -73,6 +73,9 @@ Component({ orderList: function(){ wx.navigateTo({ url: '/pages/mall/order-list/index' }) }, + tipApply: function(){ + wx.navigateTo({ url: '/pages/htmls/auths/index' }) + }, loginOut: function () { Dialog.confirm({ title: '温馨提示', message: '确定退出纸通宝账号?' }).then(() => { storage.remove('Authorization') diff --git a/pages/home/index/index.wxml b/pages/home/index/index.wxml index e9d22ab..c4b5d7d 100644 --- a/pages/home/index/index.wxml +++ b/pages/home/index/index.wxml @@ -29,14 +29,14 @@ - + - + 员工管理 - + - + + 客户管理 + + + + 二维码名片 + + + + + + + + + 修改密码 + + diff --git a/pages/home/mobile/index.js b/pages/home/mobile/index.js index 8a1df33..e78aa19 100644 --- a/pages/home/mobile/index.js +++ b/pages/home/mobile/index.js @@ -24,7 +24,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.setData({ mobile: app.accountInfo.mobile }) + this.setData({ mobile: app.userInfo.mobile }) }, bindInput: function (e) { this.data.form[e.target.id] = e.detail.value diff --git a/pages/home/qrcode/index.js b/pages/home/qrcode/index.js new file mode 100644 index 0000000..f6d6b8c --- /dev/null +++ b/pages/home/qrcode/index.js @@ -0,0 +1,20 @@ +// pages/home/qrcode/index.js +import { getCustomerList } from "../../../api/saas" +const util = require('../../../utils/util') +const app = getApp() + +Page({ + /** + * 页面的初始数据 + */ + data: { + + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + } + +}) \ No newline at end of file diff --git a/pages/home/qrcode/index.json b/pages/home/qrcode/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/home/qrcode/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/home/qrcode/index.wxml b/pages/home/qrcode/index.wxml new file mode 100644 index 0000000..2385a63 --- /dev/null +++ b/pages/home/qrcode/index.wxml @@ -0,0 +1,4 @@ + + + 二维码名片 + diff --git a/pages/home/qrcode/index.wxss b/pages/home/qrcode/index.wxss new file mode 100644 index 0000000..65eec81 --- /dev/null +++ b/pages/home/qrcode/index.wxss @@ -0,0 +1 @@ +/* pages/home/qrcode/index.wxss */ \ No newline at end of file diff --git a/pages/htmls/auths/index.js b/pages/htmls/auths/index.js index 8082ddc..aa5a4c0 100644 --- a/pages/htmls/auths/index.js +++ b/pages/htmls/auths/index.js @@ -1,17 +1,36 @@ // pages/home/agreement/index.js +import { getCustomerList } from "../../../api/saas" +const util = require('../../../utils/util') + Page({ /** * 页面的初始数据 */ data: { - + show: false, + form: { + amount: 0 + } }, onImageLoad: function(e){ console.log(e) }, tellPhone: function(){ - wx.makePhoneCall({ - phoneNumber: '020-82516486', - }) + // wx.makePhoneCall({ + // phoneNumber: '020-82516486', + // }) + this.setData({ show: true }) + }, + onClose: function(){ + this.setData({ show: false }) + }, + bindInput: function (e) { + this.data.form[e.target.id] = e.detail.value + }, + onConfirm: function(){ + if(util.isEmpty(this.data.form.amount) || Number(this.data.form.amount) <= 0){ + util.showToast('请输入额度') + return + } } }) \ No newline at end of file diff --git a/pages/htmls/auths/index.json b/pages/htmls/auths/index.json index 63eed5b..34a84db 100644 --- a/pages/htmls/auths/index.json +++ b/pages/htmls/auths/index.json @@ -2,6 +2,7 @@ "usingComponents": { "van-image": "/components/image/index", "van-loading": "/components/loading/index", - "van-button": "/components/button/index" + "van-button": "/components/button/index", + "van-dialog": "/components/dialog/index" } } \ No newline at end of file diff --git a/pages/htmls/auths/index.wxml b/pages/htmls/auths/index.wxml index a2e77e5..11701ef 100644 --- a/pages/htmls/auths/index.wxml +++ b/pages/htmls/auths/index.wxml @@ -1,6 +1,6 @@ - 云印通SaaS服务 + 纸通宝代收服务 @@ -41,4 +41,9 @@ - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/pages/login/index.js b/pages/login/index.js index bf7df70..8337c0c 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -106,7 +106,11 @@ Page({ // 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作; this.setData({ loging: false, metaData: this.data.metaData }) } else { - wx.redirectTo({ url: '/pages/index/index' }) + if(app.userInfo.isSaasPerssion){ + wx.redirectTo({ url: '/pages/index/index' }) + } else { + wx.redirectTo({ url: '/pages/client/index/index' }) + } } // if(app.userInfo.enterpriseId){ // storage.put('Authorization', app.globalData.token) diff --git a/pages/message/index/index.wxml b/pages/message/index/index.wxml index ff7b9d4..e42a796 100644 --- a/pages/message/index/index.wxml +++ b/pages/message/index/index.wxml @@ -10,7 +10,7 @@ - {{loading? '正在加载' : '暂无数据'}} + {{loading? '正在加载' : '暂无消息'}} diff --git a/pages/process/index/index.js b/pages/process/index/index.js index baac2fb..8da4624 100644 --- a/pages/process/index/index.js +++ b/pages/process/index/index.js @@ -22,6 +22,12 @@ Component({ { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_finish.png' }, // { status: 5, badge: '', name: '已关闭', icon: '/assets/image/icon_close.png' } ], + tabList2: [ + { status: 1, badge: '', name: '出库', icon: '/assets/image/icon_checking.png' }, + { status: 2, badge: '', name: '出库查询', icon: '/assets/image/icon_checking.png' }, + { status: 3, badge: '', name: '出库总汇', icon: '/assets/image/icon_finish.png' }, + // { status: 5, badge: '', name: '已关闭', icon: '/assets/image/icon_close.png' } + ], show: false, actions: [ { name: '选项1' }, @@ -68,6 +74,9 @@ Component({ } else { wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status }) } + }, + outList: function(e){ + }, fetchStatisticsInfo: function(){ getStatisticsInfo(this.data.form).then(result => { @@ -95,14 +104,17 @@ Component({ // this.setData({ show: true }) // event.emit('TabMessage', { what: 99, visiable: false }) }, - onClose() { + onClose: function() { this.setData({ show: false }) setTimeout(function(){ event.emit('TabMessage', { what: 99, visiable: true }) }, 100) }, - onSelect({detail}) { + onSelect: function({detail}) { console.log(detail) }, + toAuths: function(){ + wx.navigateTo({ url: '/pages/htmls/auths/index' }) + } } }) \ No newline at end of file diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index 9658492..b60581f 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -91,6 +91,23 @@ --> + + + + 库存管理 + + + + + + + + + + + + +