|
|
@@ -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>
|