Commit 83944505 authored by 张锡奇's avatar 张锡奇

commit

parent 2ab781a5
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
'left':x.fixed ? x.fixedLeftWidth : 'none', 'left':x.fixed ? x.fixedLeftWidth : 'none',
'border-left':tableStyle.tbodyTdBorder ? tableStyle.tbodyTrBorderBottom : '0px', 'border-left':tableStyle.tbodyTdBorder ? tableStyle.tbodyTrBorderBottom : '0px',
'border-right':(i == columns.length - 1 && tableStyle.tbodyTdBorder) ? tableStyle.tbodyTrBorderBottom : '0px', 'border-right':(i == columns.length - 1 && tableStyle.tbodyTdBorder) ? tableStyle.tbodyTrBorderBottom : '0px',
'border-bottom':tableStyle.tbodyTrBorderBottom 'border-bottom':tableStyle.tbodyTrBorderBottom,
'word-break': 'break-all'
}" }"
@click="clickTd(i,index)" @click="clickTd(i,index)"
v-html="item[x.field]" v-html="item[x.field]"
...@@ -228,7 +229,7 @@ export default { ...@@ -228,7 +229,7 @@ export default {
theadTdBorder:false, theadTdBorder:false,
tbodyTdBorder:false, tbodyTdBorder:false,
tbodyHeight:'100%', tbodyHeight:'100%',
tbodyTrBorderBottom:'1px solid #5cadff' tbodyTrBorderBottom:'1px solid #dbe9f8'
} }
} }
}, },
......
...@@ -12,7 +12,7 @@ function urlFun(name){ ...@@ -12,7 +12,7 @@ function urlFun(name){
/** /**
* 默认公司 * 默认公司
*/ */
// default:`http://192.168.4.39:5001`, // default:`http://192.168.4.67: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}`,
......
...@@ -268,6 +268,14 @@ let routes = [ ...@@ -268,6 +268,14 @@ let routes = [
title: '库存金额分析' title: '库存金额分析'
} }
}, },
{
path:'/tiip/chart/warehouseDetail',
name:'tiipChartWarehouseDetail',
component:()=> import('@/view/tiip/chart/warehouseDetail.vue'),
meta:{
title: ''
}
},
] ]
} }
]; ];
......
...@@ -11,7 +11,8 @@ const app = { ...@@ -11,7 +11,8 @@ const app = {
title: "", title: "",
keywords: "", keywords: "",
description: "" description: ""
} },
isRefresh:false
}, },
mutations: { mutations: {
saveUserId(state,data){ saveUserId(state,data){
...@@ -28,6 +29,9 @@ const app = { ...@@ -28,6 +29,9 @@ const app = {
}, },
CAHNGE_META_INFO(state, metaInfo) { CAHNGE_META_INFO(state, metaInfo) {
state.metaInfo = metaInfo; state.metaInfo = metaInfo;
},
saveRefresh(state,isRefresh){
state.isRefresh = isRefresh;
} }
}, },
actions: { actions: {
...@@ -45,7 +49,10 @@ const app = { ...@@ -45,7 +49,10 @@ const app = {
}, },
CAHNGE_META_INFO({commit}, metaInfo) { CAHNGE_META_INFO({commit}, metaInfo) {
commit('CAHNGE_META_INFO',metaInfo) commit('CAHNGE_META_INFO',metaInfo)
} },
saveRefresh({commit}, isRefresh) {
commit('saveRefresh',isRefresh)
},
} }
}; };
......
...@@ -6,9 +6,10 @@ const obj = { ...@@ -6,9 +6,10 @@ const obj = {
hdr:{ hdr:{
begin_date:'2014-01-01', begin_date:'2014-01-01',
end_date:'2019-12-13 23:59', end_date:'2019-12-13 23:59',
sType:'接单' sType:'检验'
}, },
orderItem:{}, orderItem:{},
warehouseDetail:{}
}, },
mutations: { mutations: {
saveKanbanHdr(state,data){ saveKanbanHdr(state,data){
...@@ -16,6 +17,9 @@ const obj = { ...@@ -16,6 +17,9 @@ const obj = {
}, },
saveKanbanOrderItem(state,data){ saveKanbanOrderItem(state,data){
state.orderItem = data; state.orderItem = data;
},
saveWarehouseDetail(state,data){
state.warehouseDetail = data;
} }
}, },
actions: { actions: {
...@@ -24,6 +28,9 @@ const obj = { ...@@ -24,6 +28,9 @@ const obj = {
}, },
saveKanbanOrderItem({commit},data){ saveKanbanOrderItem({commit},data){
commit('saveKanbanOrderItem',data); commit('saveKanbanOrderItem',data);
},
saveWarehouseDetail({commit},data){
commit('saveWarehouseDetail',data);
} }
} }
}; };
......
<style lang="less"> <style lang="less">
@import url('../../../styles/common.less'); @import url('../../../styles/common.less');
#tiipChartInventory{ #tiipChartInventory{
height:100%; min-height:100%;
display:flex; display:flex;
flex-direction: column; flex-direction: column;
background: #f2f2f2; background: #f2f2f2;
...@@ -21,17 +21,32 @@ ...@@ -21,17 +21,32 @@
.CONTENT{ .CONTENT{
display:flex;flex-wrap:wrap;padding:8px; display:flex;flex-wrap:wrap;padding:8px;
.iCard{ .iCard{
width:calc(50% - 4px); width:100%;
// width:calc(50% - 4px);
margin:0; margin:0;
margin-bottom:8px; margin-bottom:8px;
text-align: center; text-align: center;
line-height:30px; line-height:30px;
.warehouse{ .warehouse{
background: linear-gradient(90deg,#8470FF, #2d8cf0, #00B2EE);
color:white;
border-bottom:1px solid #ddd;
}
.TITLE{
display: flex;
background: #f2f2f2;
>span{
flex:1;
}
}
.unit{
.ITEM{
display: flex;
>span{
flex:1;
}
} }
} }
.iCard:nth-child(odd) {
margin-right:8px;
} }
} }
.vertical{ .vertical{
...@@ -56,10 +71,20 @@ ...@@ -56,10 +71,20 @@
<div> <div>
<div class="Head">数量</div> <div class="Head">数量</div>
<div class="CONTENT"> <div class="CONTENT">
<div class="iCard" v-for="(item,index) in chartData" :key="index" > <div class="iCard" v-for="(item,index) in chartData" :key="index" @click="routerToWarehouseDetail(item)">
<div class="warehouse" :style="{'color':colorList[index]}">{{item.sStoreName}}</div> <div class="warehouse" :style="{'color':'white'}">{{item.sStoreName}}</div>
<div class="piece"><span style="color:#8a8a8a;">总匹数:</span>{{Number(item.nStockPieceQty).toLocaleString()}}</div> <div class="TITLE">
<div class="qty"><span style="color:#8a8a8a;">总数量:</span>{{Number(item.nStockQty).toLocaleString()}}</div> <span>单位</span>
<span>总匹数</span>
<span>总数量</span>
</div>
<div class="unit" v-for="(v,i) in item.child" :key="i">
<div class="ITEM">
<span>{{v.sUnit}}</span>
<span style="color:#8a8a8a;">{{Number(v.nStockPieceQty).toLocaleString()}}</span>
<span style="color:#8a8a8a;">{{Number(v.nQty).toLocaleString()}}</span>
</div>
</div>
</div> </div>
</div> </div>
...@@ -134,7 +159,7 @@ export default { ...@@ -134,7 +159,7 @@ export default {
theadTdBorder:false, theadTdBorder:false,
tbodyTdBorder:false, tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 342px)', tbodyHeight:'calc(100vh - 342px)',
tbodyTrBorderBottom:'1px solid #5cadff', tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'550px' width:'550px'
}, },
chartData:[], chartData:[],
...@@ -186,7 +211,7 @@ export default { ...@@ -186,7 +211,7 @@ export default {
const data = this.chartData; const data = this.chartData;
const map = {}; const map = {};
data.forEach(function(obj) { data.forEach(function(obj) {
map[obj.sStoreName] = Number(obj.nAmount||0).toLocaleString() + '元'; map[obj.sStoreName] = Number(obj.nAllAmount||0).toLocaleString() + '元';
}); });
this.myChart = new F2.Chart({ this.myChart = new F2.Chart({
id: 'myChart', id: 'myChart',
...@@ -195,7 +220,7 @@ export default { ...@@ -195,7 +220,7 @@ export default {
plugins: Gesture, plugins: Gesture,
}); });
this.myChart.source(data, { this.myChart.source(data, {
nAmount: { nAllAmount: {
formatter: function formatter(val) { formatter: function formatter(val) {
return val + '元'; return val + '元';
} }
...@@ -210,7 +235,7 @@ export default { ...@@ -210,7 +235,7 @@ export default {
}); });
this.myChart.axis(false); this.myChart.axis(false);
this.myChart.interval() this.myChart.interval()
.position('a*nAmount') .position('a*nAllAmount')
.color('sStoreName', this.colorList) .color('sStoreName', this.colorList)
.adjust('stack'); .adjust('stack');
...@@ -219,7 +244,7 @@ export default { ...@@ -219,7 +244,7 @@ export default {
html: ` html: `
<div style="width: 250px;height: 40px;text-align: center;"> <div style="width: 250px;height: 40px;text-align: center;">
<div style="font-size: 12px">总计</div> <div style="font-size: 12px">总计</div>
<div style="font-size: 12px">${(this.chartData.reduce((x,y)=>{return x = x+y.nAmount},0)).toFixed(2)}万</div> <div style="font-size: 12px">${(this.chartData.reduce((x,y)=>{return x = x+y.nAllAmount},0)).toFixed(2)}万</div>
</div> </div>
` `
}); });
...@@ -247,13 +272,13 @@ export default { ...@@ -247,13 +272,13 @@ export default {
guide.html = ` guide.html = `
<div style="width: 250px;height: 40px;text-align: center;"> <div style="width: 250px;height: 40px;text-align: center;">
<div style="font-size: 12px">${e.data.sStoreName}</div> <div style="font-size: 12px">${e.data.sStoreName}</div>
<div style="font-size: 12px">${((e.data.nAmount / (that.chartData.reduce((x,y)=>{return x = x+y.nAmount},0))) * 100).toFixed(2)}%</div> <div style="font-size: 12px">${((e.data.nAllAmount / (that.chartData.reduce((x,y)=>{return x = x+y.nAllAmount},0))) * 100).toFixed(2)}%</div>
</div> </div>
` `
}else{ }else{
guide.html = `<div style="width: 250px;height: 40px;text-align: center;"> guide.html = `<div style="width: 250px;height: 40px;text-align: center;">
<div style="font-size: 12px">总计</div> <div style="font-size: 12px">总计</div>
<div style="font-size: 12px">${(that.chartData.reduce((x,y)=>{return x = x+y.nAmount},0)).toFixed(2)}万</div> <div style="font-size: 12px">${(that.chartData.reduce((x,y)=>{return x = x+y.nAllAmount},0)).toFixed(2)}万</div>
</div> </div>
` `
that.sStoreNo = ''; that.sStoreNo = '';
...@@ -275,7 +300,7 @@ export default { ...@@ -275,7 +300,7 @@ export default {
guide.html = ` guide.html = `
<div style="width: 250px;height: 40px;text-align: center;"> <div style="width: 250px;height: 40px;text-align: center;">
<div style="font-size: 12px">${data[0].sStoreName}</div> <div style="font-size: 12px">${data[0].sStoreName}</div>
<div style="font-size: 12px">${((data[0].nAmount / (that.chartData.reduce((x,y)=>{return x = x+y.nAmount},0))) * 100).toFixed(2)}%</div> <div style="font-size: 12px">${((data[0].nAllAmount / (that.chartData.reduce((x,y)=>{return x = x+y.nAllAmount},0))) * 100).toFixed(2)}%</div>
</div> </div>
` `
guide.repaint(); guide.repaint();
...@@ -289,14 +314,22 @@ export default { ...@@ -289,14 +314,22 @@ export default {
async getDetail(sStoreNo){ async getDetail(sStoreNo){
let data = {}; let data = {};
!!sStoreNo && (data.sStoreNo = sStoreNo); !!sStoreNo && (data.sStoreNo = sStoreNo);
let res = await this.apiGet(`${this.$url('default')}/bianalysis/stockamountinfo/`,data,'加载中'); let res = await this.request('getBoss',{
data:[
if(res.hasOwnProperty('set1')) this.chartData = res.set1; {key:'url',value:'Inventory situation'},
],
params:{},
},'加载中',{})
if(res && res.length > 0) this.chartData = res;
this.chartData.map((x,y)=>{ this.chartData.map((x,y)=>{
x.a = '1'; x.a = '1';
}) })
this.chartData = this.chartData.filter(x=>x.nAmount != 0); this.chartData = this.chartData.filter(x=>x.nAllAmount != 0);
if(res.hasOwnProperty('set2')) this.list = res.set2; // if(res.hasOwnProperty('set2')) this.list = res.set2;
},
routerToWarehouseDetail(item){
this.$store.dispatch('saveWarehouseDetail',item);
this.$router.push({name:'tiipChartWarehouseDetail'});
} }
}, },
components:{ components:{
......
<style lang="less" >
#tiipChartWarehouseDetail{
height:100%;
background:#eef4fe;
display:flex;
flex-direction: column;
.Table{
flex-grow: 1;
height:1px;
overflow: auto;
}
}
</style>
<template>
<div id="tiipChartWarehouseDetail">
<div class="Table">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import customerTable from '@/components/Table'
import { mapState } from 'vuex'
export default {
name: 'tiipChartWarehouseDetail',
data () {
return {
list:[],
columns:[],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh)',
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%'
},
}
},
computed:{
...mapState({
warehouseDetail:state => state.kanban.warehouseDetail,
})
},
async mounted(){
window.d = this;
},
async activated(){
this.$store.dispatch("CAHNGE_META_INFO", {title:this.warehouseDetail.sStoreName+'明细'});
await this.getData();
if(this.warehouseDetail.ummStoreGUID == "637a600b-c40f-4933-991f-4426374649d2"){
this.columns = [
{
width:'40%',
name:'等级',
align:'center',
field:'sGradeHTML',
// underline:true,
color:'#2d8cf0',
},
{
width:'30%',
name:'数量',
align:'center',
field:'nQtyHTML',
},
{
width:'30%',
name:'匹数',
align:'center',
field:'nStockPieceQty',
}
]
}else{
this.columns = [
{
width:'40%',
name:'类别',
align:'center',
field:'sGradeHTML',
// underline:true,
color:'#2d8cf0',
},
{
width:'30%',
name:'数量',
align:'center',
field:'nQtyHTML',
},
{
width:'30%',
name:'匹数',
align:'center',
field:'nStockPieceQty',
}
]
}
},
methods:{
async getData(){
let res = await this.request('getBoss',{
data:[
{key:"url",value:'Inventory situation Store_GroupBy'},
{key:"ummStoreGUID",value:this.warehouseDetail.ummStoreGUID},
],
params:{},
},'加载中',{})
res.map(x=>{
x.sGradeHTML = `<div><span style="color:#FF6633">${x.sGrade || ''}</div>`;
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty || ''}</span></div>`;
})
this.list = res;
}
},
components:{
customerTable,
},
}
</script>
\ No newline at end of file
...@@ -114,13 +114,12 @@ export default { ...@@ -114,13 +114,12 @@ export default {
} }
}, },
routerToOperateDetail(row){ routerToOperateDetail(row){
// return false; if(row.sType != '成品入库' && row.sType != '收货'){
if(row.sType == '接单' || row.sType == '销售'){
let data = util.deepClone(row); let data = util.deepClone(row);
data.begin_date = util.dateFormat(this.start,"yyyy-MM-dd"); data.begin_date = util.dateFormat(this.start,"yyyy-MM-dd");
data.end_date = (this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59'; data.end_date = (this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59';
this.$store.dispatch('saveKanbanHdr',data); this.$store.dispatch('saveKanbanHdr',data);
this.$store.dispatch('saveRefresh',true);
this.$router.push({name:'tiipOperateDetail',type:row.sType}) this.$router.push({name:'tiipOperateDetail',type:row.sType})
} }
} }
......
...@@ -43,13 +43,13 @@ export default { ...@@ -43,13 +43,13 @@ export default {
width:'25%', width:'25%',
name:'数量', name:'数量',
align:'center', align:'center',
field:'nAmount', field:'nQty',
}, },
{ {
width:'25%', width:'25%',
name:'金额', name:'金额',
align:'center', align:'center',
field:'nQtyHTML', field:'nAmountHTML',
}, },
{ {
width:'25%', width:'25%',
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
theadTdBorder:false, theadTdBorder:false,
tbodyTdBorder:false, tbodyTdBorder:false,
tbodyHeight:'calc(100vh)', tbodyHeight:'calc(100vh)',
tbodyTrBorderBottom:'1px solid #5cadff', tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%' width:'100%'
}, },
type:'custom' type:'custom'
...@@ -82,7 +82,17 @@ export default { ...@@ -82,7 +82,17 @@ export default {
}, },
async activated(){ async activated(){
this.type = this.$route.params.type; this.type = this.$route.params.type;
this.$store.dispatch("CAHNGE_META_INFO", {title:this.type == 'custom' ? '客户' : '产品' + '订单列表'}); let title = '';
if(this.hdr.sType == '采购'){
title = '采购';
}else if(this.hdr.sType == '加工'){
title = '加工';
}else if(this.hdr.sType == '检验'){
title = '检验';
}else{
title = '客户';
}
this.$store.dispatch("CAHNGE_META_INFO", {title:(this.type == 'custom' ? title : '产品') + '订单列表'});
await this.getData(); await this.getData();
this.global.$off('clickTd'); this.global.$off('clickTd');
...@@ -101,7 +111,11 @@ export default { ...@@ -101,7 +111,11 @@ export default {
{key:"end_date",value:this.hdr.end_date} {key:"end_date",value:this.hdr.end_date}
]; ];
if(this.type == 'custom'){ if(this.type == 'custom'){
if(this.hdr.sType == '采购' || this.hdr.sType == '加工' || this.hdr.sType == '检验'){
postData.push({key:"upbProviderGUID",value:this.orderItem.upbProviderGUID})
}else{
postData.push({key:"upbCustomerGUID",value:this.orderItem.upbCustomerGUID}) postData.push({key:"upbCustomerGUID",value:this.orderItem.upbCustomerGUID})
}
}else{ }else{
postData.push({key:"sSampleMaterialNo",value:this.orderItem.sSampleMaterialNo}) postData.push({key:"sSampleMaterialNo",value:this.orderItem.sSampleMaterialNo})
} }
...@@ -111,7 +125,7 @@ export default { ...@@ -111,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.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`; x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount || ''}</span></div>`;
}) })
this.list = res; this.list = res;
} }
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<template> <template>
<div id="tiipOperateDetail"> <div id="tiipOperateDetail">
<div class="page height"> <div class="page height" v-if="showTab">
<span v-for="(item,index) in tabList" :key="index" :class="[activeTab==item.key?'active':'']" @click="changeTab(item.key)">{{item.value}}</span> <span v-for="(item,index) in tabList" :key="index" :class="[activeTab==item.key?'active':'']" @click="changeTab(item.key)">{{item.value}}</span>
</div> </div>
<div class="Table"> <div class="Table">
...@@ -94,12 +94,79 @@ export default { ...@@ -94,12 +94,79 @@ export default {
data () { data () {
return { return {
list:[], list:[],
columns:[ columns:[],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100%)',
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%'
},
activeTab:0,
tabList:[],
columns1:[
{
width:'40%',
name:'产品',
align:'center',
field:'sMaterial',
color:'#2d8cf0',
underline:true,
},
{
width:'30%',
name:'数量',
align:'center',
field:'nQtyHTML',
},
{
width:'30%',
name:'金额',
align:'center',
field:'nAmountHTML',
}
],
showTab:true
}
},
computed:{
...mapState({
hdr:state => state.kanban.hdr,
isRefresh:state => state.app.isRefresh
})
},
async mounted(){
window.d = this;
},
async activated(){
this.showTab = true;
if(this.isRefresh){
this.activeTab = 0;
this.$store.dispatch('saveRefresh',false);
}
this.$store.dispatch("CAHNGE_META_INFO", {title:this.hdr.sType + '详情'});
await this.getData();
if(this.hdr.sType == '采购'){
this.tabList = [
{
value:'供应商信息',
key:'0'
},
{
value:'采购产品',
key:'1'
}
];
this.columns = [
{ {
width:'25%', width:'25%',
name:'客户', name:'供应商',
align:'center', align:'center',
field:'sCustomerNameHTML', field:'sProviderNameHTML',
underline:true, underline:true,
color:'#2d8cf0', color:'#2d8cf0',
}, },
...@@ -107,79 +174,134 @@ export default { ...@@ -107,79 +174,134 @@ export default {
width:'25%', width:'25%',
name:'数量', name:'数量',
align:'center', align:'center',
field:'nAmount', field:'nQtyHTML',
}, },
{ {
width:'25%', width:'25%',
name:'金额', name:'金额',
align:'center', align:'center',
field:'nQtyHTML', field:'nAmountHTML'
}, },
{ {
width:'25%', width:'25%',
name:'销售员', name:'采购员',
align:'center', align:'center',
field:'sSalesNameHTML', field:'sFollowerNameHTML',
underline:true underline:true,
} }
], ]
tableStyle:{ }else if(this.hdr.sType == '加工'){
theadBgColor:'rgba(223,238,253,1)', this.tabList = [
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 50px)',
tbodyTrBorderBottom:'1px solid #5cadff',
width:'100%'
},
activeTab:0,
tabList:[
{ {
value:'客户信息', value:'坯布加工',
key:'0' key:'0'
}, },
{ {
value:'产品信息', value:'成品加工',
key:'1' key:'1'
} }
], ];
columns1:[ this.columns = [
{ {
width:'40%', width:'25%',
name:'产品', name:'加工商',
align:'center', align:'center',
field:'sMaterial', field:'sProviderNameHTML',
underline:true,
color:'#2d8cf0', color:'#2d8cf0',
},
{
width:'25%',
name:'数量',
align:'center',
field:'nQtyHTML',
},
{
width:'25%',
name:'金额',
align:'center',
field:'nAmountHTML'
},
{
width:'25%',
name:'加工员',
align:'center',
field:'sFollowerNameHTML',
underline:true,
},
]
}else if(this.hdr.sType == '检验'){
this.showTab = false;
this.columns = [
{
width:'25%',
name:'加工商',
align:'center',
field:'sProviderNameHTML',
underline:true, underline:true,
color:'#2d8cf0',
}, },
{ {
width:'30%', width:'30%',
name:'产品',
align:'center',
field:'sMaterialHTML',
},
{
width:'20%',
name:'数量', name:'数量',
align:'center', align:'center',
field:'nAmount', field:'nQtyHTML',
}, },
{ {
width:'30%', width:'25%',
name:'金额', name:'金额',
align:'center', align:'center',
field:'nQtyHTML', field:'nAmountHTML',
}
],
} }
]
}else{
this.columns = [
{
width:'25%',
name:'客户',
align:'center',
field:'sCustomerNameHTML',
underline:true,
color:'#2d8cf0',
}, },
computed:{ {
...mapState({ width:'25%',
hdr:state => state.kanban.hdr name:'数量',
}) align:'center',
field:'nQtyHTML',
ellipsis:true
}, },
async mounted(){ {
window.d = this; width:'25%',
name:'金额',
align:'center',
field:'nAmountHTML',
}, },
async activated(){ {
this.$store.dispatch("CAHNGE_META_INFO", {title:this.hdr.sType + '详情'}); width:'25%',
name:'销售员',
await this.getData(); align:'center',
field:'sSalesNameHTML',
underline:true
}
]
this.tabList = [
{
value:'客户信息',
key:'0'
},
{
value:'产品信息',
key:'1'
}
]
}
this.global.$off('clickTd'); this.global.$off('clickTd');
//点击表格列触发 //点击表格列触发
...@@ -215,13 +337,18 @@ export default { ...@@ -215,13 +337,18 @@ export default {
if(this.activeTab == 1){ if(this.activeTab == 1){
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.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`; x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount || ''}</span></div>`;
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty}</span></div>`;
}) })
}else{ }else{
res.map(x=>{ res.map(x=>{
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.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName}</span></div>` x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName || ''}</span></div>`;
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</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.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>`;
}) })
} }
this.list = res; this.list = res;
......
...@@ -43,13 +43,13 @@ export default { ...@@ -43,13 +43,13 @@ export default {
width:'30%', width:'30%',
name:'数量', name:'数量',
align:'center', align:'center',
field:'nAmount', field:'nQty',
}, },
{ {
width:'30%', width:'30%',
name:'金额', name:'金额',
align:'center', align:'center',
field:'nQtyHTML', field:'nAmountHTML',
} }
], ],
tableStyle:{ tableStyle:{
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
theadTdBorder:false, theadTdBorder:false,
tbodyTdBorder:false, tbodyTdBorder:false,
tbodyHeight:'calc(100vh)', tbodyHeight:'calc(100vh)',
tbodyTrBorderBottom:'1px solid #5cadff', tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%' width:'100%'
}, },
} }
...@@ -84,19 +84,35 @@ export default { ...@@ -84,19 +84,35 @@ export default {
}, },
methods:{ methods:{
async getData(){ async getData(){
let res = await this.request('getBoss',{ let postData = [
data:[
{key:"url",value:'Operation gai sType-customer-sales'}, {key:"url",value:'Operation gai sType-customer-sales'},
{key:"upbSalesGUID",value:this.orderItem.upbSalesGUID},
{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.hdr.sType == '采购' || this.hdr.sType == '加工'){
postData.push({key:"upbFollowerGUID",value:this.orderItem.upbFollowerGUID});
}else{
postData.push({key:"upbSalesGUID",value:this.orderItem.upbSalesGUID});
}
let res = await this.request('getBoss',{
data:postData,
params:{}, params:{},
},'加载中',{}) },'加载中',{})
res.map(x=>{ res.map(x=>{
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName}</span></div>` if(this.hdr.sType == '采购' || this.hdr.sType == '加工'){
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`; if(this.hdr.sType == '加工'){
this.columns[0].name = '加工员名称';
}else if(this.hdr.sType == '采购'){
this.columns[0].name = '采购员名称';
}
this.columns[0].field = 'sFollowerNameHTML';
x.sFollowerNameHTML = `<div><span style="text-decoration:underline;">${x.sFollowerName}</span></div>`;
}else{
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName}</span></div>`;
}
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
}) })
this.list = res; this.list = res;
} }
......
...@@ -109,8 +109,8 @@ export default { ...@@ -109,8 +109,8 @@ export default {
singleTrBgColor:'#eef4fe', singleTrBgColor:'#eef4fe',
theadTdBorder:false, theadTdBorder:false,
tbodyTdBorder:false, tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 200px)', tbodyHeight:'calc(100vh - 160px)',
tbodyTrBorderBottom:'1px solid #5cadff' tbodyTrBorderBottom:'1px solid #dbe9f8'
}, },
status:[], status:[],
showModal:false, showModal:false,
......
...@@ -124,8 +124,8 @@ export default { ...@@ -124,8 +124,8 @@ export default {
singleTrBgColor:'#eef4fe', singleTrBgColor:'#eef4fe',
theadTdBorder:false, theadTdBorder:false,
tbodyTdBorder:false, tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 160px)', tbodyHeight:'calc(100vh - 120px)',
tbodyTrBorderBottom:'1px solid #5cadff', tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%' width:'100%'
}, },
host:'https://weixin.huansi.net/apiproxy/huansi/service/proxy/', host:'https://weixin.huansi.net/apiproxy/huansi/service/proxy/',
......
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