<template>
|
<div class="app-container">
|
<div class="filter-container">
|
<div class="carrier_search">
|
<span>企业名称:</span>
|
<el-input v-model="params.name" class="carrier_search_input"></el-input>
|
</div>
|
<div class="carrier_search">
|
<span>企业类型:</span>
|
<el-select filterable clearable v-model="params.type">
|
<el-option label="烟花爆竹经营(生产)许可证" value="1">烟花爆竹经营(生产)许可证</el-option>
|
<el-option label="烟花爆竹经营(批发)许可证" value="2">烟花爆竹经营(批发)许可证</el-option>
|
<el-option label="烟花爆竹经营(零售)许可证" value="3">烟花爆竹经营(零售)许可证</el-option>
|
</el-select>
|
</div>
|
<el-button style="margin-left: 10px;" type="primary" v-if="isSupervision!=='null'" @click="openLicenseForm('新增','')">添加</el-button>
|
<el-button style="margin-left: 10px;" type="primary" @click="searchData()">查询</el-button>
|
</div>
|
<div class="table_content">
|
<el-table
|
v-loading="listLoading"
|
:key="tableKey"
|
:data="licenseList"
|
border
|
fit
|
@sort-change="sortChange"
|
highlight-current-row
|
style="width: 100%;"
|
>
|
<el-table-column label="序号" type="index" align="center" width="60"/>
|
<el-table-column label="行政区划" prop="province" align="center" sortable="custom">
|
<template slot-scope="scope">
|
{{scope.row.province}}{{scope.row.city}}{{scope.row.district}}
|
</template>
|
</el-table-column>
|
<el-table-column label="单位名称" prop="name" align="center" sortable="custom">
|
</el-table-column>
|
<el-table-column label="主要负责人" prop="mainpersonname" align="center" sortable="custom">
|
</el-table-column>
|
<el-table-column label="许可证编号" prop="licensecode" align="center" sortable="custom">
|
</el-table-column>
|
<el-table-column label="许可证类型" prop="type" align="center" sortable="custom">
|
<template slot-scope="scope">
|
<div v-for="item in typeList">
|
<div v-if="scope.row.type === item.id">
|
{{item.name}}
|
</div>
|
</div>
|
</template>
|
</el-table-column>`
|
<el-table-column label="发证日期" prop="issuingdate" align="center" sortable="custom">
|
</el-table-column>
|
<el-table-column label="到期日期" prop="noeffectdate" align="center" sortable="custom">
|
</el-table-column>
|
<el-table-column label="发证机关" prop="issuingunit" align="center" sortable="custom">
|
</el-table-column>
|
<!-- <el-table-column label="发证类型" prop="granttype" align="center" sortable="custom">-->
|
<!-- </el-table-column>-->
|
<el-table-column label="状态" prop="reviewstatus" align="center" sortable="custom">
|
<template slot-scope="scope">
|
<div v-for="item in reviewStatusList">
|
<div v-if="scope.row.reviewstatus === item.id">
|
{{item.name}}
|
</div>
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column label="驳回建议" prop="reviewnote" align="center" sortable="custom" v-if="isSupervision !=='null' ? true :false">
|
</el-table-column>
|
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
<template slot-scope="scope">
|
<el-button type="text" @click="commit(scope.row.id)" v-if="isSupervision!=='null' && (scope.row.reviewstatus== 0||scope.row.reviewstatus===3) ?true:false">提交</el-button>
|
<el-button type="text" @click="openLicenseForm('修改',scope.row)" v-if="isSupervision==='null'?false:true">修改</el-button>
|
<el-button type="text" @click="openLicenseForm('审核',scope.row)" v-if="isSupervision ==='null' &&scope.row.reviewstatus !==2&&scope.row.reviewstatus !==3">审核</el-button>
|
<el-button type="text" @click="refuse(scope.row.id)" v-if="isSupervision ==='null'&&scope.row.reviewstatus !==3">驳回</el-button>
|
<el-button type="text" @click="deleteById(scope.row.id)" v-if="isSupervision==='null'?false:true">删除</el-button>
|
<el-button type="text" v-print="printObj1" @click="giveData(scope.row)" v-if="isSupervision==='null' && scope.row.reviewstatus === 2?true:false">打印正本</el-button>
|
<el-button type="text" v-print="printObj2" @click="giveDetail(scope.row)" v-if="isSupervision==='null' && scope.row.reviewstatus === 2?true:false">打印副本</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<br>
|
<el-pagination
|
v-show="recordTotal>0"
|
:current-page="currentPage"
|
:page-sizes="[10, 20, 30, 50]"
|
:page-size="pageSize"
|
:total="recordTotal"
|
layout="total, sizes, prev, pager, next, jumper"
|
background
|
style="float:right;"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
<br>
|
</div>
|
<div v-show="false">
|
<div id="printMe1">
|
<el-row style="height:130px;margin-left:320px;padding-top:95px;padding-bottom: 95px">
|
<el-col :span="18">
|
<span style="display: inline-block;font-size: 25px;"></span>
|
</el-col>
|
<el-col :span="6">
|
<div style="width: 40%;height: 40%;margin-left:20%;padding-top: 10px" id="qrcode" ref="qrcode"/>
|
</el-col>
|
</el-row>
|
<el-row style="height:50px;font-size: 20px;margin-top:280px;margin-left:1050px;">
|
<el-col :span="24">
|
<span style="display: inline-block">{{value}}</span>
|
</el-col>
|
</el-row>
|
<el-row style="height:60px;margin-left:470px;margin-top:28px;">
|
<el-col :span="13" style="font-size: 22px">
|
<span>{{name}}</span>
|
</el-col>
|
<el-col :span="8" style="font-size: 22px;padding-left: 50px">
|
<span>{{mainpersonname}}</span>
|
</el-col>
|
</el-row >
|
<el-row style="height:80px;margin-left:470px;">
|
<el-col :span="13" style="font-size: 22px;height: 90px;padding-right: 200px;">
|
<span>{{province === "新疆维吾尔自治区"? "新疆":province}}{{city}}{{district}}{{address}}</span>
|
</el-col>
|
<!--<el-col :span="8" style="font-size: 27px">
|
<span>{{area}}㎡</span>
|
</el-col>-->
|
<el-col :span="7" style="font-size: 22px;padding-left: 50px;padding-top: 10px">
|
<span>{{economictype}}</span>
|
</el-col>
|
</el-row>
|
<!--<el-row style="height:60px;margin-left:290px;">
|
<el-col :span="16" style="font-size: 27px">
|
<span>{{storageaddress}}</span>
|
</el-col>
|
<el-col :span="8" style="font-size: 27px">
|
<span>{{storagearea}}㎡</span>
|
</el-col>
|
</el-row>-->
|
<el-row style="height:100px;margin-left:470px;">
|
<el-col :span="13" style="font-size: 22px;padding-right: 200px;">
|
<span>{{dealingrange}}</span><br>
|
<span>核定药量:{{powder}}kg</span>
|
<span>({{reservebox}}箱)</span>
|
</el-col>
|
<el-col :span="8" style="font-size: 22px;padding-left: 50px;height: 80px">
|
<span>{{storageprovince === "新疆维吾尔自治区"? "新疆":storageprovince}}{{storagecity}}{{storagedistrict}}{{storageaddress}}</span><br>
|
<span>库区面积{{area}}㎡</span>;
|
<span>库房面积{{storagearea}}㎡</span>
|
</el-col>
|
<!--<el-col :span="8" style="font-size: 27px;margin-top:20px;">
|
<span>{{powder}}kg</span>
|
</el-col>-->
|
</el-row>
|
<el-row style="height:80px;margin-left:400px;">
|
<el-col :span="10" style="font-size: 1px">
|
<span>.</span>
|
</el-col>
|
<el-col :span="7" style="font-size: 18px;margin-top:24px;padding-left: 180px;">
|
<span>{{issuingunit}}</span>
|
</el-col>
|
</el-row>
|
<el-row style="height:75px;margin-left:290px;">
|
<el-col :span="2" style="font-size: 22px;margin-top: 15px;margin-left:45px">
|
<span>{{year1}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 22px;margin-top: 15px;margin-left:0px">
|
<span>{{month1}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 22px;margin-top: 15px;margin-left:20px">
|
<span>{{day1}}</span>
|
</el-col>
|
<el-col :span="2" style="font-size: 22px;margin-top: 15px;margin-left:40px">
|
<span>{{year2}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 22px;margin-top: 15px;margin-left:7px">
|
<span>{{month2}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 22px;margin-top: 15px;margin-left:20px">
|
<span>{{day2}}</span>
|
</el-col>
|
<el-col :span="2" style="font-size: 22px;margin-top: 15px;margin-left:210px">
|
<span>{{year}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 22px;margin-top: 15px;margin-left:35px">
|
<span>{{month}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 22px;margin-top: 15px;margin-left:35px">
|
<span>{{day}}</span>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
<div v-show="false">
|
<div id="printMe2">
|
<el-row>
|
<el-col :span="8" style="margin-top:666px;margin-left: 170px">
|
<el-row >
|
<el-col :span="24" style="margin-top: 140px;margin-left: 70px">
|
{{value}}
|
</el-col>
|
<el-col :span="8" style="margin-top: 38px;margin-left: 70px;height: 60px">
|
{{issuingunit}}
|
</el-col>
|
<el-col style="margin-left: 70px">
|
<el-col :span="2" style="margin-top: 17px;">
|
<span>{{year}}</span>
|
</el-col>
|
<el-col :span="1" style="margin-top: 17px;margin-left:18px">
|
<span>{{month}}</span>
|
</el-col>
|
<el-col :span="1" style="margin-top: 17px;margin-left:20px">
|
<span>{{day}}</span>
|
</el-col>
|
</el-col>
|
</el-row>
|
</el-col>
|
<el-col :span="12" style="margin-top: 386px;">
|
<el-row style="margin-left: 225px">
|
<el-col :span="8">
|
<div style="width:20px;height:20px;" class="qrcode" id="qrcode2" ref="qrcode"/>
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 58px;margin-left: 75px;padding-top: 20px;">
|
<el-col :span="8">
|
{{name}}
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 38px;margin-left: 75px">
|
<el-col :span="8">
|
{{mainpersonname}}
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 50px;margin-left: 75px;height: 35px">
|
<el-col :span="8">
|
<span>{{province === "新疆维吾尔自治区"? "新疆":province}}{{city}}{{district}}{{address}}</span>
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 22px;margin-left: 75px">
|
<el-col :span="8">
|
{{economictype}}
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 15px;margin-left: 75px;height: 35px">
|
<el-col :span="8">
|
<span>{{storageprovince === "新疆维吾尔自治区"? "新疆":storageprovince}}{{storagecity}}{{storagedistrict}}{{storageaddress}}</span><br>
|
<span>库区面积{{area}}㎡</span>;
|
<span>库房面积{{storagearea}}㎡</span>
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 60px;margin-left: 75px;height: 80px">
|
<el-col :span="8">
|
<span>{{dealingrange}}</span><br>
|
<span>核定药量:{{powder}}kg</span>
|
<span>({{reservebox}}箱)</span>
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 89px;margin-left: 8px">
|
<el-col :span="2" style="font-size: 16px;margin-left:5px">
|
<span>{{year1}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 16px;margin-left:0px">
|
<span>{{month1}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 16px;margin-left:1px">
|
<span>{{day1}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 16px;margin-left:17px">
|
<span>{{year2}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 16px;margin-left:22px">
|
<span>{{month2}}</span>
|
</el-col>
|
<el-col :span="1" style="font-size: 16px;margin-left:5px">
|
<span>{{day2}}</span>
|
</el-col>
|
</el-row>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
<el-dialog
|
:visible.sync="refuseVisible"
|
append-to-body
|
:close-on-click-modal="false"
|
width="30%"
|
>
|
<el-form ref="refuseForm" :rules="dataFormRules" :model="refuseForm" label-position="right" label-width="80px" >
|
<el-form-item label="驳回理由:" prop="name">
|
<el-input type="textarea" :rows="2" v-model="refuseForm.rejectnote"/>
|
</el-form-item>
|
</el-form>
|
<div align="right">
|
<el-button type="primary" @click="submitRefuse()">确认</el-button>
|
</div>
|
</el-dialog>
|
<license-info-form ref="form" @getinfo="getLicenseListData"></license-info-form>
|
</div>
|
</template>
|
|
<script>
|
|
import licenseInfoForm from "./components/licenseInfoForm";
|
import { computePageCount } from '../../../utils'
|
import {getLicenseList ,reviewLicenseInfo ,deleteById,refuseLicense} from "@/api/license";
|
import Cookies from "js-cookie";
|
import LicenseInfoForm from "./components/licenseInfoForm";
|
import {deleteCertificate} from "../../../api/tranportList";
|
import {parseError} from "../../../utils/messageDialog";
|
import QRCode from "qrcodejs2";
|
|
export default {
|
name: "carrier",
|
data(){
|
return{
|
refuseVisible:false,
|
enterprisenumber:'',
|
value:'',
|
code:'',
|
name:'',
|
mainpersonname:'11',
|
province:'',
|
city:'',
|
district:'',
|
address:'',
|
economictype:'',
|
area:'',
|
storageprovince:'',
|
storagecity:'',
|
storagedistrict:'',
|
storageaddress:'',
|
storagearea:'',
|
dealingrange:'',
|
reservebox:'',
|
powder:'',
|
effectdate:'',
|
noeffectdate:'',
|
issuingunit:'',
|
year:'',
|
month:'',
|
day:'',
|
year1:'',
|
month1:'',
|
day1:'',
|
year2:'',
|
month2:'',
|
day2:'',
|
startMonth:'',
|
startYear:'',
|
startDay:'',
|
endYear:'',
|
endMonth:'',
|
endDay:'',
|
tableKey:0,
|
listLoading:false,
|
approveVisible:false,
|
pageSize: 10,
|
recordTotal: 0,
|
currentPage: 1,
|
pageTotal: 0,
|
ruleForm:{},
|
isSupervision:'',
|
roleType:'',
|
params:{
|
pageIndex:1,
|
pageSize:10,
|
sort:'',
|
order:"ASC",
|
name:'',
|
type:''
|
},
|
dataForm:{
|
signperson:'',
|
issueperson:'',
|
issuepersonphone:'',
|
id:'',
|
},
|
listQuery:{
|
filter:{
|
code:"",
|
page:"approve",
|
},
|
pageIndex:1,
|
pageSize:10,
|
},
|
searchContent:'',
|
licenseList:[],
|
reviewStatusList:[
|
{id:0,name:'等待提交'},
|
{id:1,name:'等待审核'},
|
{id:2,name:'审核通过'},
|
{id:3,name:'审核驳回'},
|
],
|
typeList:[
|
{id:1,name:'烟花爆竹经营(生产)许可证'},
|
{id:2,name:'烟花爆竹经营(批发)许可证'},
|
{id:3,name:'烟花爆竹经营(零售)许可证'},
|
],
|
printObj1:{
|
id:'printMe1',
|
extraHead:'<meta http-equiv="Content-Language" content="zh-cn"/>'
|
},
|
printObj2:{
|
id:'printMe2',
|
extraHead:'<meta http-equiv="Content-Language" content="zh-cn"/>'
|
},
|
refuseForm:{
|
id:'',
|
rejectnote:'',
|
},
|
dataFormRules:{
|
|
}
|
}
|
},
|
components:{
|
LicenseInfoForm
|
},
|
created(){
|
this.getLicenseListData()
|
},
|
methods:{
|
giveDetail(val){
|
this.code = val.code
|
this.name =val.name
|
this.mainpersonname = val.mainpersonname
|
this.province = val.province
|
this.city = val.city
|
this.district = val.district
|
this.address = val.address
|
this.area = JSON.parse(val.licenseStorage)[0].area
|
this.storageaddress =val.storageaddress
|
this.storagearea = JSON.parse(val.licenseStorage)[0].storagearea
|
this.dealingrange = val.dealingRangeStr
|
this.powder = JSON.parse(val.licenseStorage)[0].powder
|
this.effectdate = val.effectdate
|
this.noeffectdate = val.noeffectdate
|
this.issuingunit = val.issuingunit
|
this.value = val.licensecode
|
this.economictype = val.economictype
|
this.enterprisenumber = val.enterprisenumber
|
this.year = val.issuingdate.split('-')[0]
|
this.month = val.issuingdate.split('-')[1]
|
this.day= val.issuingdate.split('-')[2]
|
this.year1 = val.effectdate.split('-')[0]
|
this.month1 = val.effectdate.split('-')[1]
|
this.day1= val.effectdate.split('-')[2]
|
this.year2 = val.noeffectdate.split('-')[0]
|
this.month2 = val.noeffectdate.split('-')[1]
|
this.day2= val.noeffectdate.split('-')[2]
|
this.startYear = val.effectdate.split('-')[0]
|
this.startMonth = val.effectdate.split('-')[1]
|
this.startDay= val.effectdate.split('-')[2]
|
this.endYear = val.noeffectdate.split('-')[0]
|
this.endMonth = val.noeffectdate.split('-')[1]
|
this.endDay= val.noeffectdate.split('-')[2]
|
this.$nextTick(() => {
|
this.qrcode()
|
})
|
},
|
giveData(val){
|
this.code = val.code
|
this.name =val.name
|
this.economictype = val.economictype
|
this.mainpersonname = val.mainpersonname
|
this.province = val.province
|
this.city = val.city
|
this.district = val.district
|
this.address = val.address
|
this.area = JSON.parse(val.licenseStorage)[0].area
|
this.storageprovince =val.storageprovince
|
this.storagecity =val.storagecity
|
this.storagedistrict =val.storagedistrict
|
this.storageaddress =val.storageaddress
|
this.storagearea = JSON.parse(val.licenseStorage)[0].storagearea
|
this.dealingrange = val.dealingRangeStr
|
this.powder = JSON.parse(val.licenseStorage)[0].powder
|
this.reservebox = val.reservebox
|
this.effectdate = val.effectdate
|
this.noeffectdate = val.noeffectdate
|
this.issuingunit = val.issuingunit
|
this.value = val.licensecode
|
this.enterprisenumber = val.enterprisenumber
|
this.year = val.issuingdate.split('-')[0]
|
this.month = val.issuingdate.split('-')[1]
|
this.day= val.issuingdate.split('-')[2]
|
this.year1 = val.effectdate.split('-')[0]
|
this.month1 = val.effectdate.split('-')[1]
|
this.day1= val.effectdate.split('-')[2]
|
this.year2 = val.noeffectdate.split('-')[0]
|
this.month2 = val.noeffectdate.split('-')[1]
|
this.day2= val.noeffectdate.split('-')[2]
|
this.$nextTick(() => {
|
this.qrcode()
|
})
|
},
|
qrcode(){
|
if(this.enterprisenumber != ''){
|
document.getElementById("qrcode").innerHTML = ""
|
let qrcode = new QRCode('qrcode', {
|
width: 125,
|
height: 125, // 高度
|
text: this.enterprisenumber, // 二维码内容
|
// render: 'canvas' , // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
|
background: '#f0f', // 背景色
|
// foreground: '#ff0' // 前景色
|
|
})
|
|
document.getElementById("qrcode2").innerHTML = ""
|
let qrcode2 = new QRCode('qrcode2', {
|
width: 75,
|
height: 75, // 高度
|
text: this.enterprisenumber, // 二维码内容
|
// render: 'canvas' , // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
|
background: '#f0f', // 背景色
|
// foreground: '#ff0' // 前景色
|
|
})
|
}
|
},
|
async getLicenseListData(){
|
this.isSupervision = Cookies.get('isSupervision')
|
this.roleType = Cookies.get('roleType')
|
|
this.listLoading = true
|
let res = await getLicenseList(this.params)
|
if(res.data.code === "200"){
|
this.recordTotal = res.data.result.totalCount
|
this.pageSize = res.data.result.pageSize
|
this.pageTotal = computePageCount(res.data.result.totalCount, res.data.result.pageSize)
|
this.currentPage = res.data.result.current
|
this.licenseList = res.data.result.result
|
}
|
this.listLoading = false
|
},
|
openLicenseForm(title,value){
|
this.$refs.form.showLicenseForm(title,value,this.isSupervision,this.roleType)
|
},
|
searchData(){
|
this.getLicenseListData()
|
},
|
handleSizeChange: function(val) {
|
this.params.pageSize = val
|
this.getLicenseListData()
|
},
|
handleCurrentChange: function(val) {
|
this.params.pageIndex = val
|
this.getLicenseListData()
|
},
|
commit(val){
|
this.$confirm('提交此条信息,是否继续','提示',{
|
confirmButtonText:'确定',
|
cancelButtonText:'取消',
|
type:'warning',
|
}).then(()=> {
|
reviewLicenseInfo({id:val,reviewstatus:1}).then( ()=>{
|
this.getLicenseListData()
|
this.$notify({
|
title:'成功',
|
message:'提交成功',
|
type:'success',
|
duration:2000,
|
})
|
}).catch(error => {
|
parseError({error: error, vm: this})
|
})
|
})
|
},
|
refuse(val){
|
this.refuseForm.id = val
|
this.refuseVisible = true
|
},
|
submitRefuse(){
|
refuseLicense(this.refuseForm).then((res) =>{
|
if(res.data.code === '200'){
|
this.getLicenseListData()
|
this.refuseVisible = false
|
this.$notify({
|
title:'成功',
|
duration:2000,
|
message:'驳回成功',
|
type:'success'
|
})
|
}else{
|
this.$message({
|
type:'warning',
|
message:res.data.message
|
})
|
}
|
})
|
},
|
deleteById(val){
|
this.$confirm('删除此条信息,是否继续','提示',{
|
confirmButtonText:'确定',
|
cancelButtonText:'取消',
|
type:'warning',
|
}).then(()=> {
|
deleteById(val).then( response=>{
|
const res = response.data;
|
|
if (res.code === "200") {
|
this.$message({
|
message: '删除成功',
|
type: 'success'
|
});
|
this.getLicenseListData()
|
} else {
|
parseError({error: res.message, vm: this})
|
}
|
}).catch(error => {
|
parseError({error: error, vm: this})
|
})
|
})
|
},
|
sortChange(){
|
|
},
|
|
}
|
}
|
</script>
|
|
<style scoped>
|
.carrier_search{
|
display: inline-block;
|
}
|
.carrier_search_input{
|
width:200px;
|
}
|
</style>
|