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

commit

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