Commit 66ff6bd0 by 邓恒通

Initial commit

parents
//app.js
var http = require('http.js') //引入刚创建的http.js,地址根据自己的地址填写
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
},
globalData: {
userInfo: null
},
func:{
post:http.req //这里配置我们需要的方法
},
listItme:{//公共变量
listItme1:{}, //个人详情
listItme2:[],//统计详情
listItme3:[],//统计个人详情
},
role_name:'',//权限
})
\ No newline at end of file
{
"pages":[
"pages/login/login",
"pages/personal/personal",
"pages/unit/unit",
"pages/statistics/statistics",
"pages/logs/logs",
"pages/personalDetails/personalDetails",
"pages/contractDetails/contractDetails",
"pages/commission/commission",
"pages/commissionDetails/commissionDetails"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#69a9f7",
"navigationBarTitleText": "Weixin",
"navigationBarTextStyle":"white"
},
"tabBar": {
"backgroundColor": "#fff",
"color": "#bcc6d5",
"selectedColor": "#69a9f7",
"list": [{
"pagePath": "pages/personal/personal",
"text": "个人",
"iconPath": "images/personal.png",
"selectedIconPath": "images/personal_select.png"
},
{
"pagePath": "pages/unit/unit",
"text": "单位",
"iconPath": "images/unit.png",
"selectedIconPath": "images/unit_select.png"
},
{
"pagePath": "pages/statistics/statistics",
"text": "统计",
"iconPath": "images/statistics.png",
"selectedIconPath": "images/statistics_select.png"
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
let rootUrl = "http://192.168.1.122:80/";//具体接口域名根据你的实际情况填写
function getData(url,data,cb,header){
wx.request({
url : rootUrl + url,
data: data,
method: 'post',
header: {
// "Content-Type": "json", //get请求时候
"Content-Type": "application/x-www-form-urlencoded", //POST请求的时候这样写
"Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
"Tenant-Id": "000000",
"Blade-Auth":header
},
success: function(res){
// debugger
if(res.data.msg =="请求未授权"){
wx.showModal({
title:'授权过期',
cancelColor: '授权过期或为授权!请重新授权!',
showCancel:true,
cancelText:'停留',
confirmText:'去授权',
success:(res)=>{
// debugger
if(res.cancel == false){
wx.navigateTo({
url: '../login/login',
})
}
},
fail:res=>{ }
})
}
return typeof cb == "function" && cb(res.data)
},
fail: function(){
return typeof cb == "function" && cb(false)
}
})
}
module.exports = {
req : getData //暴露一个方法
}
\ No newline at end of file
images/b2.png

237 Bytes

images/duei.png

1005 Bytes

images/ka.png

381 Bytes

// pages/commission/commission.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
indexLits:0,
unit:''
},
seeCommissionDetails(){
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var index = options.index;
this.setData({
indexLits:index,
unit:app.listItme.listItme2
})
if(index==0){
this.setData({
fee:app.listItme.listItme2.integrationRevenue
})
}
if(index==1){
this.setData({
fee:app.listItme.listItme2.amount
})
}
if(index==2){
this.setData({
fee:app.listItme.listItme2.total
})
}
// amount: 3334706
// contractName: "广州市白云区科技工业商务和信息化局与中国电信股份有限公司广州分公司订立之白云区第二期自然村光纤网络覆盖及增值服务采购项目合同"
// id: 113
// integrationRevenue: 5180000
// total: 482808
// unit: "白云"
// updateTime: "202004"
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
,
"navigationBarTitleText": "提成明细"
}
\ No newline at end of file
<!--pages/commission/commission.wxml-->
<!-- 搜索内容 -->
<view class="content">
<block wx:for="{{unit}}" wx:key="index">
<view class="content_li" bindtap="seeCommissionDetails">
<view class="li">
<text class="li_text1">{{item.unit}}</text>
</view>
<view class="li">
<text class="li_text2" wx:if="{{indexLits==1}}">¥{{item.integrationRevenue}}</text>
<text class="li_text2" wx:if="{{indexLits==2}}">¥{{item.amount}}</text>
<text class="li_text2" wx:if="{{indexLits==3}}">¥{{item.total}}</text>
</view>
</view>
</block>
</view>
/* pages/commission/commission.wxss */
page{
background-color: #f7f9fc;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
height: 170rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
}
.content_li .li{
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
}
.bor_bottom{
border-bottom: 1px solid #f7f9fc;
}
.li_text1{
color: #bcbcbc;
}
.li_text2{
height: 65rpx;
line-height: 65rpx;
color: #616161;
font-weight: 900;
font-size: 40rpx;
}
\ No newline at end of file
// pages/commission/commission.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
litsitem:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
litsitem:app.listItme.listItme3
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
,
"navigationBarTitleText": "提成明细"
}
\ No newline at end of file
<!--pages/commission/commission.wxml-->
<!-- 搜索内容 -->
<view class="content">
<block wx:for="{{litsitem}}" wx:key="index">
<view class="content_li">
<view class="li">
<text class="li_text1">{{item.name}}</text>
<view class="li_text3">
<image src="/images/ditu.png"></image>
{{item.unit}}
</view>
</view>
<view class="li">
<text class="li_text2">¥ {{item.personalCommission}}</text>
</view>
</view>
</block>
</view>
/* pages/commission/commission.wxss */
page{
background-color: #f7f9fc;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
height: 170rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
}
.content_li .li{
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
}
.bor_bottom{
border-bottom: 1px solid #f7f9fc;
}
.li_text1{
color: #bcbcbc;
font-weight: 600;
}
.li_text2{
height: 65rpx;
line-height: 65rpx;
color: #616161;
font-weight: 900;
font-size: 40rpx;
}
.li_text3{
height: 65rpx;
line-height: 65rpx;
color: #bcbcbc;
font-weight: 600;
display: inline-block
}
.li_text3 image{
width: 32rpx;
height: 32rpx;
}
\ No newline at end of file
// pages/personal/personal.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
inpVal:'',
historyList:[],
clearIcon:true,
selectShow: false,//控制下拉列表的显示隐藏,false隐藏、true显示
selectData: ['月份','202001','202002','202003','202004','202005','202006'],//下拉列表的数据
index: 0,//选择的下拉列表下标
List:[],//渲染列表
ListIndex:1,//渲染页数
total:1,//渲染总数
contractCode:''//合同号
},
// 点击下拉显示框
selectTap() {
this.setData({
selectShow: !this.data.selectShow
});
},
// 点击下拉列表
optionTap(e) {
let Index = e.currentTarget.dataset.index;//获取点击的下拉列表的下标
this.setData({
index: Index,
selectShow: !this.data.selectShow
});
},
show(e){//数据双向绑定
let key = e.target.dataset.model;
console.log(key)
this.setData({
[key]: e.detail.value
})
this.setData({
clearIcon: false
})
},
seePersonalDetails(e){
let item = e.currentTarget.dataset.item;
// console.log(key)
// console.log(item)
app.listItme.listItme1=item
debugger
wx.navigateTo({
url: '../personalDetails/personalDetails'
})
},
search(){//搜索
// 请求头
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
debugger
// token role_name: "hr" 个人
// token role_name: "manage" 个人 公司
// token role_name: "admin" 全部
if(this.data.inpVal){
var name = this.data.inpVal;
}else{
var name =''
}
var contractCode = this.data.contractCode;
app.func.post('excel/getInfo',{name:name,contractCode:contractCode,current:1,size:5},(res)=>{
debugger
this.setData({
List: res.data.records,
total: res.data.total,
ListIndex:1
});
console.log(res)
},
header
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
debugger
var contractCode = options.contractCode;
this.setData({
contractCode:contractCode
})
debugger
this.search();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// this.search();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var then = this
var total = Math.ceil(then.data.total/5)
then.setData({
ListIndex: then.data.ListIndex+1
});
if(then.data.ListIndex<=total){
// 请求头
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
if(then.data.inpVal){
var name = then.data.inpVal;
}else{
var name = '';
}
var contractCode = then.data.contractCode
app.func.post('excel/getInfo',{name:name,contractCode:contractCode,current:then.data.ListIndex,size:5},(res)=>{
if(res.data.records.length>0){
var List = then.data.List
for( var i in res.data.records){
List.push(res.data.records[i]);
}
then.setData({
List:List
});
}else{
wx.showToast({
title: '到底了',
icon: 'success',
duration: 2000
})
}
// console.log(res)
},header)
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "合同详情"
}
\ No newline at end of file
<!--合同详情 -->
<view class="page">
<!-- 搜索 -->
<!-- 搜索内容 -->
<view class="content">
<block wx:for="{{List}}" wx:key="index">
<view class="content_li">
<view class="li bor_bottom" bindtap="seePersonalDetails"
data-item="{{item}}">
<text class="li_name">{{item.name}}</text><text class="li_button">查看 ></text>
</view>
<view class="li">
<text class="li_text1">月份</text><text class="li_text2">{{item.updateTime}}</text>
</view>
<view class="li">
<text class="li_text1">提成</text><text class="li_text2">{{item.personalCommission}}</text>
</view>
</view>
</block>
</view>
</view>
/* pages/personal/personal.wxss */
page{
background-color: #f7f9fc;
}
/* 搜索栏 */
.page-section{
height: 90rpx;
background-color: #fff;
padding: 20rpx 0;
}
.weui-input{
width:55%;
height: 70rpx;
margin:10rpx 0 0 20rpx;
background-color: #f7f9fc;
border-radius:10rpx ;
color: #ccc;
line-height: 70rpx;
position: relative;
}
.weui-input icon{
position: absolute;
top:10rpx;
}
.weui-input input{
position: absolute;
top:10rpx;
left: 20px;
width: 80%;
color: #000;
}
.sctbiao{
position: absolute;
top:10rpx;
right: 10px;
}
.butt{
width: 100rpx;
height: 70rpx;
text-align: center;
line-height: 70rpx;
position: absolute;
top:20rpx;
font-weight: 600;
font-size: 30rpx;
color: #bcc6d5;
right: 50rpx;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
height: 250rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
}
.content_li .li{
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
}
.bor_bottom{
border-bottom: 1px solid #f7f9fc;
}
.li_name{
font-weight: 900;
color: #616161;
width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.li_button{
font-weight: 900;
color: #78b0f7;
}
.li_text1{
color: #bcbcbc;
}
.li_text2{
color: #616161;
}
/* 下拉框 */
.select_box{
width:25%;
height:70%;
border-radius: 14rpx;
margin-top: -8%;
margin-right: 20rpx;
float: right;
position: relative;
}
.select_box .select{
box-sizing: border-box;
width: 100%;
height: 100%;
border-radius: 8rpx;
display: flex;
align-items: center;
padding: 0 10rpx;
}
.select_box .select .select_text{
font-size: 26rpx;
color: #777777;
line-height: 28rpx;
flex: 1;
}
.select_box .select .select_img{
width: 30rpx;
height: 30rpx;
display: block;
transition:transform 0.3s;
}
.select_box .select .select_img_rotate{
transform:rotate(180deg);
}
.select_box .option_box{
position: absolute;
top: calc(100% - 1px);
width: 100%;
box-sizing: border-box;
height: 0;
overflow-y: auto;
background: #fff;
transition: height 0.3s;
border-left:1px solid #efefef;
border-right:1px solid #efefef;
}
.select_box .option_box .option{
display: block;
line-height: 30rpx;
font-size: 26rpx;
border-top: 1px solid #efefef;
border-bottom: 1px solid #efefef;
padding: 10rpx;
}
\ No newline at end of file
//index.js
//获取应用实例
// const app = getApp()
// Page({
// data: {
// motto: 'Hello World',
// userInfo: {},
// hasUserInfo: false,
// canIUse: wx.canIUse('button.open-type.getUserInfo')
// },
// //事件处理函数
// bindViewTap: function() {
// wx.navigateTo({
// url: '../logs/logs'
// })
// },
// onLoad: function () {
// if (app.globalData.userInfo) {
// this.setData({
// userInfo: app.globalData.userInfo,
// hasUserInfo: true
// })
// } else if (this.data.canIUse){
// // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// // 所以此处加入 callback 以防止这种情况
// app.userInfoReadyCallback = res => {
// this.setData({
// userInfo: res.userInfo,
// hasUserInfo: true
// })
// }
// } else {
// // 在没有 open-type=getUserInfo 版本的兼容处理
// wx.getUserInfo({
// success: res => {
// app.globalData.userInfo = res.userInfo
// this.setData({
// userInfo: res.userInfo,
// hasUserInfo: true
// })
// }
// })
// }
// },
// getUserInfo: function(e) {
// console.log(e)
// app.globalData.userInfo = e.detail.userInfo
// this.setData({
// userInfo: e.detail.userInfo,
// hasUserInfo: true
// })
// }
// })
var app = getApp() ;
Page({
data: {
//判断小程序的API,回调,参数,组件等是否在当前版本可用。
canIUse: wx.canIUse('button.open-type.getUserInfo'),
isHide: false
},
onLoad: function() {
var that = this;
// 查看是否授权
wx.getSetting({
success: function(res) {
if (res.authSetting['scope.userInfo']) {
wx.getUserInfo({
success: function(res) {
// 用户已经授权过,不需要显示授权页面,所以不需要改变 isHide 的值
// 根据自己的需求有其他操作再补充
// 我这里实现的是在用户授权成功后,调用微信的 wx.login 接口,从而获取code
wx.login({
success: res => {
// 获取到用户的 code 之后:res.code
console.log("用户的code:" + res.code);
console.log(res);
// 可以传给后台,再经过解析获取用户的 openid
let postdata = {
code:res.code
}
app.func.post('weChat/wxLogin',postdata,(res)=>{
console.log(res)
})
// 或者可以直接使用微信的提供的接口直接获取 openid ,方法如下:
// wx.request({
// // 自行补上自己的 APPID 和 SECRET
// url: 'https://api.weixin.qq.com/sns/jscode2session?appid=自己的APPID&secret=自己的SECRET&js_code=' + res.code + '&grant_type=authorization_code',
// success: res => {
// // 获取到用户的 openid
// console.log("用户的openid:" + res.data.openid);
// }
// });
}
});
}
});
} else {
// 用户没有授权
// 改变 isHide 的值,显示授权页面
that.setData({
isHide: true
});
}
}
});
},
bindGetUserInfo: function(e) {
if (e.detail.userInfo) {
//用户按了允许授权按钮
var that = this;
// 获取到用户的信息了,打印到控制台上看下
console.log("用户的信息如下:");
//授权成功后,通过改变 isHide 的值,让实现页面显示出来,把授权页面隐藏起来
that.setData({
isHide: false
});
} else {
//用户按了拒绝按钮
wx.showModal({
title: '警告',
content: '您点击了拒绝授权,将无法进入小程序,请授权之后再进入!!!',
showCancel: false,
confirmText: '返回授权',
success: function(res) {
// 用户没有授权成功,不需要改变 isHide 的值
if (res.confirm) {
console.log('用户点击了“返回授权”');
}
}
});
}
}
,
getPhoneNumber: function(e) {
console.log(e.detail.errMsg)
console.log(e.detail.iv)
console.log(e.detail.encryptedData)
if (e.detail.errMsg == 'getPhoneNumber:fail user deny'){
wx.showModal({
title: '提示',
showCancel: false,
content: '未授权',
success: function (res) { }
})
} else {
wx.showModal({
title: '提示',
showCancel: false,
content: '同意授权',
success: function (res) {
// 登录请求 12345678910 18102736361
app.func.post('weChat/token',{phone:12345678910},(res)=>{
console.log(res)
debugger
if(res){
wx.setStorageSync("token", res.data);
var token = wx.getStorageSync("token");
app.role_name= token.role_name
// token role_name: "hr" 个人
// token role_name: "manage" 个人 公司
// token role_name: "admin" 全部
wx.switchTab({
url: '/pages/personal/personal'
})
}
//
})
}
})
}
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "授权登录"
}
\ No newline at end of file
<!--index.wxml-->
<!-- <view class="container">
<view class="userinfo">
<button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</view> -->
<view wx:if="{{isHide}}">
<view wx:if="{{canIUse}}" >
<view class='header'>
<image src='/images/wx_login.png'></image>
</view>
<view class='content'>
<view>申请获取以下权限</view>
<text>获得你的公开信息(昵称,头像等)</text>
</view>
<button class='bottom' type='primary' open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="bindGetUserInfo">
授权
</button>
</view>
<view wx:else>请升级微信版本</view>
</view>
<view wx:else>
<view class='header'>
<image src='/images/wx_login.png'></image>
</view>
<view class='content'>
<text>申请获取手机号并登录</text>
</view>
<button class='bottom' type='primary' lang="zh_CN" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
登录
</button>
</view>
/**index.wxss**/
/* .userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
} */
.header {
margin: 90rpx 0 90rpx 50rpx;
border-bottom: 1px solid #ccc;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
}
.content text {
display: block;
color: #9d9d9d;
margin-top: 40rpx;
}
.bottom {
border-radius: 80rpx;
margin: 70rpx 50rpx;
font-size: 35rpx;
}
\ No newline at end of file
//logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return util.formatTime(new Date(log))
})
})
}
})
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}
\ No newline at end of file
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}
// pages/personal/personal.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
inpVal:'',
historyList:[],
clearIcon:true,
selectShow: false,//控制下拉列表的显示隐藏,false隐藏、true显示
selectData: ['月份','202001','202002','202003','202004','202005','202006'],//下拉列表的数据
index: 0,//选择的下拉列表下标
List:[],//渲染列表
ListIndex:1,//渲染页数
total:1,//渲染总数
role_name:''
},
// 点击下拉显示框
selectTap() {
this.setData({
selectShow: !this.data.selectShow
});
},
// 点击下拉列表
optionTap(e) {
let Index = e.currentTarget.dataset.index;//获取点击的下拉列表的下标
this.setData({
index: Index,
selectShow: !this.data.selectShow
});
},
show(e){//数据双向绑定
let key = e.target.dataset.model;
console.log(key)
this.setData({
[key]: e.detail.value
})
this.setData({
clearIcon: false
})
},
seePersonalDetails(e){
let item = e.target.dataset.item;
// console.log(key)
// console.log(item)
debugger
app.listItme.listItme1=item
wx.navigateTo({
url: '../personalDetails/personalDetails'
})
},
search(){//搜索
// 请求头
// debugger
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
// token role_name: "hr" 个人
// token role_name: "manage" 个人 公司
// token role_name: "admin" 全部
if(this.data.inpVal){
var name = this.data.inpVal;
}else{
var name =''
}
var updateTime = this.data.selectData[this.data.index];
if(updateTime=="月份"){
updateTime = ''
}
debugger
app.func.post('excel/queryPersonal',{name:name,updateTime:updateTime,current:1,size:4},(res)=>{
debugger
this.setData({
List: res.data.records,
total: res.data.total,
ListIndex:1
});
console.log(res)
},
header
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
role_name:app.role_name
})
this.search();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// this.search();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var then = this
var total = Math.ceil(then.data.total/4)
then.setData({
ListIndex: then.data.ListIndex+1
});
if(then.data.ListIndex<=total){
// 请求头
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
if(then.data.inpVal){
var name = then.data.inpVal;
}else{
var name = '';
}
var updateTime = then.data.selectData[then.data.index];
if(updateTime=="月份"){
updateTime = ''
}
app.func.post('excel/queryPersonal',{name:name,updateTime:updateTime,current:then.data.ListIndex,size:4},(res)=>{
if(res.data.records.length>0){
var List = then.data.List
for( var i in res.data.records){
List.push(res.data.records[i]);
}
then.setData({
List:List
});
}else{
wx.showToast({
title: '到底了',
icon: 'success',
duration: 2000
})
}
// console.log(res)
},header)
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "列账系统",
"onReachBottomDistance":50
}
\ No newline at end of file
<!--pages/personal/personal.wxml 列账系统 个人-->
<view class="page">
<!-- 搜索 -->
<view class="page-section">
<view class="weui-input" >
<input class="input"
placeholder="搜索名字"
placeholder-style="color:#ccc"
focus="true"
bindinput="show"
data-model="inpVal"
value="{{inpVal}}"/>
<icon type="search" class="sctbiao" color="#bcc6d5"
bindtap="search" />
</view>
<!-- <text class="butt" bindtap="addHistory">月份</text> -->
<view class='select_box'>
<view class='select' catchtap='selectTap'>
<text class='select_text'>{{selectData[index]}}</text>
<image class='select_img {{selectShow&&"select_img_rotate"}}' src='../../images/b2.png' background-size="contain"></image>
</view>
<view class='option_box' style='height:{{selectShow?(selectData.length>5?325:selectData.length*50):0}}rpx;'>
<text class='option' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</text>
</view>
</view>
</view>
<!-- 搜索内容 -->
<view class="content">
<block wx:for="{{List}}" wx:key="index">
<view class="content_li">
<view class="li bor_bottom" bindtap="seePersonalDetails"
data-item="{{item}}">
<text class="li_name">{{item.name}}</text><text class="li_button">查看 ></text>
</view>
<view class="li">
<text class="li_text1">月份</text><text class="li_text2">{{item.updateTime}}</text>
</view>
<view class="li">
<text class="li_text1">提成</text><text class="li_text2">{{item.personalCommission}}</text>
</view>
</view>
</block>
</view>
</view>
/* pages/personal/personal.wxss */
page{
background-color: #f7f9fc;
}
/* 搜索栏 */
.page-section{
height: 90rpx;
background-color: #fff;
padding: 20rpx 0;
}
.weui-input{
width:55%;
height: 70rpx;
margin:10rpx 0 0 20rpx;
background-color: #f7f9fc;
border-radius:10rpx ;
color: #ccc;
line-height: 70rpx;
position: relative;
}
.weui-input icon{
position: absolute;
top:10rpx;
}
.weui-input input{
position: absolute;
top:10rpx;
left: 20px;
width: 80%;
color: #000;
}
.sctbiao{
position: absolute;
top:10rpx;
right: 10px;
z-index: 2;
}
.butt{
width: 100rpx;
height: 70rpx;
text-align: center;
line-height: 70rpx;
position: absolute;
top:20rpx;
font-weight: 600;
font-size: 30rpx;
color: #bcc6d5;
right: 50rpx;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
height: 250rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
}
.content_li .li{
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
}
.bor_bottom{
border-bottom: 1px solid #f7f9fc;
}
.li_name{
font-weight: 900;
color: #616161;
}
.li_button{
font-weight: 900;
color: #78b0f7;
}
.li_text1{
color: #bcbcbc;
}
.li_text2{
color: #616161;
}
/* 下拉框 */
.select_box{
width:25%;
height:70%;
border-radius: 14rpx;
margin-top: -8%;
margin-right: 20rpx;
float: right;
position: relative;
}
.select_box .select{
box-sizing: border-box;
width: 100%;
height: 100%;
border-radius: 8rpx;
display: flex;
align-items: center;
padding: 0 10rpx;
}
.select_box .select .select_text{
font-size: 26rpx;
color: #777777;
line-height: 28rpx;
flex: 1;
}
.select_box .select .select_img{
width: 30rpx;
height: 30rpx;
display: block;
transition:transform 0.3s;
}
.select_box .select .select_img_rotate{
transform:rotate(180deg);
}
.select_box .option_box{
position: absolute;
top: calc(100% - 1px);
width: 100%;
box-sizing: border-box;
height: 0;
overflow-y: auto;
background: #fff;
transition: height 0.3s;
border-left:1px solid #efefef;
border-right:1px solid #efefef;
}
.select_box .option_box .option{
display: block;
line-height: 30rpx;
font-size: 26rpx;
border-top: 1px solid #efefef;
border-bottom: 1px solid #efefef;
padding: 10rpx;
}
\ No newline at end of file
// pages/personalDetails/personalDetails.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
litsitem:[],
hidden:true,
oNhidden:false,
selectShow:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(app.listItme.listItme1)
debugger
this.setData({
litsitem:app.listItme.listItme1
})
},
clickMe(e){
this.setData({
hidden:!this.data.hidden,
oNhidden:!this.data.oNhidden,
selectShow: !this.data.selectShow
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
,
"navigationBarTitleText": "详情"
}
\ No newline at end of file
<!--pages/personalDetails/personalDetails.wxml-->
<!-- 个人详情内容 -->
<view class="content">
<view class="content_li">
<view class="li bor_bottom">
<text class="li_text1">姓名</text><text class="li_text2">{{litsitem.name}}</text>
</view>
<view class="li bor_bottom">
<text class="li_text1">单位</text><text class="li_text2">{{litsitem.attributionUnit}}</text>
</view>
<view class="li ">
<text class="li_text1">合同名称</text><text class="li_text2 ht" hidden="{{oNhidden}}" bindtap='clickMe'>{{litsitem.contractName}}</text>
<image class='select_img {{selectShow&&"select_img_rotate"}}' src='../../images/b2.png' background-size="contain"></image>
</view>
<view class=" qbht" hidden="{{hidden}}">
<text class="li_text1"></text><text class="li_text2" bindtap='clickMe'>{{litsitem.contractName}}</text>
</view>
</view>
<view class="content_li">
<view class="li bor_bottom">
<text class="li_text1">列收金额</text><text class="li_text2">{{litsitem.amount}}</text>
</view>
<view class="li bor_bottom">
<text class="li_text1">激励比例</text><text class="li_text2">{{litsitem.excitation}}</text>
</view>
<view class="li">
<text class="li_text1">个人提成</text><text class="li_text2">{{litsitem.personalCommission}}</text>
</view>
</view>
</view>
/* pages/personalDetails/personalDetails.wxss */
page{
background-color: #f7f9fc;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
min-height: 250rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
}
.content_li .li{
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
}
.bor_bottom{
border-bottom: 1px solid #f7f9fc;
}
.li_text1{
color: #bcbcbc;
display: inline-block;
width: 180rpx;
}
.li_text2{
color: #616161;
display: inline-block;
width: 450rpx;
}
.ht{
/* display: inline-block; */
overflow:hidden;
/* text-overflow:ellipsis; */
white-space:nowrap;
vertical-align:middle;
}
.qbht{
height: 250rpx;
line-height: 40rpx;
padding: 0 20rpx;
margin-top: -56rpx;
}
.select_img{
width: 30rpx;
height: 30rpx;
display: block;
transition:transform 0.3s;
float: right;
margin-top: 30rpx;
}
.select_img_rotate{
transform:rotate(180deg);
}
\ No newline at end of file
// pages/statistics/statistics.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
list:[
{img:'/images/jinbi.png',class:'yuna_back1',name:'系统集成收入',index:1},
{img:'/images/qian.png',class:'yuna_back2',name:'列收金额',index:2},
{img:'/images/ka.png',class:'yuna_back3',name:'总提成',index:3},
{img:'/images/duei.png',class:'yuna_back4',name:'个人提成',index:4},
],
name:'',
updateTime:'',
unit:'',
gatherDetails:[],
gather:[],
role_name:''
},
seeCommission(e){
if(this.data.gatherDetails.length>0){
let index = e.currentTarget.dataset.index;
app.listItme.listItme2 = this.data.gatherDetails;
debugger
if(index==4){
if( app.listItme.listItme3.length>0){
wx.navigateTo({
url: '../commissionDetails/commissionDetails',
})
}
}else{
wx.navigateTo({
url: '../commission/commission?index='+index,
})
}
}else{
wx.showToast({
title: '暂无数据!',
icon: 'none',
duration: 2000
})
}
},
show1(e){//数据双向绑定
this.setData({
updateTime: e.detail.value,
})
},
show2(e){//数据双向绑定
this.setData({
name: e.detail.value,
})
},
show3(e){//数据双向绑定
this.setData({
unit: e.detail.value,
})
},
search(){//搜索
// 请求头
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
debugger
// token role_name: "hr" 个人
// token role_name: "manage" 个人 公司
// token role_name: "admin" 全部
var name = this.data.name;
var updateTime = this.data.updateTime;
var unit = this.data.unit;
app.func.post('excel/filterQueryByPersonal',{updateTime:updateTime,unit:unit,naem:name},(res)=>{
debugger
if(res.data.length>0){
app.listItme.listItme3 = res.data;
}else{
wx.showToast({
title: '暂无个人提成详情!',
icon: 'none',
duration: 2000
})
}
},
header
)
app.func.post('excel/filterQueryByWeChat',{updateTime:updateTime,unit:unit,naem:name},(res)=>{
if(res.data){
// debugger
let data1 = res.data;
let gather = data1.pop();
let gatherDetails = data1;
this.setData({
gather:[{fee:gather.integrationRevenue},{fee:gather.amount},{fee:gather.total},{fee:gather.total}],
gatherDetails:gatherDetails
});
}else{
wx.showToast({
title: '暂无可查数据!',
icon: 'none',
duration: 2000
})
}
console.log(res)
},
header
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
role_name:app.role_name
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "单位统计",
"usingComponents": {}
}
\ No newline at end of file
<!--pages/statistics/statistics.wxml-->
<!--pages/unit/unit.wxml-->
<view class="page" wx:if="{{role_name=='boss'}}">
<!-- 搜索 -->
<view class="page-section">
<view class="weui-input" bindtap="seeDetails">
<text>月份</text>
<input class="input"
placeholder="如:202001"
placeholder-style="color:#ccc"
focus="true"
bindinput="show1"
data-updateTime="updateTime"
value="{{updateTime}}"/>
</view>
<view class="weui-input" bindtap="seeDetails">
<text>姓名</text>
<input class="input"
placeholder="如:张三"
placeholder-style="color:#ccc"
focus="true"
bindinput="show2"
data-name="name"
value="{{name}}"/>
</view>
<view class="weui-input" bindtap="seeDetails">
<text>单位</text>
<input class="input"
placeholder="如:天河,白云..."
placeholder-style="color:#ccc"
focus="true"
bindinput="show3"
data-unit="unit"
value="{{unit}}"/>
</view>
<view class="weui-input" bindtap="seeDetails">
<button class="weui-button" size='mini' bindtap="search">搜索</button>
</view>
</view>
<!-- 搜索内容 -->
<view class="content">
<block wx:for="{{list}}" wx:key="index" >
<view class="content_li" bindtap="seeCommission"
data-index="{{item.index}}">
<view class="li_name">
<view class="li_yuan {{item.class}}">
<image src="{{item.img}}"></image>
</view>
</view>
<view class="li_information" >
<view class="information_titie">{{item.name}}</view>
<view class="information_content">{{gather[index].fee}}</view>
<view class="information"><image src="/images/gengduo.png"></image></view>
</view>
</view>
</block>
</view>
</view>
<view wx:else class="tishi">
权限不足,无法展示!
</view>
/* pages/statistics/statistics.wxss */
/* pages/unit/unit.wxss */
/* pages/personal/personal.wxss */
page{
background-color: #f7f9fc;
}
/* 搜索栏 */
.page-section{
height: 200rpx;
background-color: #fff;
padding: 20rpx 0;
}
.weui-input{
width:45%;
display: inline-block;
height: 70rpx;
margin:10rpx 0 0 20rpx;
border-radius:10rpx ;
color: #ccc;
line-height: 70rpx;
position: relative;
}
.weui-input input{
position: absolute;
background-color: #f7f9fc;
top:6rpx;
left: 80rpx;
width: 70%;
height: 60rpx;
color: #000;
}
.sctbiao{
position: absolute;
top:10rpx;
right: 10px;
}
.weui-button{
background-color: #69a8f7;
color: #fff;
position: absolute;
top:25rpx;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
height: 140rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
display: flex;
}
.li_name{
font-weight: 900;
color: #616161;
display: inline-block;
width: 140rpx;
height: 140rpx;
border-right: 1px solid #f7f9fc;
text-align: center;
padding: 20rpx 0;
}
.li_yuan{
/* background: #000; */
display: inline-block;
width: 90rpx;
height: 50rpx;
text-align: center;
padding: 20rpx 0;
border-radius: 100%;
}
.yuna_back1{
background: #ef7c7e;
}
.yuna_back2{
background: #f3ac64;
}
.yuna_back3{
background: #6cb2f8;
}
.yuna_back4{
background: #7179f7;
}
.li_name image{
width: 50rpx;
height: 50rpx;
border-radius: 100%;
}
.li_information{
display: inline-block;
position: relative;
width: 600rpx;
padding-left: 30rpx;
}
.information_titie{
height: 65rpx;
line-height: 65rpx;
color: #bcbcbc;
}
.information_content{
height: 65rpx;
line-height: 65rpx;
color: #616161;
font-weight: 900;
font-size: 50rpx;
}
.information{
position: absolute;
font-weight: 900;
font-style: 40rpx;
right: 50rpx;
top: 40rpx;
}
.information image{
width: 25rpx;
height: 25rpx;
}
.tishi{
display: block;
width: 500rpx;
height: 60rpx;
margin: 50% auto;
text-align: center;
}
\ No newline at end of file
// pages/personal/personal.js
// pages/personal/personal.js
var app = getApp() ;
Page({
/**
* 页面的初始数据
*/
data: {
inpVal:'',
historyList:[],
clearIcon:true,
selectShow: false,//控制下拉列表的显示隐藏,false隐藏、true显示
selectData: ['月份','202001','202002','202003','202004','202005','202006'],//下拉列表的数据
index: 0,//选择的下拉列表下标
List:[],//渲染列表
ListIndex:1,//渲染页数
total:1,//渲染总数
role_name:''
},
// 点击下拉显示框
selectTap() {
this.setData({
selectShow: !this.data.selectShow
});
},
// 点击下拉列表
optionTap(e) {
let Index = e.currentTarget.dataset.index;//获取点击的下拉列表的下标
this.setData({
index: Index,
selectShow: !this.data.selectShow
});
},
show(e){//数据双向绑定
let key = e.target.dataset.model;
console.log(key)
this.setData({
[key]: e.detail.value
})
this.setData({
clearIcon: false
})
},
seePersonalDetails(e){
let item = e.currentTarget.dataset.item;
let contractCode = item.contractCode;
// contractCode: "GDGZA1909731CGN0C"
// console.log(key)
// console.log(item)
app.listItme.listItme1=item
debugger
wx.navigateTo({
url: '../contractDetails/contractDetails?contractCode='+contractCode
})
},
search(){//搜索
// 请求头
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
// token role_name: "hr" 个人
// token role_name: "manage" 个人 公司
// token role_name: "admin" 全部
if(this.data.inpVal){
var unit = this.data.inpVal;
}else{
var unit =''
}
var updateTime = this.data.selectData[this.data.index];
if(updateTime=="月份"){
updateTime = ''
}
// debugger
app.func.post('excel/queryPersonal',{unit:unit,updateTime:updateTime,current:1,size:4},(res)=>{
// debugger
this.setData({
List: res.data.records,
total: res.data.total,
ListIndex:1
});
console.log(res)
},
header
)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.search();
this.setData({
role_name:app.role_name
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// this.search();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var then = this
var total = Math.ceil(then.data.total/4)
then.setData({
ListIndex: then.data.ListIndex+1
});
if(then.data.ListIndex<=total){
// 请求头
var token = wx.getStorageSync("token");
var header= token.token_type+' '+token.access_token
if(then.data.inpVal){
var unit = then.data.inpVal;
}else{
var unit = '';
}
var updateTime = then.data.selectData[then.data.index];
if(updateTime=="月份"){
updateTime = ''
}
app.func.post('excel/queryPersonal',{unit:unit,updateTime:updateTime,current:then.data.ListIndex,size:4},(res)=>{
if(res.data.records.length>0){
var List = then.data.List
for( var i in res.data.records){
List.push(res.data.records[i]);
}
then.setData({
List:List
});
}else{
wx.showToast({
title: '到底了',
icon: 'success',
duration: 2000
})
}
// console.log(res)
},header)
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "单位统计",
"usingComponents": {},
"onReachBottomDistance":50
}
\ No newline at end of file
<!--pages/unit/unit.wxml-->
<view class="page" wx:if="{{role_name=='manage'||role_name=='boss'}}">
<!-- 搜索 -->
<view class="page-section">
<view class="weui-input" >
<input class="input"
placeholder="搜索单位"
placeholder-style="color:#ccc"
focus="true"
bindinput="show"
data-model="inpVal"
value="{{inpVal}}"/>
<icon type="search" class="sctbiao" color="#bcc6d5"
bindtap="search" />
</view>
<!-- <text class="butt" bindtap="addHistory">月份</text> -->
<view class='select_box'>
<view class='select' catchtap='selectTap'>
<text class='select_text'>{{selectData[index]}}</text>
<image class='select_img {{selectShow&&"select_img_rotate"}}' src='../../images/b2.png' background-size="contain"></image>
</view>
<view class='option_box' style='height:{{selectShow?(selectData.length>5?325:selectData.length*50):0}}rpx;'>
<text class='option' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</text>
</view>
</view>
</view>
<!-- 搜索内容 -->
<view class="content">
<block wx:for="{{List}}" wx:key="index">
<view class="content_li">
<view class="li bor_bottom" bindtap="seePersonalDetails"
data-item="{{item}}">
<text class="li_name">{{item.unit}}</text><text class="li_button">查看 ></text>
</view>
<view class="li">
<text class="li_text1">月份</text><text class="li_text2">{{item.updateTime}}</text>
</view>
<view class="li">
<text class="li_text1">单位</text><text class="li_text2">{{item.unit}}</text>
</view>
<view class="li">
<text class="li_text1">系统集成收入</text><text class="li_text2">{{item.integrationRevenue}}</text>
</view>
<view class="li">
<text class="li_text1">列收金额</text><text class="li_text2">{{item.amount}}</text>
</view>
</view>
</block>
</view>
</view>
<view wx:else class="tishi">
权限不足,无法展示!
</view>
/* pages/unit/unit.wxss */
/* pages/personal/personal.wxss */
page{
background-color: #f7f9fc;
}
/* 搜索栏 */
.page-section{
height: 90rpx;
background-color: #fff;
padding: 20rpx 0;
}
.weui-input{
width:55%;
height: 70rpx;
margin:10rpx 0 0 20rpx;
background-color: #f7f9fc;
border-radius:10rpx ;
color: #ccc;
line-height: 70rpx;
position: relative;
}
.weui-input icon{
position: absolute;
top:10rpx;
}
.weui-input input{
position: absolute;
top:10rpx;
left: 20px;
width: 80%;
color: #000;
}
.sctbiao{
position: absolute;
top:10rpx;
right: 10px;
}
.butt{
width: 100rpx;
height: 70rpx;
text-align: center;
line-height: 70rpx;
position: absolute;
top:20rpx;
font-weight: 600;
font-size: 30rpx;
color: #bcc6d5;
right: 50rpx;
}
/* 展示内容 */
.content{
margin: 20rpx;
margin-top: 40rpx;
}
.content_li{
height: 410rpx;
margin-bottom: 40rpx;
background: #fff;
border-radius: 3%;
padding: 0 5rpx;
}
.content_li .li{
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
display: flex;
justify-content: space-between;
}
.bor_bottom{
border-bottom: 1px solid #f7f9fc;
}
.li_name{
font-weight: 900;
color: #616161;
width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.li_button{
font-weight: 900;
color: #78b0f7;
}
.li_text1{
color: #bcbcbc;
}
.li_text2{
color: #616161;
}
/* 下拉框 */
.select_box{
width:25%;
height:70%;
border-radius: 14rpx;
margin-top: -8%;
margin-right: 20rpx;
float: right;
position: relative;
}
.select_box .select{
box-sizing: border-box;
width: 100%;
height: 100%;
border-radius: 8rpx;
display: flex;
align-items: center;
padding: 0 10rpx;
}
.select_box .select .select_text{
font-size: 26rpx;
color: #777777;
line-height: 28rpx;
flex: 1;
}
.select_box .select .select_img{
width: 30rpx;
height: 30rpx;
display: block;
transition:transform 0.3s;
}
.select_box .select .select_img_rotate{
transform:rotate(180deg);
}
.select_box .option_box{
position: absolute;
top: calc(100% - 1px);
width: 100%;
box-sizing: border-box;
height: 0;
overflow-y: auto;
background: #fff;
transition: height 0.3s;
border-left:1px solid #efefef;
border-right:1px solid #efefef;
}
.select_box .option_box .option{
display: block;
line-height: 30rpx;
font-size: 26rpx;
border-top: 1px solid #efefef;
border-bottom: 1px solid #efefef;
padding: 10rpx;
}
.tishi{
display: block;
width: 500rpx;
height: 60rpx;
margin: 50% auto;
text-align: center;
}
\ No newline at end of file
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false
},
"compileType": "miniprogram",
"libVersion": "2.14.0",
"appid": "wxecb95a32a1ca73cd",
"projectname": "%E5%88%97%E8%B4%A6%E7%B3%BB%E7%BB%9F",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/personal/personal",
"pathName": "pages/personal/personal",
"query": "",
"scene": null
},
{
"id": 1,
"name": "单位",
"pathName": "pages/unit/unit",
"query": "",
"scene": null
},
{
"id": -1,
"name": "统计",
"pathName": "pages/statistics/statistics",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/personalDetails/personalDetails",
"pathName": "pages/personalDetails/personalDetails",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/commission/commission",
"pathName": "pages/commission/commission",
"query": "",
"scene": null
},
{
"id": 5,
"name": "个人提成",
"pathName": "pages/commissionDetails/commissionDetails",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/personalDetails/personalDetails",
"pathName": "pages/personalDetails/personalDetails",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/unit/unit",
"pathName": "pages/unit/unit",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/statistics/statistics",
"pathName": "pages/statistics/statistics",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/contractDetails/contractDetails",
"pathName": "pages/contractDetails/contractDetails",
"scene": null
}
]
}
}
}
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment