Commit 0bc510e4 authored by godwithdh's avatar godwithdh

tiip_form

parent bb6d8801
...@@ -63,7 +63,8 @@ const methodMap = { ...@@ -63,7 +63,8 @@ const methodMap = {
getCipLiabilities:{url:'/bianalysis/liabilities/',method:'get',host:'sales'}, getCipLiabilities:{url:'/bianalysis/liabilities/',method:'get',host:'sales'},
/** /**
* tiip 小程序 * tiip 小程序
* 智能报表
*/ */
getTiipTotalamount:{url:'/bianalysis/totalamount/',method:'get',host:"default"}, getTiipTotalamount:{url:'/bianalysis/totalamount/',method:'get',host:"default"},
getTiipSellinfo:{url:'/bianalysis/sellinfo/',method:'get',host:"default"}, getTiipSellinfo:{url:'/bianalysis/sellinfo/',method:'get',host:"default"},
...@@ -72,6 +73,8 @@ const methodMap = { ...@@ -72,6 +73,8 @@ const methodMap = {
getTiipReceiveinfo:{url:"/bianalysis/receiveinfo/",method:"get",host:"default"}, getTiipReceiveinfo:{url:"/bianalysis/receiveinfo/",method:"get",host:"default"},
getTiipReceive:{url:"/bianalysis/receivemoney/",method:"get",host:"default"}, getTiipReceive:{url:"/bianalysis/receivemoney/",method:"get",host:"default"},
getTiipCost:{url:"/bianalysis/costanalysis/",method:"get",host:"default"}, getTiipCost:{url:"/bianalysis/costanalysis/",method:"get",host:"default"},
getTiipLiabilities:{url:'/bianalysis/liabilities/',method:'get',host:'default'},
getTiipLiabilities:{url:'/bianalysis/liabilities/',method:'get',host:'default'},
//采购单进度 //采购单进度
getTipProcessProgress:{url:"/pssubcontract/getlist/",method:"post",host:"default"}, getTipProcessProgress:{url:"/pssubcontract/getlist/",method:"post",host:"default"},
......
...@@ -6,15 +6,15 @@ function urlFun(name){ ...@@ -6,15 +6,15 @@ function urlFun(name){
/** /**
* 门市域名 * 门市域名
*/ */
// sales:`http://192.168.4.67:5000`, // sales:`http://192.168.4.2:5000`,
// sales:`http://122.224.36.54:18005`,//测试服务器 // sales:`http://122.224.36.54:18005`,//测试服务器
sales:`https://weixin.huansi.net/apiproxy/huansi/Mall`, sales:`https://weixin.huansi.net/apiproxy/huansi/Mall`,
/** /**
* 默认公司 * 默认公司
*/ */
// default:`http://192.168.4.48:5001`, default:`http://192.168.4.2: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}`,
/** /**
* 基本地址 * 基本地址
......
...@@ -291,6 +291,11 @@ let tipRoutes = [ ...@@ -291,6 +291,11 @@ let tipRoutes = [
title:"智能报表" title:"智能报表"
}, },
}, },
{
path:"/tiip/liabilitiesDetail/:iCustomerId",
name:"tipLiabilitiesDetail",
component:()=>import("@/view/tiip/IntReportForms/liabilities_detail.vue")
}
] ]
}, },
{ //订单进度查询 { //订单进度查询
......
...@@ -128,8 +128,9 @@ ...@@ -128,8 +128,9 @@
<div class="TAB"> <div class="TAB">
<button-tab class="buttonTab" :value="activeBtn" > <button-tab class="buttonTab" :value="activeBtn" >
<button-tab-item @on-item-click="situation='salesStatistics'">销售统计</button-tab-item> <button-tab-item @on-item-click="situation='salesStatistics'">销售统计</button-tab-item>
<button-tab-item @on-item-click="situation='empAna'">员工排行</button-tab-item> <!-- <button-tab-item @on-item-click="situation='empAna'">员工排行</button-tab-item> -->
<button-tab-item @on-item-click="situation='revenue'">收支分析</button-tab-item> <button-tab-item @on-item-click="situation='revenue'">收支分析</button-tab-item>
<button-tab-item @on-item-click="situation='liabilities'">负债分析</button-tab-item>
<button-tab-item @on-item-click="situation='repayment'">回款额</button-tab-item> <button-tab-item @on-item-click="situation='repayment'">回款额</button-tab-item>
<button-tab-item @on-item-click="situation='cost'">费用分析</button-tab-item> <button-tab-item @on-item-click="situation='cost'">费用分析</button-tab-item>
</button-tab> </button-tab>
...@@ -148,9 +149,10 @@ import empAna from "./empAna" ...@@ -148,9 +149,10 @@ import empAna from "./empAna"
import revenue from "./revenue" import revenue from "./revenue"
import repayment from "./repayment" import repayment from "./repayment"
import cost from "./cost" import cost from "./cost"
import liabilities from "./liabilities"
export default { export default {
name:"IntReportForms", name:"IntReportForms",
components:{Swiper,SwiperItem,ButtonTab, ButtonTabItem,salesStatistics,empAna,revenue,repayment,cost}, components:{Swiper,SwiperItem,ButtonTab, ButtonTabItem,salesStatistics,empAna,revenue,repayment,cost,liabilities},
data(){ data(){
return{ return{
list:[], list:[],
......
<style lang="less">
@import url('../../../styles/common.less');
#liabilities{
background: #f6f5f9;
height:100%;
display: flex;
flex-direction: column;
.HEADER{
display:flex;
padding:10px;
>span{
flex-shrink: 0;
&.number{
color:#3BA5EF;
margin-left:5px;
flex-grow:1;
text-align: right;
}
}
>div{
margin: 0 10px;
background:#3BA5EF;
border-radius: 5px;
}
}
.Content{
height:100%;
height:1px;
flex-grow: 1;
overflow: auto;
-webkit-overflow-scrolling: touch;
margin-bottom:8px;
>div{
display:flex;
align-items: center;
&{
>div{
border-bottom:1px solid #ddd;
}
}
>div{
flex-grow:1;
padding:15px 0;
}
>span{
flex-shrink: 0;
padding: 0 13px;
&.num{
font-weight: bold;
color: #555;
font-size: 16px;
align-self: center;
}
}
>a{
flex-shrink: 0;
padding: 18px 13px;
&.iconfont{
border-bottom: 1px solid #ddd;
display: flex;
align-items: center;
color: #FF7601;
font-size: 20px;
}
}
}
}
.img{
width:100%;
display: flex;
justify-content: center;
img{
width:100%;
height:300px;
}
}
}
</style>
<template>
<div id="liabilities">
<div class="tabs">
<tab active-color="#708bf6">
<tab-item :selected="activeIndex=='客户'" @on-item-click="activeIndex='客户'">客户欠款</tab-item>
<tab-item :selected="activeIndex=='供应商'" @on-item-click="activeIndex='供应商'">欠供应商款</tab-item>
</tab>
</div>
<div class="HEADER iCard">
<span style="color:#777;margin-right:10rpx;">总负债额</span>
<div :style="{'width':rate+'%','background':color}"></div>
<span class="number">{{total}}</span>
</div>
<div class="Content iCard">
<div v-for="(v,k) in list" :key="k">
<span class="num">{{k+1}}</span>
<div @click="routerToDetail(v)">
<div style="margin-bottom:10px">{{v.sCustomerName}}</div>
<div style="font-size:12rpx;color:#777;">欠款: {{v.nAmount}}</div>
</div>
<a class="iconfont icon-dianhua" :href="`tel:${v.sTelephone01}`" v-if="activeIndex=='客户'" />
</div>
<div class="img" v-if="list.length<=0">
<img src="@/assets/noData.jpg" />
</div>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js';
import { Tab, TabItem } from 'vux'
export default {
name:"liabilities",
components:{Tab, TabItem },
data(){
return{
activeIndex:"客户",
list:[],
rate:0,
color:"",
total:0,
}
},
mounted(){
this.$nextTick(()=>{
this.getData()
})
},
methods:{
async getData(){
var value=await this.request("getTiipLiabilities",{
data:{
sCustomerType:this.activeIndex
}
},"加载中",{});
this.total=0
this.rate=0
if(value.length>0){
this.list=value.map(v=>{
this.total+=v.nAmount||0
this.tate+=v.nPercent||0
v.nAmount=(Math.round(v.nAmount*100)/100).toLocaleString()
return v;
})
this.total=(Math.round(this.total*100)/100).toLocaleString()
this.rate=Math.round(this.rate*10000)/100
this.rate>=30&&this.rate<60&&(this.color="yellow")
this.rate>=90&&(this.color="red")
}
},
routerToDetail(value){
this.$router.push({name:"tipLiabilitiesDetail",params:{iCustomerId:value.uGUID,sCustomerType:this.activeIndex}})
},
},
watch:{
activeIndex(n){
this.getData()
}
},
}
</script>
<style lang="less">
@import url('../../../styles/common.less');
#liabilitiesDetail{
}
</style>
<template>
<div id="liabilitiesDetail">
<div class="Table">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle" />
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js';
import customerTable from '@/components/Table'
export default {
name:"liabilitiesDetail",
components:{customerTable},
data(){
return{
list:[],
columns:[
{
width:"50%",
name:"日期",
align:"center",
field:"dBillDate",
},
{
width:'50%',
name:'金额',
align:'center',
field:'应收',
}
],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh)',
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%'
},
}
},
mounted(){
this.$nextTick(()=>{
this.getDetail();
})
},
methods:{
async getDetail(){
this.list=await this.request("getTiipLiabilities",{
params:{
iCustomerId:this.$route.params.iCustomerId,
sType:'Details',
sCustomerType:this.$route.params.sCustomerType,
}
},"加载中",{})
}
},
}
</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