Browse Source

no message

feature/v1.0
xpz2018 5 years ago
parent
commit
6c5f78566a
52 changed files with 1043 additions and 145 deletions
  1. 12
      app.json
  2. BIN
      assets/image/icon-banner.png
  3. 105
      colorui/main.wxss
  4. 66
      pages/client/bank-add/index.js
  5. 5
      pages/client/bank-add/index.json
  6. 35
      pages/client/bank-add/index.wxml
  7. 1
      pages/client/bank-add/index.wxss
  8. 44
      pages/client/bank-list/index.js
  9. 6
      pages/client/bank-list/index.json
  10. 30
      pages/client/bank-list/index.wxml
  11. 40
      pages/client/bank-list/index.wxss
  12. 91
      pages/client/home/index.js
  13. 12
      pages/client/home/index.json
  14. 68
      pages/client/home/index.wxml
  15. 9
      pages/client/home/index.wxss
  16. 53
      pages/client/index/index.js
  17. 11
      pages/client/index/index.json
  18. 18
      pages/client/index/index.wxml
  19. 1
      pages/client/index/index.wxss
  20. 66
      pages/client/withdrawal/index.js
  21. 7
      pages/client/withdrawal/index.json
  22. 27
      pages/client/withdrawal/index.wxml
  23. 1
      pages/client/withdrawal/index.wxss
  24. 90
      pages/client/workbench/index.js
  25. 12
      pages/client/workbench/index.json
  26. 49
      pages/client/workbench/index.wxml
  27. 12
      pages/client/workbench/index.wxss
  28. 66
      pages/home/customer-info/index.js
  29. 7
      pages/home/customer-info/index.json
  30. 47
      pages/home/customer-info/index.wxml
  31. 1
      pages/home/customer-info/index.wxss
  32. 5
      pages/home/customer-list/index.js
  33. 0
      pages/home/customer-list/index.json
  34. 5
      pages/home/customer-list/index.wxml
  35. 0
      pages/home/customer-list/index.wxss
  36. 34
      pages/home/employee/index.js
  37. 3
      pages/home/employee/index.json
  38. 4
      pages/home/employee/index.wxml
  39. 3
      pages/home/index/index.js
  40. 32
      pages/home/index/index.wxml
  41. 2
      pages/home/mobile/index.js
  42. 20
      pages/home/qrcode/index.js
  43. 3
      pages/home/qrcode/index.json
  44. 4
      pages/home/qrcode/index.wxml
  45. 1
      pages/home/qrcode/index.wxss
  46. 27
      pages/htmls/auths/index.js
  47. 3
      pages/htmls/auths/index.json
  48. 9
      pages/htmls/auths/index.wxml
  49. 6
      pages/login/index.js
  50. 2
      pages/message/index/index.wxml
  51. 16
      pages/process/index/index.js
  52. 17
      pages/process/index/index.wxml

12
app.json

@ -4,15 +4,23 @@
"pages/index/index", "pages/index/index",
"pages/home/mobile/index", "pages/home/mobile/index",
"pages/home/employee/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/authory/index",
"pages/home/qrcode/index",
"pages/process/order-list/index", "pages/process/order-list/index",
"pages/process/order-price/index", "pages/process/order-price/index",
"pages/process/order-info/index", "pages/process/order-info/index",
"pages/process/payment-list/index", "pages/process/payment-list/index",
"pages/process/payment/index", "pages/process/payment/index",
"pages/htmls/agreement/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":{ "window":{
"backgroundTextStyle":"light", "backgroundTextStyle":"light",

BIN
assets/image/icon-banner.png

Before After
Width: 694  |  Height: 250  |  Size: 33 KiB

105
colorui/main.wxss

@ -1438,109 +1438,4 @@ swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active {
.flex-sub { .flex-sub {
flex: 1; 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%;
}

66
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 () {
}
})

5
pages/client/bank-add/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"van-button": "/components/button/index"
}
}

35
pages/client/bank-add/index.wxml

