Forráskód Böngészése

下载按钮加入企业信息页面

shiyi 6 éve
szülő
commit
9a14f3ec07

+ 30 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -40,6 +40,7 @@
             年审申请</el-button>
           <el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
           </el-button>
+          <el-button type="primary" @click="toWord" title="下载" size="mini">下载</el-button>
           <router-link :to="'/oilsupplier/supplier/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
@@ -320,6 +321,7 @@
   import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
   import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
+  import dataapi from '@/api/oilsupplier/dataentry'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
   import PerformanceList from '@/components/oilsupplier/performancelist'
@@ -649,6 +651,30 @@
         });
 
       },
+      //导出到Word文件
+      toWord () {
+        let id = this.formData.Id
+        dataapi.docexport(id, this.$axios)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              let docurl = res.data.item
+              // 内网服务器专用
+              if (process.client && docurl.indexOf('upfile') === 0) {
+                const myDomain = window.location.host
+                location.href = 'http://' + myDomain + '/' + docurl
+              } else {
+                location.href = 'http://' + docurl
+              }
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+      },
       qppend() {
         let _this = this
         _this.appendformData.SupplierName = this.formData.SupplierName
@@ -718,13 +744,13 @@
         this.formData.MgrUnit = fdata.MgrUnit
         if(fdata.InStyle!=null && fdata.InStyle!=""){
         this.formData.InStyle = fdata.InStyle
-        }      
+        }
         this.formData.OperType = fdata.OperType
         if(fdata.Country!=""){
             this.formData.Country = fdata.Country;
         }
         this.formData.MaunAgent = fdata.MaunAgent
-        this.formData.ConstructTeam = fdata.ConstructTeam 
+        this.formData.ConstructTeam = fdata.ConstructTeam
         if(fdata.CredentialFlag!=null&&fdata.CredentialFlag!=""){
           this.formData.CredentialFlag = fdata.CredentialFlag
         }
@@ -755,7 +781,7 @@
         this.formData.Currency = fdata.Currency
         }
         this.formData.ContactName = fdata.ContactName
-        
+
         if(fdata.CompanyType!=null && fdata.CompanyType!=""){
           this.formData.CompanyType = fdata.CompanyType
         }
@@ -1276,4 +1302,4 @@
     padding : 8px;
   }
 
-</style>
+</style>

+ 30 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -46,6 +46,7 @@
             年审申请</el-button>
           <el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
           </el-button>
+          <el-button type="primary" @click="toWord" title="下载" size="mini">下载</el-button>
           <router-link :to="'/oilsupplier/supplier/goodslist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回</el-button>
           </router-link>
@@ -326,6 +327,7 @@
   import WfMultiHistory from "@/components/workflow/wfmultihistory.vue";
   import WfBackHistory from "@/components/workflow/wfbackhistory.vue";
   import SupplierCertEdit from "@/components/oilsupplier/suppliercertedit.vue";
+  import dataapi from '@/api/oilsupplier/dataentry'
 
   import EquipmentList from "@/components/oilsupplier/equipmentlist";
   import PerformanceList from "@/components/oilsupplier/performancelist";
@@ -737,13 +739,13 @@
         this.formData.MgrUnit = fdata.MgrUnit
         if(fdata.InStyle!=null && fdata.InStyle!=""){
         this.formData.InStyle = fdata.InStyle
-        }      
+        }
         this.formData.OperType = fdata.OperType
         if(fdata.Country!=""){
             this.formData.Country = fdata.Country;
         }
         this.formData.MaunAgent = fdata.MaunAgent
-        this.formData.ConstructTeam = fdata.ConstructTeam 
+        this.formData.ConstructTeam = fdata.ConstructTeam
         if(fdata.CredentialFlag!=null&&fdata.CredentialFlag!=""){
           this.formData.CredentialFlag = fdata.CredentialFlag
         }
