2
3
Преглед на файлове

企业页面直接添加

yuedefeng преди 6 години
родител
ревизия
234e8cab9f

+ 22 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -19,7 +19,7 @@
           <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">增项申请</el-button>
           </router-link>
           <router-link :to="'/oilsupplier/supplier/basislist'">
-            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="authUser.Profile.IsCompanyUser != 1">返回
+            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
           </router-link>
         </span>
@@ -186,7 +186,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
-          <el-card class="box-card" style="mini-height: 800px">
+          <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span>审批流程</span>
               <!-- <span style="float: right;">
@@ -277,6 +277,8 @@
 
     data () {
       return {
+        showReturn: 1,
+        IsCompanyUser: 0,
         dialogVisible: false,
         canUpdateSupplier: true,
         dictData: null,
@@ -403,14 +405,12 @@
         }
       }
     },
-    mounted () {
-      this.serviceId = this.$route.params.opera + ''
-      if (this.$route.query.certid) {
-        this.certId = this.$route.query.certid + ''
-      }
-    },
+
     created () {
       this.serviceId = this.$route.params.opera + ''
+      if (this.$route.query.rtn) {
+        this.showReturn = 0
+      }
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
       }
@@ -420,8 +420,20 @@
         this.formData.Id = 0
       }
       this.getDictOptions()
-      this.initDatas()
       this.getorgtreelist()
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+      if (this.IsCompanyUser && this.serviceId === 'add') {
+        apiCert.getEntityByCreatorAndType('02', this.$axios).then(res => {
+          this.certId = res.data.Id
+          this.serviceId = res.data.SupplierId
+          this.formData.Id = res.data.SupplierId
+          this.initDatas()
+        }).catch(err => {
+          console.error(err)
+        })
+      } else {
+        this.initDatas()
+      }
     },
     methods: {
       inputCompany (val) {
@@ -555,7 +567,7 @@
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.certId && this.formDataCert.WorkflowId) {
-              this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
+              //this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)

+ 23 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -19,7 +19,7 @@
           <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">增项申请</el-button>
           </router-link>
           <router-link :to="'/oilsupplier/supplier/goodslist'">
-            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="authUser.Profile.IsCompanyUser != 1">返回
+            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
           </router-link>
         </span>
@@ -187,7 +187,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
-          <el-card class="box-card" style="mini-height: 800px">
+          <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span>审批流程</span>
               <!-- <span style="float: right;">
@@ -287,6 +287,8 @@
 
     data () {
       return {
+        showReturn: 1,
+        IsCompanyUser: 0,
         dialogVisible: false,
         canUpdateSupplier: true,
         dictData: null,
@@ -412,14 +414,12 @@
         }
       }
     },
-    mounted () {
-      this.serviceId = this.$route.params.opera + ''
-      if (this.$route.query.certid) {
-        this.certId = this.$route.query.certid
-      }
-    },
+
     created () {
       this.serviceId = this.$route.params.opera + ''
+      if (this.$route.query.rtn) {
+        this.showReturn = 0
+      }
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
       }
@@ -430,7 +430,20 @@
       }
       this.getDictOptions()
       this.getorgtreelist()
-      this.initDatas()
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+
+      if (this.IsCompanyUser && this.serviceId === 'add') {
+        apiCert.getEntityByCreatorAndType('01', this.$axios).then(res => {
+          this.certId = res.data.Id
+          this.serviceId = res.data.SupplierId
+          this.formData.Id = res.data.SupplierId
+          this.initDatas()
+        }).catch(err => {
+          console.error(err)
+        })
+      } else {
+        this.initDatas()
+      }
     },
     methods: {
       inputCompany (val) {
@@ -564,7 +577,7 @@
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.certId && this.formDataCert.WorkflowId) {
-              this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
+              //this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)

+ 23 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -19,7 +19,7 @@
           <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">增项申请</el-button>
           </router-link>
           <router-link :to="'/oilsupplier/supplier/techlist'">
-            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="authUser.Profile.IsCompanyUser != 1">返回
+            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
           </router-link>
         </span>
@@ -184,7 +184,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
-          <el-card class="box-card" style="mini-height: 800px">
+          <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span>审批流程</span>
               <!-- <span style="float: right;">
@@ -274,6 +274,8 @@
 
     data () {
       return {
+        showReturn: 1,
+        IsCompanyUser: 0,
         dialogVisible: false,
         canUpdateSupplier: true,
         dictData: null,
@@ -400,14 +402,12 @@
         }
       }
     },
-    mounted () {
-      this.serviceId = this.$route.params.opera + ''
-      if (this.$route.query.certid) {
-        this.certId = this.$route.query.certid + ''
-      }
-    },
+
     created () {
       this.serviceId = this.$route.params.opera + ''
+      if (this.$route.query.rtn) {
+        this.showReturn = 0
+      }
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
       }
@@ -417,8 +417,21 @@
         this.formData.Id = 0
       }
       this.getDictOptions()
