|
@@ -43,8 +43,8 @@
|
|
|
<el-descriptions-item label-class-name="my-label" label="结束日期">{{mainData.endtime?mainData.endtime:'无限'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="提醒时间">{{mainData.remindday? mainData.remindday + '天' :'无需提醒'}}</el-descriptions-item>
|
|
|
<el-descriptions-item label-class-name="my-label" label="关联应用数据">
|
|
|
- <span v-if="mainData.systemapp">
|
|
|
- <el-button type="text" v-if="mainData.systemapp.length >0" @click="onGoto">{{mainData.systemapp[0].systemappname}}</el-button>
|
|
|
+ <span v-if="mainData.tableName">
|
|
|
+ <el-button type="text" v-if="mainData.tableName !== '--'" @click="onGoto">{{mainData.tableName}}</el-button>
|
|
|
<span v-else>--</span>
|
|
|
</span>
|
|
|
<span v-else>--</span>
|
|
@@ -92,6 +92,7 @@ export default {
|
|
|
disable:false,
|
|
|
team:[],
|
|
|
nowUserid: JSON.parse(sessionStorage.getItem('active_account')).userid,
|
|
|
+ pathData:[]
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
@@ -111,7 +112,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.mainData = Object.assign({},this.mainData,res.data)
|
|
|
- this.changeDataStructure()
|
|
|
+ this.queryPath()
|
|
|
+
|
|
|
this.queryAuthority()
|
|
|
/* this.$refs['details'].$refs['group'].queryGroup()*/
|
|
|
console.log(this.mainData.createuserid)
|
|
@@ -202,9 +204,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label:'关联应用数据',
|
|
|
- value:this.mainData.systemapp?this.mainData.systemapp.length>0?this.mainData.systemapp[0].systemappname:'':'',
|
|
|
+ value:this.mainData.tableName?this.mainData.tableName:'--',
|
|
|
style:()=>{
|
|
|
- let color = this.mainData.systemapp?this.mainData.systemapp.length>0?'#3874f6':'':''
|
|
|
+ let color = this.mainData.tableName?'#3874f6':''
|
|
|
return {color: color}
|
|
|
},
|
|
|
}
|
|
@@ -256,7 +258,7 @@ export default {
|
|
|
},
|
|
|
/*任务页面跳转*/
|
|
|
onGoto(){
|
|
|
- let path = this.mainData.systemapp[0].apppath_index
|
|
|
+ let path = this.mainData.path
|
|
|
let route = this.$route
|
|
|
if (route.path !== path.slice(1)){
|
|
|
this.oldRoute = {path:route.path,query:route.query}
|
|
@@ -270,6 +272,75 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /*表名对应的跳转路径*/
|
|
|
+ async queryPath(){
|
|
|
+ const res = await this.$store.dispatch('optiontypeselect','gotopath')
|
|
|
+ this.pathData = res.data
|
|
|
+ if (this.pathData){
|
|
|
+ console.log("执行")
|
|
|
+ this.pathData.forEach(item=>{
|
|
|
+ if (item.remarks == this.mainData.ownertable){
|
|
|
+ if (this.mainData.ownertable == 'sat_orderclue'){
|
|
|
+ this.customerPath(this.mainData.ownerid)
|
|
|
+ }else if (this.mainData.ownertable == 'sa_salesforecastbill'){
|
|
|
+ this.predictionPath(this.mainData.ownerid)
|
|
|
+ }else if (this.mainData.ownertable == 'sa_customers'){
|
|
|
+ this.customerPath(this.mainData.ownerid)
|
|
|
+ } else {
|
|
|
+ this.mainData.tableName = item.subvalues[0]
|
|
|
+ this.mainData.path = item.value
|
|
|
+ this.changeDataStructure()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ /*判断销售线索路径*/
|
|
|
+ async cluePath(id){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.saletool.orderclue.publicclue.PublicClue",
|
|
|
+ "method": "selectDetail",
|
|
|
+ "content": {
|
|
|
+ "sat_orderclueid": id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (res.data){
|
|
|
+ this.mainData.tableName = res.data.isprivate == '1' ? '销售线索':'公海线索'
|
|
|
+ this.mainData.path = res.data.isprivate == '1' ? '/orderclue_detail':'/clueDetail'
|
|
|
+ this.changeDataStructure()
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ /*判断销售预测路径*/
|
|
|
+ async predictionPath(id){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20230705144704,
|
|
|
+ "content": {
|
|
|
+ "sa_salesforecastbillid":id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (res.data){
|
|
|
+ this.mainData.tableName = res.data.baseonproject == '1' ? '项目成交预测':'出货开票预测'
|
|
|
+ this.mainData.path = res.data.baseonproject == '1' ? '/projectPredictionDetail':'/invoicePredictionDetail'
|
|
|
+ this.changeDataStructure()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /*判断客户路径*/
|
|
|
+ async customerPath(id){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221012164302,
|
|
|
+ "content": {
|
|
|
+ "sa_customersid": id
|
|
|
+ },
|
|
|
+ })
|
|
|
+ if (res.data){
|
|
|
+ this.mainData.tableName = res.data.sa_customerpoolid == '0' ? '公海客户':'我的客户'
|
|
|
+ this.mainData.path = res.data.sa_customerpoolid == '0' ? '/PublicCustomerDetail':'/customerDetail'
|
|
|
+ this.changeDataStructure()
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
mounted () {
|
|
|
this.queryMainData(this.$route.query.id)
|