@@ -773,7 +775,7 @@
         if(fdata.Currency!=null && fdata.Currency!=""){
         this.formData.Currency = fdata.Currency
         }
-        this.formData.ContactName = fdata.ContactName 
+        this.formData.ContactName = fdata.ContactName
         if(fdata.CompanyType!=null && fdata.CompanyType!=""){
           this.formData.CompanyType = fdata.CompanyType
         }
@@ -819,7 +821,30 @@
             this.$refs['GoodsInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
           } */
       },
-
+      //导出到Word文件
+      toWord () {
+        let id = this.formData.Id
+        dataapi.docexport(id, this.$axios)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              let docurl = res.data.item
+              // 内网服务器专用
+              if (process.client && docurl.indexOf('upfile') === 0) {
+                const myDomain = window.location.host
+                location.href = 'http://' + myDomain + '/' + docurl
+              } else {
+                location.href = 'http://' + docurl
+              }
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+      },
       isCanUpdateSupplier(supplierId) {
         api
           .isCanUpdateSupplier(supplierId, this.$axios)
@@ -843,7 +868,7 @@
         this.$refs["winningList"].showDialog();
       },
 
-      initDatas() { 
+      initDatas() {
         if (this.formData.Id) {
            this.isCanUpdateSupplier(this.formData.Id);
           api

+ 31 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -41,6 +41,7 @@
             年审申请</el-button>
           <el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
           </el-button>
+          <el-button type="primary" @click="toWord" title="下载" size="mini">下载</el-button>
           <router-link :to="'/oilsupplier/supplier/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
@@ -319,6 +320,7 @@
   import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
   import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
+  import dataapi from '@/api/oilsupplier/dataentry'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
   import PerformanceList from '@/components/oilsupplier/performancelist'
@@ -676,6 +678,30 @@
           })
 
       },
+      //导出到Word文件
+      toWord () {
+        let id = this.formData.Id
+        dataapi.docexport(id, this.$axios)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              let docurl = res.data.item
+              // 内网服务器专用
+              if (process.client && docurl.indexOf('upfile') === 0) {
+                const myDomain = window.location.host
+                location.href = 'http://' + myDomain + '/' + docurl
+              } else {
+                location.href = 'http://' + docurl
+              }
+            }
+          }).catch(err => {
+            console.error(err)
+          })
+      },
       orgtreeChange(val) {
         this.userOptions = []
         let deptid = val[val.length - 1]
@@ -711,13 +737,13 @@
         this.formData.MgrUnit = fdata.MgrUnit
         if(fdata.InStyle!=null && fdata.InStyle!=""){
         this.formData.InStyle = fdata.InStyle
-        }      
+        }
         this.formData.OperType = fdata.OperType
         if(fdata.Country!=""){
             this.formData.Country = fdata.Country;
         }
         this.formData.MaunAgent = fdata.MaunAgent
-        this.formData.ConstructTeam = fdata.ConstructTeam 
+        this.formData.ConstructTeam = fdata.ConstructTeam
         if(fdata.CredentialFlag!=null&&fdata.CredentialFlag!=""){
           this.formData.CredentialFlag = fdata.CredentialFlag
         }
@@ -748,7 +774,7 @@
         this.formData.Currency = fdata.Currency
         }
         this.formData.ContactName = fdata.ContactName
-        
+
         if(fdata.CompanyType!=null && fdata.CompanyType!=""){
           this.formData.CompanyType = fdata.CompanyType
         }
@@ -780,7 +806,7 @@
         this.formData.Remark = fdata.Remark
         this.formData.TjinNotify = fdata.TjinNotify
         this.formData.Status = fdata.Status
-        
+
 
         this.$refs["TechInfo"].CityAry = []
         this.$refs["TechInfo"].CityAry.push(this.formData.Province)
