Commit 51ebea79 authored by 张锡奇's avatar 张锡奇

commit

parent a694a626
......@@ -297,7 +297,8 @@ export default {
thead.scrollTo(tfoot.scrollLeft,thead.scrollTop);
},
clickTd(i,index){
if(!this.columns[i].underline) return false;
let value = this.list[index][this.columns[i].field.split('HTML')[0]];
if(!this.columns[i].underline || !value) return false;
this.global.$emit('clickTd',{
trIndex:index,
tdIndex:i,
......
......@@ -9,7 +9,8 @@ const obj = {
sType:'检验'
},
orderItem:{},
warehouseDetail:{}
warehouseDetail:{},
customerItem:{}
},
mutations: {
saveKanbanHdr(state,data){
......@@ -20,6 +21,9 @@ const obj = {
},
saveWarehouseDetail(state,data){
state.warehouseDetail = data;
},
saveCustomerItem(state,data){
state.customerItem = data;
}
},
actions: {
......@@ -31,6 +35,9 @@ const obj = {
},
saveWarehouseDetail({commit},data){
commit('saveWarehouseDetail',data);
},
saveCustomerItem({commit},data){
commit('saveCustomerItem',data);
}
}
};
......
......@@ -74,7 +74,7 @@ export default {
computed:{
...mapState({
hdr:state => state.kanban.hdr,
orderItem:state => state.kanban.orderItem,
customerItem:state => state.kanban.customerItem,
})
},
async mounted(){
......@@ -112,12 +112,12 @@ export default {
];
if(this.type == 'custom'){
if(this.hdr.sType == '采购' || this.hdr.sType == '加工' || this.hdr.sType == '检验'){
postData.push({key:"upbProviderGUID",value:this.orderItem.upbProviderGUID})
postData.push({key:"upbProviderGUID",value:this.customerItem.upbProviderGUID})
}else{
postData.push({key:"upbCustomerGUID",value:this.orderItem.upbCustomerGUID})
postData.push({key:"upbCustomerGUID",value:this.customerItem.upbCustomerGUID})
}
}else{
postData.push({key:"sSampleMaterialNo",value:this.orderItem.sSampleMaterialNo})
postData.push({key:"sSampleMaterialNo",value:this.customerItem.sSampleMaterialNo})
}
let res = await this.request('getBoss',{
data:postData,
......
......@@ -302,20 +302,19 @@ export default {
}
]
}
this.global.$off('clickTd');
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
this.$store.dispatch('saveKanbanOrderItem',this.list[res.trIndex]);
if(res.tdIndex == 0){
if(this.activeTab == 0){
this.$store.dispatch('saveCustomerItem',this.list[res.trIndex]);
this.$router.push({name:'tiipOperateCustomDetail',params:{type:'custom'}})
}else{
this.$store.dispatch('searchOrderSaveDtl',this.list[res.trIndex]);
this.$router.push({name:'searchOrderMaterialDetail'})
}
}else if(res.tdIndex = 3){
this.$store.dispatch('saveKanbanOrderItem',this.list[res.trIndex]);
this.$router.push({name:'tiipOperateSaleDetail'})
}
})
......
......@@ -35,7 +35,7 @@ export default {
width:'40%',
name:'客户名称',
align:'center',
field:'sSalesNameHTML',
field:'sCustomerNameHTML',
underline:true,
color:'#2d8cf0',
},
......@@ -79,6 +79,7 @@ export default {
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
this.$store.dispatch('saveCustomerItem',this.list[res.trIndex]);
this.$router.push({name:'tiipOperateCustomDetail',params:{type:'custom'}})
})
},
......@@ -103,16 +104,16 @@ export default {
res.map(x=>{
if(this.hdr.sType == '采购' || this.hdr.sType == '加工'){
if(this.hdr.sType == '加工'){
this.columns[0].name = '加工员名称';
this.columns[0].name = '加工';
}else if(this.hdr.sType == '采购'){
this.columns[0].name = '采购员名称';
this.columns[0].name = '供应商';
}
this.columns[0].field = 'sFollowerNameHTML';
x.sFollowerNameHTML = `<div><span style="text-decoration:underline;">${x.sFollowerName}</span></div>`;
this.columns[0].field = 'sProviderNameHTML';
x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName || ''}</span></div>`;
}else{
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName}</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;
}
......
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