Browse Source

v1.0 封板

master
DESKTOP-00SUCB6\Administrator 4 years ago
parent
commit
dda0c9ad43
  1. BIN
      public/h5/bg-scanCode.png
  2. BIN
      public/h5/bg-success-popup.png
  3. 150
      public/h5/invitation.html
  4. BIN
      public/h5/pic1-scanCode.png
  5. BIN
      public/h5/pic2-scanCode.png
  6. 202
      public/h5/scanCode.html
  7. 2
      src/api/system/certification.js
  8. 5
      src/views/company/campanyVerify.vue
  9. 2
      src/views/company/search.vue
  10. 2
      src/views/home/index2.vue
  11. 13
      src/views/system/enterprise/index.vue

BIN
public/h5/bg-scanCode.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 KiB

BIN
public/h5/bg-success-popup.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

150
public/h5/invitation.html

@ -127,15 +127,15 @@
.text-indent-1 {
text-indent:1em;
}
.content-mask{
.beinvited-popup{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
background: rgba(0, 0, 0, 0.5);
}
.content-mask .content-box{
.beinvited-popup .content-box{
position: absolute;
left: 8%;
top: 25%;
@ -152,7 +152,7 @@
}
.content-box .content-text .num-code{
float: right;
display: inline-block;
display: block;
width: 30%;
height: 44px;
margin-left: 8px;
@ -180,7 +180,32 @@
.content-box .content-close a img{
width: 100%;
}
.success-popup{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
.success-popup .content-box{
position: absolute;
left: 8%;
top: 25%;
width: 84%;
background: none;
box-shadow: none;
}
.success-popup .content-box .content-info img{
width: 100%;
}
.success-popup .content-box .content-close {
position: absolute;
left: 50%;
margin-left: -18px;
bottom: -20%;
width: 36px;
}
</style>
<body>
<div class="search-container flex-box-column">
@ -197,7 +222,8 @@
</div>
</div>
</div>
<div class="content-mask" id="content-mask" style="display: none;">
<!-- 受邀企业弹窗 -->
<div class="beinvited-popup" id="beinvited-popup" style="display: none;">
<div class="content-box">
<h3 class="content-title">受邀企业</h3>
<div class="content-info">
@ -219,12 +245,27 @@
</div>
</div>
</div>
<!-- 受邀企业注册成功提示弹窗 -->
<div class="success-popup" id="success-popup" style="display: none;">
<div class="content-box">
<div class="content-info">
<img src="bg-success-popup.png" alt="">
</div>
<div class="content-close">
<a href="javascript:;" class="btn-close"><img src="close.png" alt=""></a>
</div>
</div>
</div>
</body>
<script>
var code = '';
var uuid = "";
var enterpriseid= "";
var infoOpen = '';
var baseUrlIp = "http://121.36.65.171:9527";
var registerIP = "http://121.36.65.171:9527/swagger-ui.html#/"
var registerIP = "http://121.36.65.171:8778"
// 点击去注册按钮,复制链接并去浏览器打开
// 点击 去注册 按钮,复制链接并去浏览器打开
$(".btn-register").click(function(){
var input = $("<input value = "+ registerIP +">");
$("body").prepend(input);
@ -233,23 +274,28 @@
$("body").find("input").eq(0).remove();
alert("请到浏览器粘贴并打开链接 "+ registerIP);
});
// 点击登录并接受邀请按钮,打开受邀企业弹窗
// 点击 登录并接受邀请 按钮,打开受邀企业弹窗
$(".btn-invitate").click(function(){
if($("#content-mask").css("display")=="none"){
$("#content-mask").show();
if($("#beinvited-popup").css("display")=="none"){
$("#beinvited-popup").show();
}
});
// 点击关闭按钮,关闭弹窗
$(".btn-close").click(function(){
if($("#content-mask").css("display")=="block"){
$("#content-mask").hide();
// 点击 接受邀请弹窗-关闭按钮,关闭弹窗
$(".beinvited-popup .btn-close").click(function(){
if($("#beinvited-popup").css("display")=="block"){
$("#beinvited-popup").hide();
}
});
// 验证码
var uuid = "";
// 点击 受邀企业成功提示弹窗-关闭按钮,关闭弹窗
$(".success-popup .btn-close").click(function(){
if($("#success-popup").css("display")=="block"){
$("#success-popup").hide();
}
});
// 默认加载验证码
$(document).ready(function(res){
$.ajax({
url: baseUrlIp + "/captchaImage",
url: baseUrlIp + "/captchaImage",//调用获取验证码接口
type: "get", // 请求方式get / post
dataType: "json", // 数据类型
// 请求成功后的回调函数
@ -287,7 +333,7 @@
}
});
});
// 点击接受邀请按钮,提交验证
// 点击 接受邀请 按钮,提交验证
$(".btn-accept").click(function(){
var name = $('input[name=name]').val();
var password = $('input[name=password]').val();
@ -309,49 +355,73 @@
}
const data = {
'username':name,
'password':password,
    'code':vcode,
    'uuid':uuid
  }
    username:name,
    password,
    code:vcode,
    uuid
   }
$.ajax({
url: baseUrlIp + "/login",
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()
contentType : "application/json;charset=utf-8",
data : JSON.stringify(data),
            // 请求成功后的回调函数
            success: function(res) {
var token = res.token;
                if(res.code == 200){
const dataT = {
enterpriseId:parseInt(enterpriseid),
isItPublic:infoOpen
   }
                    $.ajax({
url: baseUrlIp + "/system/enterprise/acceptInvitation",//调用接受邀请接口
type: "post", // 请求方式get / post
dataType: "json", // 数据类型
contentType : "application/json;charset=utf-8",
data: JSON.stringify(dataT ),
headers: {
              'Authorization': token,
            },
// 请求成功后的回调函数
success: function(res) {
if(res.code == 200){
$("#success-popup").show()
                    $("#beinvited-popup").hide()
} else {
alert(res.msg)
}
},
error: function(err) {
console.log(err);
}
});
                } else {
alert(res.msg)
}
},
            },
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];
enterpriseid=str.split('&')[0];
if(enterpriseid.indexOf('=') == -1) {
return
}
enterpriseid = enterpriseid.split('=')[1]
var infoOpen=str.split('&')[1];
infoOpen=str.split('&')[1];
if(infoOpen.indexOf('=') == -1) {
return
}
infoOpen = infoOpen.split('=')[1]
$.ajax({
url: baseUrlIp + "/system/enterpriseManager/selectEnterpriseByIdForH5?enterpriseid=" + enterpriseid,
url: baseUrlIp + "/system/enterpriseManager/selectEnterpriseByIdForH5?enterpriseid=" + enterpriseid,//调用根据企业ID获取企业信息接口
type: "get", // 请求方式get / post
dataType: "json", // 数据类型
// 请求成功后的回调函数

BIN
public/h5/pic1-scanCode.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

BIN
public/h5/pic2-scanCode.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

202
public/h5/scanCode.html

@ -1,202 +0,0 @@
<!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>

2
src/api/system/certification.js

@ -66,7 +66,7 @@ export function certificationEnterprise(data) {
return request({
url: '/system/enterpriseManager/certificationEnterprise',
method: 'post',
// data: data
data: data
})
}

5
src/views/company/campanyVerify.vue

@ -157,7 +157,10 @@ methods: {
//
applyAuthen(type) {
if(type == 1){
certificationEnterprise().then(res => {
let param = {
'enterpriseId':this.form.enterpriseId
}
certificationEnterprise(param).then(res => {
this.msgInfo(res.msg);
if(res.msg.indexOf('工商认证成功') != -1) {
this.form.businessCertificationTime = new Date().toLocaleDateString()

2
src/views/company/search.vue

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<div class="search-form" :style="showSearchData ? 'margin:0;':'margin:0 auto;'">
<div class="search-form" >
<div class="search-top">
<img src="@/assets/images/search.png" class="search">
<label for="searchForm">食品原料供应商资质检索</label>

2
src/views/home/index2.vue

@ -14,7 +14,7 @@
<div class="company-info-block">
<el-row>
<el-col :span="4">
<img :src="enterpriseUrl" style="width:200px;height:200px">
<img :src="enterpriseUrl" style="width:90%;">
<br>
<el-button :type="companyInfo.businessCertificationStatus == 1 ? 'success':'info'" class="auth-btn" style="width:80px;margin-right:10px">工商{{companyInfo.businessCertificationStatus == 1 ? '已':'未'}}认证</el-button>
<el-button :type="companyInfo.industrialInternetCertificationStatus == 1 ? 'success':'info'" class="auth-btn">工业互联网{{companyInfo.industrialInternetCertificationStatus == 1 ? '已':'未'}}认证</el-button>

13
src/views/system/enterprise/index.vue

@ -10,7 +10,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="合作关系状态" prop="status">
<!-- <el-form-item label="合作关系状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择合作关系状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
@ -19,7 +19,7 @@
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="建立合作关系时间" prop="createTime">
<el-date-picker clearable size="small"
v-model="queryParams.createTime"
@ -82,10 +82,9 @@
</el-row>
<el-table v-loading="loading" :data="enterpriseList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="建立合作关系时间" align="center" prop="id" />
<!-- <el-table-column label="建立合作关系时间" align="center" prop="id" /> -->
<el-table-column label="合作企业名称" align="center" prop="cooperativeEnterpriseName" />
<el-table-column label="合作关系状态" align="center" prop="status" :formatter="statusFormat" />
<!-- <el-table-column label="合作关系状态" align="center" prop="status" :formatter="statusFormat" /> -->
<el-table-column label="建立合作关系时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
@ -133,13 +132,13 @@
>{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="邀请码:" prop="enterpriseId">
<!-- <el-form-item label="邀请码:" prop="enterpriseId">
<vue-qr ref="Qrcode" :logoSrc="imageUrl" :text="qrTest" :size="200" :margin="0"></vue-qr>
</el-form-item>
<el-form-item >
<el-button type="primary" size="mini" @click="downloadImg">下载二维码</el-button>
</el-form-item>
</el-form-item> -->
</el-form>

Loading…
Cancel
Save