九月线上版本1.2.0
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view class="padding-xs flex align-center">
|
||||
<view class="flex-sub text-center padding-top-lg">
|
||||
<view class="txet-xxs">
|
||||
<text class="">交易金额(元)</text>
|
||||
<text class="">交易金额</text>
|
||||
</view>
|
||||
<view class=" text-sl padding padding-top-xs"><text class="">
|
||||
¥{{basicData.totalAmout|numberFilter}}
|
||||
@@ -13,24 +13,24 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white to-top">
|
||||
<view class="bg-white to-top">
|
||||
<view class=" flex ">
|
||||
<view class="padding text-center flex-sub">
|
||||
<text>交易笔数</text>
|
||||
<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 class="padding text-center flex-sub">
|
||||
<text>客单均价</text>
|
||||
<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 class="padding text-center flex-sub">
|
||||
<text>顾客数</text>
|
||||
<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>
|
||||
@@ -58,13 +58,13 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
basicData: {
|
||||
handler(newVal, oldVal) {
|
||||
console.log('深度监听', newVal, oldVal)
|
||||
this.basicData = newVal
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
basicData: {
|
||||
handler(newVal, oldVal) {
|
||||
console.log('深度监听', newVal, oldVal)
|
||||
this.basicData = newVal
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
numberFilter(value) {
|
||||
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
gridColor: '#CCCCCC',
|
||||
dashLength: 8,
|
||||
splitNumber: 5,
|
||||
format: (val) => { return val > 0 ? val.toFixed(0) : 0 + '单' }
|
||||
format: (val) => { return val + '单' }
|
||||
},
|
||||
width: _self.cWidth * _self.pixelRatio,
|
||||
height: _self.cHeight * _self.pixelRatio,
|
||||
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
gridColor: '#CCCCCC',
|
||||
dashLength: 8,
|
||||
splitNumber: 5,
|
||||
format: (val) => { return val>0?val.toFixed(0):0 + '单' }
|
||||
format: (val) => { return val + '单' }
|
||||
},
|
||||
width: _self.cWidth * _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)'">
|
||||
<!-- {{staff.cUserName.substring(-1)}} -->
|
||||
</view>
|
||||
<!-- <view class="cu-avatar round lg" >
|
||||
<!-- <view class="cu-avatar round lg" >
|
||||
{{staff.cUserName.slice(0,1)}}
|
||||
</view> -->
|
||||
<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-cut text-df">
|
||||
<text class="cuIcon-phone oil-main-color margin-right-xs"></text>
|
||||
@@ -34,7 +38,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mainURL: this.global.mainURL
|
||||
mainURL: this.global.mainURL,
|
||||
loginUser: uni.getStorageSync('loginUser'),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
46
pages.json
46
pages.json
@@ -4,27 +4,27 @@
|
||||
"path": "pages/startPage/startPage",
|
||||
"style": {}
|
||||
},{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
|
||||
}
|
||||
}, {
|
||||
"path": "pages/operation-analysis/operation-analysis",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},{
|
||||
"path" : "pages/operation-analysis/analysis/daily",
|
||||
"style" : {
|
||||
}, {
|
||||
"path": "pages/operation-analysis/analysis/daily",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
|
||||
}
|
||||
},{
|
||||
"path": "pages/login/posLogin/posLogin",
|
||||
"style": {}
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
}, {
|
||||
"path": "pages/login/posLogin/posLogin",
|
||||
"style": {}
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
{
|
||||
"path": "pages/login/boforeLogin/boforeLogin",
|
||||
"style": {}
|
||||
@@ -81,16 +81,16 @@
|
||||
"style": {}
|
||||
}
|
||||
|
||||
,{
|
||||
"path" : "pages/operation-analysis/analysis/analysis",
|
||||
"style" : {}
|
||||
},{
|
||||
"path" : "pages/operation-analysis/analysis/monthly",
|
||||
"style" : {
|
||||
, {
|
||||
"path": "pages/operation-analysis/analysis/analysis",
|
||||
"style": {}
|
||||
}, {
|
||||
"path": "pages/operation-analysis/analysis/monthly",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"mp-alipay": {
|
||||
/* 支付宝小程序特有相关 */
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<view class="cu-form-group">
|
||||
<view class="title text-black">手机号</view>
|
||||
<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 class="cu-form-group">
|
||||
<view class="title text-black">验证码</view>
|
||||
@@ -71,6 +71,8 @@
|
||||
mainURL: this.global.mainURL,
|
||||
oilSiteNo: '',
|
||||
oilSite: {},
|
||||
tips: '发送验证码',
|
||||
frozen: false, // 二维码冷却时间
|
||||
auth: {
|
||||
|
||||
}
|
||||
@@ -90,30 +92,53 @@
|
||||
},
|
||||
methods: {
|
||||
sendMsg() {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
const code = loginRes.code
|
||||
console.log(code)
|
||||
const data2 = {
|
||||
code: code,
|
||||
name: this.auth.userName,
|
||||
phone: this.auth.phone,
|
||||
oilSiteCode: this.oilSiteNo
|
||||
}
|
||||
loginApi.registerWeixinSMS(data2).then(res => {
|
||||
console.log('res', res)
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
if (!this.frozen) {
|
||||
if (this.auth.phone) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: loginRes => {
|
||||
const code = loginRes.code
|
||||
console.log(code)
|
||||
const data2 = {
|
||||
code: code,
|
||||
name: this.auth.userName,
|
||||
phone: this.auth.phone,
|
||||
oilSiteCode: this.oilSiteNo
|
||||
}
|
||||
loginApi.registerWeixinSMS(data2).then(res => {
|
||||
console.log('res', res)
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
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 => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
register() {
|
||||
uni.login({
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<view class="padding-xs flex align-center">
|
||||
<view class="flex-sub text-center padding-top-lg">
|
||||
<view class="txet-xxs">
|
||||
<text class="text-white">今日收款(元)</text>
|
||||
<text class="text-white">今日收款</text>
|
||||
</view>
|
||||
<view class=" text-sl padding padding-top-xs"><text class="text-white">¥{{userAccount.totalMoney|numberFilter}}</text></view>
|
||||
</view>
|
||||
@@ -29,7 +29,7 @@
|
||||
</button> -->
|
||||
</view>
|
||||
<view class="padding text-center flex-sub">
|
||||
<text>账户余额(元)</text>
|
||||
<text>账户余额</text>
|
||||
<view class="padding-sm">
|
||||
|
||||
<text class="oil-main-color">¥{{userAccount.totalMoney|numberFilter}}</text>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</view>
|
||||
<view class="cu-form-group padding-top-sm" v-else>
|
||||
<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>
|
||||
|
||||
@@ -191,13 +191,16 @@
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code === 20000) {
|
||||
|
||||
this.frozen = true
|
||||
setTimeout(() => {
|
||||
this.frozen = true
|
||||
this.frozen = false
|
||||
clearInterval(timer)
|
||||
this.tips = `发送验证码`
|
||||
}, 1000 * 60);
|
||||
let second = 60
|
||||
const timer = setInterval(() => {
|
||||
second--
|
||||
if (second) {
|
||||
this.tips = `${second}秒后重发`
|
||||
} else {
|
||||
@@ -205,10 +208,12 @@
|
||||
this.disabled = false
|
||||
this.btnColor = '#FE0505'
|
||||
}
|
||||
second--
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请输入您的账号',
|
||||
@@ -217,6 +222,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
loginRandom() {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<area-time :chartData="detailData" />
|
||||
</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-bar bg-white ">
|
||||
<view class="action text-blue" @tap="hideModal">取消</view>
|
||||
@@ -66,7 +66,7 @@
|
||||
const months = []
|
||||
const month = date.getMonth() + 1
|
||||
const days = []
|
||||
const day = date.getDate() - 1
|
||||
const day = date.getDate()
|
||||
for (let i = 2020; i <= date.getFullYear(); i++) {
|
||||
years.push(i)
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
|
||||
<analysis-card @showModal="showModal" :basicData="basicData" />
|
||||
<view class="margin bg-white radius">
|
||||
<view class="margin">
|
||||
<view class="margin" style="position: relative;z-index: 1;">
|
||||
<area-month :chartData="detailData" />
|
||||
</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-bar bg-white ">
|
||||
<view class="action text-blue" @tap="hideModal">取消</view>
|
||||
@@ -37,16 +37,8 @@
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in days" :key="index">{{item}}日</view>
|
||||
</picker-view-column>
|
||||
</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>
|
||||
|
||||
@@ -91,7 +83,7 @@
|
||||
day: day,
|
||||
// value: [9999, month - 1, day - 1],
|
||||
value: [0, month - 1, day - 1],
|
||||
selDate: year + '-' + month + '-' + day,
|
||||
selDate: year + '-' + month,
|
||||
detailData: [],
|
||||
basicData: {
|
||||
totalAccount: 0,
|
||||
@@ -117,15 +109,15 @@
|
||||
},
|
||||
methods: {
|
||||
getMonthly() {
|
||||
cloudSiteApi.getAnyMonth(this.selDate).then(res => {
|
||||
cloudSiteApi.getAnyMonth(this.selDate+'-5').then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code === 20000) {
|
||||
this.basicData = res.data.basicData
|
||||
res.data.detailData.forEach(item=>{
|
||||
res.data.detailData.forEach(item => {
|
||||
var date = item[0]
|
||||
date = date.substring(0, 19);
|
||||
date = date.replace(/-/g, '/');
|
||||
item[0] = new Date(date).getTime();
|
||||
item[0] = new Date(date).getTime();
|
||||
})
|
||||
this.detailData = res.data.detailData
|
||||
}
|
||||
@@ -144,12 +136,7 @@
|
||||
} else {
|
||||
m = this.month
|
||||
}
|
||||
if (this.day < 10) {
|
||||
d = '0' + this.day
|
||||
} else {
|
||||
d = this.day
|
||||
}
|
||||
this.selDate = this.year + '-' + m + '-' + d
|
||||
this.selDate = this.year + '-' + m
|
||||
console.log(this.selDate)
|
||||
},
|
||||
showModal(e) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<view class="padding text-center flex-sub">
|
||||
<text>顾客数</text>
|
||||
<view class="padding-sm">
|
||||
<text class="oil-main-color">¥{{basicData.totalAccount|numberFilter}}</text>
|
||||
<text class="oil-main-color">{{basicData.totalAccount}}</text>
|
||||
</view>
|
||||
<!-- <button class="cu-btn bg-main-oil text-white text-sm ">
|
||||
查看明细
|
||||
@@ -44,7 +44,7 @@
|
||||
<view class="margin">
|
||||
<view class="cu-list menu-avatar radius">
|
||||
<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 class="content ">
|
||||
<text>经营分析——日报</text>
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
</view>
|
||||
<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 class="content">
|
||||
<text> 经营分析——月报</text>
|
||||
|
||||
@@ -29,16 +29,16 @@ service.interceptors.request.use(
|
||||
config.headers['JSESSIONID'] = JSESSIONID
|
||||
config.headers['token'] = utils.md5Salt(JSESSIONID)
|
||||
// if ( encryptWhite.indexOf(config.url) < 0) {
|
||||
if (!notEncrypt && encryptWhite.indexOf(config.url) < 0) {
|
||||
// 这是定义在哪的
|
||||
const data = { // 用于存储加密
|
||||
params: '' // 加密后的密文
|
||||
}
|
||||
// 要加密
|
||||
data.params = utils.encrypt(JSON.stringify(config.data))
|
||||
console.log(data.params)
|
||||
config.data = data
|
||||
// if (!notEncrypt && encryptWhite.indexOf(config.url) < 0) {
|
||||
// 这是定义在哪的
|
||||
const data = { // 用于存储加密
|
||||
params: '' // 加密后的密文
|
||||
}
|
||||
// 要加密
|
||||
data.params = utils.encrypt(JSON.stringify(config.data))
|
||||
console.log(data.params)
|
||||
config.data = data
|
||||
// }
|
||||
} else {
|
||||
console.log('请求路径', config.url, '参数加密前', config.data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user