@ -0,0 +1,35 @@
<!--pages/client/bank-add/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">添加银行卡</view>
</cu-custom>
<view class="flex flex-center" style="padding:32rpx">
<text class="text-xxl">安全绑卡,快捷支付</text>
</view>
<view class="cu-form-group margin-top">
<view class="title">持卡人姓名:</view>
<input id="name" maxlength="16" style="width:65%" disabled="{{true}}" value="{{form.name}}" placeholder="请输入持卡人姓名" bindinput="bindForm"></input>
</view>
<view class="cu-form-group">
<view class="title">银行卡卡号:</view>
<input id="cardNo" maxlength="24" style="width:65%" type="number" value="{{form.cardNo}}" bindinput="bindForm" placeholder="请输入银行卡卡号" bindinput="bindForm"></input>
</view>
<view class="cu-form-group" wx:if="{{form.cardName}}">
<image class="cu-avatar sm round" src="{{'https://medou.oss-cn-shenzhen.aliyuncs.com/bank/' + form.cardName + '.png'}}"></image>
<view style="margin-left:24rpx">{{bankName}}</view>
<view class="text-gray" style="margin-left:24rpx">{{cardType}}</view>
</view>
<view class="cu-form-group margin-top" wx:if="{{form.type == 4}}">
<view class="title">手机号:</view>
<input id="phone" maxlength="11" type="number" placeholder="请输入银行预留手机号码" bindinput="bindForm"></input>
</view>
<view class="cu-form-group" wx:if="{{form.type == 4}}">
<view class="title">验证码:</view>
<input id="verificationCode" maxlength="6" type="number" placeholder="请输入验证码" bindinput="bindForm"></input>
</view>
<view style="margin-top:20rpx;padding:80rpx 32rpx">
<van-button block type="info" bind:click="submitForm">{{form.type == 4 ? '提交' : '下一步'}}</van-button>
</view>

1
pages/client/bank-add/index.wxss

@ -0,0 +1 @@
/* pages/client/bank-add/index.wxss */

44
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)
},
})

6
pages/client/bank-list/index.json

@ -0,0 +1,6 @@
{
"usingComponents": {
"van-dialog": "/components/dialog/index",
"van-action-sheet": "/components/action-sheet/index"
}
}

30
pages/client/bank-list/index.wxml

@ -0,0 +1,30 @@
<!--pages/client/bank-list/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">我的银行卡</view>
</cu-custom>
<scroll-view scroll-y style="height: {{height}}rpx;padding:0rpx 32rpx">
<view wx:for="{{bankList}}" wx:key="index" class="item-bank" data-index="{{index}}" bindtap="showActionSheet">
<view class="flex">
<view class="cu-avatar slg round" style="background-image:url({{item.bankIcon}});"></view>
<view style="margin-left: 12rpx;flex: 1">
<view class="bank-name">{{item.bankName ? item.bankName : item.cardName}}</view>
<view class="bank-type">{{item.cardType=='PC'?'"预付费卡':(item.cardType=='SCC'?'准贷记卡':(item.cardType=='CC'?'信用卡':'储蓄卡'))}}</view>
</view>
<image style="width:32rpx;height:32rpx;" src="/assets/image/icon_bank.png" wx:if="{{item.isDefault==1}}"></image>
</view>
<view style="margin-left: 72rpx;margin-top:24rpx">
<text class="bank-suffix" style="margin-right: 12rpx">****</text>
<text class="bank-suffix" style="margin-right: 12rpx">****</text>
<text class="bank-suffix" style="margin-right: 12rpx">****</text>
<text class="bank-suffix">{{item.cardNoSuffix}}</text>
</view>
</view>
<view class="flex flex-center add-bank" data-index="{{-1}}" bindtap="showActionSheet">
<text class="cuIcon-add text-black" style="font-size:48rpx"></text>
<text class="text-black" style="font-size:28rpx;margin-left:12rpx">添加银行卡</text>
</view>
</scroll-view>
<van-dialog id="van-dialog" />
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" z-index="22" />

40
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;
}

91
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' })
})
}
}
})

12
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"
}
}

68
pages/client/home/index.wxml

