大理访客登记流水显示修改及h5请假页面修改
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 4d643d0..aa5dd7e 100644
--- a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
+++ b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
@@ -6,6 +6,8 @@
 import com.supwisdom.dlpay.doorlist.service.DoorlistMgrService;

 import com.supwisdom.dlpay.framework.util.DateUtil;

 import com.supwisdom.dlpay.framework.util.StringUtil;

+import com.supwisdom.dlpay.mainservice.domain.TCustomer;

+import com.supwisdom.dlpay.mainservice.service.WebInterfaceService;

 import com.supwisdom.dlpay.ncmgr.domain.TNcCardlist;

 import com.supwisdom.dlpay.ncmgr.domain.TNcDevice;

 import com.supwisdom.dlpay.ncmgr.service.NcService;

@@ -41,6 +43,8 @@
     DoorlistMgrService doorlistMgrService;

     @Autowired

     private VisitormanageService visitormanageService;

+    @Autowired

+    private WebInterfaceService webInterfaceService;

     private String wechatURL, redirect, appid, appsecret;

 

     private final String privatekeystring = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAK9Zcfjepn4EJvCIvEa28UY6/PgZtyO1aRv9SXJmk3X9p4etO2MpWJUL6KLd6ZAIXuKn+qmejnrg3NiWpewvGqLOuz6x0PjA21AQlc/Gf+bVkRZfH8so/om6dv0w6KwDMuwZoXtVToM81Z1gNLdfVNBskOj7c1sEpNWOUOn6qY5DAgMBAAECgYEApJdEz+HOTcL/+g+fCpF18AI2qXsZ2L7Tpp4dbvCxwbMSqdwFPpL0vxKqjxXVwojY58/dDZHzE4w2QGdH32ZnjJKIfE5Li9xjPyS9V6fHe2Lttocns1QaFhMLzHA9tgnC+HK5bP9bAyd4SCsXkUIQDMf824ytkAPgxooYp0lF+aECQQDr+r7Gfjf/FjelxndTyxCaFXSO/DbTPeabzw2RXx/SARqlttABMi45R/JxIpny/5OVlgu4NbmApfRxTv2qaAJ1AkEAvjne/XOR7ojwO9DomTIaHyWQ2NotMltnQXjHo5+PlxS+s8elpiR6bIagv8OCvbXObRqkwm3Eu5LWFOd7vqXG1wJAU47YGqT64wJU9ghOnIcc+9J5EWBRcX9LtwQcA8uxEsV9UAxpnuLL51CIknL0HE1PTvpwb+vmIZ2h7rVPsRVfOQJBAJeXwMfUSNCCGohgpGwpTD3UDwlxXSFLTA8V9GrFpoVsx8i3ap/rZBCGfSY05UTP1NCHshMrrOMaUjbYfnng3IMCQApnWtHEMlDH/PVr4Ig0Jvf6NZ2VUSzM1lgcbE6L2M8w3hNZKYtM8oC0/PEGfh53KG7E+HpQa1m/flimvSNIFGs=";

@@ -62,7 +66,9 @@
     public String doorappvisitor(@RequestParam(value = "custid") String custid, Model model) {

 

         model.addAttribute("custid", custid);

-        model.addAttribute("deptcode", 0);

+        TCustomer customerById = webInterfaceService.findCustomerById(custid);

+        String deptcode = customerById.getDeptcode();

+        model.addAttribute("deptcode", deptcode);

         return "apph5/applyforvisitor";

     }

 