-      this.initDatas()
       this.getorgtreelist()
+
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+      if (this.IsCompanyUser && this.serviceId === 'add') {
+        apiCert.getEntityByCreatorAndType('03', this.$axios).then(res => {
+          this.certId = res.data.Id
+          this.serviceId = res.data.SupplierId
+          this.formData.Id = res.data.SupplierId
+          this.initDatas()
+        }).catch(err => {
+          console.error(err)
+        })
+      } else {
+        this.initDatas()
+      }
     },
     methods: {
       inputCompany (val) {
@@ -556,7 +569,7 @@
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.certId && this.formDataCert.WorkflowId) {
-              this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
+              //this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)

+ 6 - 32
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/basislist.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="!IsCompanyUser">
+  <div>
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
       <el-breadcrumb-item :to="{ path: '/oilsupplier/supplier' }">基建类类列表</el-breadcrumb-item>
@@ -891,37 +891,11 @@
       }
     },
     created () {
-      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
-      if (this.IsCompanyUser) {
-        certApi.getEntityByCreatorAndType('02', this.$axios).then(res => {
-          const CertId = res.data.Id
-          const SupplierId = res.data.SupplierId
-          if (CertId) {
-            this.$router.push({
-              path: '/oilsupplier/supplier/' + SupplierId + '/basisedit',
-              query: {
-                certid: CertId
-              }
-            })
-          } else {
-            this.$router.push({
-              path: '/oilsupplier/supplier/add/basisedit',
-              query: {}
-            })
-          }
-
-        }).catch(err => {
-          console.error(err)
-        })
-
-      } else {
-        //查询条件初始值备份
-        Object.assign(this.searchFormReset, this.searchForm);
-        //查询列表
-        this.initDatas();
-        //this.getDictOptions()
-      }
-
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm);
+      //查询列表
+      this.initDatas();
+      //this.getDictOptions()
     },
     methods: {
       initDatas() {

+ 6 - 32
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/goodslist.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="!IsCompanyUser">
+  <div>
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
       <el-breadcrumb-item :to="{ path: '/oilsupplier/supplier' }">物资类列表</el-breadcrumb-item>
@@ -446,7 +446,6 @@
 
     data () {
       return {
-        IsCompanyUser: 0,
         dialogVisible: false,
         //列表数据
         entityList: [],
@@ -893,36 +892,11 @@
       }
     },
     created () {
-      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
-      if (this.IsCompanyUser) {
-        certApi.getEntityByCreatorAndType('01', this.$axios).then(res => {
-          const CertId = res.data.Id
-          const SupplierId = res.data.SupplierId
-          if (CertId) {
-            this.$router.push({
-              path: '/oilsupplier/supplier/' + SupplierId + '/goodsedit',
-              query: {
-                certid: CertId
-              }
-            })
-          } else {
-            this.$router.push({
-              path: '/oilsupplier/supplier/add/goodsedit',
-              query: {}
-            })
-          }
-
-        }).catch(err => {
-          console.error(err)
-        })
-
-      } else {
-        //查询条件初始值备份
-        Object.assign(this.searchFormReset, this.searchForm);
-        //查询列表
-        this.initDatas();
-        //this.getDictOptions()
-      }
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm);
+      //查询列表
+      this.initDatas();
+      //this.getDictOptions()
     },
     methods: {
       initDatas() {

+ 7 - 34
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/techlist.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="!IsCompanyUser">
+  <div>
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
       <el-breadcrumb-item :to="{ path: '/oilsupplier/supplier' }">技术服务类列表</el-breadcrumb-item>
@@ -446,7 +446,6 @@
 
     data() {
       return {
-        IsCompanyUser: 0,
         canApply: false,
         dialogVisible: false,
         //列表数据
@@ -898,38 +897,12 @@
       }
     },
     created () {
-      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()
-      }
-
+      this.isCanApply()
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initDatas()
+      //this.getDictOptions()
     },
     methods: {
       initDatas() {