@ -0,0 +1,68 @@
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{false}}">
<view slot="content" style="color:black;font-size:18px">我的</view>
</cu-custom>
<scroll-view scroll-y style="height:{{height}}rpx;">
<!-- 用户信息 -->
<view class="bg-white flex flex-justify" style="padding:32rpx" wx:if="{{userInfo}}" bindtap="toUserInfo">
<view class="flex">
<view style="position: relative">
<van-image use-loading-slot width="60" height="60" lazy-load round src="{{avatarUrl}}">
<image class="image-load" slot="loading" src="/assets/image/ygImg.png"></image>
</van-image>
<view class="cu-tag badge cuIcon-vip bg-blue" style="font-size:24rpx" wx:if="{{userInfo.isVIP}}"></view>
</view>
<view class="flex flex-column flex-center" style="margin-left:24rpx;align-items:flex-start">
<view class="flex flex-center">
<text class="text-lg" style="white-space: nowrap">{{userName || ''}}</text>
<view class="flex flex-center" style="font-size:12px;margin-left:18rpx">
<text class="{{userInfo.isAuth == 1 ? 'text-blue' : 'text-gray'}}">{{userInfo.isAuth == 1 ? '已认证' : '未实名认证'}}</text>
<text class="text-yellow" style="font-size:14px;padding:4px;" wx:if="{{userInfo.isAuth != 1 && userInfo.userType == 1}}">去认证</text>
</view>
</view>
<view class="flex flex-center" style="font-size:12px;margin-top:12rpx">
<text class="text-black" style="font-size:14px">{{userInfo.mobile || ''}}</text>
</view>
</view>
</view>
<text class="cuIcon-right text-gray" style="font-size:18px"></text>
</view>
<!-- 授信信息 -->
<view class="bg-white" wx:if="{{userInfo.position != 'ORDINARY'}}" style="margin-top: 16rpx">
<view class="flex" style="padding: 20rpx 32rpx">
<text class="text-lg text-bold">账户余额</text>
<text class="text-df text-gray" style="padding-top:6rpx;margin-left:8rpx"></text>
</view>
<view class="flex" style="padding:0rpx 32rpx 24rpx 32rpx">
<view style="flex:1;border: 2rpx solid #eeeeee;padding:24rpx 32rpx;margin-right:12rpx">
<view class="text-black">我的余额</view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">{{formate.formateAmount(creditInfo.availableCreditLine)}}</view>
<view class="text-blue text-sm" style=";text-decoration:underline" wx:if="{{!creditInfo.creditLine}}"
catchtap="tipApply">账单明细</view>
</view>
<view style="flex:1;border: 2rpx solid #eeeeee;padding:24rpx 32rpx;margin-left:12rpx" bindtap="orderList">
<view class="text-black">待收款</view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">{{formate.formateAmount(creditInfo.usedCreditLine)}}</view>
<view class="text-gray text-sm">查看详情</view>
</view>
</view>
</view>
<view style="height:16rpx"></view>
<van-cell-group>
<van-cell is-link link-type="navigateTo" url="/pages/client/withdrawal/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="cash-back-record" size="20"/>
<text class="text-sg" style="margin-left:12rpx">提现</text>
</view>
</van-cell>
<van-cell is-link link-type="navigateTo" url="/pages/client/bank-list/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="credit-pay" size="18"/>
<text class="text-sg" style="margin-left:12rpx">我的银行卡</text>
</view>
</van-cell>
</van-cell-group>
<view style="height:16rpx"></view>
</scroll-view>

9
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;
}

53
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)
}
})

11
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"
}
}

18
pages/client/index/index.wxml

@ -0,0 +1,18 @@
<!--pages/administ/index.wxml-->
<swiper current="{{tabIndex}}" duration="0" style="height:{{fragment}}rpx">
<swiper-item catchtouchmove="stopTouchMove"><message id="{{tabList[0].value}}"/></swiper-item>
<swiper-item catchtouchmove="stopTouchMove"><workbench id="{{tabList[1].value}}"/></swiper-item>
<swiper-item catchtouchmove="stopTouchMove"><home id="{{tabList[2].value}}"/></swiper-item>
</swiper>
<view class="cu-bar bg-white foot" style="height:{{100 + safeBottom}}rpx;padding-bottom:{{safeBottom}}rpx;display:{{visiable? 'block' : 'none'}}">
<van-tabbar active="{{ tabIndex }}" fixed="{{false}}" bind:change="onChange">
<van-tabbar-item wx:for="{{tabList}}" wx:key="index" >
<van-icon slot="icon" name="{{item.gray}}" size="25"/>
<van-icon slot="icon-active" name="{{item.blue}}" size="25"/>
<text>{{item.name}}</text>
</van-tabbar-item>
</van-tabbar>
</view>
<van-dialog id="van-dialog" />

