访客码反扫开门修改测试
diff --git a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
index 6b2743d..3a1305e 100644
--- a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
+++ b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
@@ -24,6 +24,7 @@
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -64,6 +65,22 @@
// return "apph5/leavehistory";
// }
+ @RequestMapping("/doorappvisitorindex")
+ public String appindex(@RequestParam(value = "custid") String custid, Model model) {
+ model.addAttribute("custid", custid);
+ TCustomer cust=webInterfaceService.findCustomerById(custid);
+ if(cust==null){
+ return "atte/app/error";
+ }
+ return "apph5/applyforvisitorindex";
+ }
+ @GetMapping("/doorvisitorhistory")
+ public ModelAndView searchindex(@RequestParam(value = "custid")String custid){
+ ModelAndView model=new ModelAndView();
+ model.addObject("custid",custid);
+ model.setViewName("apph5/myleave");
+ return model;
+ }
@RequestMapping("/doorappvisitor")
public String doorappvisitor(@RequestParam(value = "custid") String custid, Model model) {
@@ -288,46 +305,48 @@
if (b) {
//long listid = webInterfaceService.getNextSeqTDoorcardlst();
//从缓存读取列表值并加1
- long listid = RedisUtil.incr("seq_cardlist");
- TNcCardlist tmpCardlist = new TNcCardlist();
- tmpCardlist.setListid(listid + "");
- tmpCardlist.setCustid(s);
- tmpCardlist.setCustname(postData.getVisitorname());
- tmpCardlist.setCardno(s);
- tmpCardlist.setBankcardno("");
- tmpCardlist.setCardphyid("");
- tmpCardlist.setClosedate(lasttime);
- tmpCardlist.setDeviceid(3);
- tmpCardlist.setOperflag("A");
- tmpCardlist.setRectime(time);
- tmpCardlist.setSynctime("");
- tmpCardlist.setSyncflag("Y");
- tmpCardlist.setRtnflag("Y");
- tmpCardlist.setRtntime(time);
- tmpCardlist.setVersion(1);
- tmpCardlist.setOperid("");
- tmpCardlist.setReason("内部人员访客app申请");
+ for(int n=10;n<=17;n++){
+ long listid = RedisUtil.incr("seq_cardlist");
+ TNcCardlist tmpCardlist = new TNcCardlist();
+ tmpCardlist.setListid(listid + "");
+ tmpCardlist.setCustid(s);
+ tmpCardlist.setCustname(postData.getVisitorname());
+ tmpCardlist.setCardno(s);
+ tmpCardlist.setBankcardno("");
+ tmpCardlist.setCardphyid("");
+ tmpCardlist.setClosedate(lasttime);
+ tmpCardlist.setDeviceid(n);
+ tmpCardlist.setOperflag("A");
+ tmpCardlist.setRectime(time);
+ tmpCardlist.setSynctime("");
+ tmpCardlist.setSyncflag("Y");
+ tmpCardlist.setRtnflag("Y");
+ tmpCardlist.setRtntime(time);
+ tmpCardlist.setVersion(1);
+ tmpCardlist.setOperid("");
+ tmpCardlist.setReason("内部人员访客app申请");
- tNcCardlists.add(tmpCardlist);
+ tNcCardlists.add(tmpCardlist);
- //webInterfaceService.saveTDoorcardlst(tDoorcardlst);
- TNcAllottimeId tNcAllottimeId = new TNcAllottimeId();
- tNcAllottimeId.setListid(listid + "");
- tNcAllottimeId.setTimeid("1");
- TNcAllottime tNcAllottime = new TNcAllottime();
- tNcAllottime.setDeviceid(3);
- tNcAllottime.setId(tNcAllottimeId);
+ //webInterfaceService.saveTDoorcardlst(tDoorcardlst);
+ TNcAllottimeId tNcAllottimeId = new TNcAllottimeId();
+ tNcAllottimeId.setListid(listid + "");
+ tNcAllottimeId.setTimeid("1");
+ TNcAllottime tNcAllottime = new TNcAllottime();
+ tNcAllottime.setDeviceid(n);
+ tNcAllottime.setId(tNcAllottimeId);
- tNcAllottimes.add(tNcAllottime);
- //long end1=System.currentTimeMillis(); //获取结束时间
- //System.out.println("程序运行时间: "+(end1-start1)+"ms");
+ tNcAllottimes.add(tNcAllottime);
+ //long end1=System.currentTimeMillis(); //获取结束时间
+ //System.out.println("程序运行时间: "+(end1-start1)+"ms");
- doorlistMgrService.batchSaveCardList(tNcCardlists);
- doorlistMgrService.batchSaveAllotTime(tNcAllottimes);
- tNcCardlists.clear();
- tNcAllottimes.clear();
- RedisUtil.incr("zcard_max_version");
- tNcCardlists.clear();
+ doorlistMgrService.batchSaveCardList(tNcCardlists);
+ doorlistMgrService.batchSaveAllotTime(tNcAllottimes);
+ tNcCardlists.clear();
+ tNcAllottimes.clear();
+ RedisUtil.incr("zcard_max_version");
+ tNcCardlists.clear();
+ }
}
diff --git a/src/main/java/com/supwisdom/dlpay/visitormanage/dao/impl/VisitorDaoImpl.java b/src/main/java/com/supwisdom/dlpay/visitormanage/dao/impl/VisitorDaoImpl.java
index 039ca1e..22caefe 100644
--- a/src/main/java/com/supwisdom/dlpay/visitormanage/dao/impl/VisitorDaoImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/visitormanage/dao/impl/VisitorDaoImpl.java
@@ -95,10 +95,10 @@
String sex = param.getSex();
String startdate = param.getStartdate();
String enddate = param.getEnddate();
- String sql = "select a.visitorname,a.idno,a.phone,a.transdate,a.transtime,a.deptcode,a.custid,a.company,a.sex,a.remarks,b.custname,c.deptname from E_VISITOR_CHECK_DTL a left join t_customer b on a.custid=b.custid left join tb_dept c on c.deptcode=a.deptcode " +
- " where a.status='1' ";
+ String sql = "select a.visitorname,a.idno,a.phone,a.transdate,a.transtime,a.deptcode,a.custid,a.company,a.sex,a.remarks,b.custname,c.deptname,a.isqrcode,a.lastopentime,a.usecount,a.totalcount,a.qrcode from E_VISITOR_CHECK_DTL a left join t_customer b on a.custid=b.custid left join tb_dept c on c.deptcode=a.deptcode " +
+ " where 1=1 ";
String countSql = "select count(*) as cnt from E_VISITOR_CHECK_DTL a left join t_customer b on a.custid=b.custid left join tb_dept c on c.deptcode=a.deptcode " +
- " where a.status='1' ";
+ " where 1=1 ";
if (!StringUtil.isEmpty(visitorname)) {
sql += " and a.visitorname like :visitorname ";
@@ -177,7 +177,7 @@
public EVisitorCheckDtl getVisitorCheckById(int id) {
String sql = "select a.* from E_VISITOR_CHECK_DTL a " +
- " where a.id = ? and a.status = 1 ";
+ " where a.id = ? ";
Query query = entityManager.createNativeQuery(sql, EVisitorCheckDtl.class);
query.setParameter(1, id);
List<EVisitorCheckDtl> list = query.getResultList();
diff --git a/src/main/java/com/supwisdom/dlpay/visitormanage/domain/VisitorShowBean.java b/src/main/java/com/supwisdom/dlpay/visitormanage/domain/VisitorShowBean.java
index 000e877..36e9d2f 100644
--- a/src/main/java/com/supwisdom/dlpay/visitormanage/domain/VisitorShowBean.java
+++ b/src/main/java/com/supwisdom/dlpay/visitormanage/domain/VisitorShowBean.java
@@ -14,6 +14,14 @@
private String company;
private String remarks;
private String sex;
+ private String isqrcode;
+ private String lastopentime;
+
+ private Integer totalcount;
+
+ private Integer usecount;
+
+ private String qrcode;
private Integer status;
diff --git a/src/main/resources/templates/apph5/applyforvisitorindex.html b/src/main/resources/templates/apph5/applyforvisitorindex.html
new file mode 100644
index 0000000..c8fd6f5
--- /dev/null
+++ b/src/main/resources/templates/apph5/applyforvisitorindex.html
@@ -0,0 +1,103 @@
+
+<!DOCTYPE html>
+<html style="height: 100%" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
+
+<head>
+ <title>请假</title>
+ <!--<meta name="_csrf_header" th:content="${_csrf.headerName}" />
+ <meta name="_csrf_token" th:content="${_csrf.parameterName}" th:value="${_csrf.token}" />-->
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="stylesheet" href="/static/libs/layui/css/layui.css" th:href="@{/static/libs/layui/css/layui.css}"/>
+
+ <link rel="stylesheet" href="/static/res/assets/plugins/element-ui/theme-default/index.css" th:href="@{/static/res/assets/plugins/element-ui/theme-default/index.css}"/>
+
+ <!--<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>-->
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.min.js}"></script>
+ <!--<script type="text/javascript" th:src="@{/static/libs/layui/layui.js}"></script>-->
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.form.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/layer/layer.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/js/vue.min.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/element-ui/index.js}"></script>
+
+
+ <link rel="stylesheet" th:href="@{/static/libs/weui/weui.min.css}" media="all"/>
+</head>
+
+<body style="height: 100%;background:#f0f0ff">
+<!--<div class="topbar">-->
+ <!--<p style="text-align: center;display: block;font-size:20px">请假</p>-->
+<!--</div>-->
+<div class="weui-cells">
+ <a class="weui-cell weui-cell_access" th:href="@{'/app/doorappvisitor?custid='+${custid}}" >
+ <div class="weui-cell__bd">
+ <p>访客申请</p>
+ </div>
+ <div class="weui-cell__ft">
+ </div>
+ </a>
+
+</div>
+<div class="weui-cells">
+ <a class="weui-cell weui-cell_access" th:href="@{'/app/doorvisitorhistory?custid='+${custid}}" >
+ <div class="weui-cell__bd">
+ <p>申请记录</p>
+ </div>
+ <div id="test" class="weui-cell__ft">
+ </div>
+ </a>
+
+</div>
+
+
+
+</body>
+
+<script>
+
+ $(function () {
+
+ });
+ function add() {
+ var custid=[[${custid}]];
+ alert('ok');
+ $.ajax({
+ type: "get",
+ url: "[[@{/app/atte/addindex?custid=}]]"+custid,
+ dataType: "json",
+ success: function (data) {
+
+ }
+ });
+ }
+ function search(){
+ var custid=[[${custid}]];
+ $.ajax({
+ type: "get",
+ url: "[[@{app/atte/searchindex?custid=}]]"+custid,
+ dataType: "json",
+ success: function (data) {
+
+
+ }
+ });
+ }
+ function review() {
+ var custid=[[${custid}]];
+ $.ajax({
+ type: "get",
+ url: "[[@{app/atte/reviewindex?custid=}]]"+custid,
+ dataType: "json",
+ success: function (data) {
+
+
+ }
+ });
+ }
+
+</script>
+
+<style>
+
+</style>
\ No newline at end of file
diff --git a/src/main/resources/templates/apph5/visitorhistory.html b/src/main/resources/templates/apph5/visitorhistory.html
new file mode 100644
index 0000000..5fac38e
--- /dev/null
+++ b/src/main/resources/templates/apph5/visitorhistory.html
@@ -0,0 +1,598 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
+
+<head>
+ <title>首页</title>
+ <!--<meta name="_csrf_header" th:content="${_csrf.headerName}" />
+ <meta name="_csrf_token" th:content="${_csrf.parameterName}" th:value="${_csrf.token}" />-->
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="stylesheet" href="/static/libs/layui/css/layui.css" th:href="@{/static/libs/layui/css/layui.css}"/>
+
+ <link rel="stylesheet" href="/static/res/assets/plugins/element-ui/theme-default/index.css"
+ th:href="@{/static/res/assets/plugins/element-ui/theme-default/index.css}"/>
+ <link rel="stylesheet" href="/static/res/assets/css/wxpage.css"
+ th:href="@{/static/res/assets/css/wxpage.css}"/>
+ <!--<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>-->
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.min.js}"></script>
+ <!--<script type="text/javascript" th:src="@{/static/libs/layui/layui.js}"></script>-->
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.form.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/layer/layer.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/js/vue.min.js}"></script>
+ <script type="text/javascript" th:src="@{/static/res/assets/plugins/element-ui/index.js}"></script>
+
+
+</head>
+
+<body>
+
+<div id="app">
+ <div class="page-title" style="text-align:center; font-size: 24px;color: #FF8247;margin-top:7%">申请记录</div><br>
+
+ <el-button type="primary" @click="showdiv()" style="float: right">筛 选</el-button>
+
+
+
+ <div class="row">
+ <div class="col-md-12" style="padding-left: 0px;padding-right: 0px">
+ <div class="box box-primary" style="margin-bottom: 15px">
+ <div class="box-body box-profile">
+ <template>
+ <el-table
+ ref="singleTable"
+ :data="tableData"
+ highlight-current-row
+ @current-change="currRowChange"
+ stripe
+ border>
+ <el-table-column
+ prop="custid"
+ align="center"
+ v-show="false">
+ <template scope="scope">
+ <div class="weui-panel__bd">
+ <div class="weui-media-box weui-media-box_text">
+ <h4 class="weui-media-box__title" style="display: flex">
+ <div style="flex: 1">{{scope.row.custname}}</div>
+ <div>{{scope.row.deptname}}</div>
+ </h4>
+ <p class="weui-media-box__desc">
+ <div class="weui-cell__bd">
+ <span style="font-size:14px;color:#999; "></span>
+ </div>
+ <div style="display: flex;">
+
+ <div style="font-size:14px;color:#999;flex: 1">
+ 请假时间{{scope.row.startdate}}--{{scope.row.enddate}}
+ </div>
+ <div style="font-size:14px;color:#999;margin-left:10px">
+ <span v-if="scope.row.status== '0'"><el-button
+ type="warning"
+ @click="editDtl(scope.row)">未审核</el-button></span>
+ <span v-if="scope.row.status== '1'"><el-button
+ type="success"
+ @click="editDtl(scope.row)">已通过</el-button></span>
+ <span v-if="scope.row.status== '2'"><el-button
+ type="success"
+ @click="editDtl(scope.row)">未通过</el-button></span>
+ <span v-if="scope.row.status== '3'"><el-button
+ type="success"
+ @click="editDtl(scope.row)">取消</el-button></span>
+ <span v-if="scope.row.status== '4'"><el-button
+ type="warning"
+ @click="editDtl(scope.row)">删除</el-button></span>
+ </div>
+
+ </div>
+ </p>
+ </div>
+ </div>
+
+ </template>
+ </el-table-column>
+
+ <!--<el-table-column
+ prop="custname"
+ label="名称"
+ align="center">
+ </el-table-column>
+ <el-table-column
+ prop="remark"
+ label="描述"
+ align="center">
+ </el-table-column>
+ <el-table-column
+ prop="startdate"
+ label="开始日期"
+
+ align="center">
+ </el-table-column>
+ <el-table-column
+ prop="enddate"
+ label="结束日期"
+
+ align="center">
+ </el-table-column>
+
+<el-table-column
+ prop="status"
+ label="状态"
+
+ align="center">
+ <template scope="scope">
+ <span v-if="scope.row.status=== '1'"><el-tag
+ type="success">已批准</el-tag></span>
+ <span v-if="scope.row.status=== '2'"><el-tag
+ type="warning">未批准</el-tag></span>
+ </template>
+
+ </el-table-column>
+
+ <el-table-column
+ label="操作"
+ fixed="right"
+ align="center"
+ >
+ <template scope="scope">
+ <button v-if="scope.row.status=== '2'" type="button" class="btn btn-danger btn-xs"
+ title="批准"
+ @click="delUser(scope.row.ids)">批准
+ </button>
+ </template>
+ </el-table-column>-->
+ </el-table>
+ <div class="clearfix"></div>
+ <el-pagination
+ @size-change="handleSizeChange"
+ @current-change="currPageChange"
+ :current-page="currPage"
+ :page-sizes="[10, 20, 50, 100]"
+ :page-size="pageSize"
+ layout="prev, pager, next,sizes, jumper,total"
+ :total="totSize">
+ </el-pagination>
+
+ </template>
+ </div>
+ </div>
+ </div>
+ </div>
+ <el-dialog :title="updatetitle2" :visible.sync="dialogFormVisible2" size="large"
+ :modal-append-to-body='false' @close="closeDialog('historyform')">
+ <el-form ref="historyform" class="el-form-item " :model="historyform"
+ :rules="rules" label-width="36%">
+ <el-form-item label="姓名:" prop="custname">
+ <el-col :span="18">
+ <el-input v-model="historyform.custname" readonly style="width: 90%;" maxlength="20">
+ </el-input>
+ </el-col>
+ </el-form-item>
+ <el-form-item label="人员类别:" prop="custtypename">
+ <el-col :span="18">
+ <el-input v-model="historyform.custtypename" readonly style="width: 90%;" maxlength="20">
+ </el-input>
+ </el-col>
+ </el-form-item>
+ <el-form-item label="请假类型:" prop="rtypename">
+ <el-col :span="18">
+ <el-input v-model="historyform.rtypename" readonly style="width: 90%;" maxlength="20">
+ </el-input>
+ </el-col>
+ </el-form-item>
+ <el-form-item label="状态:" prop="statusname">
+ <el-col :span="18">
+ <el-input v-model="historyform.statusname" readonly style="width: 90%;" maxlength="20">
+ </el-input>
+ </el-col>
+ </el-form-item>
+ <el-form-item label="备注:" prop="remark">
+ <el-col :span="18">
+ <el-input type="textarea" style="width: 90%;" v-model="historyform.remark" placeholder="填写备注"
+ readonly>
+ </el-input>
+ </el-col>
+ </el-form-item>
+
+
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="resetForm('historyform') ">取 消</el-button>
+ <el-button type="primary" v-if="historyform.status== '0'" @click="review('historyform')">取消申请</el-button>
+
+
+ </div>
+ </el-dialog>
+ <el-dialog :title="updatetitle" :visible.sync="dialogFormVisible" style="width: 100%" :modal-append-to-body='false'
+ @close="closeDialog('tempform')" size="large">
+ <el-form ref="tempform" :model="tempform" data-parsley-validate
+ class="el-form-item" style="width: 100%">
+ <el-form-item label="请假类型:" prop="rtype">
+ <div class="el-col el-col-18">
+ <div class="el-input" style="width: 90%;">
+ <el-select v-model="tempform.rtype" id="rtype">
+ <el-option
+ v-for="status in rtypelist"
+ :key="status.value"
+ :label="status.label"
+ :value="status.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-form-item>
+ <el-form-item label="状 态:" prop="status">
+ <div class="el-col el-col-18">
+ <div class="el-input" style="width: 90%;">
+ <el-select v-model="tempform.status" id="status">
+ <el-option
+ v-for="status in statuslist"
+ :key="status.value"
+ :label="status.label"
+ :value="status.value">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </el-form-item>
+
+ </el-form>
+ <div slot="footer" style="text-align:center; ">
+ <el-button type="primary" @click="saveTemp('tempform')">查 询</el-button>
+ <el-button type="primary" @click="closediv()">取 消</el-button>
+ </div>
+ </el-dialog>
+</div>
+
+
+</body>
+
+<script>
+ var validatePhone = function (rule, value, callback) {
+ if (value == "") {
+ callback(new Error("请输入手机号"));
+ } else if (!isCellPhone(value)) {//引入methods中封装的检查手机格式的方法
+ callback(new Error("请输入正确的手机号!"));
+ } else {
+ callback();
+ }
+ }
+
+ var app_vue = new Vue({
+ el: '#app',
+ data: {
+ tableData: [],
+ confName: '1234',
+ currPage: 1,
+ pageSize: 20,
+ totSize: 0,
+ currentRow: null,
+ tempform: {
+ rtype: '',
+ custtype: '',
+ status: '',
+ },
+ historyform: {
+ custid: '',
+ custname: '',
+ startdate: '',
+ enddate: '',
+ remark: '',
+ rtype: '',
+ status: '',
+ custtype: '',
+ id: ''
+ },
+ sexlist: [],
+ rtypelist: [],
+ custtypelist: [],
+ statuslist: [],
+ bannerHeight: 1000,
+ screenWidth: 0,
+ userId: '',
+ dialogFormVisible: false,
+ dialogFormVisible2: false,
+ dlgAllotDevVisible: false,
+ updatetitle: '筛选',
+ updatetitle2: '详情',
+ rules: {
+ /*visitorname: [
+ {required: true, message: '请输入访客姓名', trigger: 'blur'},
+ ],
+ idno: [
+ {required: true, message: '请输入访客身份证号', trigger: 'blur'}
+ ],
+ sex: [
+ {required: true, message: '请输入访客性别', trigger: 'blur'}
+ ],
+ remarks: [
+ {required: true, message: '请输入备注', trigger: 'blur'}
+ ],
+ phone: [
+ {required: true, validator: validatePhone, trigger: 'blur'}
+ ]*/
+ },
+ },
+
+ methods: {
+ saveTemp: function (formName) {
+ this.dialogFormVisible = false;
+
+ var _that = this;
+ this.pagesize = 10;
+ this.currPage = 1;
+ commonQuery(this, this.tempform.rtype, this.tempform.status, this.tempform.custid, this.currPage, this.pageSize);
+ },
+ review: function (formName) {
+ this.dialogFormVisible2 = false;
+
+ var _that = this;
+ this.pagesize = 10;
+ this.currPage = 1;
+ reviewupdate(this, 3, this.historyform.id);
+ },
+ showdiv: function (row) {
+ this.dialogFormVisible = true;
+ this.updatetitle = "筛选"
+ },
+ editDtl: function (row) {
+ dtl_getFillData(this, row);
+ this.dialogFormVisible2 = true;
+ this.updatetitle2 = "详情"
+ },
+ closediv: function () {
+ this.dialogFormVisible = false;
+ },
+ currRowChange: function (val) {
+ this.currentRow = val;
+ },
+ indexChange: function (pre, next) {
+ var _self = this;
+ var devIdListTmp = _self.devIdList;
+ _self.selectDevId = devIdListTmp[pre];
+ // console.log(_self.selectDevId)
+
+ },
+ setSize: function () {
+ // 通过浏览器宽度(图片宽度)计算高度
+ this.bannerHeight = this.screenWidth;
+ }, handleSizeChange: function (val) {
+ this.pageSize = val;
+ commonQuery(this, this.tempform.rtype ,this.tempform.status, this.tempform.custid, this.currPage, this.pageSize);
+ //console.log('每页条'+val);
+ }, currPageChange: function (val) {
+ this.currPage = val;
+ commonQuery(this, this.tempform.rtype, this.tempform.status, this.tempform.custid, this.currPage, this.pageSize);
+ //console.log('当前页:'+val);
+ },resetForm:function(formName) {
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false;
+ this.dialogFormVisible2 = false;
+ }
+
+ },
+ created: function () {
+ var _self = this;
+ // 首次加载时,需要调用一次
+ _self.screenWidth = window.innerWidth;
+ _self.setSize();
+ var confid = '[[${custid}]]';
+ console.log(confid);
+ _self.tempform.custid = confid;
+ var sexl = [];
+ sexl.push({
+ value: '',
+ label: '请选择'
+ });
+ sexl.push({
+ value: '11',
+ label: '事假'
+ });
+ sexl.push({
+ value: '12',
+ label: '病假'
+ });
+ sexl.push({
+ value: '13',
+ label: '年假'
+ });
+ sexl.push({
+ value: '14',
+ label: '调休'
+ });
+ sexl.push({
+ value: '15',
+ label: '其他'
+ });
+ _self.rtypelist = sexl;
+ var statl = [];
+ statl.push({
+ value: '',
+ label: '请选择'
+ });
+ statl.push({
+ value: '0',
+ label: '未审核'
+ });
+ statl.push({
+ value: '1',
+ label: '已通过'
+ });
+ statl.push({
+ value: '2',
+ label: '未通过'
+ });
+ statl.push({
+ value: '3',
+ label: '取消'
+ });
+
+
+ _self.statuslist = statl;
+ $.ajax({
+ type: "get",
+ dataType: "json",
+ url: encodeURI("[[@{/app/atte/getcusttypelist}]]"),
+ success: function (ret) {
+ var dlist = [];
+ dlist.push({
+ value: '',
+ label: '请选择'
+ });
+ var rB = ret.custtypelist;
+ if (rB != null) {
+ for (var j = 0; j < rB.length; j++) {
+ dlist.push({
+ value: rB[j]["custtype"],
+ label: rB[j]["custtypename"]
+ });
+ }
+ }
+
+ _self.custtypelist = dlist;
+
+ }
+ })
+
+ }
+ })
+
+ // 窗口大小发生改变时,调用一次
+ window.onresize = function () {
+ app_vue.screenWidth = window.innerWidth;
+ app_vue.setSize();
+ }
+
+ function showsearchform() {
+ $("#sear").show();
+ }
+
+ function closesearchform() {
+ $("#sear").hide();
+ }
+
+ function dtl_getFillData(_self, row) {
+ _self.historyform.custname = row.custname;
+ _self.historyform.custtype = row.custtype;
+ _self.historyform.custtypename = row.custtypename;
+ _self.historyform.status = row.status;
+ _self.historyform.id = row.id;
+ if (row.status == "0") {
+ _self.historyform.statusname = "未审核"
+ } else if (row.status == "1") {
+ _self.historyform.statusname = "已通过"
+ } else if (row.status == "2") {
+ _self.historyform.statusname = "未通过"
+ } else if (row.status == "3") {
+ _self.historyform.statusname = "取消"
+ } else {
+ _self.historyform.statusname = "删除"
+ }
+ if (row.rtype == "11") {
+ _self.historyform.rtypename = "事假"
+ } else if (row.rtype == "12") {
+ _self.historyform.rtypename = "病假"
+ } else if (row.rtype == "13") {
+ _self.historyform.rtypename = "年假"
+ } else if (row.rtype == "14") {
+ _self.historyform.rtypename = "调休"
+ } else if (row.rtype == "15") {
+ _self.historyform.rtypename = "其他"
+ }
+ _self.historyform.remark = row.remark;
+ }
+
+ function saveTempCustomer(_that, formdata, formName) {
+ var token = $("meta[name='_csrf_token']").attr("value");
+ $.ajax({
+ type: "post",
+ url: encodeURI("[[@{/app/atte/getreviewlist}]]"),
+ dataType: "json",
+ contentType: "application/json",
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ 'X-CSRF-TOKEN': token,
+ },
+ data: JSON.stringify(formdata),
+ success: function (data) {
+
+ if (data.retcode != "0") {
+ layer.msg(data.retmsg, {icon: 2, time: 2000});
+ window.location = "[[@{/app/getapplyqrcode?visitorid=}]]" + data.visitorid;
+ } else {
+ layer.msg('登记成功!', {icon: 1, time: 1000});
+ }
+ }
+ });
+ }
+
+ function commonQuery(_self, rtype, status, custid, pageno, pagesize) {
+ $.ajax({
+ type: "get",
+ dataType: "json",
+ url: "[[@{/app/atte/getrestlist?rtype=}]]" + rtype + "&status=" + status + "&custid=" + custid + "&pageNo=" + pageno + "&pageSize=" + pagesize,
+ success: function (info) {
+ console.log(info)
+
+ _self.tableData = info.page.list;
+ _self.totSize = info.page.totalCount;
+ }
+ })
+ }
+
+ function reviewupdate(_self, status, id) {
+ $.ajax({
+ type: "get",
+ dataType: "json",
+ url: "[[@{/app/atte/cancelRest?id=}]]" + id + "&status=" + status,
+ success: function (info) {
+ console.log(info)
+ if (info.errStr != "") {
+ layer.msg(info.errStr, {icon: 2, time: 2000});
+ } else {
+ layer.msg('修改成功!', {icon: 1, time: 1000});
+ }
+ commonQuery(_self, _self.tempform.rtype, _self.tempform.status, _self.tempform.custid, _self.currPage, _self.pageSize);
+ }
+ })
+ }
+
+ function isCellPhone(val) {
+ if (!/^1(3|4|5|6|7|8)\d{9}$/.test(val)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+
+</script>
+
+<style>
+
+ .el-carousel__item h3 {
+ color: #ff3366;
+ font-size: 14px;
+ opacity: 0.75;
+ line-height: 300px;
+ margin: 0;
+ /*background-color:#66cccc;
+ border: 0px solid #e5e5e5;
+ width: 50%;
+ left: 10%;
+ height: 100%;*/
+ }
+
+ .el-carousel__item:nth-child(2n) {
+ background-color: #ffffff;
+ }
+
+ .el-carousel__item:nth-child(2n+1) {
+ background-color: #ffffff;
+ }
+
+ .el-carousel__item .Carousel {
+ border-bottom: 1px solid #f1f4f8;
+ }
+</style>
\ No newline at end of file
diff --git a/src/main/resources/templates/visitormanage/customer/visitorchecklist.html b/src/main/resources/templates/visitormanage/customer/visitorchecklist.html
index 25295f6..264d525 100644
--- a/src/main/resources/templates/visitormanage/customer/visitorchecklist.html
+++ b/src/main/resources/templates/visitormanage/customer/visitorchecklist.html
@@ -92,7 +92,19 @@
{field: 'company', align: 'center', title: '单位'},
{field: 'custname', align: 'center', title: '受访人'},
{field: 'deptname', align: 'center', title: '受访人部门'},
- {field: 'remarks', align: 'center', title: '备注'}
+ {field: 'remarks', align: 'center', title: '备注'},
+ {field: 'isqrcode', align: 'center', title: '开门方式',
+ templet: function (item) {
+ if(item.qrcode==1){
+ return "二维码开门"
+ }else {
+ return "正常访问"
+ }
+ }},
+ {field: 'lastopentime', align: 'center', title: '开门时间'},
+ {field: 'usecount', align: 'center', title: '使用次数'},
+ {field: 'totalcount', align: 'center', title: '总次数'},
+ {field: 'qrcode', align: 'center', title: '二维码'}
]
]
});