|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
+ <div v-if="!IsCompanyUser">
|
|
|
<el-breadcrumb class="heading">
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item :to="{ path: '/oilsupplier/supplier' }">技术服务类列表</el-breadcrumb-item>
|
|
|
@@ -434,6 +434,7 @@
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import api from '@/api/oilsupplier/supplier';
|
|
|
+ import certApi from '@/api/oilsupplier/suppliercert'
|
|
|
|
|
|
export default {
|
|
|
computed: {
|
|
|
@@ -445,6 +446,7 @@
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ IsCompanyUser: 0,
|
|
|
canApply: false,
|
|
|
dialogVisible: false,
|
|
|
//列表数据
|
|
|
@@ -462,6 +464,10 @@
|
|
|
CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
|
//查询项
|
|
|
searchFormReset: {},
|
|
|
+ CompanyApprovedData: {
|
|
|
+ SupplierId: '',
|
|
|
+ CertId: '',
|
|
|
+ },
|
|
|
searchForm: {
|
|
|
Id: '',
|
|
|
SupplierName: '',
|
|
|
@@ -892,12 +898,38 @@
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- this.isCanApply()
|
|
|
- //查询条件初始值备份
|
|
|
- Object.assign(this.searchFormReset, this.searchForm)
|
|
|
- //查询列表
|
|
|
- this.initDatas()
|
|
|
- //this.getDictOptions()
|
|
|
+ this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
|
|
|
+ if (this.IsCompanyUser) {
|
|
|
+ certApi.getEntityByCreatorAndType('03', this.$axios).then(res => {
|
|
|
+ this.CompanyApprovedData.CertId = res.data.Id
|
|
|
+ this.CompanyApprovedData.SupplierId = res.data.SupplierId
|
|
|
+ if (this.CompanyApprovedData.CertId) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/oilsupplier/supplier/' + this.CompanyApprovedData.SupplierId + '/techedit',
|
|
|
+ query: {
|
|
|
+ certid: this.CompanyApprovedData.CertId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/oilsupplier/supplier/add/techedit',
|
|
|
+ query: {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.isCanApply()
|
|
|
+ //查询条件初始值备份
|
|
|
+ Object.assign(this.searchFormReset, this.searchForm)
|
|
|
+ //查询列表
|
|
|
+ this.initDatas()
|
|
|
+ //this.getDictOptions()
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
initDatas() {
|