1
pages/client/index/index.wxss

@ -0,0 +1 @@
/* pages/administ/index.wxss */

66
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 () {
}
})

7
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"
}
}

27
pages/client/withdrawal/index.wxml

@ -0,0 +1,27 @@
<!--pages/client/withdrawal/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">申请提现</view>
</cu-custom>
<view class="bg-white" style="margin-top:24rpx;padding: 30rpx 0rpx 0rpx 40rpx">
<text class="text-sg text-bold text-black" bindtap="banlanceDetails">提现金额</text>
<view class="cu-form-group" style="border-bottom: 1px solid #f3f3f3;margin-top:24rpx;padding: 2rpx 0rpx">
<view><text style="font-size:50rpx;font-weight: 600; color:black">¥</text></view>
<input type="digit" style="font-size:45rpx;" value="{{expendMoney}}" bindinput="bindAndSet" placeholder="请输入金额"></input>
</view>
</view>
<van-cell link-type="navigateTo" url="/pages/home/mobile/index">
<view class="flex" slot="title" style="align-items: center">
<text class="text-sg" style="margin-left:12rpx">账户余额¥{{formate.numberFormat2(xsaccountMoney)}}</text>
<text class="text-sm text-blue" style="margin-left:30rpx" bindtap="allExpend">全部提现</text>
</view>
</van-cell>
<van-cell is-link bind:click="chooseCard">
<view class="flex" slot="title" style="align-items: center">
<text class="text-sg" style="margin-left:12rpx">到账银行卡</text>
</view>
</van-cell>
<view style="margin-top:20rpx;padding:80rpx 32rpx">
<van-button block type="info" bind:click="submitForm">提现</van-button>
</view>

1
pages/client/withdrawal/index.wxss

@ -0,0 +1 @@
/* pages/client/withdrawal/index.wxss */

90
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)
}
}
})

12
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"
}
}

49
pages/client/workbench/index.wxml

@ -0,0 +1,49 @@
<!--pages/process/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white">
<view slot="content" style="color:black;font-size:36rpx">工作台</view>
</cu-custom>
<view style="padding: 0rpx 28rpx;margin-top:24rpx">
<view class="bg-white" style="border-radius: 20rpx;padding: 24rpx 0rpx 8rpx 0rpx">
<view class="flex flex-justify" style="padding: 0rpx 28rpx 24rpx 28rpx">
<view class="text-black text-sg text-bold">卖货统计</view>
<view class="flex flex-center" bindtap="showSheet">
<view class="text-black text-sm" style="margin-right:8rpx">今日</view>
<van-icon name="arrow-down" />
</view>
</view>
<view class="flex" style="padding:0rpx 0rpx 24rpx 0rpx">
<view style="flex:1;padding:0rpx 32rpx;margin-right:12rpx">
<view class="flex flex-center" style="justify-content: flex-start">
<view style="height:24rpx;width:6rpx;background:#007AFF"></view>
<view class="text-black text-sm" style="margin-left: 12rpx">卖货重量</view>
</view>
<view class="text-xxl text-bold" style="margin:12rpx 0rpx">{{formate.formateWeight(totalInfo.totalWeight)}}吨
</view>
</view>
<view style="flex:1;padding:0rpx 32rpx;margin-left:12rpx">
<view class="flex flex-center" style="justify-content: flex-start">
<view style="height:24rpx;width:6rpx;background:#FF8413"></view>
<view class="text-black text-sm" style="margin-left: 12rpx">卖货金额</view>
</view>
<view class="text-xxl text-bold text-price" style="margin:12rpx 0rpx">
{{formate.formateAmount(totalInfo.totalMoney)}}</view>
</view>
</view>
</view>
</view>
<view style="padding: 0rpx 28rpx;margin-top:24rpx">
<view class="bg-white" style="border-radius: 20rpx;padding: 24rpx 0rpx">
<view class="text-black text-sg text-bold" style="padding: 0rpx 28rpx 12rpx 28rpx">收货订单</view>
<van-grid column-num="4" border="{{fasle}}">
<van-grid-item wx:for="{{ tabList }}" wx:key="index" data-status="{{item.status}}" bind:click="orderList"
text="{{item.name}}">
<van-icon slot="icon" name="{{ item.icon }}" size="68rpx" info="{{item.badge}}" />
</van-grid-item>
</van-grid>
</view>
</view>
<view style="height:24rpx;"></view>
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" z-index="22" />

