Commit 6d169d73 authored by 张锡奇's avatar 张锡奇

commit

parent 7d222bec
import apiURL from './host.js'
const methodMap = {
/**
* 产品颜色销售排行TOP50
*/
getMmcolorsaletop:{url:apiURL('sales')+'/bianalysis/mmcolorsaletop/',method:'get'},
getMmcolorsaledtltop:{url:apiURL('sales')+'/bianalysis/mmcolorsaledtltop/',method:'get'},
getMmcolorsaletop:{url:'/bianalysis/mmcolorsaletop/',method:'get',host:'sales'},
getMmcolorsaledtltop:{url:'/bianalysis/mmcolorsaledtltop/',method:'get',host:'sales'},
/**
* 产品销售排行TOP25
*/
getMmsaletop:{url:apiURL('sales')+'/bianalysis/mmsaletop/',method:'get'},
getMmsaledtltop:{url:apiURL('sales')+'/bianalysis/mmsaledtltop/',method:'get'},
getMmsaletop:{url:'/bianalysis/mmsaletop/',method:'get',host:'sales'},
getMmsaledtltop:{url:'/bianalysis/mmsaledtltop/',method:'get',host:'sales'},
/**
* 客户
*/
getPbcustomer:{url:apiURL('sales')+'/bianalysis/pbcustomer/',method:'get'},
getPbcustomerDtl:{url:apiURL('sales')+'/bianalysis/pbcustomerdtl/',method:'get'},
getPbcustomer:{url:'/bianalysis/pbcustomer/',method:'get',host:'sales'},
getPbcustomerDtl:{url:'/bianalysis/pbcustomerdtl/',method:'get',host:'sales'},
/**
* 销售员
*/
getPbsales:{url:apiURL('sales')+'/bianalysis/pbsales/',method:'get'},
getPbsalesDtl:{url:apiURL('sales')+'/bianalysis/pbsalesdtl/',method:'get'},
getPbsales:{url:'/bianalysis/pbsales/',method:'get',host:'sales'},
getPbsalesDtl:{url:'/bianalysis/pbsalesdtl/',method:'get',host:'sales'},
/**
* 应收应付 || 实收实付
*/
getPayable:{url:apiURL('sales')+'/bianalysis/payable/',method:'get'},
getReceivepay:{url:apiURL('sales')+'/bianalysis/receivepay/',method:'get'},
getPayable:{url:'/bianalysis/payable/',method:'get',host:'sales'},
getReceivepay:{url:'/bianalysis/receivepay/',method:'get',host:'sales'},
/**
* 销售统计
*/
sellinfo:{url:`${apiURL('sales')}/bianalysis/sellinfo/`,method:'get'},
sellinfo:{url:`/bianalysis/sellinfo/`,method:'get',host:'sales'},
/**
* 样品信息
*/
getSpeciminHdr:{url:apiURL('sales')+'/mmmaterial/getlist/',method:'post'},
getSpeciminDtl:{url:apiURL('sales')+'/mmmaterial/getdetail/',method:'post'},
getSpeciminHdr:{url:'/mmmaterial/getlist/',method:'post',host:'sales'},
getSpeciminDtl:{url:'/mmmaterial/getdetail/',method:'post',host:'sales'},
/**
* 老板看板
*/
getBoss:{url:apiURL('default')+'/boss/',method:"post"},
getBoss:{url:'/boss/',method:"post",host:'default'},
......@@ -48,21 +46,21 @@ const methodMap = {
*/
//面料主档
getTiipSpeciminHdr:{url:apiURL('default')+'/mmmaterial/getlist/',method:'post'},
getTiipSpeciminHdr:{url:'/mmmaterial/getlist/',method:'post',host:'default'},
//订单明细查询
getTiipPbcontract:{url:apiURL('default')+'/pbcontracthdr/',method:'post'}, //采购
getTiipFipayable:{url:apiURL('default')+'/fipayablehdr/',method:'post'}, //应付
getTiipFireceivable:{url:apiURL('default')+'/fireceivablehdr/',method:'post'}, //应收
getTiipFabric:{url:apiURL('default')+'/mmFabric/',method:'post'}, //验布
getTiipPbcontract:{url:'/pbcontracthdr/',method:'post',host:'default'}, //采购
getTiipFipayable:{url:'/fipayablehdr/',method:'post',host:'default'}, //应付
getTiipFireceivable:{url:'/fireceivablehdr/',method:'post',host:'default'}, //应收
getTiipFabric:{url:'/mmFabric/',method:'post',host:'default'}, //验布
/**
* cip小程序
*/
getCipTotalamount:{url:apiURL('sales')+'/bianalysis/totalamount/',method:'get'},
getCipSalesinfo:{url:apiURL('sales')+'/bianalysis/salesinfo/',method:'get'},
getCipLiabilities:{url:apiURL('sales')+'/bianalysis/liabilities/',method:'get'},
getCipTotalamount:{url:'/bianalysis/totalamount/',method:'get',host:'sales'},
getCipSalesinfo:{url:'/bianalysis/salesinfo/',method:'get',host:'sales'},
getCipLiabilities:{url:'/bianalysis/liabilities/',method:'get',host:'sales'},
};
export default methodMap;
import methodMap from './apiMap';
import AsInst from './axios';
import HSHttpClient from './crypto'
import store from '@/store/modules/app.js'
import apiURL from './host.js'
class Http {
}
......@@ -30,7 +32,7 @@ Http.install = function (Vue) {
loading(toast);
}
let _params = opts.hasOwnProperty('params') ? opts.params : {};
let url = new HSHttpClient(m.url,{},_params).newUrl;
let url = new HSHttpClient(apiURL(m.host) + m.url,{},_params).newUrl;
if (m.method === 'get') {
return Vue.prototype.apiGet(url,opts.data,toast,header);
......
......@@ -64,7 +64,6 @@ FastClick.attach(document.body)
Vue.config.productionTip = false;
router.beforeEach((to, from, next) => {
console.log(222)
if(to.path.indexOf('shopVersion') != -1 && to.params.hasOwnProperty('iProjectId')){
store.dispatch('setIproject',to.params.iProjectId);
}
......
......@@ -140,6 +140,7 @@ export default {
title:"提示",
content:"是否查看详情",
onConfirm:()=>{
console.log(name + index)
wx.miniProgram.navigateTo({
url:this.toUrl[name+index]
})
......
......@@ -48,21 +48,21 @@
<div class="CONTENT">
<div class="iCard" ref="chart1">
<p>前十名员工(联动)</p>
<canvas id="chart1" v-if="chartData1.length > 0" width="400" height="260" style="width:100%;height:240px; touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
<canvas id="chart1" v-show="chartData1.length > 0" width="400" height="260" style="width:100%;height:240px; touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
<div class="noData" v-if="chartData1.length <= 0">
<img src="../../../../assets/noData.jpg" class="_img" alt="">
</div>
</div>
<div class="iCard" ref="chart2">
<p>{{title}}每月回款率</p>
<canvas id="chart2" v-if="chartData2.length > 0" width="400" height="260" style="width:100%;height:240px;"></canvas>
<canvas id="chart2" v-show="chartData2.length > 0" width="400" height="260" style="width:100%;height:240px;"></canvas>
<div class="noData" v-if="chartData2.length <= 0">
<img src="../../../../assets/noData.jpg" class="_img" alt="">
</div>
</div>
<div class="iCard" ref="chart3">
<p>{{title}}按月统计订单金额</p>
<canvas id="chart3" v-if="chartData3.length > 0" width="400" height="260" style="width:100%;height:240px;"></canvas>
<canvas id="chart3" v-show="chartData3.length > 0" width="400" height="260" style="width:100%;height:240px;"></canvas>
<div class="noData" v-if="chartData3.length <= 0">
<img src="../../../../assets/noData.jpg" class="_img" alt="">
</div>
......
......@@ -248,7 +248,18 @@ export default {
</div>
`
});
this.myChart.pluginGesture({
gesture: {
press(data, event) {
guide.html = `<div style="width: 250px;height: 40px;text-align: center;">
<div style="font-size: 12px">总计</div>
<div style="font-size: 12px">${(that.chartData.reduce((x,y)=>{return x = x+y.nAllAmount},0)).toFixed(2)}万</div>
</div>
`
guide.repaint();
}
}
})
this.myChart.interaction('pie-select',{
startEvent: 'tap',
cancelable:true,
......
......@@ -125,7 +125,7 @@ export default {
},'加载中',{})
res.map(x=>{
x.sOrderNoHTML = `<div><span style="text-decoration:underline;">${x.sOrderNo}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount || ''}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
})
this.list = res;
}
......
......@@ -200,7 +200,7 @@ export default {
key:'1'
}
];
this.columns = [
this.columns = this.columns1 = [
{
width:'25%',
name:'加工商',
......@@ -305,7 +305,7 @@ export default {
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
if(res.tdIndex == 0){
if(this.activeTab == 0){
if(this.activeTab == 0 || this.hdr.sType == '加工'){
this.$store.dispatch('saveCustomerItem',this.list[res.trIndex]);
this.$router.push({name:'tiipOperateCustomDetail',params:{type:'custom'}})
}else{
......@@ -350,19 +350,27 @@ export default {
this.getData();
},
async getData(){
let postData = [
{key:"url",value:this.activeTab == '0' ? "Operation gai sType-customer" : 'Operation gai sType-material'},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
]
if(this.activeTab == '0' && this.hdr.sType == '加工'){
postData[0].value = 'Operation gai sType-customer';
postData.push({key:'sProcessCategory',value:'坯布'});
}else if(this.activeTab == '1' && this.hdr.sType == '加工'){
postData[0].value = 'Operation gai sType-customer';
postData.push({key:'sProcessCategory',value:'成品布'});
}
let res = await this.request('getBoss',{
data:[
{key:"url",value:this.activeTab == '0' ? "Operation gai sType-customer" : 'Operation gai sType-material'},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
],
data:postData,
params:{},
},'加载中',{})
if(this.activeTab == 1){
if(this.activeTab == 1 && this.hdr.sType != '加工'){
res.map(x=>{
x.sMaterial = `<div><span style="color:#FF6633">${x.sSampleMaterialNo}</span><br><span style="color:black;">${x.sSampleMaterialName}</span></div>`
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount || ''}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty}</span></div>`;
})
}else{
......@@ -370,7 +378,7 @@ export default {
x.sCustomerNameHTML = `<div><span style="text-decoration:underline;">${x.sCustomerName || ''}</span></div>`;
x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName || ''}</span></div>`;
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName || ''}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount || ''}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty}</span></div>`;
x.sMaterialHTML = `<div><span">${x.sSampleMaterialNo || ''}<br>${x.sSampleMaterialName || ''}</span></div>`;
x.sFollowerNameHTML = `<div><span style="text-decoration:underline;">${x.sFollowerName || ''}</span></div>`;
......
......@@ -111,9 +111,11 @@ export default {
this.columns[0].field = 'sProviderNameHTML';
x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName || ''}</span></div>`;
}else{
this.columns[0].name = '客户名称';
this.columns[0].field = 'sCustomerNameHTML';
x.sCustomerNameHTML = `<div><span style="text-decoration:underline;">${x.sCustomerName || ''}</span></div>`;
}
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount || ''}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
})
this.list = res;
}
......
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