@@ -817,7 +843,7 @@
       },
 
       initDatas() {
-       
+
         if (this.formData.Id) {
           this.isCanUpdateSupplier(this.formData.Id)
           api.getEntityAndCert(this.certId, this.$axios).then(res => {

+ 2 - 28
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/basislist.vue

@@ -37,8 +37,6 @@
             <router-link :to="'/oilsupplier/supplier/' + scope.row.Id + '/basisedit?certid=' + scope.row.CertId">
               <el-button type="text" title="打开" icon="el-icon-edit" size="mini">打开</el-button>
             </router-link>
-            <el-button type="text" @click="toWord(scope.row)" title="下载" size="mini" icon="el-icon-download" width="120px">下载</el-button>
-
             <el-popover placement="top" title="提示">
               <el-alert
                 title=""
@@ -457,9 +455,8 @@
   </div>
 </template>
 <script>
-  import { mapGetters } from 'vuex';
-  import api from '@/api/oilsupplier/supplier';
-  import dataapi from '@/api/oilsupplier/dataentry'
+  import { mapGetters } from 'vuex'
+  import api from '@/api/oilsupplier/supplier'
   import certApi from '@/api/oilsupplier/suppliercert'
 
   export default {
@@ -957,29 +954,6 @@
           console.error(err)
         })
       },
-      //导出到Word文件
-      toWord (val) {
-        dataapi.docexport(val.Id, this.$axios)
-          .then(res => {
-            // response
-            if (res.data.code === 0) {
-              this.$message({
-                type: 'success',
-                message: res.data.message
-              })
-              let docurl = res.data.item
-              // 内网服务器专用
-              if (process.client && docurl.indexOf('upfile') === 0) {
-                const myDomain = window.location.host
-                location.href = 'http://' + myDomain + '/' + docurl
-              } else {
-                location.href = 'http://' + docurl
-              }
-            }
-          }).catch(err => {
-          console.error(err)
-        })
-      },
       getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           //this.dictOptions.customerList = res.data.items['customerList']

+ 0 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/goodslist.vue

@@ -37,8 +37,6 @@
             <router-link :to="'/oilsupplier/supplier/' + scope.row.Id + '/goodsedit?certid=' + scope.row.CertId">
               <el-button type="text" title="打开"  icon="el-icon-edit" size="mini">打开</el-button>
             </router-link>
-            <el-button type="text" @click="toWord(scope.row)" title="下载" size="mini" icon="el-icon-download" width="120px">下载</el-button>
-
             <el-popover placement="top" title="提示">
               <el-alert
                 title=""
@@ -414,7 +412,6 @@
 <script>
   import { mapGetters } from 'vuex';
   import api from '@/api/oilsupplier/supplier';
-  import dataapi from '@/api/oilsupplier/dataentry'
   import certApi from '@/api/oilsupplier/suppliercert'
 
   export default {
@@ -911,29 +908,6 @@
           console.error(err)
         })
       },
-      //导出到Word文件
-      toWord (val) {
-        dataapi.docexport(val.Id, this.$axios)
-          .then(res => {
-            // response
-            if (res.data.code === 0) {
-              this.$message({
-                type: 'success',
-                message: res.data.message
-              })
-              let docurl = res.data.item
-              // 内网服务器专用
-              if (process.client && docurl.indexOf('upfile') === 0) {
-                const myDomain = window.location.host
-                location.href = 'http://' + myDomain + '/' + docurl
-              } else {
-                location.href = 'http://' + docurl
-              }
-            }
-          }).catch(err => {
-          console.error(err)
-        })
-      },
       getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           //this.dictOptions.customerList = res.data.items['customerList']

+ 12 - 29
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/index.vue

@@ -42,11 +42,9 @@
       <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" size="mini">
         <el-table-column label="操作" min-width="200px" align="center" fixed="right">
           <template slot-scope="scope">
