九月线上版本1.2.0

lixuan
xk_guohonglei 5 years ago
parent 856f0c8167
commit 0bcbc4b3e1
  1. 8
      components/analysis-card/analysis-card.vue
  2. 2
      components/area-month.vue
  3. 2
      components/area-time.vue
  4. 11
      components/staff-item.vue
  5. 30
      pages.json
  6. 29
      pages/Auth/Auth.vue
  7. 4
      pages/index/index.vue
  8. 12
      pages/login/posLogin/posLogin.vue
  9. 4
      pages/operation-analysis/analysis/daily.vue
  10. 27
      pages/operation-analysis/analysis/monthly.vue
  11. 6
      pages/operation-analysis/operation-analysis.vue
  12. 4
      utils/request.js

@ -4,7 +4,7 @@
<view class="padding-xs flex align-center"> <view class="padding-xs flex align-center">
<view class="flex-sub text-center padding-top-lg"> <view class="flex-sub text-center padding-top-lg">
<view class="txet-xxs"> <view class="txet-xxs">
<text class="">交易金额()</text> <text class="">交易金额</text>
</view> </view>
<view class=" text-sl padding padding-top-xs"><text class=""> <view class=" text-sl padding padding-top-xs"><text class="">
{{basicData.totalAmout|numberFilter}} {{basicData.totalAmout|numberFilter}}
@ -18,19 +18,19 @@
<view class="padding text-center flex-sub"> <view class="padding text-center flex-sub">
<text>交易笔数</text> <text>交易笔数</text>
<view class="padding-sm"> <view class="padding-sm">
<text class="oil-main-color">{{basicData.totalCount}}</text> <text class="text-lg oil-main-color padding-top-xs">{{basicData.totalCount}}</text>
</view> </view>
</view> </view>
<view class="padding text-center flex-sub"> <view class="padding text-center flex-sub">
<text>客单均价</text> <text>客单均价</text>
<view class="padding-sm"> <view class="padding-sm">
<text class="oil-main-color">{{basicData.totalAmout/basicData.totalAccount|numberFilter}}</text> <text class="text-lg oil-main-color">{{basicData.totalAmout/basicData.totalAccount|numberFilter}}</text>
</view> </view>
</view> </view>
<view class="padding text-center flex-sub"> <view class="padding text-center flex-sub">
<text>顾客数</text> <text>顾客数</text>
<view class="padding-sm"> <view class="padding-sm">
<text class="oil-main-color">{{basicData.totalAccount}}</text> <text class="text-lg oil-main-color padding-top-xs">{{basicData.totalAccount}}</text>
</view> </view>
</view> </view>
</view> </view>

@ -141,7 +141,7 @@ export default {
gridColor: '#CCCCCC', gridColor: '#CCCCCC',
dashLength: 8, dashLength: 8,
splitNumber: 5, splitNumber: 5,
format: (val) => { return val > 0 ? val.toFixed(0) : 0 + '单' } format: (val) => { return val + '单' }
}, },
width: _self.cWidth * _self.pixelRatio, width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio, height: _self.cHeight * _self.pixelRatio,

@ -136,7 +136,7 @@ export default {
gridColor: '#CCCCCC', gridColor: '#CCCCCC',
dashLength: 8, dashLength: 8,
splitNumber: 5, splitNumber: 5,
format: (val) => { return val>0?val.toFixed(0):0 + '单' } format: (val) => { return val + '单' }
}, },
width: _self.cWidth * _self.pixelRatio, width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio, height: _self.cHeight * _self.pixelRatio,

