Commit 41fb1d55 authored by 张锡奇's avatar 张锡奇
parents 1f680f42 d1140395
...@@ -13,8 +13,8 @@ function urlFun(name){ ...@@ -13,8 +13,8 @@ function urlFun(name){
* 默认公司 * 默认公司
*/ */
// default:`http://192.168.4.39:5001`, // default:`http://192.168.4.39:5001`,
default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`, // default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
// default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`, default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
/** /**
* 基本地址 * 基本地址
......
...@@ -111,7 +111,7 @@ let tipRoutes = [ ...@@ -111,7 +111,7 @@ let tipRoutes = [
name:"kanban", name:"kanban",
component:()=>import("@/view/tiip/kanban/index.vue"), component:()=>import("@/view/tiip/kanban/index.vue"),
meta:{ meta:{
title:"老板看板" title:"经营分析"
} }
}, },
{ {
......
...@@ -40,18 +40,20 @@ ...@@ -40,18 +40,20 @@
<template> <template>
<div class="Finance" :style="list.length==0&&'background:#fff;height:100%;'"> <div class="Finance" :style="list.length==0&&'background:#fff;height:100%;'">
<div v-for="(v,k) in list" :key='k' v-if="list.length>0"> <div v-for="(v,k) in list" :key='k' v-if="list.length>0">
<div class="title_">{{v.sName}}</div> <!-- <div class="title_">{{v.sName}}</div> -->
<div class="card"> <div class="card">
<span style="font-size:15px;">{{v.sName}}</span>
<div> <div>
<div class="num"> <div class="num">
<div><span>数量</span><span>{{Number(v.nQty||0).toLocaleString()}}</span></div> <div><span>数量</span><span>{{Number(v.nQty||0)}}</span></div>
<div><span>金额</span><span style="color:#5E9AFE;">{{Number(v.nAmount||0).toLocaleString()}}</span></div> <div><span>金额</span><span style="color:#5E9AFE;">{{Number(v.nAmount||0).toLocaleString()}}</span></div>
<div><span>余额</span><span style="color:#FF6633;">{{Number(v.nCloseAmount||0).toLocaleString()}}</span></div> <div><span>余额</span><span style="color:#901AF7;">{{Number(v.nCloseAmount||0).toLocaleString()}}</span></div>
</div> </div>
<XCircle <XCircle
style="width: 70px;height: 70px;" style="width: 70px;height: 70px;margin-right:15px;"
:percent="Number(v.nPercent)||0" :percent="Number(v.nPercent)||0"
:stroke-width="7" :stroke-width="10"
:id="`perent${k}`"
:stroke-color="color[k%4]" :stroke-color="color[k%4]"
:trail-width="5" :trail-width="5"
trail-color="#ececec"> trail-color="#ececec">
...@@ -76,7 +78,7 @@ export default { ...@@ -76,7 +78,7 @@ export default {
data(){ data(){
return{ return{
list:[], list:[],
color:['#FF6633','#5E9AFE','#9966CC','#46FC43'], color:[['#21AEE4','#74D3F7'],['#5E9AFE',"#A0C1FC"],['#9966CC',"#C190F7"],['#3EC9DE',"#A0F0FA"]],
} }
}, },
watch:{ watch:{
...@@ -102,7 +104,16 @@ export default { ...@@ -102,7 +104,16 @@ export default {
] ]
},"加载中",{}) },"加载中",{})
if(typeof value=='object'&&value.length>0){ if(typeof value=='object'&&value.length>0){
this.list=value this.list=value.map(v=>{
if(!v.nAmount){
v.nPercent=0
}else if(!v.nPercent){
v.nPercent=v.nAmount>0?100:-100
}else{
v.nPercent=Math.round((v.nAmount-v.nAmounted)/v.nAmounted*100)
}
return v;
})
}else{ }else{
this.$vux.confirm.show({ this.$vux.confirm.show({
title:"提示", title:"提示",
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
<div class="card" v-if="list.length>0" v-for="(v,i) in list" :key="i" :style="{'--color':color[i%6]}"> <div class="card" v-if="list.length>0" v-for="(v,i) in list" :key="i" :style="{'--color':color[i%6]}">
<div> <div>
<div style="font-size:13px;margin-bottom:14px;">{{v.sName}}</div> <div style="font-size:13px;margin-bottom:14px;">{{v.sName}}</div>
<div style="font-size: 28px;font-weight: 600;">{{Number(v.sValue||0).toLocaleString()}}</div> <div style="font-size: 28px;font-weight: 600;">{{Number(v.nAmount||0).toLocaleString()}}</div>
</div> </div>
<div style="align-self: flex-end;" v-if="v.rate!=0&&dateMode<5"> <div style="align-self: flex-end;" v-if="v.rate!=0&&dateMode<5">
<div>{{v.rate>0?'↑':'↓'}}{{v.rate}}%</div> <div>{{v.rate>0?'↑':'↓'}}{{v.rate}}%</div>
<div>{{dateModeName}}{{v.rate>0?'上':'下'}}</div> <div>{{dateModeName}}{{v.rate>0?'上升':'下降'}}</div>
</div> </div>
</div> </div>
<img src="@/assets/noData.jpg" style="width:100%;" v-if="list.length==0"/> <img src="@/assets/noData.jpg" style="width:100%;" v-if="list.length==0"/>
...@@ -77,12 +77,12 @@ export default{ ...@@ -77,12 +77,12 @@ export default{
},"加载中",{}) },"加载中",{})
if(typeof value=='object'&&value.length>0){ if(typeof value=='object'&&value.length>0){
this.list=value.map(v=>{ this.list=value.map(v=>{
if(v.sValued==0&&v.sValue!=0){ if(v.nAmounted==0&&v.nAmount!=0){
v.rate=v.sValue>0?100:-100 v.rate=v.nAmount>0?100:-100
}else if(v.sValue==0){ }else if(v.nAmount==0){
v.rate=0 v.rate=0
}else{ }else{
v.rate=Math.round((v.sValue-v.sValued)/v.sValued*100)/100 v.rate=Math.round((v.nAmount-v.nAmounted)/v.nAmounted*100)
} }
return v; return v;
}) })
......
...@@ -206,18 +206,16 @@ export default { ...@@ -206,18 +206,16 @@ export default {
}else{ }else{
date.setDate(date.getDate()+7-(date.getDay()||7)+val*7) date.setDate(date.getDate()+7-(date.getDay()||7)+val*7)
} }
return date; return new Date(date.getTime());
}, },
setMonth(date,val,mode){ setMonth(date,val,mode){
console.log(date,val,mode,"----")
date.setMonth(date.getMonth()+val)
if(mode=='start'){
date.setDate(1) date.setDate(1)
}else{ date.setMonth(date.getMonth()+val)
if(mode=='end'){
date.setMonth(date.getMonth()+1) date.setMonth(date.getMonth()+1)
date.setDate(0) date.setDate(0)
} }
return date; return new Date(date.getTime());
}, },
setYear(date,val,mode){ setYear(date,val,mode){
date.setFullYear(date.getFullYear()+val) date.setFullYear(date.getFullYear()+val)
...@@ -228,7 +226,7 @@ export default { ...@@ -228,7 +226,7 @@ export default {
date.setFullYear(date.getFullYear()+1) date.setFullYear(date.getFullYear()+1)
date.setDate(0); date.setDate(0);
} }
return date; return new Date(date.getTime());
}, },
}, },
computed:{ computed:{
......
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