Commit fceb70fb authored by godwithdh's avatar godwithdh

往来单位

parent b75b8de8
...@@ -199,13 +199,15 @@ export default { ...@@ -199,13 +199,15 @@ export default {
DateValue:[new Date], DateValue:[new Date],
isFooter:false, isFooter:false,
mode:0,//进入方式0 默认 往来单位->产品列表,1 往来单位->销售 mode:0,//进入方式0 默认 往来单位->产品列表,1 往来单位->销售,2 往来单位->退货
upbCustomerGUID:"",//客户id upbCustomerGUID:"",//客户id
page:1, page:1,
per_page:50 per_page:50
} }
}, },
async mounted(){ async mounted(){
window.s=this
this.mode=this.$route.query.mode||0 this.mode=this.$route.query.mode||0
this.upbCustomerGUID=this.$route.query.upbCustomerGUID||"" this.upbCustomerGUID=this.$route.query.upbCustomerGUID||""
if(this.mode==1){ if(this.mode==1){
...@@ -237,7 +239,36 @@ export default { ...@@ -237,7 +239,36 @@ export default {
this.tableStyle.tbodyHeight="calc(100vh - 125px)" this.tableStyle.tbodyHeight="calc(100vh - 125px)"
this.isFooter=true this.isFooter=true
this.$store.dispatch("CAHNGE_META_INFO", {title:"销售列表"}); this.$store.dispatch("CAHNGE_META_INFO", {title:"销售列表"});
} }else if(this.mode==2){
this.columns=[
{
width:"25%",
name:"单号",
align:"center",
field:"sStoreInNoHTML",
underline:true,
color:"#2d8cf0"
},{
width:"25%",
name:"匹数",
align:"center",
field:"nPieceHTML"
},{
width:"25%",
name:"数量",
align:"center",
field:"nQtyHTML"
},{
width:"25%",
name:"金额",
align:"center",
field:"nAmountHTML"
}
]
this.tableStyle.tbodyHeight="calc(100vh - 125px)"
this.isFooter=true
this.$store.dispatch("CAHNGE_META_INFO", {title:"退货列表"});
}
this.$nextTick(async ()=>{ this.$nextTick(async ()=>{
this.$refs.time.$on("time",date=>{ this.$refs.time.$on("time",date=>{
...@@ -254,14 +285,11 @@ export default { ...@@ -254,14 +285,11 @@ export default {
this.global.$off("clickTd") this.global.$off("clickTd")
this.global.$on("clickTd",async res=>{ this.global.$on("clickTd",async res=>{
var postData=[ if(this.mode==1){
{key:"url",value:"Operation gai sType-customer-sOrder-dtl"}, this.getDetail(1,"销售",this.list[res.trIndex].sOrderNo)
{key:"sType",value:"销售"}, }else if(this.mode==2){
{key:"sOrderNo",value:this.list[res.trIndex].sOrderNo}, this.getDetail(2,"销售退货",this.list[res.trIndex].sStoreInNo)
] }
var value=await this.request("getBoss",{data:postData},"加载中",{})
this.$store.dispatch("saveKanbanOrderDetail",value)
this.$router.push({name:"orderDetailsIndex"})
}) })
}) })
}, },
...@@ -274,11 +302,11 @@ export default { ...@@ -274,11 +302,11 @@ export default {
{key:"begin_date",value:Util.dateFormat(this.DateValue[0],"yyyy-MM-dd")}, {key:"begin_date",value:Util.dateFormat(this.DateValue[0],"yyyy-MM-dd")},
{key:"end_date",value:Util.dateFormat(this.DateValue[1]||this.DateValue[0],"yyyy-MM-dd 23:59")} {key:"end_date",value:Util.dateFormat(this.DateValue[1]||this.DateValue[0],"yyyy-MM-dd 23:59")}
] ]
}else if(this.mode==1){ }else if(/^1$|^2$/.test(this.mode)){
if(this.per_page<50)return; if(this.per_page<50)return;
var postData=[ var postData=[
{key:"url",value:"Operation gai sType-customer-sOrder"}, {key:"url",value:this.mode==1?"Operation gai sType-customer-sOrder":"Abnormal early warning-customer-sOrder"},
{key:"sType",value:"销售"}, {key:"sType",value:this.mode==1?"销售":"销售退货"},
{key:"begin_date",value:Util.dateFormat(this.DateValue[0],"yyyy-MM-dd")}, {key:"begin_date",value:Util.dateFormat(this.DateValue[0],"yyyy-MM-dd")},
{key:"end_date",value:Util.dateFormat(this.DateValue[1]||this.DateValue[0],"yyyy-MM-dd 23:59")}, {key:"end_date",value:Util.dateFormat(this.DateValue[1]||this.DateValue[0],"yyyy-MM-dd 23:59")},
{key:"upbCustomerGUID",value:this.upbCustomerGUID} {key:"upbCustomerGUID",value:this.upbCustomerGUID}
...@@ -300,13 +328,18 @@ export default { ...@@ -300,13 +328,18 @@ export default {
x.nQtyHTML = `<div><span">${(x.nQty || x.nOutQty || x.nInQty||0).toLocaleString()}</span></div>`; x.nQtyHTML = `<div><span">${(x.nQty || x.nOutQty || x.nInQty||0).toLocaleString()}</span></div>`;
return x; return x;
}) })
}else if(this.mode==1){ }else if(/^1$|^2$/.test(this.mode)){
this.per_page=res.length this.per_page=res.length
this.page++ this.page++
res.forEach((v,i)=>{ res.forEach((v,i)=>{
v.sOrderNoHTML=`<div><span style='text-decoration:${i<res.length-1?'underline':'none'};'>${v.sOrderNo||0}</span></div>` v.sOrderNoHTML=`<div><span style='text-decoration:${i<res.length-1?'underline':'none'};'>${v.sOrderNo||0}</span></div>`
v.nAmountHTML=`<div><span style="color:#339966;">${v.nAmount||0}</span></div>` v.nAmountHTML=`<div><span style="color:#339966;">${v.nAmount||0}</span></div>`
if(this.mode==2){
v.nQtyHTML=`<div><span>${v.nSumInQty}</span></div>`
v.nPieceHTML=`<div><span>${v.nInPieceQty}</span></div>`
v.sStoreInNoHTML=`<div><span style="text-decoration:${i<res.length-1?"underline":"none"}">${v.sStoreInNo}</span></div>`
}
}) })
if(typeof reData=='boolean'&&reData){ if(typeof reData=='boolean'&&reData){
this.list=res this.list=res
...@@ -320,6 +353,16 @@ export default { ...@@ -320,6 +353,16 @@ export default {
this.per_page=50 this.per_page=50
this.list=[] this.list=[]
}, },
async getDetail(M,sType,orderNo){
var postData=[
{key:"url",value:M==1?"Operation gai sType-customer-sOrder-dtl":"Abnormal early warning-customer-sOrder-dtl"},
{key:"sType",value:sType},
{key:"sOrderNo",value:orderNo},
]
var value=await this.request("getBoss",{data:postData},"加载中",{})
this.$store.dispatch("saveKanbanOrderDetail",value)
this.$router.push({name:"orderDetailsIndex"})
},
}, },
components:{ components:{
customerTable, customerTable,
......
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