After Width: | Height: | Size: 436 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,377 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
|||
<link rel="icon" href="favicon.ico"> |
|||
<title>欢迎使用食品原料供应商资质检查系统</title> |
|||
<script src="jquery.min.js"></script> |
|||
</head> |
|||
<style> |
|||
html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
body { |
|||
height: 100%; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
-webkit-font-smoothing: antialiased; |
|||
text-rendering: optimizeLegibility; |
|||
font-family: Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif; |
|||
} |
|||
|
|||
label { |
|||
font-weight: 700; |
|||
} |
|||
|
|||
html { |
|||
height: 100%; |
|||
box-sizing: border-box; |
|||
} |
|||
*, |
|||
*:before, |
|||
*:after { |
|||
box-sizing: inherit; |
|||
} |
|||
.flex-box { |
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
/* Safari */ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
.flex-box-column { |
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
/* Safari */ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-direction: column; |
|||
} |
|||
.search-container { |
|||
position: relative; |
|||
width: 100vw; |
|||
min-height: 100%; |
|||
background-image: url('bg-invitation.png'); |
|||
background-repeat: no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
.content-block { |
|||
position: relative; |
|||
margin-top: 42vh; |
|||
width: 320px; |
|||
width: 93.5%; |
|||
color: #fff; |
|||
} |
|||
.content-box { |
|||
position: relative; |
|||
top:0; |
|||
width: 100%; |
|||
min-height: 200px; |
|||
padding: 15px; |
|||
margin-bottom: 15px; |
|||
word-wrap:break-word; |
|||
background: #FFFFFF; |
|||
border-radius: 10px; |
|||
box-shadow: 0px 4px 20px 0px rgba(65, 194, 252, 0.14), 0px 7px 13px 0px rgba(50, 147, 255, 0.52); |
|||
} |
|||
.content-box .content-title{ |
|||
margin-bottom: 8px; |
|||
font-size: 20px; |
|||
font-weight: 400; |
|||
color: #1F5C99; |
|||
line-height: 54px; |
|||
border-bottom: 1px dashed #D2E1EA; |
|||
} |
|||
.content-box .content-text { |
|||
font-size: 16px; |
|||
line-height: 44px; |
|||
color: #666666; |
|||
border-bottom: 1px dashed #D2E1EA; |
|||
overflow: hidden; |
|||
} |
|||
.content-box .content-text label{ |
|||
line-height: 34px; |
|||
font-weight: normal; |
|||
vertical-align: top; |
|||
} |
|||
.content-box .content-text span{ |
|||
display: block; |
|||
float: right; |
|||
width: 60%; |
|||
line-height: 34px; |
|||
color: #222222; |
|||
text-align: right; |
|||
} |
|||
.content-box .content-btn{ |
|||
margin-top: 70px; |
|||
} |
|||
.content-box .content-btn a{ |
|||
display: block; |
|||
width: 100%; |
|||
padding: 15px 0; |
|||
margin-bottom: 25px; |
|||
font-size: 18px; |
|||
color: #FFFFFF; |
|||
text-align: center; |
|||
text-decoration: none; |
|||
background: #30E3D8; |
|||
border-radius: 80px; |
|||
} |
|||
.content-box .content-btn a.btn-register{ |
|||
background: #3293FF; |
|||
} |
|||
.text-indent-1 { |
|||
text-indent:1em; |
|||
} |
|||
.content-mask{ |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
height: 100%; |
|||
background: rgba(0, 0, 0, 0.7); |
|||
} |
|||
.content-mask .content-box{ |
|||
position: absolute; |
|||
left: 8%; |
|||
top: 25%; |
|||
width: 84%; |
|||
box-shadow: none; |
|||
} |
|||
.content-box .content-text:last-child{ |
|||
border-bottom: 0 none; |
|||
} |
|||
.content-box .content-text span input{ |
|||
height: 30px; |
|||
text-align: right; |
|||
border: 0 none; |
|||
} |
|||
.content-box .content-text .num-code{ |
|||
float: right; |
|||
display: inline-block; |
|||
width: 30%; |
|||
height: 44px; |
|||
margin-left: 8px; |
|||
} |
|||
.content-box .content-text .num-code img{ |
|||
width: 100%; |
|||
margin-top: 4px; |
|||
} |
|||
.content-box .content-text .input-code{ |
|||
width: 35%; |
|||
} |
|||
.content-box .content-text .input-code input{ |
|||
width: 100%; |
|||
} |
|||
.content-box{ |
|||
position: relative; |
|||
} |
|||
.content-box .content-close{ |
|||
position: absolute; |
|||
left: 50%; |
|||
margin-left: -18px; |
|||
bottom: -20%; |
|||
width: 36px; |
|||
} |
|||
.content-box .content-close a img{ |
|||
width: 100%; |
|||
} |
|||
|
|||
</style> |
|||
<body> |
|||
<div class="search-container flex-box-column"> |
|||
<div class="content-block"> |
|||
<div class="content-box"> |
|||
<h3 class="content-title">企业信息</h3> |
|||
<div class="content-info" id="enterprise-info"> |
|||
|
|||
</div> |
|||
<div class="content-btn"> |
|||
<a href="javascript:;" class="btn-invitate">登录并接受邀请</a> |
|||
<a href="javascript:;" class="btn-register">去注册</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="content-mask" id="content-mask" style="display: none;"> |
|||
<div class="content-box"> |
|||
<h3 class="content-title">受邀企业</h3> |
|||
<div class="content-info"> |
|||
<form class="content-form" action="#" method="GET" name="content-form"> |
|||
<p class="content-text"><label>用户名:</label><span><input type="text" name="name" id="name" placeholder="请输入用户名"></span></p> |
|||
<p class="content-text"><label>密码:<label><span><input type="password" name="password" id="password" placeholder="请输入密码"></span></p> |
|||
<p class="content-text"> |
|||
<label>验证码:</label> |
|||
<span class="input-code"><input type="text" name="vcode" id="vcode" placeholder="请输入验证码"></span> |
|||
<strong class="num-code"></strong> |
|||
</p> |
|||
</form> |
|||
</div> |
|||
<div class="content-btn"> |
|||
<a href="javascript:;" class="btn-accept">接受邀请</a> |
|||
</div> |
|||
<div class="content-close"> |
|||
<a href="javascript:;" class="btn-close"><img src="close.png" alt=""></a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
<script> |
|||
var baseUrlIp = "http://121.36.65.171:9527"; |
|||
var registerIP = "http://121.36.65.171:9527/swagger-ui.html#/" |
|||
|
|||
// 点击去注册按钮,复制链接并去浏览器打开 |
|||
$(".btn-register").click(function(){ |
|||
var input = $("<input value = "+ registerIP +">"); |
|||
$("body").prepend(input); |
|||
$("body").find("input").eq(0).select(); |
|||
document.execCommand("copy"); |
|||
$("body").find("input").eq(0).remove(); |
|||
alert("请到浏览器粘贴并打开链接 "+ registerIP); |
|||
}); |
|||
// 点击登录并接受邀请按钮,打开受邀企业弹窗 |
|||
$(".btn-invitate").click(function(){ |
|||
if($("#content-mask").css("display")=="none"){ |
|||
$("#content-mask").show(); |
|||
} |
|||
}); |
|||
// 点击关闭按钮,关闭弹窗 |
|||
$(".btn-close").click(function(){ |
|||
if($("#content-mask").css("display")=="block"){ |
|||
$("#content-mask").hide(); |
|||
} |
|||
}); |
|||
// 验证码 |
|||
var uuid = ""; |
|||
$(document).ready(function(res){ |
|||
$.ajax({ |
|||
url: baseUrlIp + "/captchaImage", |
|||
type: "get", // 请求方式get / post |
|||
dataType: "json", // 数据类型 |
|||
// 请求成功后的回调函数 |
|||
success: function(res) { |
|||
uuid=res.uuid; |
|||
if(res.code == 200){ |
|||
// data后台返回来的数据 |
|||
var html = ''; |
|||
html +='<img id="imgUrl" src="data:gif;base64,'+ res.img +'" alt="">' |
|||
} else { |
|||
html +='<span style="color:#000;">error</span>'; |
|||
} |
|||
// append 结尾插入内容 |
|||
$(".num-code").append(html); |
|||
|
|||
}, |
|||
error: function(err) { |
|||
console.log(err); |
|||
} |
|||
}); |
|||
}) |
|||
// 刷新验证码 |
|||
$(".num-code").click(function(){ |
|||
$.ajax({ |
|||
url: baseUrlIp + "/captchaImage", |
|||
type: "get", // 请求方式get / post |
|||
dataType: "json", // 数据类型 |
|||
// 请求成功后的回调函数 |
|||
success: function(res) { |
|||
$("#imgUrl").attr("src","data:gif;base64,"+ res.img) |
|||
uuid=res.uuid; |
|||
}, |
|||
error: function(err) { |
|||
console.log(err); |
|||
} |
|||
}); |
|||
}); |
|||
// 点击接受邀请按钮,提交验证 |
|||
$(".btn-accept").click(function(){ |
|||
var name = $('input[name=name]').val(); |
|||
var password = $('input[name=password]').val(); |
|||
var vcode = $('input[name=vcode]').val(); |
|||
if($.trim(name)==''){ |
|||
alert("请输入用户名") |
|||
$('input[name=name]').focus() |
|||
return false |
|||
} |
|||
if($.trim(password)==''){ |
|||
alert("请输入密码") |
|||
$('input[name=password]').focus() |
|||
return false |
|||
} |
|||
if($.trim(vcode)==''){ |
|||
alert("请输入验证码") |
|||
$('input[name=vcode]').focus() |
|||
return false |
|||
} |
|||
|
|||
const data = { |
|||
'username':name, |
|||
'password':password, |
|||
'code':vcode, |
|||
'uuid':uuid |
|||
} |
|||
$.ajax({ |
|||
url: baseUrlIp + "/login", |
|||
type: "post", // 请求方式get / post |
|||
dataType: "json", // 数据类型 |
|||
contentType : "application/json;charset=utf-8",//添加这句话 |
|||
data : JSON.stringify(data), |
|||
// 请求成功后的回调函数 |
|||
success: function(res) { |
|||
console.log(res) |
|||
if(res.code == 200){ |
|||
alert("受邀企业成功注册") |
|||
$("#content-mask").hide() |
|||
} |
|||
|
|||
}, |
|||
error: function(err) { |
|||
console.log(err); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
//企业名称接口 |
|||
function enterpriseInfo(){ |
|||
var code = ''; |
|||
var str = window.location.href.split('?')[1]; |
|||
if (!str) {return}; |
|||
var enterpriseid=str.split('&')[0]; |
|||
if(enterpriseid.indexOf('=') == -1) { |
|||
return |
|||
} |
|||
enterpriseid = enterpriseid.split('=')[1] |
|||
var infoOpen=str.split('&')[1]; |
|||
if(infoOpen.indexOf('=') == -1) { |
|||
return |
|||
} |
|||
infoOpen = infoOpen.split('=')[1] |
|||
$.ajax({ |
|||
url: baseUrlIp + "/system/enterpriseManager/selectEnterpriseByIdForH5?enterpriseid=" + enterpriseid, |
|||
type: "get", // 请求方式get / post |
|||
dataType: "json", // 数据类型 |
|||
// 请求成功后的回调函数 |
|||
success: function(res) { |
|||
if(res.code == 200){ |
|||
// data后台返回来的数据 |
|||
var html = ''; |
|||
html +='<p class="content-text"><label>企业名称:</label><span id="enterprise_name">'+ res.data.name +'</span></p>' |
|||
+'<p class="content-text"><label>法定代表人名称:</label><span id="enterprise_person">'+ res.data.nameLegalRepresentative +'</span></p>' |
|||
} else { |
|||
html +='<span style="color:#000;">error</span>'; |
|||
} |
|||
// append 结尾插入内容 |
|||
$('#enterprise-info').append(html); |
|||
}, |
|||
error: function(err) { |
|||
console.log(err); |
|||
} |
|||
}); |
|||
} |
|||
enterpriseInfo() |
|||
</script> |
|||
</html> |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,202 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
|||
<link rel="icon" href="favicon.ico"> |
|||
<title>欢迎使用预包装食品标签合规性核验系统</title> |
|||
<script src="jquery.min.js"></script> |
|||
</head> |
|||
<style> |
|||
html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
body { |
|||
height: 100%; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
-webkit-font-smoothing: antialiased; |
|||
text-rendering: optimizeLegibility; |
|||
font-family: Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif; |
|||
} |
|||
|
|||
label { |
|||
font-weight: 700; |
|||
} |
|||
|
|||
html { |
|||
height: 100%; |
|||
box-sizing: border-box; |
|||
} |
|||
*, |
|||
*:before, |
|||
*:after { |
|||
box-sizing: inherit; |
|||
} |
|||
.flex-box { |
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
/* Safari */ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
.flex-box-column { |
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
/* Safari */ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-direction: column; |
|||
} |
|||
.search-container { |
|||
position: relative; |
|||
width: 100vw; |
|||
min-height: 100%; |
|||
background-image: url('bg-scanCode.png'); |
|||
background-repeat: no-repeat; |
|||
background-size: 100% 100%; |
|||
} |
|||
.content-block { |
|||
position: relative; |
|||
margin-top: 42vh; |
|||
width: 320px; |
|||
width: 93.5%; |
|||
color: #fff; |
|||
} |
|||
.content-box { |
|||
position: relative; |
|||
top:0; |
|||
width: 100%; |
|||
min-height: 200px; |
|||
padding: 15px; |
|||
margin-bottom: 15px; |
|||
word-wrap:break-word; |
|||
background: #FFFFFF; |
|||
border-radius: 10px; |
|||
box-shadow: 0px 4px 20px 0px rgba(65, 194, 252, 0.14), 0px 7px 13px 0px rgba(50, 147, 255, 0.52); |
|||
} |
|||
.content-box .content-title{ |
|||
margin-bottom: 8px; |
|||
font-size: 20px; |
|||
font-weight: 400; |
|||
color: #1F5C99; |
|||
line-height: 54px; |
|||
border-bottom: 1px dashed #D2E1EA; |
|||
} |
|||
.content-box .content-text { |
|||
font-size: 16px; |
|||
line-height: 44px; |
|||
color: #666666; |
|||
border-bottom: 1px dashed #D2E1EA; |
|||
overflow: hidden; |
|||
} |
|||
.content-box .content-text label{ |
|||
line-height: 30px; |
|||
font-weight: normal; |
|||
vertical-align: top; |
|||
} |
|||
.content-box .content-text span{ |
|||
display: block; |
|||
float: right; |
|||
width: 70%; |
|||
line-height: 30px; |
|||
color: #222222; |
|||
text-align: right; |
|||
} |
|||
.content-box .content-text span img{ |
|||
width: 70px; |
|||
height: 60px; |
|||
margin: 8px 0 0 8px; |
|||
border-radius: 10px; |
|||
} |
|||
.content-box .content-pdf{ |
|||
margin-top: 15px; |
|||
} |
|||
.content-box .content-pdf a{ |
|||
display: block; |
|||
margin: 12px 0; |
|||
font-size: 12px; |
|||
color:#3293FF; |
|||
} |
|||
.content-box .content-btn{ |
|||
margin-top: 70px; |
|||
} |
|||
.content-box .content-btn a{ |
|||
display: block; |
|||
width: 100%; |
|||
padding: 15px 0; |
|||
margin-bottom: 25px; |
|||
font-size: 18px; |
|||
color: #FFFFFF; |
|||
text-align: center; |
|||
text-decoration: none; |
|||
background: #30E3D8; |
|||
border-radius: 80px; |
|||
} |
|||
.content-box .content-btn a.btn-register{ |
|||
background: #3293FF; |
|||
} |
|||
.text-indent-1 { |
|||
text-indent:1em; |
|||
} |
|||
</style> |
|||
<body> |
|||
<div class="search-container flex-box-column"> |
|||
<div id="data"></div> |
|||
<div class="content-block"> |
|||
<div class="content-box"> |
|||
<h3 class="content-title">产品信息</h3> |
|||
<div class="content-info" id="content-info"> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
<script> |
|||
var code = ''; |
|||
var str = window.location.href.split('?')[1]; |
|||
var baseUrlIp = "http://172.119.51.195:8080"; |
|||
function productInfo(){ |
|||
$.ajax({ |
|||
url: baseUrlIp + "/company/standard/fetch/" + str, |
|||
type: "get", // 请求方式get / post |
|||
dataType: "json", // 数据类型 |
|||
// 请求成功后的回调函数 |
|||
success: function(res) { |
|||
if(res.code == 200){ |
|||
// data后台返回来的数据 |
|||
var html = ''; |
|||
var picHtml = ''; |
|||
var fileHtml = ''; |
|||
// 包装图片 |
|||
var pics = res.data.standard.productImgUrl.split(',') |
|||
for (var i = 0; i < pics.length; i++) { |
|||
picHtml +='<img src='+ pics[i] +'/>' |
|||
} |
|||
// 文件 |
|||
for (var i = 0; i < res.data.fileList.length; i++) { |
|||
fileHtml +='<a href='+ res.data.fileList[i].fileUrl+'>'+ res.data.fileList[i].fileName +'</a>' |
|||
} |
|||
html +='<p class="content-text"><label>产品名称:</label><span id="product_name">'+ res.data.standard.productName +'</span></p>' |
|||
+'<p class="content-text"><label>包装图片:</label><span id="product_pics">'+ picHtml +'</span></p>' |
|||
+'<p class="content-text"><label>包装标准:</label><span id="product_standard">'+ res.data.standard.ybzStandard +'</span></p>' |
|||
+'<p class="content-text"><label>营养成分:</label><span id="product_nutrients">'+ res.data.standard.nutrients +'</span></p>' |
|||
+'<div class="content-pdf" id="product_pdfs">'+ fileHtml +'</div>'; |
|||
} else { |
|||
html +='<span style="color:#000;">该产品码无效</span>'; |
|||
} |
|||
// append 结尾插入内容 |
|||
$('#content-info').append(html); |
|||
}, |
|||
error: function(err) { |
|||
console.log(err); |
|||
} |
|||
}); |
|||
} |
|||
productInfo() |
|||
</script> |
|||
</html> |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,567 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="apply-wait" v-if="isAdd"> |
|||
<p><i class="el-icon-loading" style="font-weight: bold"></i>尊敬的企业用户,您正在添加您的企业信息</p> |
|||
</div> |
|||
<div class="apply-reject" v-if="!isAdd && isEdit"> |
|||
<p><i class="el-icon-warning-outline" style="font-weight: bold;color:#f9a80d;margin-right: 4px;"></i>尊敬的企业用户,您正在修改您的企业信息</p> |
|||
</div> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="170px"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="企业名称:" prop="name"> |
|||
<el-input v-if="isEdit" v-model="form.name" placeholder="请输入企业名称" /> |
|||
<span v-else>{{form.name}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="法人责任主体名称:" prop="nameLegalPersonLiabilitySubject"> |
|||
<el-input v-if="isEdit" v-model="form.nameLegalPersonLiabilitySubject" placeholder="请输入法人责任主体名称" /> |
|||
<span v-else>{{form.nameLegalPersonLiabilitySubject}}</span> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="法定代表人名称:" prop="nameLegalRepresentative"> |
|||
<el-input v-if="isEdit" v-model="form.nameLegalRepresentative" placeholder="请输入法定代表人名称" /> |
|||
<span v-else>{{form.nameLegalRepresentative}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="法定代表人证件类型:" prop="typeLegalRepresentative"> |
|||
<el-select v-if="isEdit" v-model="form.typeLegalRepresentative" placeholder="请选择法定代表人类型"> |
|||
<el-option |
|||
v-for="dict in typeLegalRepresentativeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.typeLegalRepresentative | filterTypeLegalRepresentative(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="法定代表人证件号码:" prop="certificateNumberLegalRepresentative"> |
|||
<el-input v-if="isEdit" v-model="form.certificateNumberLegalRepresentative" placeholder="请输入法定代表人证件号码" /> |
|||
<span v-else>{{form.certificateNumberLegalRepresentative}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="统一社会信用代码类型:" prop="corporateUnifiedSocialCreditType"> |
|||
<el-select v-if="isEdit" v-model="form.corporateUnifiedSocialCreditType" placeholder="请选择统一社会信用代码类型"> |
|||
<el-option |
|||
v-for="dict in corporateUnifiedSocialCreditTypeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.corporateUnifiedSocialCreditType | filterCorporateUnifiedSocialCreditTypeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="统一社会信用代码:" prop="corporateUnifiedSocialCreditCode"> |
|||
<el-input v-if="isEdit" v-model="form.corporateUnifiedSocialCreditCode" placeholder="请输入统一社会信用代码" /> |
|||
<span v-else>{{form.corporateUnifiedSocialCreditCode}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业行业大类型:" prop="enterpriseIndustryBigType"> |
|||
<el-select v-if="isEdit" v-model="form.enterpriseIndustryBigType" placeholder="请选择企业行业大类型"> |
|||
<el-option |
|||
v-for="dict in enterpriseIndustryBigTypeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.enterpriseIndustryBigType | filterEnterpriseIndustryBigTypeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业行业小类型:" prop="enterpriseIndustrySmallType"> |
|||
<el-select v-if="isEdit" v-model="form.enterpriseIndustrySmallType" placeholder="请选择企业行业小类型"> |
|||
<el-option |
|||
v-for="dict in enterpriseIndustrySmallTypeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.enterpriseIndustrySmallType | filterEnterpriseIndustrySmallTypeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业类型:" prop="enterpriseType"> |
|||
<el-select v-if="isEdit" v-model="form.enterpriseType" placeholder="请选择企业类型"> |
|||
<el-option |
|||
v-for="dict in enterpriseTypeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.enterpriseType | filterEnterpriseTypeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="邮箱:" prop="email"> |
|||
<el-input v-if="isEdit" v-model="form.email" placeholder="请输入邮箱" /> |
|||
<span v-else>{{form.email}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业简介:" prop="enterpriseDescribe"> |
|||
<el-input v-if="isEdit" v-model="form.enterpriseDescribe" type="textarea" placeholder="请输入内容" /> |
|||
<span v-else>{{form.enterpriseDescribe}}</span> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="官网地址:" prop="websiteAddress"> |
|||
<el-input v-if="isEdit" v-model="form.websiteAddress" placeholder="请输入官网地址" /> |
|||
<span v-else>{{form.websiteAddress}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="电话:" prop="mobile"> |
|||
<el-input v-if="isEdit" v-model="form.mobile" placeholder="请输入电话" /> |
|||
<span v-else>{{form.mobile}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="详细地址:" prop="address"> |
|||
<el-input v-if="isEdit" v-model="form.address" placeholder="请输入详细地址" /> |
|||
<span v-else>{{form.address}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业注册地详细地址:" prop="placeRegistrationAddress"> |
|||
<el-input v-if="isEdit" v-model="form.placeRegistrationAddress" placeholder="请输入企业注册地详细地址" /> |
|||
<span v-else>{{form.placeRegistrationAddress}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="认证资料类型:" prop="certificatedInformationType"> |
|||
<el-select v-if="isEdit" v-model="form.certificatedInformationType" placeholder="请选择认证资料类型"> |
|||
<el-option |
|||
v-for="dict in certificatedInformationTypeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.certificatedInformationType | filterCertificatedInformationTypeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="联系人姓名:" prop="duty"> |
|||
<el-input v-if="isEdit" v-model="form.duty" placeholder="请输入联系人姓名" /> |
|||
<span v-else>{{form.duty}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="联系方式:" prop="contactInformation"> |
|||
<el-input v-if="isEdit" v-model="form.contactInformation" placeholder="请输入联系方式" /> |
|||
<span v-else>{{form.contactInformation}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="省代码:" prop="provinceCode"> |
|||
<el-select v-if="isEdit" v-model="form.provinceCode" placeholder="请选择省代码" @change="changeProvince"> |
|||
<el-option |
|||
v-for="dict in provinceCodeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.provinceCode | filterProvinceCodeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="市代码:" prop="cityCode"> |
|||
<el-select v-if="isEdit" v-model="form.cityCode" placeholder="请选择市代码" @change="changeCity"> |
|||
<el-option |
|||
v-for="(item,index) in cityCodeOptions" |
|||
:key="index" |
|||
:label="item.name" |
|||
:value="item.areaCode+''" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.cityCode | filterCityCodeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="区代码:" prop="areaCode"> |
|||
<el-select v-if="isEdit" v-model="form.areaCode" placeholder="请选择县代码" @change="changeArea"> |
|||
<el-option |
|||
v-for="(item,index) in areaCodeOptions" |
|||
:key="index" |
|||
:label="item.name" |
|||
:value="item.areaCode+''" |
|||
></el-option> |
|||
</el-select> |
|||
<span v-else>{{form.areaCode | filterAreaCodeOptions(that)}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="备注:" prop="remarks"> |
|||
<el-input v-if="isEdit" v-model="form.remarks" placeholder="请输入备注" /> |
|||
<span v-else>{{form.remarks}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业logo:" prop="logo"> |
|||
<imageUpload v-if="isEdit" v-model="form.logo"/> |
|||
<img v-else :src="form.logo" class="pic-item"> |
|||
</el-form-item> |
|||
<el-form-item label="营业执照照片:" prop="companyImg"> |
|||
<imageUpload v-if="isEdit" v-model="form.companyImg"/> |
|||
<img v-else :src="form.companyImg" class="pic-item"> |
|||
</el-form-item> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="法人证件正面照片:" prop="faceIdImg"> |
|||
<imageUpload v-if="isEdit" v-model="form.faceIdImg"/> |
|||
<img v-else :src="form.faceIdImg" class="pic-item"> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="法人证件反面照片:" prop="rearIdImg"> |
|||
<imageUpload v-if="isEdit" v-model="form.rearIdImg"/> |
|||
<img v-else :src="form.rearIdImg" class="pic-item"> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
<div v-if="isEdit" class="dialog-footer text-center"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
<div v-else class="text-center"> |
|||
<el-button type="primary" @click="onClickEdit">编 辑</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ImageUpload from '@/components/ImageUpload'; |
|||
import { getEnterPriseInfoByLogin,addEnterpriseManager, updateEnterpriseManager,getAreaByParentId} from "@/api/system/enterpriseManager"; |
|||
import {validatAlphabetAndNum,validAlphabets,validatePhone,validEmail,validatePasswordStrong,validateIDCard} from "@/utils/validate" |
|||
export default { |
|||
name: "EnterpriseManager", |
|||
components: { |
|||
ImageUpload, |
|||
}, |
|||
data() { |
|||
const checkPhoneNum = (rule, value, callback) => { |
|||
if (!validatePhone(value)) { |
|||
return callback(new Error('请输入正确的手机号码')); |
|||
} else { |
|||
callback() |
|||
} |
|||
}; |
|||
const checkEmailAddr = (rule, value, callback) => { |
|||
if (!validEmail(value)) { |
|||
return callback(new Error('请输入正确的邮箱地址')); |
|||
} else { |
|||
callback() |
|||
} |
|||
}; |
|||
return { |
|||
that:this, |
|||
isEdit:false, |
|||
isAdd:true, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
name: null, |
|||
nameLegalRepresentative: null |
|||
}, |
|||
// 认证资料类型字典 |
|||
certificatedInformationTypeOptions: [], |
|||
// 统一社会信用代码类型字典 |
|||
corporateUnifiedSocialCreditTypeOptions: [], |
|||
// 企业行业大类型字典 |
|||
enterpriseIndustryBigTypeOptions: [], |
|||
// 企业行业小类型字典 |
|||
enterpriseIndustrySmallTypeOptions: [], |
|||
// 企业类型字典 |
|||
enterpriseTypeOptions: [], |
|||
// 省代码字典 |
|||
provinceCodeOptions: [], |
|||
// 市代码字典 |
|||
cityCodeOptions: [], |
|||
// 县代码字典 |
|||
areaCodeOptions: [], |
|||
// 法定代表人类型字典 |
|||
typeLegalRepresentativeOptions: [], |
|||
// 表单参数 |
|||
form: {}, |
|||
params:{}, |
|||
// 表单校验 |
|||
rules: { |
|||
address: [ |
|||
{ required: true, message: "详细地址不能为空", trigger: "blur" } |
|||
], |
|||
certificateNumberLegalRepresentative: [ |
|||
{ required: true, message: "法定代表人证件号码不能为空", trigger: "blur" } |
|||
], |
|||
certificatedInformationType: [ |
|||
{ required: true, message: "认证资料类型不能为空", trigger: "change" } |
|||
], |
|||
contactInformation: [ |
|||
{ required: true, message: "联系方式不能为空", trigger: "blur" } |
|||
], |
|||
corporateUnifiedSocialCreditCode: [ |
|||
{ required: true, message: "统一社会信用代码不能为空", trigger: "blur" } |
|||
], |
|||
corporateUnifiedSocialCreditType: [ |
|||
{ required: true, message: "统一社会信用代码类型不能为空", trigger: "change" } |
|||
], |
|||
duty: [ |
|||
{ required: true, message: "联系人姓名不能为空", trigger: "blur" } |
|||
], |
|||
email: [ |
|||
{ required: true, message: "邮箱不能为空", trigger: "blur" }, |
|||
{ validator: checkEmailAddr, trigger: 'blur' } |
|||
], |
|||
enterpriseDescribe: [ |
|||
{ required: true, message: "企业简介不能为空", trigger: "blur" } |
|||
], |
|||
enterpriseIndustryBigType: [ |
|||
{ required: true, message: "企业行业大类型不能为空", trigger: "change" } |
|||
], |
|||
enterpriseIndustrySmallType: [ |
|||
{ required: true, message: "企业行业小类型不能为空", trigger: "change" } |
|||
], |
|||
enterpriseType: [ |
|||
{ required: true, message: "企业类型不能为空", trigger: "change" } |
|||
], |
|||
mobile: [ |
|||
{ required: true, message: "电话不能为空", trigger: "blur" }, |
|||
{validator:checkPhoneNum,trigger:"blur"} |
|||
], |
|||
name: [ |
|||
{ required: true, message: "企业名称不能为空", trigger: "blur" } |
|||
], |
|||
nameLegalPersonLiabilitySubject: [ |
|||
{ required: true, message: "法人责任主体名称不能为空", trigger: "blur" } |
|||
], |
|||
nameLegalRepresentative: [ |
|||
{ required: true, message: "法定代表人名称不能为空", trigger: "blur" } |
|||
], |
|||
provinceCode: [ |
|||
{ required: true, message: "省代码不能为空", trigger: "change" } |
|||
], |
|||
cityCode: [ |
|||
{ required: true, message: "市代码不能为空", trigger: "change" } |
|||
], |
|||
areaCode: [ |
|||
{ required: true, message: "区代码不能为空", trigger: "change" } |
|||
], |
|||
typeLegalRepresentative: [ |
|||
{ required: true, message: "法定代表人类型不能为空", trigger: "change" } |
|||
], |
|||
companyImg: [ |
|||
{ required: true, message: "营业执照照片不能为空", trigger: "blur" } |
|||
], |
|||
faceIdImg: [ |
|||
{ required: true, message: "法人证件正面照片不能为空", trigger: "blur" } |
|||
], |
|||
rearIdImg: [ |
|||
{ required: true, message: "法人证件反面照片不能为空", trigger: "blur" } |
|||
], |
|||
} |
|||
}; |
|||
}, |
|||
filters: { |
|||
//法定代表人类型过滤 |
|||
filterTypeLegalRepresentative(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.typeLegalRepresentativeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
//统一社会信用代码类型 |
|||
filterCorporateUnifiedSocialCreditTypeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.corporateUnifiedSocialCreditTypeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
|
|||
//行业大类类型 |
|||
filterEnterpriseIndustryBigTypeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.enterpriseIndustryBigTypeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
//行业小类类型 |
|||
filterEnterpriseIndustrySmallTypeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.enterpriseIndustrySmallTypeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
//企业类型 |
|||
filterEnterpriseTypeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.enterpriseTypeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
//认证资料类型 |
|||
filterCertificatedInformationTypeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.certificatedInformationTypeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
|
|||
//省 |
|||
filterProvinceCodeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.provinceCodeOptions.filter(item => { |
|||
return item.dictValue == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].dictLabel : '' |
|||
}, |
|||
//市 |
|||
filterCityCodeOptions(value,that){ |
|||
if (!value) return '' |
|||
let aFilters = that.cityCodeOptions.filter(item => { |
|||
return item.areaCode == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].name : '' |
|||
}, |
|||
//区 |
|||
filterAreaCodeOptions(value,that){ |
|||
if (!value) return '' |
|||
// value = value.toString() |
|||
let aFilters = that.areaCodeOptions.filter(item => { |
|||
return item.areaCode == value |
|||
}) |
|||
return aFilters.length > 0 ? aFilters[0].name : '' |
|||
}, |
|||
}, |
|||
created() { |
|||
getEnterPriseInfoByLogin().then(res => { |
|||
if(res.data) |
|||
{ |
|||
this.form = res.data |
|||
this.isAdd = false |
|||
if(res.data.provinceCode) |
|||
{ |
|||
this.getCityOrAreaList(res.data.provinceCode,1) |
|||
} |
|||
if(res.data.cityCode) |
|||
{ |
|||
this.getCityOrAreaList(res.data.cityCode,2) |
|||
} |
|||
} else { |
|||
this.isAdd = true |
|||
this.isEdit = true |
|||
} |
|||
|
|||
}) |
|||
this.getDicts("business_license_category").then(response => { |
|||
this.certificatedInformationTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("credit_code").then(response => { |
|||
this.corporateUnifiedSocialCreditTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("industry_main_category").then(response => { |
|||
this.enterpriseIndustryBigTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("industry_sub_category").then(response => { |
|||
this.enterpriseIndustrySmallTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("enterprise_category").then(response => { |
|||
this.enterpriseTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("province_code").then(response => { |
|||
this.provinceCodeOptions = response.data; |
|||
}); |
|||
// this.getDicts("province_code").then(response => { |
|||
// this.cityCodeOptions = response.data; |
|||
// }); |
|||
// this.getDicts("province_code").then(response => { |
|||
// this.areaCodeOptions = response.data; |
|||
// }); |
|||
this.getDicts("credential_type_code").then(response => { |
|||
this.typeLegalRepresentativeOptions = response.data; |
|||
}); |
|||
}, |
|||
methods: { |
|||
//根据父级ID获取市、区列表,type:1为市,2为区 |
|||
getCityOrAreaList(parentId,type){ |
|||
getAreaByParentId({parentId:parseInt(parentId)}).then(res => { |
|||
if(type == 1) { |
|||
this.cityCodeOptions = res.data; |
|||
} else if (type == 2) { |
|||
this.areaCodeOptions = res.data; |
|||
} |
|||
// this.$forceUpdate() |
|||
}) |
|||
}, |
|||
//点击编辑按钮 |
|||
onClickEdit(){ |
|||
//深拷贝 |
|||
this.params = JSON.parse(JSON.stringify(this.form)) |
|||
this.isEdit = true |
|||
}, |
|||
changeProvince(newVal){ |
|||
this.form.cityCode = null |
|||
this.form.areaCode = null |
|||
this.getCityOrAreaList(newVal,1) |
|||
}, |
|||
changeCity(newVal){ |
|||
this.form.areaCode = null |
|||
this.getCityOrAreaList(newVal,2) |
|||
}, |
|||
changeArea(newVal){ |
|||
this.$forceUpdate() |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate(valid => { |
|||
if (valid) { |
|||
if (this.isEdit == true) { |
|||
if(this.isAdd) { |
|||
addEnterpriseManager(this.form).then(res => { |
|||
console.log(res); |
|||
this.msgSuccess("添加成功"); |
|||
this.isAdd = false |
|||
}) |
|||
} else { |
|||
updateEnterpriseManager(this.form).then(res => { |
|||
console.log(res); |
|||
this.msgSuccess("修改成功"); |
|||
}) |
|||
} |
|||
this.isEdit = false |
|||
|
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.isEdit = false; |
|||
this.form = {} |
|||
this.form = this.params |
|||
this.resetForm("form"); |
|||
// this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
enterpriseid: null, |
|||
address: null, |
|||
certificateNumberLegalRepresentative: null, |
|||
contactInformation: null, |
|||
corporateUnifiedSocialCreditCode: null, |
|||
email: null, |
|||
enterpriseDescribe: null, |
|||
logo: null, |
|||
websiteAddress:null, |
|||
name: null, |
|||
nameLegalRepresentative: null, |
|||
placeRegistrationAddress: null, |
|||
companyImg: null, |
|||
faceIdImg: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.el-form { |
|||
position: relative; |
|||
width: 1200px; |
|||
margin: 0 auto; |
|||
} |
|||
.pic-item { |
|||
position: relative; |
|||
width: 146px; |
|||
height: 146px; |
|||
} |
|||
.apply-wait,.apply-reject,.apply-adopt{ |
|||
p{ |
|||
text-align: center; |
|||
font-size: 18px; |
|||
color: #666; |
|||
margin-bottom: 15px; |
|||
} |
|||
} |
|||
</style> |
@ -1,194 +0,0 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> |
|||
<h3 class="mb30 text-danger text-center">企业信息审核通过/企业信息变更申请中</h3> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<el-form-item label="企业logo"> |
|||
<imageUpload v-if="isEdit" v-model="form.logo"/> |
|||
<img v-else :src="form.logo"> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" v-if="isEdit"> |
|||
<p class="text-muted" >支持JPG、JPEG、PNG格式,图片大小不超过5MB请保证图片质量,分辨率至少为150*150。</p> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="企业名称" prop="name"> |
|||
<el-input v-if="isEdit" v-model="form.name" placeholder="请输入企业名称" /> |
|||
<span v-else>{{form.name}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="统一社会信用代码" prop="corporateUnifiedSocialCreditCode"> |
|||
<el-input v-if="isEdit" v-model="form.corporateUnifiedSocialCreditCode" placeholder="请输入统一社会信用代码" /> |
|||
<span v-else>{{form.corporateUnifiedSocialCreditCode}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="法定代表人名称" prop="nameLegalRepresentative"> |
|||
<el-input v-if="isEdit" v-model="form.nameLegalRepresentative" placeholder="请输入法定代表人名称" /> |
|||
<span v-else>{{form.nameLegalRepresentative}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="法定代表人证件号码" prop="certificateNumberLegalRepresentative"> |
|||
<el-input v-if="isEdit" v-model="form.nameLegalRepresentative" placeholder="请输入法定代表人名称" /> |
|||
<span v-else>{{form.certificateNumberLegalRepresentative}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="营业执照照片" prop="companyImg"> |
|||
<imageUpload v-if="isEdit" v-model="form.companyImg"/> |
|||
<img v-else :src="form.companyImg"> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="联系方式" prop="contactInformation"> |
|||
<el-input v-if="isEdit" v-model="form.contactInformation" placeholder="请输入联系方式" /> |
|||
<span v-else>{{form.contactInformation}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="官网地址" prop="web"> |
|||
<el-input v-if="isEdit" v-model="form.web" placeholder="请输入官网地址" /> |
|||
<span v-else>{{form.web}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="企业注册地详细地址" prop="placeRegistrationAddress"> |
|||
<el-input v-if="isEdit" v-model="form.placeRegistrationAddress" placeholder="请输入企业注册地详细地址" /> |
|||
<span v-else>{{form.placeRegistrationAddress}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="邮箱" prop="email"> |
|||
<el-input v-if="isEdit" v-model="form.email" placeholder="请输入邮箱" /> |
|||
<span v-else>{{form.email}}</span> |
|||
</el-form-item> |
|||
<el-form-item label="法人证件正面照片" prop="faceIdImg"> |
|||
<imageUpload v-if="isEdit" v-model="form.faceIdImg"/> |
|||
<img v-else :src="form.faceIdImg"> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item label="企业简介" prop="enterpriseDescribe"> |
|||
<el-input v-if="isEdit" v-model="form.enterpriseDescribe" type="textarea" placeholder="请输入内容" /> |
|||
<span v-else>{{form.enterpriseDescribe}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item label="搜索词" prop="enterpriseDescribe"> |
|||
<el-input v-if="isEdit" v-model="form.enterpriseDescribe" placeholder="请输入邮箱" /> |
|||
<span v-else>{{form.enterpriseDescribe}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="isEdit"> |
|||
<p class="text-muted" style="margin:0 40px">如“北京福通互联科技集团有限公司”的搜索词为“福通互联”,用户可根据搜索词搜索到您的企业,搜索词必须是来自于企业名称中的字。</p> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div class="text-center mt20" v-if="isEdit"> |
|||
<el-button type="primary" @click="submitForm">提交</el-button> |
|||
<el-button @click="isEdit = false">取消</el-button> |
|||
</div> |
|||
<div class="text-center mt20" v-else> |
|||
<el-button @click="isEdit = true">编辑</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ImageUpload from '@/components/ImageUpload'; |
|||
|
|||
export default { |
|||
name: "EnterpriseManager", |
|||
components: { |
|||
ImageUpload, |
|||
}, |
|||
data() { |
|||
return { |
|||
isEdit:false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
name: null, |
|||
nameLegalRepresentative: null |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
rules: { |
|||
address: [ |
|||
{ required: true, message: "详细地址不能为空", trigger: "blur" } |
|||
], |
|||
certificateNumberLegalRepresentative: [ |
|||
{ required: true, message: "法定代表人证件号码不能为空", trigger: "blur" } |
|||
], |
|||
contactInformation: [ |
|||
{ required: true, message: "联系方式不能为空", trigger: "blur" } |
|||
], |
|||
corporateUnifiedSocialCreditCode: [ |
|||
{ required: true, message: "统一社会信用代码不能为空", trigger: "blur" } |
|||
], |
|||
email: [ |
|||
{ required: true, message: "邮箱不能为空", trigger: "blur" } |
|||
], |
|||
enterpriseDescribe: [ |
|||
{ required: true, message: "企业简介不能为空", trigger: "blur" } |
|||
], |
|||
name: [ |
|||
{ required: true, message: "企业名称不能为空", trigger: "blur" } |
|||
], |
|||
nameLegalRepresentative: [ |
|||
{ required: true, message: "法定代表人名称不能为空", trigger: "blur" } |
|||
], |
|||
companyImg: [ |
|||
{ required: true, message: "营业执照照片不能为空", trigger: "blur" } |
|||
], |
|||
faceIdImg: [ |
|||
{ required: true, message: "法人证件正面照片不能为空", trigger: "blur" } |
|||
], |
|||
} |
|||
}; |
|||
}, |
|||
created() { |
|||
}, |
|||
methods: { |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate(valid => { |
|||
if (valid) { |
|||
if (this.isEdit == true) { |
|||
|
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
enterpriseid: null, |
|||
address: null, |
|||
certificateNumberLegalRepresentative: null, |
|||
contactInformation: null, |
|||
corporateUnifiedSocialCreditCode: null, |
|||
email: null, |
|||
enterpriseDescribe: null, |
|||
logo: null, |
|||
name: null, |
|||
nameLegalRepresentative: null, |
|||
placeRegistrationAddress: null, |
|||
companyImg: null, |
|||
faceIdImg: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.el-form { |
|||
position: relative; |
|||
width: 1000px; |
|||
margin: 0 auto; |
|||
} |
|||
</style> |