Commit b2def7ed authored by 张锡奇's avatar 张锡奇
parents 2103b51e a207c68c
......@@ -3,7 +3,8 @@
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
let host = 'https://weixin.huansi.net/apiproxy/huansi/Mall';
// let host = 'https://weixin.huansi.net/apiproxy/huansi/Mall';
let host = `https://weixin.huansi.net/apiproxy/huansi/TIP_Test`;
module.exports = {
dev: {
......@@ -11,6 +12,12 @@ module.exports = {
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
"/TIP_Test":{
target: "https://weixin.huansi.net/apiproxy/huansi/TIP_Test",
pathRewrite: { '^/TIP_Test': '' },
changeOrigin: true,
secure: true
},
'/api': {
target: host,
pathRewrite: { '^/api': '' },
......
......@@ -54,6 +54,6 @@ AsInst.interceptors.response.use(response => {
// Message.error('后端服务请求404错误');
}
//请求错误时做些事
return Promise.reject(error);
return Promise.reject(error.response);
});
export default AsInst;
......@@ -12,10 +12,11 @@ function urlFun(name){
/**
* 默认公司
*/
// default:`http://192.168.4.34:5001`,
// default:`http://192.168.4.51:5001`,
// 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/Tip`,
// default:`https://weixin.huansi.net/apiproxy/huansi/TIP_Test`,
/**
* 基本地址
*/
......
......@@ -115,6 +115,12 @@ let tipRoutes = [
title:"经营分析"
}
},
{
path:"/financeDetail",
name:"financeDetail",
component:()=>import("@/view/tiip/kanban/FinanceDetail.vue"),
meta:{ title:"" }
},
{
path:"/kanbanOperateDetail",
name:"tiipOperateDetail",
......
<style lang="less">
.Finance{
>div{
>.title_{
display: inline-block;
background: #5E9AFE;
color: #fff;
border-bottom-right-radius: 50px;
border-top-right-radius: 50px;
padding: 6px 15px;
font-size: 16px;
}
>.card{
.card{
background: #fff;
border-radius: 7px;
box-shadow: 1px 1px 3px #aaa;
padding: 10px;
margin: 10px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
>.title{
font-size: 12px !important;
font-weight: 600;
}
>.more{
color:#35BAF6;
}
>.should{
display: flex;
text-align: center;
min-height:60px;
width:100%;
>div{
border-left: 3px solid #5E9AFE;
padding-left: 8px;
display: flex;
>div.num{
flex-grow:1;
flex-direction: column;
justify-content: space-between;
width: 50%;
>span{
padding:2px 0;
&:nth-child(2){
font-weight: bold;
font-size: 23px;
}
}
}
}
>.actual{
display: flex;
text-align: center;
min-height:40px;
width:100%;
>div{
font-size:15px;
&:not(:last-child){padding-bottom:4px;}
>span:first-child{
color:#777;
padding-right:10px;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 50%;
&:last-child{
border-left:2px solid #03A9F4;
}
>span{
padding:2px 0;
&:first-child{
font-weight: bold;
font-size: 23px;
}
}
}
}
}
......@@ -39,26 +63,33 @@
</style>
<template>
<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 class="title_">{{v.sName}}</div> -->
<div class="card">
<span style="font-size:15px;">{{v.sName}}</span>
<div>
<div class="num">
<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:#901AF7;">{{Number(v.nCloseAmount||0).toLocaleString()}}</span></div>
<div class="card" v-if="list.length>0">
<span class="title">应收应付</span>
<span class="more" @click="more(1,0)">更多</span>
<div class="should">
<div @click="more(1,0)">
<span>应收账款</span>
<span>{{(list.filter(v=>v.sName=="应收")[0]&&list.filter(v=>v.sName=="应收")[0].nAmount||0).toLocaleString()}}</span>
<span>余额:{{(list.filter(v=>v.sName=="应收")[0]&&list.filter(v=>v.sName=="应收")[0].nCloseAmount||0).toLocaleString()}}</span>
</div>
<div @click="more(1,1)">
<span>应付账款</span>
<span style="color:red;">{{(list.filter(v=>v.sName=="应付")[0]&&list.filter(v=>v.sName=="应付")[0].nAmount||0).toLocaleString()}}</span>
<span>余额:{{(list.filter(v=>v.sName=="应付")[0]&&list.filter(v=>v.sName=="应付")[0].nCloseAmount||0).toLocaleString()}}</span>
</div>
</div>
<XCircle
style="width: 70px;height: 70px;margin-right:15px;"
:percent="Number(v.nPercent)||0"
:stroke-width="10"
:id="`perent${k}`"
:stroke-color="color[k%4]"
:trail-width="5"
trail-color="#ececec">
<span style="color:#36D1DC;">{{Number(v.nPercent)||0}}%</span>
</XCircle>
</div>
<div class="card" v-if="list.length>0">
<span class="title">实收实付</span>
<span class="more" @click="more(2,0)">更多</span>
<div class="actual">
<div @click="more(2,0)">
<span>{{(list.filter(v=>v.sName=="实付")[0]&&list.filter(v=>v.sName=="实付")[0].nAmount||0).toLocaleString()}}</span>
<span>实收账款</span>
</div>
<div @click="more(2,1)">
<span style="color:red;">{{(list.filter(v=>v.sName=="实付")[0]&&list.filter(v=>v.sName=="实付")[0].nAmount||0).toLocaleString()}}</span>
<span>实付账款</span>
</div>
</div>
</div>
......@@ -121,7 +152,10 @@ export default {
showConfirmButton:false,
})
}
}
},
more(val,tabIndex){
this.$router.push({name:"financeDetail",params:{mode:val,tabIndex:tabIndex,start:this.start,end:this.end}})
},
},
}
</script>
<style lang="less">
#FinanceDetail{
display: flex;
flex-direction: column;
height:100%;
>.search{
padding:5px;
text-align: center;
>input{
background: #fff;
width: 90%;
border-radius: 5px;
height: 30px;
border: 1px solid #e9ecf3;
padding: 2px;
}
}
>.balance{
padding: 10px;
justify-content: space-between;
display: flex;
background: #fff;
border-bottom:1px solid #ddd;
}
>.content{
flex-grow:1;
overflow: auto;
height:1px;
font-size:15px;
>.list{
background:#fff;
display:flex;
>span{
&:first-child{
padding: 10px 5px;
min-width: 30px;
text-align: right;
font-weight: 600;
}
&:nth-child(2n){
flex-grow:1;
}
&:nth-child(2n-1){
flex-shrink: 0;
}
&:not(:first-child){
border-bottom: 1px solid #ddd;
display: flex;
align-items: center;
color:#777;
}
&:last-child{
padding:0 10px;
}
}
}
}
}
</style>
<template>
<div id="FinanceDetail">
<tab v-model="tabIndex" prevent-default default-color="#000" active-color="#5E9AFE" @on-before-index-change="switchTabItem">
<template v-if="$route.params.mode==1">
<tab-item selected>应收账款</tab-item>
<tab-item>应付账款</tab-item>
</template>
<template v-else>
<tab-item selected>实收账款</tab-item>
<tab-item>实付账款</tab-item>
</template>
</tab>
<div class="search">
<input placeholder="请输入客户简称/名称进行搜索" v-model="searchValue"/>
</div>
<div class="balance" v-if="$route.params.mode==1">
<span>余额</span>
<span>{{balance.toLocaleString()}}</span>
</div>
<div class="content">
<div class="list" v-for="(v,k) in list" :key="k">
<span>{{k}}</span>
<span>{{v["客户名称"]}}</span>
<span>{{v["总金额"]}}</span>
</div>
<img src="@/assets/noData.jpg" style="width:100%;" v-if="list.length==0"/>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import { Tab, TabItem } from 'vux'
var inputIng=false
var searchIng=false
export default {
name:"FinanceDetail",
components:{Tab, TabItem},
data(){
return{
tabIndex:0,
searchValue:"",
balance:0,
list:[],
}
},
activated(){
this.tabIndex=this.$route.params.tabIndex
this.$nextTick(()=>{
this.searchList();
})
},
watch:{
searchValue(n,o){
this.delayedSearch()
},
},
methods:{
switchTabItem(index){
if(this.tabIndex!=index){
this.tabIndex=index
this.searchList()
}
},
async searchList(){
var data=[
{key:"begin_date",value:Util.dateFormat(this.$route.params.start,"yyyy-MM-dd")},
{key:"end_date",value:Util.dateFormat(this.$route.params.end,"yyyy-MM-dd 23:59")},
{key:"url",value:"Financial Summary Dtl"},
{key:"sType",value:(this.$route.params.mode==1?'应':'实')+(this.tabIndex==0?'收':'付')}
]
this.searchValue&&data.push({key:"sQueryValue",value:this.searchValue})
var value=await this.request("getBoss",{
data:data
},"加载中",{})
this.list=value
this.total()
},
total(){
this.balance=0
this.list.forEach(v=>{
this.balance+=v["总金额"]
})
},
delayedSearch(){
inputIng=true
if(!searchIng){
searchIng=true
inputIng=false
this.searchList()
setTimeout(()=>{
searchIng=false
if(inputIng){
inputIng=false
this.delayedSearch()
}
},500)
}
}
}
}
</script>
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