Commit da63f31a authored by godwithdh's avatar godwithdh

tiip

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