Procházet zdrojové kódy

准入范围下载

lining před 6 roky
rodič
revize
a66f9b19af

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -120,7 +120,7 @@ func (this *OilSupplierCertSubController) GetEntityList() {
 			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
 		}
 	}
-	where = where + " and Type = '1'"
+	where = where + " and Type in (1, 3)"
 	svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
 	var list []suppliercertsub.OilSupplierCertSub
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)

+ 4 - 4
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -168,11 +168,11 @@ module.exports = {
     'pages/oilsupplier/goodsaptitude/*.*',
     'pages/oilsupplier/infochange/*.*',
     'pages/oilsupplier/infochangech/*.*',
-    'pages/oilsupplier/supplier/*.*',
+    // 'pages/oilsupplier/supplier/*.*',
     'pages/oilsupplier/supplierappend/*.*',
     // 'pages/oilsupplier/supplieraudit/*.*',
-    'pages/oilsupplier/suppliercert/*.*',
-    'pages/oilsupplier/supplierfile/*.*',
+    // 'pages/oilsupplier/suppliercert/*.*',
+    // 'pages/oilsupplier/supplierfile/*.*',
 
     'pages/oilsupplier/suppliernopass/*.*',
     'pages/oilsupplier/supplierps/*.*',
@@ -182,7 +182,7 @@ module.exports = {
     'pages/oilsupplier/technologyservice/*.*',
     'pages/system/*/*.*',
     'pages/setting/*/*.*',
-    'pages/select/*/*.*',
+    // 'pages/select/*/*.*',
     'pages/report/*/*.*',
     'pages/oilbank/*/*.*',
     'pages/log/*/*.*',

+ 112 - 11
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -74,8 +74,8 @@
         <el-table-column label="操作" width="200px" align="center" fixed="right" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-button type="text" @click="toWord(scope.row)" title="下载" size="mini" icon="el-icon-download" width="120px">表单下载</el-button>
-            <el-button type="text" @click="toPdf(scope.row)" title="导出" size="mini" icon="el-icon-document" width="120px">准入范围</el-button>
-
+            <!--<el-button type="text" @click="toPdf(scope.row)" title="导出" size="mini" icon="el-icon-document" width="120px">准入范围</el-button>-->
+            <el-button type="text" @click="opencertsub(scope.row)" title="导出" size="mini" icon="el-icon-document" width="120px">准入范围</el-button>
           </template>
         </el-table-column>
         <!--内框表格剩余栏显示-->
@@ -674,6 +674,51 @@
         <el-button size="mini" type="primary" @click="initDatas($event)">查 询</el-button>
       </span>
     </el-dialog>
+    <el-dialog :visible.sync="dialogVisibleCertsSub" width="80%">
+      <el-card class="box-card">
+            <div slot="header" class="clearfix">
+              <span style="font-weight: bold">准入范围</span>
+              <span style="float: right;">
+                <el-form ref="form" :inline="true" style="margin-top: -10px">
+                  <el-form-item label="编码">
+                    <el-input size="mini" v-model="searchFormSub.Code" style="width: 100%"></el-input>
+                  </el-form-item>
+                  <el-form-item label="名称">
+                    <el-input size="mini" v-model="searchFormSub.Name" style="width: 100%"></el-input>
+                  </el-form-item>
+                  <el-form-item>
+                    <el-button type="primary" size="mini" style="margin-left: 8px" @click="search">查询</el-button>
+                    <el-button type="primary" @click="toPdf" size="mini" style="margin-left: 25px">下载准入范围</el-button>
+                  </el-form-item>
+                </el-form>
+              </span>
+            </div>
+            <el-table :data="certsubList" border size="mini">
+              <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+              <el-table-column label="状态"
+                               align="center"
+                               width="100px">
+                <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+                  <span v-else-if="scope.row.CertSubStatus=='2'"
+                        style="color:#E6A23C">暂停</span>
+                  <span v-else>——</span>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination
+              @size-change="handleSizeChangeSub"
+              @current-change="handleCurrentChangeSub"
+              :current-page="currentPageSub"
+              :page-sizes="[10, 50, 100, 200, 400]"
+              :page-size="sizeSub"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="currentItemCountSub"
+            ></el-pagination>
+          </el-card>
+    </el-dialog>
   </div>
 </template>
 
@@ -687,7 +732,7 @@ import FileSaver from 'file-saver'
 import XLSX from 'xlsx'
 import oapi from '@/api/oilsupplier/supplier'
 import dataapi from '@/api/oilsupplier/dataentry'
-import watermark from '@/assets/js/watermark'
+
 export default {
   created () {
     Object.assign(this.searchFormReset, this.searchForm)
@@ -699,6 +744,12 @@ export default {
   },
   data () {
     return {
+      Id: '',
+      SupplierCertId: '',
+      SupplierTypeCode: '',
+      SupplierName: '',
+      activeName: 'first',
+      dialogVisibleCertsSub: false,
       HSEOptions: [
         {
           value: '',
@@ -769,6 +820,10 @@ export default {
       // 定义列表数据
       entityList: [],
       // 分页参数
+      sizeSub: 10,
+      currentPageSub: 1,
+      currentItemCountSub: 0,
+      // 分页参数
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
@@ -800,16 +855,53 @@ export default {
         NeedFileType: '',
         CerSubName: ''
       },
+      searchFormSub: {
+        Code: '',
+        Name: ''
+      },
       // 列表排序
       Column: {
         Order: '',
         Prop: ''
       },
-      countryoptions: []
+      countryoptions: [],
+
+      certsubList: []
     }
   },
 
   methods: {
+    search () {
+      this.getCertSub()
+    },
+    opencertsub (row) {
+      this.dialogVisibleCertsSub = true
+      this.Id = row.Id
+      this.SupplierCertId = row.CertId
+      this.SupplierTypeCode = row.SupplierTypeCode
+      this.SupplierName = row.SupplierName
+      this.getCertSub(row)
+    },
+    getCertSub (row) {
+      let _this = this
+      const params = {
+        SupplierCertId: this.SupplierCertId,
+        SupplierTypeCode: this.SupplierTypeCode,
+        _currentPage: this.currentPageSub,
+        _size: this.sizeSub
+      }
+      Object.assign(params, this.searchFormSub)
+      this.$axios.get('suppliercertsub/list', {
+        params
+      })
+        .then(res => {
+          _this.certsubList = res.data.items
+          _this.currentItemCountSub = res.data.currentItemCount
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
     transferStr (val) {
       if (val === '01') {
         return '物资类'
@@ -882,7 +974,6 @@ export default {
     },
     // 导出到Word文件
     toWord (val) {
-      console.log(val)
       let params = {
         CertId: val.CertId
       }
@@ -908,8 +999,8 @@ export default {
         })
     },
     // 导出准入范围到pdf
-    toPdf (val) {
-      dataapi.pdfexport(val.Id, val.SupplierTypeCode, this.$axios)
+    toPdf () {
+      dataapi.pdfexport(this.Id, this.SupplierTypeCode, this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {
@@ -926,7 +1017,7 @@ export default {
               pdfurl = 'http://' + process.env.LOCAL_IP + '/' + docurl
               let requestParams = {
                 pdfUrl: pdfurl,
-                watermark: val.SupplierName
+                watermark: this.SupplierName
               }
               this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
                 .then(function (res) {
@@ -937,7 +1028,7 @@ export default {
               pdfurl = 'http://' + docurl
               let requestParams = {
                 pdfUrl: pdfurl,
-                watermark: val.SupplierName
+                watermark: this.SupplierName
               }
               this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
                 .then(function (res) {
@@ -951,9 +1042,9 @@ export default {
     },
     // 列表排序功能
     orderby (column) {
-      if (column.order == 'ascending') {
+      if (column.order === 'ascending') {
         this.Column.Order = 'asc'
-      } else if (column.order == 'descending') {
+      } else if (column.order === 'descending') {
         this.Column.Order = 'desc'
       }
       this.Column.Prop = column.prop
@@ -997,6 +1088,16 @@ export default {
         })
     },
     // 分页方法
+    handleCurrentChangeSub (value) {
+      this.currentPageSub = value
+      this.getCertSub()
+    },
+    handleSizeChangeSub (value) {
+      this.sizeSub = value
+      this.currentPageSub = 1
+      this.getCertSub()
+    },
+    // 分页方法
     handleCurrentChange (value) {
       this.currentPage = value
       this.initDatas()