mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
加入放行类型
This commit is contained in:
parent
4910e5d91d
commit
9d577f7c52
@ -0,0 +1,51 @@
|
||||
<div id="addItemReleaseTypeModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span>
|
||||
<vc:i18n name="添加放行类型" namespace="addItemReleaseType"></vc:i18n>
|
||||
</span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='类型名称' namespace='addItemReleaseType'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addItemReleaseTypeInfo.typeName" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写类型名称','addItemReleaseType')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='备注' namespace='addItemReleaseType'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="addItemReleaseTypeInfo.remark"
|
||||
:placeholder="vc.i18n('必填,请填写备注','addItemReleaseType')" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveItemReleaseTypeInfo()"><i class="fa fa-check"></i>
|
||||
<span>
|
||||
<vc:i18n name="保存"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">
|
||||
<span>
|
||||
<vc:i18n name="取消"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,95 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addItemReleaseTypeInfo: {
|
||||
typeId: '',
|
||||
typeName: '',
|
||||
remark: '',
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addItemReleaseType', 'openAddItemReleaseTypeModal', function () {
|
||||
$('#addItemReleaseTypeModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
addItemReleaseTypeValidate() {
|
||||
return vc.validate.validate({
|
||||
addItemReleaseTypeInfo: vc.component.addItemReleaseTypeInfo
|
||||
}, {
|
||||
'addItemReleaseTypeInfo.typeName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "类型名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "类型名称不能超过30"
|
||||
},
|
||||
],
|
||||
'addItemReleaseTypeInfo.remark': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "备注不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "512",
|
||||
errInfo: "备注不能超过512"
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
saveItemReleaseTypeInfo: function () {
|
||||
if (!vc.component.addItemReleaseTypeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return;
|
||||
}
|
||||
vc.component.addItemReleaseTypeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/itemRelease.saveItemReleaseType',
|
||||
JSON.stringify(vc.component.addItemReleaseTypeInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addItemReleaseTypeModel').modal('hide');
|
||||
vc.component.clearAddItemReleaseTypeInfo();
|
||||
vc.emit('itemReleaseTypeManage', 'listItemReleaseType', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
clearAddItemReleaseTypeInfo: function () {
|
||||
vc.component.addItemReleaseTypeInfo = {
|
||||
typeName: '',
|
||||
flowName: '',
|
||||
remark: '',
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -0,0 +1,19 @@
|
||||
<div class="modal fade" id="deleteItemReleaseTypeModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel"> <span><vc:i18n name="请确认您的操作!"></vc:i18n></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center"><th><span><vc:i18n name="确定删除放行类型" namespace="deleteItemReleaseType"></vc:i18n></span></th></tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteItemReleaseTypeModel()"><span><vc:i18n name="点错了"></vc:i18n></span></button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteItemReleaseType()"><span><vc:i18n name="确认删除!"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,52 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
deleteItemReleaseTypeInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('deleteItemReleaseType', 'openDeleteItemReleaseTypeModal', function (_params) {
|
||||
|
||||
vc.component.deleteItemReleaseTypeInfo = _params;
|
||||
$('#deleteItemReleaseTypeModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteItemReleaseType: function () {
|
||||
vc.component.deleteItemReleaseTypeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/itemRelease.deleteItemReleaseType',
|
||||
JSON.stringify(vc.component.deleteItemReleaseTypeInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteItemReleaseTypeModel').modal('hide');
|
||||
vc.emit('itemReleaseTypeManage', 'listItemReleaseType', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
|
||||
});
|
||||
},
|
||||
closeDeleteItemReleaseTypeModel: function () {
|
||||
$('#deleteItemReleaseTypeModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,48 @@
|
||||
<div id="editItemReleaseTypeModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span>
|
||||
<vc:i18n name="修改" namespace="editItemReleaseType"></vc:i18n>
|
||||
</span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='类型名称' namespace='editItemReleaseType'></vc:i18n>
|
||||
</span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editItemReleaseTypeInfo.typeName" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写类型名称','editItemReleaseType')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='备注' namespace='editItemReleaseType'></vc:i18n>
|
||||
</span> </label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="editItemReleaseTypeInfo.remark"
|
||||
:placeholder="vc.i18n('必填,请填写备注','editItemReleaseType')"
|
||||
class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="editItemReleaseType()"><i class="fa fa-check"></i> <span>
|
||||
<vc:i18n name="保存"></vc:i18n>
|
||||
</span></button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal"><span>
|
||||
<vc:i18n name="取消"></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,102 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
editItemReleaseTypeInfo: {
|
||||
typeId: '',
|
||||
typeName: '',
|
||||
flowName: '',
|
||||
remark: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editItemReleaseType', 'openEditItemReleaseTypeModal', function (_params) {
|
||||
vc.component.refreshEditItemReleaseTypeInfo();
|
||||
$('#editItemReleaseTypeModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editItemReleaseTypeInfo);
|
||||
vc.component.editItemReleaseTypeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
editItemReleaseTypeValidate: function () {
|
||||
return vc.validate.validate({
|
||||
editItemReleaseTypeInfo: vc.component.editItemReleaseTypeInfo
|
||||
}, {
|
||||
'editItemReleaseTypeInfo.typeName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "类型名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "类型名称不能超过30"
|
||||
},
|
||||
],
|
||||
'editItemReleaseTypeInfo.remark': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "备注不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "512",
|
||||
errInfo: "备注不能超过512"
|
||||
},
|
||||
],
|
||||
'editItemReleaseTypeInfo.typeId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "编号不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
},
|
||||
editItemReleaseType: function () {
|
||||
if (!vc.component.editItemReleaseTypeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/itemRelease.updateItemReleaseType',
|
||||
JSON.stringify(vc.component.editItemReleaseTypeInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editItemReleaseTypeModel').modal('hide');
|
||||
vc.emit('itemReleaseTypeManage', 'listItemReleaseType', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditItemReleaseTypeInfo: function () {
|
||||
vc.component.editItemReleaseTypeInfo = {
|
||||
typeId: '',
|
||||
typeName: '',
|
||||
flowName: '',
|
||||
remark: '',
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,114 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择类型名称','itemReleaseTypeManage')"
|
||||
v-model="itemReleaseTypeManageInfo.conditions.typeName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryItemReleaseTypeMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="放行类型" namespace="itemReleaseTypeManage"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_openAddItemReleaseTypeModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
<span>
|
||||
<vc:i18n name="添加" namespace="itemReleaseTypeManage"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='编号' namespace='itemReleaseTypeManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='类型名称' namespace='itemReleaseTypeManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='流程名称' namespace='itemReleaseTypeManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='备注' namespace='itemReleaseTypeManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="itemReleaseType in itemReleaseTypeManageInfo.itemReleaseTypes">
|
||||
<td class="text-center">{{itemReleaseType.typeId}}</td>
|
||||
<td class="text-center">{{itemReleaseType.typeName}}</td>
|
||||
<td class="text-center">{{itemReleaseType.flowName}}</td>
|
||||
<td class="text-center">{{itemReleaseType.remark}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditItemReleaseTypeModel(itemReleaseType)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteItemReleaseTypeModel(itemReleaseType)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="property/addItemReleaseType" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="property/editItemReleaseType"></vc:create>
|
||||
<vc:create path="property/deleteItemReleaseType"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -0,0 +1,85 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
itemReleaseTypeManageInfo: {
|
||||
itemReleaseTypes: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
typeId: '',
|
||||
conditions: {
|
||||
typeId: '',
|
||||
typeName: '',
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listItemReleaseTypes(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('itemReleaseTypeManage', 'listItemReleaseType', function (_param) {
|
||||
vc.component._listItemReleaseTypes(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listItemReleaseTypes(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listItemReleaseTypes: function (_page, _rows) {
|
||||
|
||||
vc.component.itemReleaseTypeManageInfo.conditions.page = _page;
|
||||
vc.component.itemReleaseTypeManageInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: vc.component.itemReleaseTypeManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/itemRelease.listItemReleaseType',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _itemReleaseTypeManageInfo = JSON.parse(json);
|
||||
vc.component.itemReleaseTypeManageInfo.total = _itemReleaseTypeManageInfo.total;
|
||||
vc.component.itemReleaseTypeManageInfo.records = _itemReleaseTypeManageInfo.records;
|
||||
vc.component.itemReleaseTypeManageInfo.itemReleaseTypes = _itemReleaseTypeManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.itemReleaseTypeManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddItemReleaseTypeModal: function () {
|
||||
vc.emit('addItemReleaseType', 'openAddItemReleaseTypeModal', {});
|
||||
},
|
||||
_openEditItemReleaseTypeModel: function (_itemReleaseType) {
|
||||
vc.emit('editItemReleaseType', 'openEditItemReleaseTypeModal', _itemReleaseType);
|
||||
},
|
||||
_openDeleteItemReleaseTypeModel: function (_itemReleaseType) {
|
||||
vc.emit('deleteItemReleaseType', 'openDeleteItemReleaseTypeModal', _itemReleaseType);
|
||||
},
|
||||
_queryItemReleaseTypeMethod: function () {
|
||||
vc.component._listItemReleaseTypes(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.itemReleaseTypeManageInfo.moreCondition) {
|
||||
vc.component.itemReleaseTypeManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.itemReleaseTypeManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user