|
@@ -9,7 +9,7 @@
|
|
|
idname="sa_dispatchid"
|
|
|
ownertable="sa_dispatch"
|
|
|
:isGoDetail="true"
|
|
|
- detailPath="/saler_orderDetails"
|
|
|
+ :detailPath="detailPath"
|
|
|
nowDetailPath="/dispatchdetail"
|
|
|
:detailId="mainData.sa_orderid"
|
|
|
tags=""
|
|
@@ -86,6 +86,7 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ detailPath:''
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
@@ -108,7 +109,26 @@ import dialogTemplateNew from '@/components/dialogTemplate/index1'
|
|
|
if (res.data) this.mainData = res.data
|
|
|
console.log(this.mainData)
|
|
|
this.changeDataStructure()
|
|
|
+ this.setDetailPath()
|
|
|
},
|
|
|
+ /*设置调整详情页的地址*/
|
|
|
+ async setDetailPath(){
|
|
|
+ const usertype = JSON.parse(sessionStorage.getItem('active_account')).usertype
|
|
|
+ if (usertype == 0){
|
|
|
+ this.detailPath = '/orderdetail'
|
|
|
+ }else if (usertype == 21 || usertype == 22){
|
|
|
+ this.detailPath = '/agent_orderDetails'
|
|
|
+ }else if (usertype == 1) {
|
|
|
+ const hrid = JSON.parse(sessionStorage.getItem('active_account')).hrid
|
|
|
+ const res = await this.$store.dispatch('isSalesperson',hrid)
|
|
|
+ if (res.issalehr == 1){
|
|
|
+ this.detailPath = '/saler_orderDetails'
|
|
|
+ }else {
|
|
|
+ this.detailPath = '/orderdetail'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
changeDataStructure() {
|
|
|
let that = this
|
|
|
this.mainAreaData = [
|