@ -3,11 +3,15 @@
<view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'"> <view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'">
<!-- {{staff.cUserName.substring(-1)}} --> <!-- {{staff.cUserName.substring(-1)}} -->
</view> </view>
<!-- <view class="cu-avatar round lg" > <!-- <view class="cu-avatar round lg" >
{{staff.cUserName.slice(0,1)}} {{staff.cUserName.slice(0,1)}}
</view> --> </view> -->
<view class="content"> <view class="content">
<view class="text-black">{{staff.cUserName}}</view> <view class="text-black">{{staff.cUserName}}
<text v-show="loginUser.id===staff.cUserId" class="padding-left-sm text-orange text-sm">
(当前登录账号)
</text>
</view>
<view class="text-gray flex" @tap="callStaff(staff.phone)"> <view class="text-gray flex" @tap="callStaff(staff.phone)">
<view class="text-cut text-df"> <view class="text-cut text-df">
<text class="cuIcon-phone oil-main-color margin-right-xs"></text> <text class="cuIcon-phone oil-main-color margin-right-xs"></text>
@ -34,7 +38,8 @@
}, },
data() { data() {
return { return {
mainURL: this.global.mainURL mainURL: this.global.mainURL,
loginUser: uni.getStorageSync('loginUser'),
}; };
}, },
methods: { methods: {

@ -4,21 +4,21 @@
"path": "pages/startPage/startPage", "path": "pages/startPage/startPage",
"style": {} "style": {}
},{ },{
"path": "pages/operation-analysis/operation-analysis", "path": "pages/login/login",
"style": { "style": {
"enablePullDownRefresh": true
} }
},{ }, {
"path" : "pages/operation-analysis/analysis/daily", "path": "pages/operation-analysis/operation-analysis",
"style" : { "style": {
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ }, {
"path": "pages/login/login", "path": "pages/operation-analysis/analysis/daily",
"style": { "style": {
"enablePullDownRefresh": true
} }
},{ }, {
"path": "pages/login/posLogin/posLogin", "path": "pages/login/posLogin/posLogin",
"style": {} "style": {}
} }
@ -81,12 +81,12 @@
"style": {} "style": {}
} }
,{ , {
"path" : "pages/operation-analysis/analysis/analysis", "path": "pages/operation-analysis/analysis/analysis",
"style" : {} "style": {}
},{ }, {
"path" : "pages/operation-analysis/analysis/monthly", "path": "pages/operation-analysis/analysis/monthly",
"style" : { "style": {
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
} }

@ -34,7 +34,7 @@
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title text-black">手机号</view> <view class="title text-black">手机号</view>
<input type="number" v-model="auth.phone" placeholder="请输入手机号" name="input"></input> <input type="number" v-model="auth.phone" placeholder="请输入手机号" name="input"></input>
<button class='cu-btn bg-main-oil shadow' @tap="sendMsg">验证码</button> <text :class="frozen?'text-gray':'oil-main-color'" @tap="sendMsg">{{tips}}</text>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title text-black">验证码</view> <view class="title text-black">验证码</view>
@ -71,6 +71,8 @@
mainURL: this.global.mainURL, mainURL: this.global.mainURL,
oilSiteNo: '', oilSiteNo: '',
oilSite: {}, oilSite: {},
tips: '发送验证码',
frozen: false, //
auth: { auth: {
} }
@ -90,6 +92,8 @@
}, },
methods: { methods: {
sendMsg() { sendMsg() {
if (!this.frozen) {
if (this.auth.phone) {
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: loginRes => { success: loginRes => {
@ -107,13 +111,34 @@
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
if (res.code === 20000) {
this.frozen = true
setTimeout(() => {
this.frozen = false
clearInterval(timer)
this.tips = `发送验证码`
}, 1000 * 60);
let second = 60
const timer = setInterval(() => {
second--
if (second) {
this.tips = `${second}秒后重发`
} else {
this.tips = `发送验证码`
}
}, 1000)
}
}) })
}, },
fail: err => { fail: err => {
console.log(err) console.log(err)
} }
}); })
}
}
}, },
register() { register() {
uni.login({ uni.login({

@ -7,7 +7,7 @@
<view class="padding-xs flex align-center"> <view class="padding-xs flex align-center">
<view class="flex-sub text-center padding-top-lg"> <view class="flex-sub text-center padding-top-lg">
<view class="txet-xxs"> <view class="txet-xxs">
<text class="text-white">今日收款()</text> <text class="text-white">今日收款</text>
</view> </view>
<view class=" text-sl padding padding-top-xs"><text class="text-white">{{userAccount.totalMoney|numberFilter}}</text></view> <view class=" text-sl padding padding-top-xs"><text class="text-white">{{userAccount.totalMoney|numberFilter}}</text></view>
</view> </view>
@ -29,7 +29,7 @@
</button> --> </button> -->
</view> </view>
<view class="padding text-center flex-sub"> <view class="padding text-center flex-sub">
<text>账户余额</text> <text>账户余额</text>
<view class="padding-sm"> <view class="padding-sm">
<text class="oil-main-color">{{userAccount.totalMoney|numberFilter}}</text> <text class="oil-main-color">{{userAccount.totalMoney|numberFilter}}</text>

@ -22,7 +22,7 @@
</view> </view>
<view class="cu-form-group padding-top-sm" v-else> <view class="cu-form-group padding-top-sm" v-else>
<view class="title text-black">密码</view> <view class="title text-black">密码</view>
<input inpitype="password" v-model="auth.password" placeholder="请输入登入密码" name="input" /> <input type="password" v-model="auth.password" placeholder="请输入登入密码" name="input" />
</view> </view>
</view> </view>
@ -191,13 +191,16 @@
icon: 'none' icon: 'none'
}) })
if (res.code === 20000) { if (res.code === 20000) {
this.frozen = true this.frozen = true
setTimeout(() => { setTimeout(() => {
this.frozen = true this.frozen = false
clearInterval(timer) clearInterval(timer)
this.tips = `发送验证码`
}, 1000 * 60); }, 1000 * 60);
let second = 60 let second = 60
const timer = setInterval(() => { const timer = setInterval(() => {
second--
if (second) { if (second) {
this.tips = `${second}秒后重发` this.tips = `${second}秒后重发`
} else { } else {
@ -205,10 +208,12 @@
this.disabled = false this.disabled = false
this.btnColor = '#FE0505' this.btnColor = '#FE0505'
} }
second--
}, 1000) }, 1000)
} }
}) })
} else { } else {
uni.showToast({ uni.showToast({
title: '请输入您的账号', title: '请输入您的账号',
@ -217,6 +222,7 @@
} }
} }
}, },
loginRandom() { loginRandom() {
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',

@ -24,7 +24,7 @@
<area-time :chartData="detailData" /> <area-time :chartData="detailData" />
</view> </view>
</view> </view>
<view class="cu-modal bottom-modal" :class="dialogModal"> <view class="cu-modal bottom-modal" style="z-index: 999999;" :class="dialogModal">
<view class="cu-dialog"> <view class="cu-dialog">
<view class="cu-bar bg-white "> <view class="cu-bar bg-white ">
<view class="action text-blue" @tap="hideModal">取消</view> <view class="action text-blue" @tap="hideModal">取消</view>
@ -66,7 +66,7 @@
const months = [] const months = []
const month = date.getMonth() + 1 const month = date.getMonth() + 1
const days = [] const days = []
const day = date.getDate() - 1 const day = date.getDate()
for (let i = 2020; i <= date.getFullYear(); i++) { for (let i = 2020; i <= date.getFullYear(); i++) {
years.push(i) years.push(i)
} }

@ -19,11 +19,11 @@
<analysis-card @showModal="showModal" :basicData="basicData" /> <analysis-card @showModal="showModal" :basicData="basicData" />
<view class="margin bg-white radius"> <view class="margin bg-white radius">
<view class="margin"> <view class="margin" style="position: relative;z-index: 1;">
<area-month :chartData="detailData" /> <area-month :chartData="detailData" />
</view> </view>
</view> </view>
<view class="cu-modal bottom-modal" :class="dialogModal"> <view class="cu-modal bottom-modal" style="z-index: 999999;" :class="dialogModal">
<view class="cu-dialog"> <view class="cu-dialog">
<view class="cu-bar bg-white "> <view class="cu-bar bg-white ">
<view class="action text-blue" @tap="hideModal">取消</view> <view class="action text-blue" @tap="hideModal">取消</view>
@ -37,16 +37,8 @@
<picker-view-column> <picker-view-column>
<view class="item" v-for="(item,index) in months" :key="index">{{item}}</view> <view class="item" v-for="(item,index) in months" :key="index">{{item}}</view>
</picker-view-column> </picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in days" :key="index">{{item}}</view>
</picker-view-column>
</picker-view> </picker-view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="onConfirm">确定</button>
</view>
</view>
</view> </view>
</view> </view>
@ -91,7 +83,7 @@
day: day, day: day,
// value: [9999, month - 1, day - 1], // value: [9999, month - 1, day - 1],
value: [0, month - 1, day - 1], value: [0, month - 1, day - 1],
selDate: year + '-' + month + '-' + day, selDate: year + '-' + month,
detailData: [], detailData: [],
basicData: { basicData: {
totalAccount: 0, totalAccount: 0,
@ -117,11 +109,11 @@
}, },
methods: { methods: {
getMonthly() { getMonthly() {
cloudSiteApi.getAnyMonth(this.selDate).then(res => { cloudSiteApi.getAnyMonth(this.selDate+'-5').then(res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if (res.code === 20000) { if (res.code === 20000) {
this.basicData = res.data.basicData this.basicData = res.data.basicData
res.data.detailData.forEach(item=>{ res.data.detailData.forEach(item => {
var date = item[0] var date = item[0]
date = date.substring(0, 19); date = date.substring(0, 19);
date = date.replace(/-/g, '/'); date = date.replace(/-/g, '/');
@ -144,12 +136,7 @@
} else { } else {
m = this.month m = this.month
} }
if (this.day < 10) { this.selDate = this.year + '-' + m
d = '0' + this.day
} else {
d = this.day
}
this.selDate = this.year + '-' + m + '-' + d
console.log(this.selDate) console.log(this.selDate)
}, },
showModal(e) { showModal(e) {

@ -33,7 +33,7 @@
<view class="padding text-center flex-sub"> <view class="padding text-center flex-sub">
<text>顾客数</text> <text>顾客数</text>
<view class="padding-sm"> <view class="padding-sm">
<text class="oil-main-color">{{basicData.totalAccount|numberFilter}}</text> <text class="oil-main-color">{{basicData.totalAccount}}</text>
</view> </view>
<!-- <button class="cu-btn bg-main-oil text-white text-sm "> <!-- <button class="cu-btn bg-main-oil text-white text-sm ">
查看明细 查看明细
@ -44,7 +44,7 @@
<view class="margin"> <view class="margin">
<view class="cu-list menu-avatar radius"> <view class="cu-list menu-avatar radius">
<view class="cu-item" @tap="routerTo('/pages/operation-analysis/analysis/daily')"> <view class="cu-item" @tap="routerTo('/pages/operation-analysis/analysis/daily')">
<view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'"> <view class="cu-avatar lg" :style="'background-image: url('+mainURL+'rb.png)'">
</view> </view>
<view class="content "> <view class="content ">
<text>经营分析日报</text> <text>经营分析日报</text>
@ -57,7 +57,7 @@
</view> </view>
<view class="cu-item" @tap="routerTo('/pages/operation-analysis/analysis/monthly')"> <view class="cu-item" @tap="routerTo('/pages/operation-analysis/analysis/monthly')">
<view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'"> <view class="cu-avatar lg" :style="'background-image: url('+mainURL+'yb.png)'">
</view> </view>
<view class="content"> <view class="content">
<text> 经营分析月报</text> <text> 经营分析月报</text>

@ -29,7 +29,7 @@ service.interceptors.request.use(
config.headers['JSESSIONID'] = JSESSIONID config.headers['JSESSIONID'] = JSESSIONID
config.headers['token'] = utils.md5Salt(JSESSIONID) config.headers['token'] = utils.md5Salt(JSESSIONID)
// if ( encryptWhite.indexOf(config.url) < 0) { // if ( encryptWhite.indexOf(config.url) < 0) {
if (!notEncrypt && encryptWhite.indexOf(config.url) < 0) { // if (!notEncrypt && encryptWhite.indexOf(config.url) < 0) {
// 这是定义在哪的 // 这是定义在哪的
const data = { // 用于存储加密 const data = { // 用于存储加密
params: '' // 加密后的密文 params: '' // 加密后的密文
@ -38,7 +38,7 @@ service.interceptors.request.use(
data.params = utils.encrypt(JSON.stringify(config.data)) data.params = utils.encrypt(JSON.stringify(config.data))
console.log(data.params) console.log(data.params)
config.data = data config.data = data
} // }
} else { } else {
console.log('请求路径', config.url, '参数加密前', config.data) console.log('请求路径', config.url, '参数加密前', config.data)
} }

Loading…
Cancel
Save