12
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;
}

66
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 () {
}
})

7
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"
}
}

47
pages/home/customer-info/index.wxml

@ -0,0 +1,47 @@
<!--pages/home/customer-info/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">客户资料</view>
</cu-custom>
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="点击可以修改用户信息" />
<view wx:if="{{form}}">
<view style="height:16rpx"></view>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">客户姓名</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">手机号码</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">付款方式</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">银行名称</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">银行卡号</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<view style="height:32rpx"></view>
<view style="margin-top:20rpx;padding:40rpx 80rpx">
<van-button block type="default" bind:click="submitForm">邀请注册纸通宝</van-button>
<view style="height:32rpx"></view>
<van-button block type="info" bind:click="submitForm">保存</van-button>
</view>
</view>

1
pages/home/customer-info/index.wxss

@ -0,0 +1 @@
/* pages/home/customer-info/index.wxss */

pages/home/customer/index.js → pages/home/customer-list/index.js

@ -1,5 +1,5 @@
// pages/home/customer/index.js // pages/home/customer/index.js
import { getCustomerList, cancelOrder } from "../../../api/saas"
import { getCustomerList } from "../../../api/saas"
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -83,5 +83,8 @@ Page({
}, },
onSearch:function(){ onSearch:function(){
this.onRefreshList() this.onRefreshList()
},
customerInfo: function(e){
wx.navigateTo({ url: '/pages/process/customer-info/index?id=' + e.currentTarget.dataset.id })
} }
}) })

pages/home/customer/index.json → pages/home/customer-list/index.json

pages/home/customer/index.wxml → pages/home/customer-list/index.wxml

@ -7,8 +7,7 @@
<view slot="action" bind:tap="onSearch" style="padding: 0rpx 8rpx">搜索</view> <view slot="action" bind:tap="onSearch" style="padding: 0rpx 8rpx">搜索</view>
</van-search> </van-search>
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}"
bind:scrolltolower="fetchCustomerList">
<refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchCustomerList">
<view class="list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}"> <view class="list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}">
<view style="margin-bottom:24px" wx:if="{{loading}}"> <view style="margin-bottom:24px" wx:if="{{loading}}">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
@ -18,7 +17,7 @@
</view> </view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<van-cell clickable wx:for="{{pageItem}}" wx:key="index"> <van-cell clickable wx:for="{{pageItem}}" wx:key="index">
<view slot="title" class="flex" style="margin-bottom:-12rpx">
<view slot="title" class="flex" style="margin-bottom:-12rpx" data-id="{{item.id}}" bindtap="customerInfo">
<van-image round width="80rpx" height="80rpx" src="{{ item.avatarUrl || '/assets/image/ygImg.png' }}" /> <van-image round width="80rpx" height="80rpx" src="{{ item.avatarUrl || '/assets/image/ygImg.png' }}" />
<view style="margin-left:18rpx;width:100%"> <view style="margin-left:18rpx;width:100%">
<view class="text-sg text-bold">{{item.name || ''}}</view> <view class="text-sg text-bold">{{item.name || ''}}</view>

pages/home/customer/index.wxss → pages/home/customer-list/index.wxss

34
pages/home/employee/index.js

