Commit beb8ffec authored by godwithdh's avatar godwithdh

boss

parent 24ac5105
...@@ -12,8 +12,8 @@ function urlFun(name){ ...@@ -12,8 +12,8 @@ function urlFun(name){
/** /**
* 默认公司 * 默认公司
*/ */
// default:`http://192.168.4.37:5001`, default:`http://192.168.4.39:5001`,
default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`, // default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
/** /**
* 基本地址 * 基本地址
......
...@@ -107,7 +107,7 @@ let routes = [ ...@@ -107,7 +107,7 @@ let routes = [
path:"/main", path:"/main",
children:[ children:[
{ {
path:"/kanban", path:"/kanban/:userId",
name:"kanban", name:"kanban",
component:()=>import("@/view/kanban/index.vue"), component:()=>import("@/view/kanban/index.vue"),
meta:{ meta:{
......
<style lang="less"> <style lang="less">
.Finance{ .Finance{
padding:10px;
display:flex;
>div{ >div{
width:50%; >.title_{
background:rgb(94,154,254); display: inline-block;
box-shadow: 2px 2px 3px rgba(94,154,254,0.4); background: #5E9AFE;
color:#fff; color: #fff;
padding:10px; border-bottom-right-radius: 50px;
box-sizing: border-box; border-top-right-radius: 50px;
border-radius: 6px; padding: 6px 15px;
>.number{ font-size: 16px;
min-height: 35px; }
padding: 5px 0; >.card{
display: flex; background: #fff;
align-items: center; border-radius: 7px;
justify-content: center; box-shadow: 1px 1px 3px #aaa;
font-size: 25px; padding: 10px;
margin: 10px;
>div{
border-left: 3px solid #5E9AFE;
padding-left: 8px;
display: flex;
>div.num{
flex-grow:1;
>div{
&:not(:last-child){padding-bottom:4px;}
>span:first-child{
color:#777;
padding-right:10px;
}
}
}
}
} }
} }
} }
</style> </style>
<template> <template>
<div class="Finance"> <div class="Finance">
<div> <div v-for="(v,k) in list" :key='k'>
<div style="font-size:15px;">应收数量</div> <div class="title_">{{v.sName}}</div>
<div class="number">324,523.45</div> <div class="card">
<div>
<div class="num">
<div><span>数量</span><span>{{v.nQty||0}}</span></div>
<div><span>金额</span><span style="color:#5E9AFE;">{{v.nAmount||0}}</span></div>
<div><span>余额</span><span style="color:#FF6633;">{{v.nCloseAmount||0}}</span></div>
</div>
<XCircle
style="width: 60px;height: 60px;"
:percent="Number(v.nPercent)||70"
:stroke-width="7"
:stroke-color="color[k%4]"
:trail-width="5"
trail-color="#ececec">
<span style="color:#36D1DC;">{{Number(v.nPercent)||0}}%</span>
</XCircle>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { XCircle } from 'vux'
import util from "@/libs/util.js"
export default { export default {
name:"Finance" name:"Finance",
components:{XCircle},
props:{
start:Date,
end:Date,
},
data(){
return{
list:{},
color:['#FF6633','#5E9AFE','#9966CC','#46FC43'],
}
},
watch:{
start(n){
this.search()
},
end(n){
this.search()
},
},
created(){
this.$nextTick(()=>{
this.search()
})
},
methods:{
async search(){
var value=await this.request("getBoss",{
data:[{key:"url",value:"Financial Summary"}],
params:{
begin_date:util.dateFormat(this.start,"yyyy-MM-dd"),
end_date:(this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59',
},
},true,{})
if(typeof value=='object'&&value.length>0){
this.list=value
}else{
this.$vux.confirm.show({
title:"提示",
content:"未获取到数据",
showConfirmButton:false,
})
}
}
},
} }
</script> </script>
...@@ -35,25 +35,122 @@ ...@@ -35,25 +35,122 @@
<div>销售退货</div> <div>销售退货</div>
</td> </td>
<td> <td>
<div>1000</div> <div>{{value['销售退货']}}</div>
</td> </td>
<td> <td>
<div>采购退货</div> <div>采购退货</div>
</td> </td>
<td> <td>
<div>346</div> <div>{{value['采购退货']}}</div>
</td>
</tr>
<tr>
<td>
<div>加工回修</div>
</td>
<td>
<div>{{value['加工回修']}}</div>
</td>
<td>
<div>疵品数量</div>
</td>
<td>
<div>{{value['疵品汇总']}}</div>
</td>
</tr>
<tr>
<td colspan='4' style="text-align:left;padding:0 0 0 10px;color:#68A0FE;">拖期订单:{{value['拖期订单数量']}}</td>
</tr>
<tr>
<td>
<div>数量</div>
</td>
<td>
<div>{{value['拖期订单总数量']}}</div>
</td>
<td>
<div>金额</div>
</td>
<td>
<div>{{value['拖期订单总金额']}}</div>
</td>
</tr>
<tr>
<td>
<div>供应商赔款</div>
</td>
<td>
<div>{{value['供应商索赔']}}</div>
</td>
<td>
<div>客户赔款</div>
</td>
<td>
<div>{{value['客户索赔']}}</div>
</td>
</tr>
<tr>
<td>
<div>超期应收额</div>
</td>
<td>
<div>{{value['超期应收']}}</div>
</td>
<td>
<div>超期应付额</div>
</td>
<td>
<div>{{value['超期应付']}}</div>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</template> </template>
<script> <script>
import util from "@/libs/util.js"
export default { export default {
name:"abnormal", name:"abnormal",
props:{
start:Date,
end:Date,
},
data(){ data(){
return{ return{
value:{},
} }
} },
watch:{
start(n){
this.search()
},
end(n){
this.search()
},
},
created(){
this.$nextTick(()=>{
this.search()
})
},
methods:{
async search(){
var value= await this.request('getBoss',{
data:[{key:"url",value:"Abnormal early warning"}],
params:{
begin_date:util.dateFormat(this.start,"yyyy-MM-dd"),
end_date:(this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59',
},
},true,{})
if(typeof value=="object"&&value.length>0){
this.value=value[0]
}else{
this.$vux.confirm.show({
title:"提示",
content:"未获取到数据",
showConfirmButton:false,
})
}
},
},
} }
</script> </script>
...@@ -17,25 +17,82 @@ ...@@ -17,25 +17,82 @@
</style> </style>
<template> <template>
<div class="capital"> <div class="capital">
<div class="card"> <div class="card" v-for="(v,i) in list" :key="i">
<div> <div>
<div style="font-size:13px;margin-bottom:14px;">银行收入 (单位:万元)</div> <div style="font-size:13px;margin-bottom:14px;">{{v.sName}}</div>
<div style="font-size: 28px;font-weight: 600;">234,452.42</div> <div style="font-size: 28px;font-weight: 600;">{{Number(v.sValue)||0}}</div>
</div> </div>
<div style="align-self: flex-end;"> <div style="align-self: flex-end;" >
<div>89.30%</div> <div>{{v.rate}}</div>
<div>昨日下降</div> <div>{{dateModeName}}下降</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import util from "@/libs/util.js"
export default{ export default{
name:"capital", name:"capital",
props:{
start:Date,
end:Date,
dateMode:Number,
},
data(){ data(){
return{ return{
list:[],
} }
} },
watch:{
start(n){
this.search()
},
end(n){
this.search()
},
},
created(){
window.aaa=this
this.$nextTick(()=>{
this.search()
})
},
methods:{
async search(){
var value=await this.request("getBoss",{
data:[{key:"url",value:"Summary of funds"}],
params:{
begin_date:util.dateFormat(this.start,"yyyy-MM-dd"),
end_date:(this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59',
}
},true,{})
if(typeof value=='object'&&value.length>0){
this.list=value.map(v=>{
if(v.sValued==0){
v.rate=100
}else{
v.rate=Math.round((v.sValue-v.sValued)/v.sValued*100)/100
}
return v;
})
}else{
this.$vux.confirm.show({
title:"提示",
content:"未获取到数据",
showConfirmButton:false,
})
}
}
},
computed:{
dateModeName(){
switch(this.dateMode){
case 1:return "昨日";
case 2:return "上周";
case 3:return "上个月";
case 4:return "去年";
}
}
},
} }
</script> </script>
...@@ -99,10 +99,10 @@ ...@@ -99,10 +99,10 @@
<span :class="{active:situation=='capital'}" @click="situation='capital'">资金概况</span> <span :class="{active:situation=='capital'}" @click="situation='capital'">资金概况</span>
<span :class="{active:situation=='Finance'}" @click="situation='Finance'">财务概况</span> <span :class="{active:situation=='Finance'}" @click="situation='Finance'">财务概况</span>
<span :class="{active:situation=='abnormal'}" @click="situation='abnormal'">异常预警</span> <span :class="{active:situation=='abnormal'}" @click="situation='abnormal'">异常预警</span>
<span :class="{active:situation==4}" @click="situation=4">库存情况</span> <span :class="{active:situation=='tiipChartInventory'}" @click="situation='tiipChartInventory'">库存情况</span>
</div> </div>
<div class="content"> <div class="content">
<component :is="situation" :start="DateValue[0]" :end="DateValue[1]"/> <component :is="situation" :dateMode="dateMode" :start="DateValue[0]" :end="DateValue[1]"/>
</div> </div>
<calendar <calendar
:show.sync="calendarShow" :show.sync="calendarShow"
...@@ -117,10 +117,11 @@ import operate from "./operate" ...@@ -117,10 +117,11 @@ import operate from "./operate"
import capital from "./capital" import capital from "./capital"
import Finance from "./Finance" import Finance from "./Finance"
import abnormal from "./abnormal" import abnormal from "./abnormal"
import tiipChartInventory from "@/view/tiip/chart/inventory"
export default { export default {
name:"kanban", name:"kanban",
components:{operate,capital,Finance,abnormal}, components:{operate,capital,Finance,abnormal,tiipChartInventory},
data(){ data(){
return{ return{
calendarShow:false, calendarShow:false,
...@@ -132,6 +133,8 @@ export default { ...@@ -132,6 +133,8 @@ export default {
}, },
mounted(){ mounted(){
window.kanban=this window.kanban=this
this.$store.dispatch('saveUserId',this.$route.params.userId);
console.log()
}, },
methods:{ methods:{
preDate(){ preDate(){
......
...@@ -39,35 +39,21 @@ ...@@ -39,35 +39,21 @@
<tr> <tr>
<td></td> <td></td>
<td>米数</td> <td>米数</td>
<td>重量</td> <td>匹数</td>
<td>金额</td> <td>金额</td>
</tr> </tr>
<tr> <tr v-for="(v,i) in list" :key="i">
<td>
<div>接单</div>
</td>
<td>
<div>1</div>
</td>
<td>
<div>2</div>
</td>
<td>
<div>3</div>
</td>
</tr>
<tr>
<td> <td>
<div>接单</div> <div>{{v.sType}}</div>
</td> </td>
<td> <td>
<div>13</div> <div>{{v.nQty||0}}</div>
</td> </td>
<td> <td>
<div>14</div> <div>{{v.nPieces||0}}</div>
</td> </td>
<td> <td>
<div>52</div> <div>{{v.nAmount||0}}</div>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -83,7 +69,7 @@ export default { ...@@ -83,7 +69,7 @@ export default {
}, },
data(){ data(){
return{ return{
list:[],
} }
}, },
watch:{ watch:{
...@@ -105,9 +91,18 @@ export default { ...@@ -105,9 +91,18 @@ export default {
data:[{key:"url",value:"Operation gai"}], data:[{key:"url",value:"Operation gai"}],
params:{ params:{
begin_date:util.dateFormat(this.start,"yyyy-MM-dd"), begin_date:util.dateFormat(this.start,"yyyy-MM-dd"),
end_date:this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"), end_date:(this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59',
}, },
},true,{}) },true,{})
if(typeof value=='object'&&value.length>0){
this.list=value
}else{
this.$vux.confirm.show({
title:"提示",
content:"未获取到数据",
showConfirmButton:false,
})
}
}, },
}, },
} }
......
...@@ -159,11 +159,12 @@ export default { ...@@ -159,11 +159,12 @@ export default {
this.renderChart(); this.renderChart();
}) })
}); });
},
async activated(){ this.$nextTick(async ()=>{
this.renderResize(); this.renderResize();
await this.getDetail(); await this.getDetail();
await this.renderChart(); await this.renderChart();
})
}, },
methods:{ methods:{
renderResize() { renderResize() {
......
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