Browse Source

添加 tab 页 公司曾用名

wlin1 5 years ago
parent
commit
552d99ad13

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist.vue

@@ -53,8 +53,8 @@
           <template slot="header" slot-scope="scope">
           <!-- <el-input v-model="search" size="mini" placeholder="输入关键字搜索"/> -->
             <el-button-group>
-            <el-button type="primary" size="small" @click="setManufacturer(2)">设置制造商</el-button>
-            <el-button type="primary" size="small" @click="setManufacturer(1)">设置非制造商<i class="el-icon--right"></i></el-button>
+            <el-button type="primary" size="small" @click="setManufacturer(2)">制造商</el-button>
+            <el-button type="primary" size="small" @click="setManufacturer(1)">非制造商<i class="el-icon--right"></i></el-button>
             </el-button-group>
           </template>
 

+ 2 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist2.vue

@@ -53,8 +53,8 @@
           <template slot="header" slot-scope="scope">
             <!-- <el-input v-model="search" size="mini" placeholder="输入关键字搜索"/> -->
             <el-button-group>
-              <el-button type="primary" size="small" @click="setManufacturer(2)">设置制造商</el-button>
-              <el-button type="primary" size="small" @click="setManufacturer(1)">设置非制造商<i class="el-icon--right"></i></el-button>
+              <el-button type="plain"  size="small" @click="setManufacturer(2)">制造商</el-button>
+              <el-button type="plain"  size="small" @click="setManufacturer(1)">非制造商<i class="el-icon--right"></i></el-button>
             </el-button-group>
           </template>
 

+ 184 - 0
src/dashoo.cn/frontend_web/src/components/usednameselect/index.vue

@@ -0,0 +1,184 @@
+<template>
+  <div>
+    <!--内框顶部显示-->
+    <el-card class="box-card" style="height: calc(100vh - 115px);position:relative">
+      <div slot="header">
+      </div>
+
+      <!--内框表格显示-->
+      <el-table id="rebateSetTable" size="mini" :data="entityList" border height="calc(100vh - 243px)"
+        style="width: 100%" @sort-change="orderby">
+        <!--内框表格剩余栏显示-->
+        <el-table-column label="企业名称" prop="SupplierName" sortable align="center"></el-table-column>
+        <el-table-column label="曾用名" prop="OldSupplierName" align="center"></el-table-column>
+      </el-table>
+      </el-card>
+  </div>
+</template>
+
+
+<script>
+  import api from "@/api/oilsupplier/usednameselect";
+  import FileSaver from "file-saver";
+  import XLSX from "xlsx";
+  export default {
+
+    name:'usednameselectIndex',
+     props: {
+      formData: {
+        type: Object,
+        default: {}
+      },
+
+     },
+    created() {
+      console.log(123,this.formData.SupplierName)
+      // 执行初始化方法
+     this.initDatas()
+      // this.initDatas()
+    },
+    data () {
+      return {
+        // 定义列表数据
+        entityList: [],
+        CreateOn: [],
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        searchForm: {
+          SupplierName: '',
+          CreateOn: ''
+        },
+        // 列表排序
+        Column: {
+          Order: "",
+          Prop: ""
+        }
+      }
+    },
+
+    methods: {
+      // 初始化列表方法
+      initDatas () {
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn != null && this.CreateOn.length === 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+
+        this.searchForm.CreateOn = myCreateOn.join(',')
+
+        // if (event != null) {
+        //   console.log(666666666,event)
+          this.currentPage = 1
+        // }
+        let params = {  
+          _size: this.size,
+          _currentPage: this.currentPage,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          SupplierName:this.formData.SupplierName,
+
+        }
+        // 查询条件
+        // Object.assign(params, this.searchForm)
+        api.getNameList(params, this.$axios)
+          .then(res => {
+            console.log(res.data.items)
+            this.entityList = res.data.items
+            this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      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"
+            }),
+            "SupplierUsedName.xlsx"
+          );
+        } catch (e) {
+          if (typeof console !== "undefined") console.log(e, wbout);
+        }
+        return wbout;
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      },
+      // 列表排序功能
+      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();
+      },
+
+      // 分页方法
+      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 () {
+        this.searchForm.SupplierName = ''
+        this.CreateOn = []
+        this.currentPage = 1
+        this.initDatas()
+      }
+    }
+  }
+</script>
+
+<style>
+  .eldialog .el-input__inner {
+    border: none;
+  }
+
+  .eldialog .el-textarea__inner {
+    border: none;
+    resize: none;
+    height: 70px;
+  }
+
+</style>

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

@@ -332,6 +332,29 @@
                               :entryinfo="entrydetail"></wf-multi-history>
           </el-card>
         </el-tab-pane>
+
+        <el-tab-pane label="企业曾用名"
+                     v-if="formDataCert.Status != 0">
+          <el-card class="box-card mycard">
+            <div slot="header"
+                 class="clearfix">
+              <span>企业曾用名</span>
+            </div>
+             <usednameselect-index ref="usednameselectIndex"
+                              :formData.sync="formData"
+                              :entryinfo="entrydetail"></usednameselect-index>
+            <!-- <usedname-list ref="usednameselectIndex"
+               :data.sync="usednameselectIndex"
+                     @close="getbuslist" 
+                     :canadd="add_flat"
+                     :candelete="delete_flat"
+                     height="360px"
+                     style="margin-top: 20px"
+            >
+              
+            </usedname-list> -->
+          </el-card>
+        </el-tab-pane>
         <!--<el-tab-pane label="审批历史" v-if="this.formData.AuditIndex > 0 ">-->
         <!--<el-card class="box-card" style="margin-top: 20px">-->
         <!--<div slot="header" class="clearfix">-->
@@ -535,6 +558,7 @@ import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
 import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
 import FloatImgBtn from '@/components/floatButton/index'
 
+import usednameselectIndex from '@/components/usednameselect/index'
 export default {
 
   components: {
@@ -552,7 +576,8 @@ export default {
     SubfileList, // 选择企业资质
     TechInfo,
 
-    ChooseAuditor
+    ChooseAuditor,
+    usednameselectIndex
   },
   computed: {
     ...mapGetters({
@@ -1197,6 +1222,8 @@ export default {
           this.$refs['techList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId, this
             .formDataCert.InStyle)
+
+          this.$refs['usednameselectIndex'].getvalue()
           if (this.formData.InStyle == '2' || this.formData.InStyle == '6' || this.formData.InStyle == '4') {
             this.allowpre = false
           }

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

@@ -1712,7 +1712,7 @@ export default {
         return val
       }
     },
-    openCompanyInfo (row) {
+    openCompanyInfo (row) {      
       if (!row.CertId) {
         this.$message({
           type: 'warning',