@ -14,7 +14,12 @@ Page({
checkList: [], checkList: [],
memberList: [], memberList: [],
eemidList: [], eemidList: [],
showEmbedded: false
showEmbedded: false,
show: false,
actions: [
{ id: 1, name: '删除该员工' }
],
nowIndex: -1
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -46,17 +51,22 @@ Page({
util.showToast(err) 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){ setAdmin: function(index, item){
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })

3
pages/home/employee/index.json

@ -7,6 +7,7 @@
"van-index-anchor": "/components/index-anchor/index", "van-index-anchor": "/components/index-anchor/index",
"van-tag": "/components/tag/index", "van-tag": "/components/tag/index",
"van-icon": "/components/icon/index", "van-icon": "/components/icon/index",
"van-overlay": "/components/overlay/index"
"van-overlay": "/components/overlay/index",
"van-action-sheet": "/components/action-sheet/index"
} }
} }

4
pages/home/employee/index.wxml

@ -72,4 +72,6 @@
<text class="text-df text-white" style="margin-top:36rpx;text-align:center">为保证企业账户安全,二维码仅在3小时内有效,失效后,可重新生成。</text> <text class="text-df text-white" style="margin-top:36rpx;text-align:center">为保证企业账户安全,二维码仅在3小时内有效,失效后,可重新生成。</text>
<van-icon name="close" color="white" size="36px" custom-style="margin-top:48px" catch:tap="onClickHideEmbedded" /> <van-icon name="close" color="white" size="36px" custom-style="margin-top:48px" catch:tap="onClickHideEmbedded" />
</view> </view>
</van-overlay>
</van-overlay>
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:cancel="onClose" bind:close="onClose" bind:select="onSelect" cancel-text="取消" z-index="22"/>

3
pages/home/index/index.js