-            <router-link :to="'/oilsupplier/supplier/' + scope.row.Id + '/goodsedit?certid=' + scope.row.CertId">
-              <el-button type="text" title="打开"  icon="el-icon-edit" size="mini">打开</el-button>
+            <router-link :to="'/oilsupplier/supplier/' + scope.row.Id + '/' + Type + '?certid=' + scope.row.CertId">
+              <el-button type="text" title="打开" @click="judge(scope.row.SupplierTypeName)" icon="el-icon-edit" size="mini">打开</el-button>
             </router-link>
-            <el-button type="text" @click="toWord(scope.row)" title="下载" size="mini" icon="el-icon-download" width="120px">下载</el-button>
-
             <el-popover placement="top" title="提示">
               <el-alert
                 title=""
@@ -467,7 +465,6 @@
 <script>
   import { mapGetters } from 'vuex'
   import api from '@/api/oilsupplier/supplier'
-  import dataapi from '@/api/oilsupplier/dataentry'
   import certApi from '@/api/oilsupplier/suppliercert'
 
   export default {
@@ -484,6 +481,7 @@
         dialogVisible: false,
         //列表数据
         entityList: [],
+        Type: '',
         //分页参数
         size: 10,
         currentPage: 1,
@@ -975,7 +973,15 @@
           console.error(err)
         })
       },
-
+      judge (val) {
+        if (val === '物资类') {
+          this.Type = 'goodsedit'
+        } else if (val === '技术服务类') {
+          this.Type = 'techedit'
+        } else {
+          this.Type = 'basisedit'
+        }
+      },
       searchCommand(command) {
         if (command == 'search') {
           this.dialogVisible = true
@@ -983,29 +989,6 @@
           this.clearSearch()
         }
       },
-      //导出到Word文件
-      toWord (val) {
-        dataapi.docexport(val.Id, this.$axios)
-          .then(res => {
-            // response
-            if (res.data.code === 0) {
-              this.$message({
-                type: 'success',
-                message: res.data.message
-              })
-              let docurl = res.data.item
-              // 内网服务器专用
-              if (process.client && docurl.indexOf('upfile') === 0) {
-                const myDomain = window.location.host
-                location.href = 'http://' + myDomain + '/' + docurl
-              } else {
-                location.href = 'http://' + docurl
-              }
-            }
-          }).catch(err => {
-          console.error(err)
-        })
-      },
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 0 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/techlist.vue

@@ -37,8 +37,6 @@
             <router-link :to="'/oilsupplier/supplier/' + scope.row.Id + '/techedit?certid=' + scope.row.CertId">
               <el-button type="text" title="打开" icon="el-icon-edit" size="mini">打开</el-button>
             </router-link>
-            <el-button type="text" @click="toWord(scope.row)" title="下载" size="mini" icon="el-icon-download" width="120px">下载</el-button>
-
             <el-popover placement="top" title="提示">
               <el-alert
                 title=""
@@ -459,7 +457,6 @@
 <script>
   import { mapGetters } from 'vuex';
   import api from '@/api/oilsupplier/supplier';
-  import dataapi from '@/api/oilsupplier/dataentry'
   import certApi from '@/api/oilsupplier/suppliercert'
 
   export default {
@@ -960,29 +957,6 @@
           console.error(err)
         })
       },
-      //导出到Word文件
-      toWord (val) {
-        dataapi.docexport(val.Id, this.$axios)
-          .then(res => {
-            // response
-            if (res.data.code === 0) {
-              this.$message({
-                type: 'success',
-                message: res.data.message
-              })
-              let docurl = res.data.item
-              // 内网服务器专用
-              if (process.client && docurl.indexOf('upfile') === 0) {
-                const myDomain = window.location.host
-                location.href = 'http://' + myDomain + '/' + docurl
-              } else {
-                location.href = 'http://' + docurl
-              }
-            }
-          }).catch(err => {
-          console.error(err)
-        })
-      },
       getDictOptions () {
         api.getDictList(this.$axios).then(res => {
           //this.dictOptions.customerList = res.data.items['customerList']