大理访客登记h5待测试
diff --git a/config/application-devel-pg.properties b/config/application-devel-pg.properties
index d3858c5..70e074a 100644
--- a/config/application-devel-pg.properties
+++ b/config/application-devel-pg.properties
@@ -9,7 +9,7 @@
spring.datasource.platform=postgresql
-spring.datasource.url=jdbc:postgresql://172.28.201.70:15432/policedoor
+spring.datasource.url=jdbc:postgresql://172.28.201.70:15432/door
spring.datasource.username=payapi
spring.datasource.password=123456
database.dbtype=postgresql
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 c124119..b342551 100644
--- a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
+++ b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
@@ -135,7 +135,7 @@
@RequestMapping("/appvisitor")
public String appvisitor(Model model) {
model.addAttribute("issuccess", true);
- return "apph5/visitorresult";
+ return "apph5/leavehistory";
}
@RequestMapping("/getqrcode")
diff --git a/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java b/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
index d0ee441..5b4d150 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
@@ -3,7 +3,10 @@
import com.supwisdom.dlpay.atte.bean.RestSearchBean;
import com.supwisdom.dlpay.atte.domain.TAtteRest;
import com.supwisdom.dlpay.atte.service.AtteRestService;
+import com.supwisdom.dlpay.customer.bean.CustomerSearchBean;
+import com.supwisdom.dlpay.doorlist.bean.TCustomerInfo;
import com.supwisdom.dlpay.framework.util.DateUtil;
+import com.supwisdom.dlpay.framework.util.PageResult;
import com.supwisdom.dlpay.mainservice.domain.TCustomer;
import com.supwisdom.dlpay.mainservice.service.WebInterfaceService;
import com.supwisdom.dlpay.system.domain.TCustType;
@@ -45,7 +48,7 @@
* 请假
* @param
*/
- @RequestMapping(value = "/savetempcust", method = RequestMethod.POST)
+ @RequestMapping(value = "/savetempcust")
@ResponseBody
public Map addRest(@RequestParam("custid") String custid,
@RequestParam("enddate") String enddate,
@@ -78,7 +81,7 @@
/**
* 查看历史假条
*/
- @RequestMapping(value = "/getrestlist", method = RequestMethod.POST)
+ @RequestMapping(value = "/getrestlist")
@ResponseBody
public Map getRestList(@RequestParam("rtype") Integer rtype,
@RequestParam("status") Integer status,
@@ -123,15 +126,28 @@
public ModelAndView reviewindex(@RequestParam(value = "custid")String custid){
ModelAndView model=new ModelAndView();
model.addObject("custid",custid);
- model.setViewName("atte/app/index");
- List<TCustType> custtypelist=systemService.findAllCusttype();
- model.addObject("custtypelist",custtypelist);
+ model.setViewName("apph5/leavehistory");
+
return model;
}
+ @ResponseBody
+ @RequestMapping("/getcusttypelist")
+ public Map loadAppDevList(){
+ Map map = new HashMap();
+ try{
+ List<TCustType> custtypelist=systemService.findAllCusttype();
+ map.put("custtypelist",custtypelist);
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ return map;
+
+
+ }
/**
* 审核列表
*/
- @RequestMapping(value = "/getreviewlist", method = RequestMethod.POST)
+ @RequestMapping(value = "/getreviewlist")
@ResponseBody
public Map getreviewlist(@RequestParam("rtype") Integer rtype,
@RequestParam("custid") String custid,
diff --git a/src/main/resources/templates/apph5/applyforvisitor.html b/src/main/resources/templates/apph5/applyforvisitor.html
index c3715aa..0eda7db 100644
--- a/src/main/resources/templates/apph5/applyforvisitor.html
+++ b/src/main/resources/templates/apph5/applyforvisitor.html
@@ -175,7 +175,7 @@
// 首次加载时,需要调用一次
_self.screenWidth = window.innerWidth;
_self.setSize();
- var confid = '[[${confid}]]';
+ var confid = '[[${custid}]]';
var deptcode = '[[${deptcode}]]';
console.log(confid);
console.log(deptcode);
diff --git a/src/main/resources/templates/apph5/askforleave.html b/src/main/resources/templates/apph5/askforleave.html
index f55715c..3a55deb 100644
--- a/src/main/resources/templates/apph5/askforleave.html
+++ b/src/main/resources/templates/apph5/askforleave.html
@@ -27,7 +27,7 @@
<body>
<div id="app">
- <div class="page-title" style="text-align:center; font-size: 24px;color: #FF8247;margin-top:7%">请登记访客信息</div>
+ <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%">
@@ -116,20 +116,17 @@
screenWidth: 0,
userId: '',
rules: {
- visitorname: [
- {required: true, message: '请输入访客姓名', trigger: 'blur'},
+ rtype: [
+ {required: true, message: '请选择请假类型', trigger: 'blur'},
],
- idno: [
- {required: true, message: '请输入访客身份证号', trigger: 'blur'}
+ startdate: [
+ {required: true, message: '请选择开始日期', trigger: 'blur'}
],
- sex: [
- {required: true, message: '请输入访客性别', trigger: 'blur'}
+ enddate: [
+ {required: true, message: '请选择结束日期', trigger: 'blur'}
],
- remarks: [
+ remark: [
{required: true, message: '请输入备注', trigger: 'blur'}
- ],
- phone: [
- {required: true, validator: validatePhone, trigger: 'blur'}
]
},
},
@@ -168,7 +165,7 @@
// 首次加载时,需要调用一次
_self.screenWidth = window.innerWidth;
_self.setSize();
- var confid = '[[${confid}]]';
+ var confid = '[[${custid}]]';
console.log(confid);
_self.tempform.custid = confid;
var sexl = [];
@@ -205,19 +202,21 @@
}
function saveTempCustomer(_that, formdata, formName) {
+ var token = $("meta[name='_csrf_token']").attr("value");
$.ajax({
type: "post",
- url: encodeURI("[[@{/app/apply}]]"),
+ url: encodeURI("[[@{/app/savetempcust}]]"),
dataType: "json",
contentType: "application/json",
headers: {
'Accept': 'application/json',
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
+ 'X-CSRF-TOKEN': token
},
data: JSON.stringify(formdata),
success: function (data) {
- if (data.errcode != "0") {
+ if (data.errStr != "") {
layer.msg(data.errStr, {icon: 2, time: 2000});
} else {
layer.msg('登记成功!', {icon: 1, time: 1000});
diff --git a/src/main/resources/templates/apph5/leavehistory.html b/src/main/resources/templates/apph5/leavehistory.html
index 49c9efc..544f90e 100644
--- a/src/main/resources/templates/apph5/leavehistory.html
+++ b/src/main/resources/templates/apph5/leavehistory.html
@@ -28,7 +28,7 @@
<body>
<div id="app">
- <el-button type="primary" @click="showdiv()">筛 选</el-button>
+ <el-button type="primary" @click="showdiv()" style="float: right">筛 选</el-button>
<div class="row">
@@ -47,7 +47,7 @@
prop="custid"
align="center"
v-show="false">
- <template scope="scope" @click="editDtl(scope.row)">
+ <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">
@@ -64,10 +64,10 @@
请假时间{{scope.row.transdate}}--{{scope.row.transdate}}
</div>
<div style="font-size:14px;color:#999;margin-left:10px">
- <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>
+ <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="warning"@click="editDtl(scope.row)">未批准</el-button></span>
</div>
</div>
@@ -135,19 +135,19 @@
</div>
</div>
</div>
- <el-dialog :title="updatetitle2" :visible.sync="dialogFormVisible2" size="thin"
+ <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 el-form-item--mini" :model="historyform" size="mini"
+ <el-form ref="historyform" class="el-form-item " :model="historyform"
:rules="rules" label-width="36%">
<el-form-item label="姓名:" prop="custid">
<el-col :span="18">
- <el-input v-model="historyform.custid" readonly style="width: 250px;" maxlength="20">
+ <el-input v-model="historyform.custid" readonly style="width: 90%;" maxlength="20">
</el-input>
</el-col>
</el-form-item>
<el-form-item label="状态:" prop="status">
<el-col :span="18">
- <el-select v-model="historyform.state" style="width: 250px;" clearable filterable placeholder="请选择">
+ <el-select v-model="historyform.state" style="width: 90%;" clearable filterable placeholder="请选择">
<el-option
v-for="state in statuslist"
:key="state.value"
@@ -159,7 +159,7 @@
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-col :span="18">
- <el-input type="textarea" v-model="historyform.remark" placeholder="填写备注" style="width: 250px;">
+ <el-input type="textarea" v-model="historyform.remark" placeholder="填写备注" readonly>
</el-input>
</el-col>
</el-form-item>
@@ -171,13 +171,13 @@
<el-button type="primary" @click="saveState('historyform')">确 定</el-button>
</div>
</el-dialog>
- <el-dialog :title="updatetitle" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false'
- @close="closeDialog('tempform')">
- <el-form size="mini" ref="tempform" :model="tempform" data-parsley-validate
- class="el-form-item el-form-item--mini" >
+ <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="custtype">
<div class="el-col el-col-18">
- <div class="el-input" style="width: 187px;">
+ <div class="el-input" style="width: 90%;">
<el-select v-model="tempform.custtype" id="custtype">
<el-option
v-for="status in custtypelist"
@@ -191,7 +191,7 @@
</el-form-item>
<el-form-item label="请假类型:" prop="rtype">
<div class="el-col el-col-18">
- <div class="el-input" style="width: 187px;">
+ <div class="el-input" style="width: 90%;">
<el-select v-model="tempform.rtype" id="rtype">
<el-option
v-for="status in rtypelist"
@@ -205,7 +205,7 @@
</el-form-item>
<el-form-item label="状态:" prop="status">
<div class="el-col el-col-18">
- <div class="el-input" style="width: 187px;">
+ <div class="el-input" style="width: 90%;">
<el-select v-model="tempform.status" id="status">
<el-option
v-for="status in statuslist"
@@ -298,11 +298,12 @@
methods: {
saveTemp: function (formName) {
+ this.dialogFormVisible = false;
var _that = this;
this.pagesize = 10;
this.currPage = 1;
- commonQuery(this, this.tempform.rtype, this.tempform.custtype, this.tempform.status, this.currPage, this.pageSize);
+ commonQuery(this, this.tempform.rtype, this.tempform.custtype, this.tempform.custid, this.currPage, this.pageSize);
},
showdiv: function (row) {
this.dialogFormVisible = true;
@@ -336,8 +337,7 @@
// 首次加载时,需要调用一次
_self.screenWidth = window.innerWidth;
_self.setSize();
- var confid = '[[${confid}]]';
- var deptcode = '[[${deptcode}]]';
+ var confid = '[[${custid}]]';
console.log(confid);
_self.tempform.custid = confid;
var sexl = [];
@@ -346,14 +346,70 @@
label: '请选择'
});
sexl.push({
- value: '1',
- label: '男'
+ value: '11',
+ label: '事假'
+ });sexl.push({
+ value: '12',
+ label: '病假'
+ });sexl.push({
+ value: '13',
+ label: '年假'
+ });sexl.push({
+ value: '14',
+ label: '调休'
});
sexl.push({
- value: '2',
- label: '女'
+ value: '15',
+ label: '其他'
});
- _self.sexlist = sexl;
+ _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: '取消'
+ });statl.push({
+ value: '4',
+ label: '删除'
+ });
+
+ _self.statuslist = statl;
+ $.ajax({
+ type: "get",
+ dataType: "json",
+ url: encodeURI("[[@{/app/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;
+
+ }
+ })
}
})
@@ -382,7 +438,7 @@
var token = $("meta[name='_csrf_token']").attr("value");
$.ajax({
type: "post",
- url: encodeURI("[[@{/app/apply/apply}]]"),
+ url: encodeURI("[[@{/app/getreviewlist}]]"),
dataType: "json",
contentType: "application/json",
headers: {
@@ -403,11 +459,11 @@
});
}
- function commonQuery(_self, rtype, custtype, status, pageno, pagesize) {
+ function commonQuery(_self, rtype, custtype, custid, pageno, pagesize) {
$.ajax({
type: "get",
dataType: "json",
- url: "[[@{/app/getleavehistory?rtype=}]]" + rtype + "&custtype=" + custtype + "&status=" + status + "&pageNo=" + pageno + "&pageSize=" + pagesize,
+ url: "[[@{/app/getreviewlist?rtype=}]]" + rtype + "&custtype=" + custtype + "&custid=" + custid + "&pageNo=" + pageno + "&pageSize=" + pagesize,
success: function (info) {
console.log(info)