@ -73,6 +73,9 @@ Component({
orderList: function(){ orderList: function(){
wx.navigateTo({ url: '/pages/mall/order-list/index' }) wx.navigateTo({ url: '/pages/mall/order-list/index' })
}, },
tipApply: function(){
wx.navigateTo({ url: '/pages/htmls/auths/index' })
},
loginOut: function () { loginOut: function () {
Dialog.confirm({ title: '温馨提示', message: '确定退出纸通宝账号?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '确定退出纸通宝账号?' }).then(() => {
storage.remove('Authorization') storage.remove('Authorization')

32
pages/home/index/index.wxml

@ -29,14 +29,14 @@
<text class="cuIcon-right text-gray" style="font-size:18px"></text> <text class="cuIcon-right text-gray" style="font-size:18px"></text>
</view> </view>
<!-- 授信信息 --> <!-- 授信信息 -->
<!-- <view class="bg-white" wx:if="{{userInfo.position != 'ORDINARY'}}" style="margin-top: 16rpx">
<view class="bg-white" wx:if="{{userInfo.position != 'ORDINARY'}}" style="margin-top: 16rpx">
<view class="flex" style="padding: 20rpx 32rpx"> <view class="flex" style="padding: 20rpx 32rpx">
<text class="text-lg text-bold">先用后付</text>
<text class="text-df text-gray" style="padding-top:6rpx;margin-left:8rpx">最高200万限额采购商品,满意了再付款</text>
<text class="text-lg text-bold">千鸟代付额度</text>
<text class="text-df text-gray" style="padding-top:6rpx;margin-left:8rpx"></text>
</view> </view>
<view class="flex" style="padding:0rpx 32rpx 24rpx 32rpx"> <view class="flex" style="padding:0rpx 32rpx 24rpx 32rpx">
<view style="flex:1;border: 2rpx solid #eeeeee;padding:24rpx 32rpx;margin-right:12rpx"> <view style="flex:1;border: 2rpx solid #eeeeee;padding:24rpx 32rpx;margin-right:12rpx">
<view class="text-black">剩余使用采购量</view>
<view class="text-black">剩余代付额度</view>
<view class="text-xxl text-bold" style="margin:12rpx 0rpx">{{formate.formateAmount(creditInfo.availableCreditLine)}}</view> <view class="text-xxl text-bold" style="margin:12rpx 0rpx">{{formate.formateAmount(creditInfo.availableCreditLine)}}</view>
<view class="text-blue text-sm" style=";text-decoration:underline" wx:if="{{!creditInfo.creditLine}}" <view class="text-blue text-sm" style=";text-decoration:underline" wx:if="{{!creditInfo.creditLine}}"
catchtap="tipApply">如何获得采购量?</view> catchtap="tipApply">如何获得采购量?</view>
@ -47,22 +47,38 @@
<view class="text-gray text-sm">查看订单明细</view> <view class="text-gray text-sm">查看订单明细</view>
</view> </view>
</view> </view>
</view> -->
</view>
<!-- 企业信息 --> <!-- 企业信息 -->
<view style="height:16rpx"></view> <view style="height:16rpx"></view>
<van-cell-group> <van-cell-group>
<van-cell is-link link-type="navigateTo" url="/pages/home/employee/index" wx:if="{{userInfo.enterpriseId && userInfo.position != 'ORDINARY'}}"> <van-cell is-link link-type="navigateTo" url="/pages/home/employee/index" wx:if="{{userInfo.enterpriseId && userInfo.position != 'ORDINARY'}}">
<view class="flex" slot="title" style="align-items: center"> <view class="flex" slot="title" style="align-items: center">
<van-icon name="contact" size="18"/>
<van-icon name="manager-o" size="18"/>
<text class="text-sg" style="margin-left:12rpx">员工管理</text> <text class="text-sg" style="margin-left:12rpx">员工管理</text>
</view> </view>
</van-cell> </van-cell>
<van-cell is-link link-type="navigateTo" url="/pages/home/customer/index">
<van-cell is-link link-type="navigateTo" url="/pages/home/customer-list/index">
<view class="flex" slot="title" style="align-items: center"> <view class="flex" slot="title" style="align-items: center">
<van-icon name="user-circle-o" size="18"/>
<van-icon name="user-circle-o" size="20"/>
<!-- <van-icon name="https://b.yzcdn.cn/vant/icon-demo-1126.png" size="18"/> -->
<text class="text-sg" style="margin-left:12rpx">客户管理</text> <text class="text-sg" style="margin-left:12rpx">客户管理</text>
</view> </view>
</van-cell> </van-cell>
<van-cell is-link link-type="navigateTo" url="/pages/home/qrcode/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="qr" size="18"/>
<text class="text-sg" style="margin-left:12rpx">二维码名片</text>
</view>
</van-cell>
</van-cell-group>
<view style="height:16rpx"></view>
<van-cell-group>
<van-cell is-link link-type="navigateTo" url="/pages/home/mobile/index">
<view class="flex" slot="title" style="align-items: center">
<van-icon name="qr" size="18"/>
<text class="text-sg" style="margin-left:12rpx">修改密码</text>
</view>
</van-cell>
<van-cell is-link bind:click="loginOut"> <van-cell is-link bind:click="loginOut">
<view class="flex" slot="title" style="align-items: center"> <view class="flex" slot="title" style="align-items: center">
<van-icon name="setting-o" size="18" /> <van-icon name="setting-o" size="18" />

2
pages/home/mobile/index.js

@ -24,7 +24,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ mobile: app.accountInfo.mobile })
this.setData({ mobile: app.userInfo.mobile })
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.form[e.target.id] = e.detail.value this.data.form[e.target.id] = e.detail.value

20
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) {
}
})

3
pages/home/qrcode/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

4
pages/home/qrcode/index.wxml

@ -0,0 +1,4 @@
<!--pages/home/qrcode/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">二维码名片</view>
</cu-custom>

1
pages/home/qrcode/index.wxss

@ -0,0 +1 @@
/* pages/home/qrcode/index.wxss */

27
pages/htmls/auths/index.js

@ -1,17 +1,36 @@
// pages/home/agreement/index.js // pages/home/agreement/index.js
import { getCustomerList } from "../../../api/saas"
const util = require('../../../utils/util')
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
show: false,
form: {
amount: 0
}
}, },
onImageLoad: function(e){ onImageLoad: function(e){
console.log(e) console.log(e)
}, },
tellPhone: function(){ 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
}
} }
}) })

3
pages/htmls/auths/index.json

@ -2,6 +2,7 @@
"usingComponents": { "usingComponents": {
"van-image": "/components/image/index", "van-image": "/components/image/index",
"van-loading": "/components/loading/index", "van-loading": "/components/loading/index",
"van-button": "/components/button/index"
"van-button": "/components/button/index",
"van-dialog": "/components/dialog/index"
} }
} }

9
pages/htmls/auths/index.wxml

