添加对话框关闭事件,区域编辑编号修改限制,重新下发名单优化
diff --git a/src/main/java/com/supwisdom/dlpay/doorlist/controller/DoorlistMgrController.java b/src/main/java/com/supwisdom/dlpay/doorlist/controller/DoorlistMgrController.java
index e743968..de63f53 100644
--- a/src/main/java/com/supwisdom/dlpay/doorlist/controller/DoorlistMgrController.java
+++ b/src/main/java/com/supwisdom/dlpay/doorlist/controller/DoorlistMgrController.java
@@ -308,6 +308,7 @@
* @param request
* @return
*/
+ @ResponseBody
@RequestMapping(value = "/impDoorCardList", method = {RequestMethod.POST})
public Map impDoorCardList(@RequestParam(value = "impCustomerlist_file", required = false) MultipartFile file,
HttpServletRequest request,@AuthenticationPrincipal TOperator operUser) {
diff --git a/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CardListDaoImpl.java b/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CardListDaoImpl.java
index a81fe29..e99f2cc 100644
--- a/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CardListDaoImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CardListDaoImpl.java
@@ -1069,7 +1069,7 @@
@Transactional
@Override
public void updateDoorcardlstToNoWithIds(List<Long> listIds) {
- String sql = "update T_DOORCARDLST set version = version+1,syncstatus='0',SYNCTIME='', UPDATETIME=to_char(current_timestamp, 'YYYYMMDDHH24MISS') where listid in " + StringUtil.intOrLikeIntListTransToStr(listIds);
+ String sql = "update T_NC_CARDLIST set version = version+1,syncflag='N',SYNCTIME='', RECTIME=to_char(current_timestamp, 'YYYYMMDDHH24MISS') where cast(listid as INTEGER) in " + StringUtil.intOrLikeIntListTransToStr(listIds);
Query query = entityManager.createNativeQuery(sql);
query.executeUpdate();
}
diff --git a/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCard.java b/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCard.java
index a8b4e34..271a76e 100644
--- a/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCard.java
+++ b/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCard.java
@@ -30,8 +30,7 @@
private String cardverno;
private String lastsavedtime;
private String bankcardno;
- @GenericGenerator(name = "idGenerator", strategy = "uuid")
- @GeneratedValue(generator = "idGenerator")
+
private String cardid;
// Constructors
@@ -65,6 +64,8 @@
}
@Id
+ @GenericGenerator(name = "idGenerator", strategy = "uuid")
+ @GeneratedValue(generator = "idGenerator")
@Column(name = "CARDID",unique = true, nullable = false,length = 32)
public String getCardid() {
return cardid;
diff --git a/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCustomer.java b/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCustomer.java
index b3fbcf5..ad4bf0d 100644
--- a/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCustomer.java
+++ b/src/main/java/com/supwisdom/dlpay/mainservice/domain/TCustomer.java
@@ -12,8 +12,7 @@
public class TCustomer implements java.io.Serializable {
// Fields
- @GenericGenerator(name = "idGenerator", strategy = "uuid")
- @GeneratedValue(generator = "idGenerator")
+
private String custid;
private String status;
private String custname;
@@ -58,6 +57,8 @@
// Property accessors
@Id
+ @GenericGenerator(name = "idGenerator", strategy = "uuid")
+ @GeneratedValue(generator = "idGenerator")
@Column(name = "CUSTID", unique = true, nullable = false, length = 32)
public String getCustid() {
return this.custid;
diff --git a/src/main/resources/templates/doorlist/impCustomerlist.html b/src/main/resources/templates/doorlist/impCustomerlist.html
index 8dddb89..884f36b 100644
--- a/src/main/resources/templates/doorlist/impCustomerlist.html
+++ b/src/main/resources/templates/doorlist/impCustomerlist.html
@@ -78,7 +78,6 @@
this.textfield=$("#impCustomerlist_filePath").val();
},
person_inExcel:function(){
- alert(this.textfield)
var path=JSON.parse(JSON.stringify(this.textfield));
console.log(path);
var file=path.substring(path.lastIndexOf(".") + 1);
@@ -119,10 +118,12 @@
type: 'post',
headers: {
'Accept': 'application/json',
- 'Content-Type': 'application/json;multipart/form-data',
- 'X-CSRF-TOKEN':token,
+ 'X-CSRF-TOKEN': token,
},
dataType: 'json',
+ processData:false,
+ contentType: false,
+ //data: formData,
success:function(data){
//console.log(data);
if (data.flag==1){
diff --git a/src/main/resources/templates/ncmgr/nc_dev.html b/src/main/resources/templates/ncmgr/nc_dev.html
index 15d5719..6cf2647 100644
--- a/src/main/resources/templates/ncmgr/nc_dev.html
+++ b/src/main/resources/templates/ncmgr/nc_dev.html
@@ -194,7 +194,7 @@
</template>
<!--添加修改设备-->
- <el-dialog :title="devtitle" :visible.sync="dialogFormVisible" center="true" top="10%" size="tiny" :modal-append-to-body='false'>
+ <el-dialog :title="devtitle" :visible.sync="dialogFormVisible" center="true" top="10%" size="tiny" :modal-append-to-body='false' @close="closeDialog('devUpform')">
<el-form ref="devUpform" :model="devUpform" :rules="rules" size="mini" label-width="36%">
<el-form-item label="设备名称:" prop="devname">
<div class="el-col el-col-18">
@@ -449,6 +449,11 @@
this.$refs[formName].resetFields();
this.dialogFormVisible = false;
},
+ closeDialog: function (formName) {
+ this.devUpform.deviceid = '';
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false;
+ },
saveDev: function (formName) {
var _that = this;
diff --git a/src/main/resources/templates/ncmgr/nc_time.html b/src/main/resources/templates/ncmgr/nc_time.html
index 7f2b9ef..28f38f7 100644
--- a/src/main/resources/templates/ncmgr/nc_time.html
+++ b/src/main/resources/templates/ncmgr/nc_time.html
@@ -79,7 +79,7 @@
</el-pagination>
</template>
- <el-dialog :title="timetitile" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false'>
+ <el-dialog :title="timetitile" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false' @close="closeDialog('timeDiaForm')">
<el-form ref="timeDiaForm" :model="timeDiaForm" :rules="rules" label-width="36%" >
<el-form-item label="时间段名称:" prop="timename">
<div class="el-col el-col-15">
@@ -178,6 +178,10 @@
this.$refs[formName].resetFields();
this.dialogFormVisible = false
},
+ closeDialog:function(formName) {
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false
+ },
editTime:function(timeid){
time_getFillData(this,timeid);
this.dialogFormVisible = true;
diff --git a/src/main/resources/templates/ncmgr/nc_timegrp.html b/src/main/resources/templates/ncmgr/nc_timegrp.html
index ef4b13e..29c0515 100644
--- a/src/main/resources/templates/ncmgr/nc_timegrp.html
+++ b/src/main/resources/templates/ncmgr/nc_timegrp.html
@@ -104,7 +104,7 @@
</template>
<!--添加修改设备-->
- <el-dialog :title="timegrptitle" top="50px" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false'>
+ <el-dialog :title="timegrptitle" top="50px" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false' @close="closeDialog('timegrpDiaForm')">
<el-form ref="timegrpDiaForm" class="el-form-item el-form-item--mini" :model="timegrpDiaForm" :rules="rules" label-width="36%">
<el-form-item label="时间组名称:" prop="timegrpname" >
<el-col :span="18">
@@ -262,6 +262,10 @@
this.$refs[formName].resetFields();
this.dialogFormVisible = false
},
+ closeDialog: function(formName) {
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false
+ },
saveTimegrp:function (formName) {
var _that=this;
var vali = false;
diff --git a/src/main/resources/templates/ncmgr/nc_weektime.html b/src/main/resources/templates/ncmgr/nc_weektime.html
index 3077817..09d78fa 100644
--- a/src/main/resources/templates/ncmgr/nc_weektime.html
+++ b/src/main/resources/templates/ncmgr/nc_weektime.html
@@ -116,7 +116,7 @@
</template>
<!--添加修改设备-->
- <el-dialog :title="weektimetitle" :visible.sync="dialogFormVisible" top="80px" size="tiny" :modal-append-to-body='false'>
+ <el-dialog :title="weektimetitle" :visible.sync="dialogFormVisible" top="80px" size="tiny" :modal-append-to-body='false' @close="closeDialog('weektimeDiaForm')">
<el-form ref="weektimeDiaForm" class="el-form-item el-form-item--mini" :model="weektimeDiaForm" size="mini" :rules="rules" label-width="36%">
<el-form-item label="时间周名称:" prop="weekname">
<el-col :span="18">
@@ -283,6 +283,10 @@
this.$refs[formName].resetFields();
this.dialogFormVisible = false
},
+ closeDialog:function(formName) {
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false
+ },
saveWeektime:function (formName) {
var _that=this;
var vali = false;
diff --git a/src/main/resources/templates/system/building.html b/src/main/resources/templates/system/building.html
index 88fcc86..792ac49 100644
--- a/src/main/resources/templates/system/building.html
+++ b/src/main/resources/templates/system/building.html
@@ -2,7 +2,7 @@
<div class="layui-card-header">
<h2 class="header-title">楼栋管理</h2>
<span class="layui-breadcrumb pull-right">
- <a href="#">集控中心</a>
+ <a href="#">系统中心</a>
<a><cite>楼栋管理</cite></a>
</span>
</div>
@@ -104,7 +104,7 @@
</el-pagination>
</template>
- <el-dialog :title="buildingtitle" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false'>
+ <el-dialog :title="buildingtitle" :visible.sync="dialogFormVisible" size="tiny" :modal-append-to-body='false' @close="closeDialog('buildingDiaForm')">
<el-form ref="buildingDiaForm" :model="buildingDiaForm" :rules="rules" label-width="120px">
<el-form-item label="楼栋编号:" prop="buildingid">
<el-col :span="22">
@@ -214,6 +214,12 @@
resetForm:function(formName) {
this.$refs[formName].resetFields();
this.dialogFormVisible = false;
+ this.buildingidDis = false;
+ },
+ closeDialog:function(formName){
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false;
+ this.buildingidDis = false;
},
saveBuilding:function (formName) {
var _that=this;
diff --git a/src/main/resources/templates/system/operator.html b/src/main/resources/templates/system/operator.html
index 3a663a5..2fa7a67 100644
--- a/src/main/resources/templates/system/operator.html
+++ b/src/main/resources/templates/system/operator.html
@@ -109,7 +109,7 @@
</el-pagination>
</template>
- <el-dialog :title="operatortitile" :visible.sync="dialogFormVisible" :modal-append-to-body='false'>
+ <el-dialog :title="operatortitile" :visible.sync="dialogFormVisible" :modal-append-to-body='false' @close="closeDialog('operatorDiaForm')">
<el-form ref="operatorDiaForm" :model="operatorDiaForm" :rules="rules" label-width="36%" >
<el-form-item label="操作员编号:" prop="operid">
<div class="el-col el-col-15">
@@ -223,7 +223,7 @@
<!--分配楼栋-->
- <el-dialog :title="buildingTitle" :visible.sync="dlgAllotBuildingVisible" size="mini"top="80px" :modal-append-to-body='false'>
+ <el-dialog :title="buildingTitle" :visible.sync="dlgAllotBuildingVisible" size="mini"top="80px" :modal-append-to-body='false' @close="closeOperBuildingDialog('operBuildingDiaform')">
<el-form ref="operBuildingDiaform" :model="operBuildingDiaform" :rules="rules" label-width="100px" >
<el-form-item label="操作员:" prop="operid">
<el-col :span="24">
@@ -366,6 +366,10 @@
this.$refs[formName].resetFields();
this.dialogFormVisible = false;
},
+ closeDialog: function (formName) {
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false;
+ },
saveOperator:function (formName) {
var _that=this;
var vali = false;
@@ -428,6 +432,12 @@
this.operlist=[];
this.dlgAllotBuildingVisible=false;
},
+ closeOperBuildingDialog:function () {
+ this.allotbuilding=[];
+ this.buildingList=[];
+ this.operlist=[];
+ this.dlgAllotBuildingVisible=false;
+ },
saveBuildingOper:function () {
var _that = this;
var token=$("meta[name='_csrf_token']").attr("value");
diff --git a/src/main/resources/templates/system/region.html b/src/main/resources/templates/system/region.html
index 24d1b2f..32212a3 100644
--- a/src/main/resources/templates/system/region.html
+++ b/src/main/resources/templates/system/region.html
@@ -2,7 +2,7 @@
<div class="layui-card-header">
<h2 class="header-title">区域管理</h2>
<span class="layui-breadcrumb pull-right">
- <a href="#">集控中心</a>
+ <a href="#">系统中心</a>
<a><cite>区域管理</cite></a>
</span>
</div>
@@ -74,8 +74,8 @@
label="操作"
width="130">
<template scope="scope">
- <button type="button" class="btn btn-info btn-xs" title="编辑" @click="editRegion(scope.row.regionid)">编辑</button>
- <button type="button" class="btn btn-danger btn-xs" title="删除" @click="delRegion(scope.row.regionid)">删除</button>
+ <button type="button" class="btn btn-info btn-xs" title="编辑" @click="editRegion(scope.row.regionid)" v-if="scope.row.regionid!='0'">编辑</button>
+ <button type="button" class="btn btn-danger btn-xs" title="删除" @click="delRegion(scope.row.regionid)" v-if="scope.row.regionid!='0'">删除</button>
</template>
</el-table-column>
</el-table>
@@ -91,12 +91,12 @@
</el-pagination>
</template>
- <el-dialog :title="regiontitile" :visible.sync="dialogFormVisible" :modal-append-to-body='false'>
+ <el-dialog :title="regiontitile" :visible.sync="dialogFormVisible" :modal-append-to-body='false' @close="closeDialog('regionDiaForm')">
<el-form ref="regionDiaForm" :model="regionDiaForm" :rules="rules" label-width="36%" >
<el-form-item label="区域编号:" prop="regionid">
<div class="el-col el-col-15">
<div class="el-input" style="width: 187px;">
- <el-input v-model="regionDiaForm.regionid">
+ <el-input v-model="regionDiaForm.regionid" :disabled="regionidDis">
<i class="el-icon-edit el-input__icon" slot="icon" ></i>
</el-input>
</div>
@@ -186,6 +186,7 @@
regionname:''
},
dialogFormVisible: false,
+ regionidDis:false,
dlgAllotDevVisible:false,
parentRegions:[],
levels:[],
@@ -250,11 +251,18 @@
this.parentRegionDis=false;
region_getFillData(this,regionid);
this.dialogFormVisible = true;
+ this.regionidDis = true;
this.regiontitile="修改区域"
},
resetForm: function (formName) {
this.$refs[formName].resetFields();
this.dialogFormVisible = false;
+ this.regionidDis = false;
+ },
+ closeDialog: function (formName) {
+ this.$refs[formName].resetFields();
+ this.dialogFormVisible = false;
+ this.regionidDis = false;
},
saveRegion:function (formName) {
var _that=this;
@@ -424,6 +432,7 @@
region_refreshThisTable();
_that.$refs[formName].resetFields();
_that.dialogFormVisible = false;
+ _that.regionidDis = false;
}
}
});