@@ -309,7 +315,7 @@
             }

 

             if (b) {

-                EVisitorCheckDtl checkBySign = visitormanageService.getVisitorCheckBySign(sign);

+                EVisitorCheckDtl checkBySign = visitormanageService.getVisitorCheckBySign(s);

                 int id = checkBySign.getId();

                 map.put("retcode", "0");

                 map.put("retmsg", "保存成功");

diff --git a/src/main/resources/templates/apph5/applyforvisitor.html b/src/main/resources/templates/apph5/applyforvisitor.html
index 4f467d3..22a13aa 100644
--- a/src/main/resources/templates/apph5/applyforvisitor.html
+++ b/src/main/resources/templates/apph5/applyforvisitor.html
@@ -30,10 +30,10 @@
     <div class="page-title" style="text-align:center; font-size: 24px;color: #FF8247;margin-top:7%">请登记访客信息</div><br>
 
     <el-form ref="tempform" :model="tempform" :rules="rules" size="mini" label-width="36%" style="margin-top:7%">
-        <el-form-item label="访客姓名:" prop="custname">
+        <el-form-item label="访客姓名:" prop="visitorname">
             <div class="el-col el-col-18">
                 <div class="el-input" style="width: 187px;">
-                    <el-input v-model="tempform.custname">
+                    <el-input v-model="tempform.visitorname">
                     </el-input>
                 </div>
             </div>
diff --git a/src/main/resources/templates/apph5/askforleave.html b/src/main/resources/templates/apph5/askforleave.html
index 3478818..1a6dcd7 100644
--- a/src/main/resources/templates/apph5/askforleave.html
+++ b/src/main/resources/templates/apph5/askforleave.html
@@ -117,7 +117,7 @@
             userId: '',
             pickerOptions0: {
                 disabledDate: function (time) {
-                    return time.getTime();
+                    return false;
                 }
             },pickerOptions1: {
                 disabledDate:function(time) {
diff --git a/src/main/resources/templates/apph5/leavehistory.html b/src/main/resources/templates/apph5/leavehistory.html
index 8eeea95..9978c12 100644
--- a/src/main/resources/templates/apph5/leavehistory.html
+++ b/src/main/resources/templates/apph5/leavehistory.html
@@ -337,6 +337,11 @@
                 this.currPage = 1;
                 commonQuery(this, this.tempform.rtype, this.tempform.custtype, this.tempform.status, this.tempform.custid, this.currPage, this.pageSize);
             },
+            resetForm:function(formName) {
+                this.$refs[formName].resetFields();
+                this.dialogFormVisible = false;
+                this.dialogFormVisible2 = false;
+            },
             review: function (formName) {
                 this.dialogFormVisible2 = false;
 
@@ -344,7 +349,6 @@
                 this.pagesize = 10;
                 this.currPage = 1;
                 reviewupdate(this, 1,this.tempform.custid, this.historyform.id);
-                commonQuery(this, this.tempform.rtype, this.tempform.custtype, this.tempform.status, this.tempform.custid, this.currPage, this.pageSize);
 
             },unreview: function (formName) {
                 this.dialogFormVisible2 = false;
@@ -353,7 +357,6 @@
                 this.pagesize = 10;
                 this.currPage = 1;
                 reviewupdate(this, 2,this.tempform.custid, this.historyform.id);
-                commonQuery(this, this.tempform.rtype, this.tempform.custtype, this.tempform.status, this.tempform.custid, this.currPage, this.pageSize);
 
             },
             showdiv: function (row) {
@@ -366,7 +369,8 @@
                 this.updatetitle2 = "详情"
             },
             closediv: function () {
-                closesearchform();
+                this.dialogFormVisible2 = true;
+
             },
             currRowChange: function (val) {
                 this.currentRow = val;
@@ -447,10 +451,7 @@
                 value: '3',
                 label: '取消'
             });
-            statl.push({
-                value: '4',
-                label: '删除'
-            });
+
 
             _self.statuslist = statl;
             $.ajax({
@@ -572,11 +573,13 @@
             url: "[[@{/app/atte/review?id=}]]" + id + "&status=" + status+ "&custid=" + custid,
             success: function (info) {
                 console.log(info)
-                if (data.errStr != "") {
-                    layer.msg(data.errStr, {icon: 2, time: 2000});
+                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.custtype, _self.tempform.status, _self.tempform.custid, _self.currPage, _self.pageSize);
+
             }
         })
     }
diff --git a/src/main/resources/templates/apph5/myleave.html b/src/main/resources/templates/apph5/myleave.html
index f9cacdc..b4a0b2c 100644
--- a/src/main/resources/templates/apph5/myleave.html
+++ b/src/main/resources/templates/apph5/myleave.html
@@ -329,7 +329,7 @@
                 var _that = this;
                 this.pagesize = 10;
                 this.currPage = 1;
-                reviewupdate(this, this.historyform.status, this.historyform.id);
+                reviewupdate(this, 3, this.historyform.id);
             },
             showdiv: function (row) {
                 this.dialogFormVisible = true;
@@ -341,7 +341,7 @@
                 this.updatetitle2 = "详情"
             },
             closediv: function () {
-                closesearchform();
+                this.dialogFormVisible = false;
             },
             currRowChange: function (val) {
                 this.currentRow = val;
@@ -364,6 +364,10 @@
                 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;
             }
 
         },
@@ -422,10 +426,7 @@
                 value: '3',
                 label: '取消'
             });
-            statl.push({
-                value: '4',
-                label: '删除'
-            });
+
 
             _self.statuslist = statl;
             $.ajax({
@@ -547,11 +548,12 @@
             url: "[[@{/app/atte/cancelRest?id=}]]" + id + "&status=" + status,
             success: function (info) {
                 console.log(info)
-                if (data.errStr != "") {
-                    layer.msg(data.errStr, {icon: 2, time: 2000});
+                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);
             }
         })
     }