@ -1,6 +1,6 @@
<!--pages/htmls/saas/index.wxml--> <!--pages/htmls/saas/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">云印通SaaS服务</view>
<view slot="content">纸通宝代收服务</view>
</cu-custom> </cu-custom>
<view class="relative"> <view class="relative">
@ -41,4 +41,9 @@
</view> </view>
</view> </view>
</view>
</view>
<van-dialog use-slot title="代收额度" show="{{ show }}" bind:close="onClose" bind:confirm="onConfirm">
<input id="amount" type="number" style="padding:0rpx 16rpx;border:1rpx solid #eee;height:80rpx;margin:64rpx" placeholder-style="color:#aaa"
maxlength="8" placeholder="请输入您需要的额度,单位(万元)" bindinput="bindInput" />
</van-dialog>

6
pages/login/index.js

@ -106,7 +106,11 @@ Page({
// 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作; // 这里要进行账号的绑定,对工厂进行绑定;或者进行申请操作;
this.setData({ loging: false, metaData: this.data.metaData }) this.setData({ loging: false, metaData: this.data.metaData })
} else { } 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){ // if(app.userInfo.enterpriseId){
// storage.put('Authorization', app.globalData.token) // storage.put('Authorization', app.globalData.token)

2
pages/message/index/index.wxml

@ -10,7 +10,7 @@
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image> <image class="img-empty" src="/assets/image/list_empty.png" wx:else></image>
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
<view class="text-empty">{{loading? '正在加载' : '暂无消息'}}</view>
</view> </view>
<view wx:else> <view wx:else>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">

16
pages/process/index/index.js

@ -22,6 +22,12 @@ Component({
{ status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_finish.png' }, { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_finish.png' },
// { status: 5, badge: '', name: '已关闭', icon: '/assets/image/icon_close.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, show: false,
actions: [ actions: [
{ name: '选项1' }, { name: '选项1' },
@ -68,6 +74,9 @@ Component({
} else { } else {
wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status }) wx.navigateTo({ url: '/pages/process/order-list/index?status=' + e.currentTarget.dataset.status })
} }
},
outList: function(e){
}, },
fetchStatisticsInfo: function(){ fetchStatisticsInfo: function(){
getStatisticsInfo(this.data.form).then(result => { getStatisticsInfo(this.data.form).then(result => {
@ -95,14 +104,17 @@ Component({
// this.setData({ show: true }) // this.setData({ show: true })
// event.emit('TabMessage', { what: 99, visiable: false }) // event.emit('TabMessage', { what: 99, visiable: false })
}, },
onClose() {
onClose: function() {
this.setData({ show: false }) this.setData({ show: false })
setTimeout(function(){ setTimeout(function(){
event.emit('TabMessage', { what: 99, visiable: true }) event.emit('TabMessage', { what: 99, visiable: true })
}, 100) }, 100)
}, },
onSelect({detail}) {
onSelect: function({detail}) {
console.log(detail) console.log(detail)
}, },
toAuths: function(){
wx.navigateTo({ url: '/pages/htmls/auths/index' })
}
} }
}) })

17
pages/process/index/index.wxml

@ -91,6 +91,23 @@
</van-grid> </van-grid>
</view> </view>
</view> --> </view> -->
<view style="padding: 0rpx 28rpx;margin-top:24rpx">
<view class="bg-white" style="border-radius: 20rpx;padding: 24rpx 0rpx">
<view class="text-black text-sg text-bold" style="padding: 0rpx 28rpx 12rpx 28rpx">库存管理</view>
<van-grid column-num="4" border="{{fasle}}">
<van-grid-item wx:for="{{ tabList2 }}" wx:key="index" data-status="{{item.status}}" bind:click="outList" text="{{item.name}}">
<van-icon slot="icon" name="{{ item.icon }}" size="68rpx" info="{{item.badge}}" />
</van-grid-item>
</van-grid>
</view>
</view>
<view style="padding: 0rpx 28rpx;margin-top:24rpx">
<image style="width:694rpx;height:250rpx" src="/assets/image/icon-banner.png" bindtap="toAuths"></image>
</view>
<view style="height:24rpx;"></view> <view style="height:24rpx;"></view>
</scroll-view> </scroll-view>
Loading…
Cancel
Save