Browse Source

特殊业务供方查询

Kevin 6 năm trước cách đây
mục cha
commit
9039b0e4fa

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/selectbusiness/selectservice.go

@@ -41,6 +41,7 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
 	sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.InFlag,a.ContactName,a.CommercialNo, `
 	sql += `a.DepositBank,a.HseTraining,a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street, `
 	sql += `a.LinkAddress,a.LinkProvince,a.LinkCity,a.LinkStreet,a.BusinessScope, `
+	sql += `b.InStyle,`
 	sql += `group_concat(distinct d.Name) CerSubName,group_concat(distinct d.NeedFileType) NeedFileType `
 	sql += `from ` + supplierTableName + ` a `
 	sql += `left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id `

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -158,6 +158,7 @@ type OilSupplierSelect struct {
 	BusinessScope    string    //营业范围
 	NeedFileType     string    //资质
 	CerSubName       string    //准入范围
+	InStyle		  	 string		//准入方式
 }
 
 //type NeedFileTypeStruct struct {

+ 13 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/select.go

@@ -7,6 +7,8 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	"dashoo.cn/backend/api/business/register"
 	"encoding/json"
+	"fmt"
+
 	// "fmt"
 
 	"dashoo.cn/backend/api/business/oilsupplier/selectbusiness"
@@ -154,6 +156,17 @@ func (this *SelectController) GetTList() {
 		where = where + " and a.BusinessScope like '%" + model.BusinessScope + "%'"
 	}
 
+	a := model.InStyle
+	fmt.Println(a)
+	//准入方式
+	if model.InStyle != "" {
+		if model.InStyle == "0"{
+			where = where + " and b.InStyle in ('2','3','4','5')"
+		}else{
+			where = where + " and b.InStyle ='" + model.InStyle + "'"
+		}
+	}
+
 	//包含资质
 	//if model2.NeedFileType != nil && len(model2.NeedFileType) > 0 {
 	//	pararm := ""

BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1559638172.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1559643493.docx


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

@@ -17,7 +17,7 @@
       </div>
     </no-ssr>-->
 
-    <el-card class="box-card mycard">
+    <el-card class="box-card">
       <div slot="header">
         <span>
           <i class="icon icon-table2"></i> 信息
@@ -65,7 +65,7 @@
 
       <el-tabs tab-position="top" v-model="activeName" style="margin-top: -10px">
         <el-tab-pane label="企业信息">
-          <el-card class="box-card mycard">
+          <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span>供方基本信息表</span>
               <span style="float: right;">
@@ -1477,5 +1477,5 @@
 <style>
   .mycard .el-card__header {
     padding : 8px;
-  }
+  } 
 </style>

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

@@ -17,7 +17,7 @@
       </div>
     </no-ssr>-->
 
-    <el-card class="box-card mycard">
+    <el-card class="box-card">
       <div slot="header">
         <span>
           <i class="icon icon-table2"></i> 信息
@@ -61,7 +61,7 @@
 
       <el-tabs tab-position="top" v-model="activeName" style="margin-top: -10px">
         <el-tab-pane label="企业信息">
-          <el-card class="box-card mycard">
+          <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span>供方基本信息表</span>
               <span style="float: right;">

+ 460 - 0
src/dashoo.cn/frontend_web/src/pages/select/specialselect/index.vue

@@ -0,0 +1,460 @@
+<template>
+  <div>
+    <!--顶部显示-->
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item>特殊业务供方情况查询</el-breadcrumb-item>
+    </el-breadcrumb>
+
+    <!--内框顶部显示-->
+    <el-card class="box-card" style="height: calc(100vh - 115px);position:relative">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 特殊业务供方情况查询
+        </span>
+
+        <el-form
+          :model="searchForm"
+          ref="searchformRef"
+          :inline="true"
+          style="float: right;position:absolute;right:15px;top:10.5px"
+        >
+          <el-form-item label="准入方式">                     
+            <el-select
+              size="mini"
+              style="width:150px"
+              v-model="searchForm.InStyle"
+            >
+              <el-option label="全部" value='0'></el-option>
+              <el-option label="一级物资准入" value='2'></el-option>
+              <el-option label="二级物资准入" value='3'></el-option>
+              <el-option label="战略合作准入" value='4'></el-option>
+              <el-option label="内部多元准入" value='5'></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="企业名称">
+            <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入内容"></el-input>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-dropdown
+              split-button
+              type="primary"
+              size="mini"
+              @click="initDatas($event)"
+              @command="searchCommand"
+            >
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" @click="exportExcel">导出</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!--内框表格显示-->
+      <el-table
+        id="rebateSetTable"
+        :data="entityList"
+        size="mini"
+        border
+        height="calc(100vh - 243px)"
+        style="width: 100%"
+        @sort-change="orderby"
+      >
+        <el-table-column label="操作" min-width="200px" align="center" fixed="right">
+          <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>
+
+          </template>
+        </el-table-column>
+        <!--内框表格剩余栏显示-->
+        <el-table-column label="企业名称" width="280px" prop="SupplierName" sortable align="center"></el-table-column>
+        <el-table-column label="准入方式" prop="InStyle" align="center">
+          <template slot-scope="scope">
+              {{transferInStyle(scope.row.InStyle)}}
+          </template>
+        </el-table-column>
+        <el-table-column label="合作范围" width="500px" prop="SupplierName" sortable align="center"></el-table-column>
+        <el-table-column label="有效期至" width="100px" prop="ApplyTime" align="center">
+          <template slot-scope="scope">{{ jstimehandle(scope.row.ApplyTime) }}</template>
+        </el-table-column>
+      </el-table>
+
+
+      <!-- 分页 -->
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[10, 15, 20, 25]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount"
+      ></el-pagination>
+    </el-card>
+
+
+  </div>
+</template>
+
+
+
+
+
+<script>
+import api from '@/api/oilsupplier/select'
+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)
+    // 执行初始化方法
+    this.getDictOptions()
+    this.initDatas()
+    this.initNftOptions()
+    //watermark.set("大港油田企业法规处")
+  },
+  data () {
+    return {
+      HSEOptions: [
+        {
+          value: '',
+          label: '全部'
+        },
+        {
+          value: '1',
+          label: '是'
+        },
+        {
+          value: '0',
+          label: '否'
+        }
+      ],
+      nftOptions: [],
+      CityAry: [],
+      LinkCityAry: [],
+      countryprops: {
+        value: 'adcode',
+        label: 'name',
+        children: 'districts'
+      },
+      CompanyTypeOptions: [],
+      dictData: null,
+      searchFormReset: {},
+      dialogVisible: false,
+      formData: {
+        SupplierName: '',
+        AccessCardNo: '',
+        SpecTypeCode: '',
+        Country: '',
+        InStyle: '',
+        ManagementUnit: '',
+        CredentialFlag: '',
+        CommercialNo: '',
+        CountryTaxNo: '',
+        OrganCode: '',
+        Address: '',
+        ZipCode: '',
+        LinkAddress: '',
+        LinkZipCode: '',
+        LegalPerson: '',
+        CompanyType: '',
+        RegCapital: '',
+        SetupTime: '',
+        DepositBank: '',
+        BankAccount: '',
+        ContactName: '',
+        Mobile: '',
+        Telphone: '',
+        Fax: '',
+        CompanyTel: '',
+        EMail: '',
+        BankCreditRating: '',
+        Level: '',
+        HseTraining: '',
+        QualitySystemCert: '',
+        ProductQualityCert: '',
+        MaunLicense: '',
+        AgentManufacturer: '',
+        SupplierCertificate: '',
+        SafetyLicense: '',
+        SpecIndustryCert: '',
+        BusinessScope: '',
+        Remark: ''
+      },
+      show: false,
+      // 定义列表数据
+      entityList: [],
+      // 分页参数
+      size: 10,
+      currentPage: 1,
+      currentItemCount: 0,
+      SetupTime: '', // 成立时间
+      searchForm: {
+        AccessCardNo: '',
+        SupplierName: '',
+        SupplierTypeCode: '',
+        InFlag: '',
+        InStyle: '0',
+        LegalPerson: '',
+        ContactName: '',
+        CommercialNo: '',
+        RegCapital1: '',
+        RegCapital2: '',
+        CompanyType: '',
+        Province: '',
+        City: '',
+        Street: '',
+        Address: '',
+        LinkProvince: '',
+        LinkCity: '',
+        LinkStreet: '',
+        LinkAddress: '',
+        DepositBank: '',
+        BusinessScope: '',
+        OldSupplierName: '',
+        HseTraining: '',
+        NeedFileType: '',
+        CerSubName: ''
+      },
+      // 列表排序
+      Column: {
+        Order: '',
+        Prop: ''
+      },
+      countryoptions: []
+    }
+  },
+
+  methods: {
+    transferInStyle (val) {
+      switch (val) {
+        case '2':
+          return '一级物资备案准入'
+        case '3':
+          return '二级物资备案准入'
+        case '4':
+          return '战略合作准入'
+        case '5':
+          return '内部多元准入'
+      }
+    },
+    initNftOptions () {
+      api
+        .getNFTOptions(this.$axios)
+        .then(res => {
+          this.nftOptions = res.data.items
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
+    handleLinkAreaChange (value) {
+      this.searchForm.LinkProvince = value[0]
+      this.searchForm.LinkCity = value[1]
+      this.searchForm.LinkStreet = value[2]
+    },
+    handleAreaChange (value) {
+      this.searchForm.Province = value[0]
+      this.searchForm.City = value[1]
+      this.searchForm.Street = value[2]
+    },
+    getDictOptions () {
+      oapi
+        .getDictList(this.$axios)
+        .then(res => {
+          this.dictData = res.data.items
+          this.CompanyTypeOptions = this.dictData['CompanyType']
+          this.getCityList(this.dictData['GaodeMapChinaAreas'])
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
+    getCityList (val) {
+      let resultData = JSON.parse(val)
+      let countstr = JSON.stringify(resultData.districts[0].districts)
+      countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+      this.countryoptions = JSON.parse(countstr)
+    },
+    exportExcel () {
+      /* generate workbook object from table */
+      let wb = XLSX.utils.table_to_book(
+        document.querySelector('#rebateSetTable')
+      )
+      /* get binary string as output */
+      let wbout = XLSX.write(wb, {
+        bookType: 'xlsx',
+        bookSST: true,
+        type: 'array'
+      })
+      try {
+        FileSaver.saveAs(
+          new Blob([wbout], { type: 'application/octet-stream' }),
+          'SupplierSituation.xlsx'
+        )
+      } catch (e) {
+        if (typeof console !== 'undefined') console.log(e, wbout)
+      }
+      return wbout
+    },
+    //导出到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)
+        })
+    },
+    //导出准入范围到pdf
+    toPdf (val) {
+      dataapi.pdfexport(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
+            let pdfurl
+            // 内网服务器专用
+            if (process.client && docurl.indexOf('upfile') === 0) {
+              const myDomain = window.location.host
+              // location.href = 'http://' + myDomain + '/' + docurl
+              pdfurl = 'http://' + myDomain + '/' + docurl
+              let requestParams = {
+                pdfUrl: pdfurl,
+                watermark: val.SupplierName
+              }
+              this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
+                .then(function (res) {
+                  console.log('????????????????:', res.data)
+                  window.open('http://' + myDomain + '/' + res.data)
+                })
+            } else {
+              // location.href = 'http://' + docurl
+              pdfurl = 'http://' + docurl
+              let requestParams = {
+                pdfUrl: pdfurl,
+                watermark: val.SupplierName
+              }
+              this.$axios.post('supplierdataentry/word-to-pdf-watermark', requestParams)
+                .then(function (res) {
+                  window.open('http://' + res.data)
+                })
+            }
+          }
+        }).catch(err => {
+        console.error(err)
+      })
+    },
+    // 列表排序功能
+    orderby (column) {
+      if (column.order == 'ascending') {
+        this.Column.Order = 'asc'
+      } else if (column.order == 'descending') {
+        this.Column.Order = 'desc'
+      }
+      this.Column.Prop = column.prop
+      this.initDatas()
+    },
+    jstimehandle (val) {
+      if (val === '') {
+        return '----'
+      } else if (val === '0001-01-01T08:00:00+08:00') {
+        return '----'
+      } else if (val === '0001-01-01T00:00:00Z') {
+        return '----'
+      } else if (val === '5000-01-01T23:59:59+08:00') {
+        return '永久'
+      } else {
+        val = val.replace('T', ' ')
+        return val.substring(0, 10)
+      }
+    },
+    // 初始化列表方法
+    initDatas (event) {
+      if (event != null) {
+        this.currentPage = 1
+        this.dialogVisible = false
+      }
+      let params = {
+        _size: this.size,
+        _currentPage: this.currentPage,
+        Order: this.Column.Order,
+        Prop: this.Column.Prop,
+        SetupTime: this.SetupTime
+      }
+      api
+        .getCompanyList(params, this.searchForm, this.$axios)
+        .then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
+    // 分页方法
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initDatas()
+    },
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initDatas()
+    },
+    searchCommand (command) {
+      if (command == 'clear') {
+        this.clearSearch()
+      }
+    },
+    clearSearch () {
+      Object.assign(this.searchForm, this.searchFormReset)
+      this.CityAry = []
+      this.SetupTime = '';
+      (this.LinkCityAry = []), (this.currentPage = 1)
+      this.initDatas()
+    }
+  }
+}
+</script>
+
+<style>
+.eldialog .el-input__inner {
+  border: none;
+}
+.eldialog .el-textarea__inner {
+  border: none;
+  resize: none;
+  height: 70px;
+}
+</style>
+