Browse Source

前后:供方信息查询加不良行为tab页

dubch 4 years ago
parent
commit
372b9a21d1

+ 2 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/badrecord.go

@@ -466,8 +466,8 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
 	sqlAdd:=""
 	cwhere := ""
 	if certName!=""{
-		sqlAdd="and (a.Name like '%"+certName+"%' or a.Code like '%"+certName+"%')"
-		cwhere="and (Name like '%"+certName+"%' or Code like '%"+certName+"%')"
+		sqlAdd="and (a.Name like '%"+certName+"%' or a.Code like '"+certName+"%')"
+		cwhere="and (Name like '%"+certName+"%' or Code like '"+certName+"%')"
 	}
 	if certSubStatus!=""{
 		sqlAdd= sqlAdd + " and (a.CertSubStatus = '"+certSubStatus+"')"

+ 261 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/badrecord.vue

@@ -0,0 +1,261 @@
+<template>
+  <div>
+    <el-tabs type="border-card" v-model="activeName2">
+      <el-tab-pane label="企业" name="first">
+        <el-card class="box-card1" shadow="never">
+          <el-table size="mini" :data="wzList" border height="300px">
+            <el-table-column label="序号" align="center" width="70">
+              <template slot-scope="scope">
+                <span>{{scope.$index+(wzCurrentPage - 1) * wzSize + 1}} </span>
+              </template>
+            </el-table-column>
+            <el-table-column width="150" property="CreateOn" label="操作时间" align="center">
+              <template slot-scope="scope">
+                {{ jstimehandle(scope.row.Createon+'') }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="CertSubStatus" label="状态" width="100px" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span style="color: #67C23A" v-if="scope.row.CertSubStatus=='1'">准入</span>
+                <span style="color: #E6A23C" v-else-if="scope.row.CertSubStatus=='2'">暂停</span>
+                <span style="color: #F56C6C" v-else-if="scope.row.CertSubStatus=='3'">取消</span>
+                <span v-else>——</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="BackReason"
+                             label="原因"
+                             align="center"
+                             show-overflow-tooltip></el-table-column>
+          </el-table>
+          <el-pagination @size-change="handleWZSizeChange"
+                         @current-change="handleWZCurrentChange"
+                         :current-page="wzCurrentPage"
+                         :page-sizes="[10, 15, 20, 25]"
+                         :page-size="wzSize"
+                         layout="total, sizes, prev, pager, next, jumper"
+                         :total="wzCurrentItemCount"></el-pagination>
+        </el-card>
+      </el-tab-pane>
+      <el-tab-pane label="准入范围" name="second">
+        <div style="width:100%;height:50px;margin-top:-15px">
+          <el-form :inline="true" style="float:right">
+            <el-form-item label="准入范围/编码">
+              <el-input size="mini" style="width: 165px;" v-model="certChooseName" clearable placeholder="请输入准入范围/编码"></el-input>
+            </el-form-item>
+            <el-form-item label="状态">
+              <el-select size="mini" style="width:100px" v-model="CertSubStatus" placeholder="请选择" clearable >
+                <el-option label="准入" value="1"></el-option>
+                <el-option label="暂停" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-button type="primary" style="float:right;margin-top:6.5px" size="mini" @click="serachGoodsCertByCompany($event)">查询</el-button>
+          </el-form>
+        </div>
+        <el-table size="mini" :data="goodsList1" border height="300px" v-loading="goodsLoading">
+          <el-table-column label="序号" align="center" width="70">
+            <template slot-scope="scope">
+              <span>{{scope.$index+(currentGoodsPage - 1) * goodsSize + 1}} </span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="Code"
+                           label="编码"
+                           width="120px"
+                           align="center"
+                           show-overflow-tooltip></el-table-column>
+          <el-table-column prop="Name"
+                           label="名称"
+                           width="300px"
+                           align="center"
+                           show-overflow-tooltip></el-table-column>
+          <el-table-column prop="CertSubStatus"
+                           label="状态"
+                           align="center"
+                           width="100px"
+                           show-overflow-tooltip>
+            <template slot-scope="scope">
+                    <span v-if="scope.row.CertSubStatus=='1'"
+                          style="color:#67C23A">准入</span>
+              <span v-else-if="scope.row.CertSubStatus>'1'"
+                    style="color:#E6A23C">暂停</span>
+              <span v-else>——</span>
+            </template>
+          </el-table-column>
+          <el-table-column width="150" prop="badCreateOn" label="操作时间" align="center">
+            <template slot-scope="scope">
+              {{ jstimehandle(scope.row.badCreateOn+'') }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="BackReason"
+                           label="原因"
+                           align="center"
+                           show-overflow-tooltip>
+          </el-table-column>
+          <el-table-column label=""
+                           align="center"
+                           width="160px"
+                           show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-button type="plain" plain size="mini" @click="showBackReasonList(scope.row)">查看历史状态</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination @size-change="handleGoodsSizeChange"
+                       @current-change="handleGoodsCurrentChange"
+                       :current-page="currentGoodsPage"
+                       :page-sizes="[10, 15, 20, 25]"
+                       :page-size="goodsSize"
+                       layout="total, sizes, prev, pager, next, jumper"
+                       :total="currentGoodsItemCount"></el-pagination>
+      </el-tab-pane>
+    </el-tabs>
+    <el-dialog title="准入变化历史" stripe :visible.sync="showBackReason" width="800px">
+      <el-table :data="backReasonList">
+        <el-table-column label="序号" align="center" width="70" type="index"></el-table-column>
+        <el-table-column width="80" property="CertSubStatus" label="状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+            <span v-else-if="scope.row.CertSubStatus>'1'"
+                  style="color:#E6A23C">暂停</span>
+            <span v-else>——</span>
+          </template>
+        </el-table-column>
+        <el-table-column width="150" property="CreateOn" label="操作时间">
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.CreateOn+'') }}
+          </template>
+        </el-table-column>
+        <el-table-column mini-width="120" property="BackReason" label="原因"></el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+
+<script>
+  import setapi from '@/api/oilsupplier/oilclassorgset'
+  import backReasonApi from '@/api/oilsupplier/supplierpausereason'
+
+  export default {
+    name: 'usednameselectIndex',
+    created () {
+    },
+    data () {
+      return {
+        activeName2: 'first',
+        wzList: [],
+        goodsList1: [],
+        backReasonList: [],
+        showBackReason: false,
+        wzSize: 10,
+        wzCurrentPage: 1,
+        wzCurrentItemCount: 0,
+        goodsLoading: false,
+        size: 10,
+        goodsSize: 10,
+        currentPage: 1,
+        currentGoodsPage: 1,
+        currentItemCount: 0,
+        currentGoodsItemCount: 0,
+        certChooseName: '',
+        CertSubStatus: '',
+        supplierId: '',
+        supplierTypeCode: '',
+      }
+    },
+
+    methods: {
+      getValue (supplierId, supplierTypeCode) {
+        this.supplierId = supplierId
+        this.supplierTypeCode = supplierTypeCode
+        this.getWZBadList()
+        this.serachGoodsCertByCompany()
+      },
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+      getWZBadList () {
+        let params = {
+          _size: this.wzSize,
+          _currentPage: this.wzCurrentPage,
+          companyId: this.supplierId,
+          companyType: this.supplierTypeCode
+        }
+        setapi.getBadList(params, this.$axios).then(res => {
+          this.wzList = res.data.items
+          this.wzCurrentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      handleWZSizeChange (value) {
+        this.wzSize = value
+        this.wzCurrentPage = 1
+        this.getWZBadList()
+      },
+      handleWZCurrentChange (value) {
+        this.wzCurrentPage = value
+        this.getWZBadList()
+      },
+      handleGoodsSizeChange (value) {
+        this.goodsSize = value
+        this.currentGoodsPage = 1
+        this.serachGoodsCertByCompany()
+      },
+      handleGoodsCurrentChange (value) {
+        this.currentGoodsPage = value
+        this.serachGoodsCertByCompany()
+      },
+      serachGoodsCertByCompany (event) {
+        this.goodsLoading = true
+        if (event != null) {
+          this.currentGoodsPage = 1
+        }
+        let params = {
+          _size: this.goodsSize,
+          _currentPage: this.currentGoodsPage,
+          _companyId: this.supplierId,
+          badStatus: 'badStatus',
+          _certName: this.certChooseName,
+          _certSubStatus: this.CertSubStatus
+        }
+        setapi.serachGoodsCertByCompany(params, this.$axios).then(res => {
+          this.goodsList1 = res.data.items
+          if (res.data.currentItemCount) {
+            this.currentGoodsItemCount = res.data.currentItemCount
+          } else {
+            this.currentGoodsItemCount = 0
+          }
+          this.goodsLoading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      showBackReasonList (row) {
+        // 分页及列表条件
+        let params = {
+          CertSubId: row.Id
+        }
+        backReasonApi.getNoPageList(params, this.$axios).then(res => {
+          this.backReasonList = res.data.items
+          this.showBackReason = true
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+    }
+  }
+</script>
+
+<style>
+
+</style>

+ 16 - 7
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -69,7 +69,7 @@
       <el-tabs tab-position="top"
                v-model="activeName"
                style="margin-top: -10px">
-        <el-tab-pane label="企业信息">
+        <el-tab-pane label="企业信息" name="0">
           <el-card class="box-card">
             <div slot="header"
                  class="clearfix">
@@ -94,7 +94,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="企业情况"
+        <el-tab-pane label="企业情况" name="1"
                      :disabled="!certId">
           <el-card class="box-card mycard">
             <div slot="header"
@@ -307,7 +307,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="企业资质"
+        <el-tab-pane label="企业资质" name="2"
                      :disabled="(!certId) || (WorkerTotal == 0)">
           <subfile-list ref="subfileList"
                         :data.sync="subfileList"
@@ -317,7 +317,7 @@
                         height="360px"></subfile-list>
         </el-tab-pane>
 
-        <el-tab-pane label="准入范围"
+        <el-tab-pane label="准入范围" name="3"
                      :disabled="(!certId) || (WorkerTotal == 0)">
           <business-list ref="businessList"
                          :data.sync="businessList"
@@ -329,7 +329,7 @@
                          height="360px"></business-list>
         </el-tab-pane>
 
-        <el-tab-pane label="审批流程"
+        <el-tab-pane label="审批流程" name="4"
                      v-if="formDataCert.Status != 0">
           <el-card class="box-card">
             <div slot="header"
@@ -345,7 +345,7 @@
         <!--             v-if="formDataCert.Status == 5">-->
         <!--</el-tab-pane>-->
 
-        <el-tab-pane label="企业曾用名" v-if="this.showcy">
+        <el-tab-pane label="企业曾用名" v-if="this.showcy" name="5">
           <el-card class="box-card mycard" >
             <div slot="header" class="clearfix">
               <span>企业曾用名</span>
@@ -355,7 +355,11 @@
                                   :entryinfo="entrydetail"></usednameselect-index>
           </el-card>
         </el-tab-pane>
-
+        <el-tab-pane label="不良行为记录" v-if="this.showcy" name="6">
+          <el-card class="box-card mycard" >
+            <badrecord ref="badrecord"></badrecord>
+          </el-card>
+        </el-tab-pane>
       </el-tabs>
 
       <div style="float: right; margin: 20px;">
@@ -559,6 +563,7 @@ import WinningList from '@/components/oilsupplier/winninglist'
 import BusinessList from '@/components/oilsupplier/businesslist'
 import SubfileList from '@/components/oilsupplier/subfilelist2'
 import BasisInfo from '@/components/oilsupplier/basisinfo'
+import Badrecord from '@/components/oilsupplier/badrecord.vue'
 
 import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
 // import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
@@ -572,6 +577,7 @@ export default {
     SupplierFileTable,
     WfMultiHistory,
     WfBackHistory,
+    Badrecord,
     SupplierCertEdit,
     ChooseAuditorFen,
 
@@ -1286,6 +1292,9 @@ export default {
           this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+          if (this.showcy) {
+            this.$refs['badrecord'].getValue(this.formData.Id, this.formData.SupplierTypeCode)
+          }
           this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId, this.formDataCert.InStyle)
           /*if (this.formData.InStyle == '2' || this.formData.InStyle == '6' || this.formData.InStyle == '4') {
             this.allowpre = false

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

@@ -72,7 +72,7 @@
       <el-tabs tab-position="top"
                v-model="activeName"
                style="margin-top: -10px">
-        <el-tab-pane label="企业信息">
+        <el-tab-pane label="企业信息" name="0">
           <el-card class="box-card" v-loading="goodsloading">
             <div slot="header"
                  class="clearfix">
@@ -100,7 +100,7 @@
 
         <el-tab-pane label="企业情况"
                      :disabled="!certId"
-                     ref="tabPaneRef">
+                     ref="tabPaneRef" name="1">
           <el-card class="box-card mycard">
             <div slot="header"
                  class="clearfix">
@@ -324,7 +324,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="企业资质"
+        <el-tab-pane label="企业资质" name="2"
                      :disabled="(!certId) || (WorkerTotal == 0)">
           <subfile-list2 ref="subfileList"
                         :data.sync="subfileList"
@@ -337,7 +337,7 @@
                         :isInvestigate="isInvestigate"></subfile-list2>
         </el-tab-pane>
 
-        <el-tab-pane label="准入范围"
+        <el-tab-pane label="准入范围" name="3"
                      :disabled="(!certId) || (WorkerTotal == 0)">
           <goods-list2 ref="goodsList"
                       :data.sync="goodsList"
@@ -353,7 +353,7 @@
                       @commitAudit="commitAudit"></goods-list2>
         </el-tab-pane>
 
-        <el-tab-pane label="审批流程"
+        <el-tab-pane label="审批流程" name="4"
                      v-if="formDataCert.Status != 0">
           <el-card class="box-card mycard">
             <div slot="header"
@@ -377,7 +377,7 @@
         <!--<el-tab-pane label="供方交费"-->
         <!--             v-if="formDataCert.Status == 5"></el-tab-pane>-->
 
-        <el-tab-pane label="企业曾用名" v-if="this.showcy">
+        <el-tab-pane label="企业曾用名" v-if="this.showcy" name="5">
           <el-card class="box-card mycard" >
             <div slot="header" class="clearfix">
               <span>企业曾用名</span>
@@ -387,6 +387,11 @@
                                   :entryinfo="entrydetail"></usednameselect-index>
           </el-card>
         </el-tab-pane>
+        <el-tab-pane label="不良行为记录" v-if="this.showcy" name="6">
+          <el-card class="box-card mycard" >
+            <badrecord ref="badrecord"></badrecord>
+          </el-card>
+        </el-tab-pane>
       </el-tabs>
 
       <div style="float: right; margin: 20px;">
@@ -588,6 +593,7 @@ import apiCert from '@/api/oilsupplier/suppliercert'
 import annapi from '@/api/oilsupplier/annualaudit'
 import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
 import WfHistory from '@/components/workflow/wfhistory.vue'
+import Badrecord from '@/components/oilsupplier/badrecord.vue'
 // import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
 // import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
 import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
@@ -609,6 +615,7 @@ export default {
     FloatImgBtn,
     SupplierFileTable,
     WfHistory,
+    Badrecord,
     // WfMultiHistory,
     // WfBackHistory,
     SupplierCertEdit,
@@ -1400,6 +1407,9 @@ export default {
               this.certId,
               this.formDataCert.InStyle
             )
+            if (this.showcy) {
+              this.$refs['badrecord'].getValue(this.formData.Id, this.formData.SupplierTypeCode)
+            }
             /* if (this.formData.InStyle == '2' || this.formData.InStyle == '6' || this.formData.InStyle == '4') {
               this.allowpre = false
             } */

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

@@ -67,7 +67,7 @@
       <el-tabs tab-position="top"
                v-model="activeName"
                style="margin-top: -10px">
-        <el-tab-pane label="企业信息">
+        <el-tab-pane label="企业信息" name="0">
           <el-card class="box-card">
             <div slot="header"
                  class="clearfix">
@@ -91,7 +91,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="企业情况"
+        <el-tab-pane label="企业情况" name="1"
                      :disabled="!certId">
           <el-card class="box-card mycard">
             <div slot="header"
@@ -302,7 +302,7 @@
             </winning-list>
           </el-card>
         </el-tab-pane>
-        <el-tab-pane label="企业资质"
+        <el-tab-pane label="企业资质" name="2"
                      :disabled="(!certId) || (WorkerTotal == 0)">
           <subfile-list ref="subfileList"
                         :data.sync="subfileList"
@@ -311,7 +311,7 @@
                         :typeCode="formData.SupplierTypeCode"
                         height="360px"></subfile-list>
         </el-tab-pane>
-        <el-tab-pane label="准入范围"
+        <el-tab-pane label="准入范围" name="3"
                      :disabled="(!certId) || (WorkerTotal == 0)">
           <tech-list ref="techList"
                      :data.sync="techList"
@@ -323,7 +323,7 @@
                      height="360px"></tech-list>
         </el-tab-pane>
 
-        <el-tab-pane label="审批流程"
+        <el-tab-pane label="审批流程" name="4"
                      v-if="formDataCert.Status != 0">
           <el-card class="box-card mycard">
             <div slot="header"
@@ -339,7 +339,7 @@
         <!--             v-if="formDataCert.Status == 5">-->
         <!--</el-tab-pane>-->
 
-        <el-tab-pane label="企业曾用名" v-if="this.showcy">
+        <el-tab-pane label="企业曾用名" v-if="this.showcy" name="5">
           <el-card class="box-card mycard" >
             <div slot="header" class="clearfix">
               <span>企业曾用名</span>
@@ -349,6 +349,11 @@
                                   :entryinfo="entrydetail"></usednameselect-index>
           </el-card>
         </el-tab-pane>
+        <el-tab-pane label="不良行为记录" v-if="this.showcy" name="6">
+          <el-card class="box-card mycard" >
+            <badrecord ref="badrecord"></badrecord>
+          </el-card>
+        </el-tab-pane>
       </el-tabs>
 
       <div style="float: right; margin: 20px;">
@@ -559,6 +564,7 @@ import TechInfo from '@/components/oilsupplier/techinfo'
 import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
 import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
 import FloatImgBtn from '@/components/floatButton/index'
+import Badrecord from '@/components/oilsupplier/badrecord.vue'
 
 import usednameselectIndex from '@/components/usednameselect/index'
 export default {
@@ -567,6 +573,7 @@ export default {
     FloatImgBtn,
     SupplierFileTable,
     WfMultiHistory,
+    Badrecord,
     WfBackHistory,
     SupplierCertEdit,
     ChooseAuditorFen,
@@ -1290,7 +1297,9 @@ 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)
-
+            if (this.showcy) {
+              this.$refs['badrecord'].getValue(this.formData.Id, this.formData.SupplierTypeCode)
+            }
             /* if (this.formData.InStyle == '2' || this.formData.InStyle == '6' || this.formData.InStyle == '4') {
               this.allowpre = false
             } */