mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
b912e44da5
commit
801eb89223
@ -22,7 +22,12 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入合同类型','contractChangeManage')" v-model="contractChangeManageInfo.conditions.contractType" class=" form-control">
|
||||
<select class="custom-select" v-model="contractChangeManageInfo.conditions.contractType">
|
||||
<option selected value="">请选择合同类型</option>
|
||||
<option :value="item.contractTypeId" v-for="(item,index) in contractChangeManageInfo.contractTypes">
|
||||
{{item.typeName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
@ -121,4 +126,4 @@
|
||||
|
||||
<vc:create path="admin/deleteContractChangePlan"></vc:create>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -17,11 +17,13 @@
|
||||
contractCode: '',
|
||||
contractType: '',
|
||||
|
||||
}
|
||||
},
|
||||
contractTypes: []
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listContractTypes();
|
||||
},
|
||||
_initEvent: function() {
|
||||
|
||||
@ -60,6 +62,25 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_listContractTypes: function(_page, _rows) {
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 50,
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/contract/queryContractType',
|
||||
param,
|
||||
function(json, res) {
|
||||
let _contractTypeManageInfo = JSON.parse(json);
|
||||
$that.contractChangeManageInfo.contractTypes = _contractTypeManageInfo.data;
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_toChangeContractPage: function(_param) {
|
||||
vc.jumpToPage('/#/pages/admin/contractChangeDetail?param=' + _param)
|
||||
},
|
||||
|
||||
@ -22,7 +22,12 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入合同类型','contractManage')" v-model="contractManageInfo.conditions.contractType" class=" form-control">
|
||||
<select class="custom-select" v-model="contractManageInfo.conditions.contractType">
|
||||
<option selected value="">请选择合同类型</option>
|
||||
<option :value="item.contractTypeId" v-for="(item,index) in contractManageInfo.contractTypes">
|
||||
{{item.typeName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
@ -113,4 +118,4 @@
|
||||
<vc:create path="admin/editContract"></vc:create>
|
||||
<vc:create path="admin/deleteContract"></vc:create>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -17,11 +17,13 @@
|
||||
contractCode: '',
|
||||
contractType: '',
|
||||
|
||||
}
|
||||
},
|
||||
contractTypes: [],
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listContractTypes();
|
||||
},
|
||||
_initEvent: function() {
|
||||
|
||||
@ -60,6 +62,26 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_listContractTypes: function(_page, _rows) {
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 50,
|
||||
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/contract/queryContractType',
|
||||
param,
|
||||
function(json, res) {
|
||||
let _contractTypeManageInfo = JSON.parse(json);
|
||||
$that.contractManageInfo.contractTypes = _contractTypeManageInfo.data;
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddContractModal: function() {
|
||||
vc.emit('addContract', 'openAddContractModal', {});
|
||||
},
|
||||
|
||||
@ -12,25 +12,21 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入甲方','contractPartyaManage')"
|
||||
v-model="contractPartyaManageInfo.conditions.partyA" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请输入甲方','contractPartyaManage')" v-model="contractPartyaManageInfo.conditions.partyA" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入甲方联系人','contractPartyaManage')"
|
||||
v-model="contractPartyaManageInfo.conditions.aContacts" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请输入甲方联系人','contractPartyaManage')" v-model="contractPartyaManageInfo.conditions.aContacts" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入联系电话','contractPartyaManage')"
|
||||
v-model="contractPartyaManageInfo.conditions.aLink" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请输入联系电话','contractPartyaManage')" v-model="contractPartyaManageInfo.conditions.aLink" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryContractPartyaMethod()">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryContractPartyaMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span><vc:i18n name="查询" namespace="contractPartyaManage"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
@ -45,7 +41,7 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span><vc:i18n name="合同甲方信息" namespace="contractPartyaManage"></vc:i18n></span></h5>
|
||||
<h5><span><vc:i18n name="合同甲方" namespace="contractPartyaManage"></vc:i18n></span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddContractPartyaModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
@ -58,7 +54,7 @@
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><span><vc:i18n name="甲方编号" namespace="contractPartyaManage"></vc:i18n></span></th>
|
||||
<!-- <th class="text-center"><span><vc:i18n name="甲方编号" namespace="contractPartyaManage"></vc:i18n></span></th> -->
|
||||
<th class="text-center"><span><vc:i18n name="甲方" namespace="contractPartyaManage"></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name="甲方联系人" namespace="contractPartyaManage"></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name="联系电话" namespace="contractPartyaManage"></vc:i18n></span></th>
|
||||
@ -67,21 +63,18 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="contractPartya in contractPartyaManageInfo.contractPartyas">
|
||||
<td class="text-center">{{contractPartya.partyaId}}</td>
|
||||
<!-- <td class="text-center">{{contractPartya.partyaId}}</td> -->
|
||||
<td class="text-center">{{contractPartya.partyA}}</td>
|
||||
<td class="text-center">{{contractPartya.aContacts}}</td>
|
||||
<td class="text-center">{{contractPartya.aLink}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditContractPartyaModel(contractPartya)"><span><vc:i18n name="修改" namespace="contractPartyaManage"></vc:i18n></span></button>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditContractPartyaModel(contractPartya)"><span><vc:i18n name="修改" namespace="contractPartyaManage"></vc:i18n></span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteContractPartyaModel(contractPartya)"><span><vc:i18n name="删除" namespace="contractPartyaManage"></vc:i18n></span></button>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteContractPartyaModel(contractPartya)"><span><vc:i18n name="删除" namespace="contractPartyaManage"></vc:i18n></span></button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@ -105,4 +98,4 @@
|
||||
<vc:create path="admin/editContractPartya"></vc:create>
|
||||
<vc:create path="admin/deleteContractPartya"></vc:create>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -12,8 +12,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入类型名称','contractTypeManage')"
|
||||
v-model="contractTypeManageInfo.conditions.typeName" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请输入类型名称','contractTypeManage')" v-model="contractTypeManageInfo.conditions.typeName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@ -25,13 +24,11 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入类型编码','contractTypeManage')"
|
||||
v-model="contractTypeManageInfo.conditions.contractTypeId" class=" form-control">
|
||||
<input type="text" :placeholder="vc.i18n('请输入类型编码','contractTypeManage')" v-model="contractTypeManageInfo.conditions.contractTypeId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryContractTypeMethod()">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryContractTypeMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span><vc:i18n name="查询" namespace="contractTypeManage"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
@ -74,20 +71,16 @@
|
||||
<td class="text-center">{{contractType.createTime}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openContractTypeSpecModel(contractType)"><span><vc:i18n name="扩展信息" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openContractTypeSpecModel(contractType)"><span><vc:i18n name="扩展信息" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openContractTemplate(contractType)"><span><vc:i18n name="合同模板" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openContractTemplate(contractType)"><span><vc:i18n name="合同模板" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditContractTypeModel(contractType)"><span><vc:i18n name="修改" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditContractTypeModel(contractType)"><span><vc:i18n name="修改" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteContractTypeModel(contractType)"><span><vc:i18n name="删除" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteContractTypeModel(contractType)"><span><vc:i18n name="删除" namespace="contractTypeManage"></vc:i18n></span></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -115,4 +108,4 @@
|
||||
<vc:create path="admin/editContractType"></vc:create>
|
||||
<vc:create path="admin/deleteContractType"></vc:create>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -22,7 +22,12 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请输入合同类型','newContractManage')" v-model="newContractManageInfo.conditions.contractType" class=" form-control">
|
||||
<select class="custom-select" v-model="newContractManageInfo.conditions.contractType">
|
||||
<option selected value="">请选择合同类型</option>
|
||||
<option :value="item.contractTypeId" v-for="(item,index) in newContractManageInfo.contractTypes">
|
||||
{{item.typeName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
@ -117,4 +122,4 @@
|
||||
<vc:create path="admin/editContract"></vc:create>
|
||||
<vc:create path="admin/deleteContract"></vc:create>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -17,11 +17,13 @@
|
||||
contractCode: '',
|
||||
contractType: '',
|
||||
state: '11'
|
||||
}
|
||||
},
|
||||
contractTypes: [],
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listContractTypes();
|
||||
},
|
||||
_initEvent: function() {
|
||||
|
||||
@ -60,6 +62,28 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_listContractTypes: function(_page, _rows) {
|
||||
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 50,
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/contract/queryContractType',
|
||||
param,
|
||||
function(json, res) {
|
||||
let _contractTypeManageInfo = JSON.parse(json);
|
||||
$that.newContractManageInfo.contractTypes = _contractTypeManageInfo.data;
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddContractModal: function() {
|
||||
//vc.emit('addContract', 'openAddContractModal', {});
|
||||
vc.jumpToPage('/#/pages/admin/addContract')
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
@ -15,22 +15,22 @@
|
||||
boxName: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
_initMethod: function() {
|
||||
$that.parkingBoxAreaManageInfo.boxId = vc.getParam('boxId');
|
||||
$that.parkingBoxAreaManageInfo.boxName = vc.getParam('boxName');
|
||||
vc.component._listParkingBoxAreas(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
_initEvent: function() {
|
||||
|
||||
vc.on('parkingBoxAreaManage', 'listParkingBoxArea', function (_param) {
|
||||
vc.on('parkingBoxAreaManage', 'listParkingBoxArea', function(_param) {
|
||||
vc.component._listParkingBoxAreas(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listParkingBoxAreas(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listParkingBoxAreas: function (_page, _rows) {
|
||||
_listParkingBoxAreas: function(_page, _rows) {
|
||||
var param = {
|
||||
params: {
|
||||
page: _page,
|
||||
@ -43,7 +43,7 @@
|
||||
//发送get请求
|
||||
vc.http.apiGet('/parkingBoxArea.listParkingBoxArea',
|
||||
param,
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
let _parkingBoxAreaManageInfo = JSON.parse(json);
|
||||
$that.parkingBoxAreaManageInfo.total = _parkingBoxAreaManageInfo.total;
|
||||
$that.parkingBoxAreaManageInfo.records = _parkingBoxAreaManageInfo.records;
|
||||
@ -52,32 +52,33 @@
|
||||
total: vc.component.parkingBoxAreaManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddParkingBoxAreaModal: function () {
|
||||
_openAddParkingBoxAreaModal: function() {
|
||||
vc.emit('addParkingBoxArea', 'openAddParkingBoxAreaModal', {
|
||||
boxId: $that.parkingBoxAreaManageInfo.boxId
|
||||
});
|
||||
},
|
||||
_openDeleteParkingBoxAreaModel: function (_parkingBoxArea) {
|
||||
_openDeleteParkingBoxAreaModel: function(_parkingBoxArea) {
|
||||
vc.emit('deleteParkingBoxArea', 'openDeleteParkingBoxAreaModal', _parkingBoxArea);
|
||||
},
|
||||
_settingDefaultArea: function (_parkingBoxArea) {
|
||||
_settingDefaultArea: function(_parkingBoxArea) {
|
||||
let _data = {
|
||||
boxId: _parkingBoxArea.boxId,
|
||||
communityId: _parkingBoxArea.communityId,
|
||||
baId: _parkingBoxArea.baId,
|
||||
defaultArea: 'T'
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'parkingBoxArea.updateParkingBoxArea',
|
||||
JSON.stringify(_data),
|
||||
{
|
||||
JSON.stringify(_data), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
@ -87,15 +88,15 @@
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
});
|
||||
},
|
||||
_goBack:function(){
|
||||
_goBack: function() {
|
||||
vc.goBack();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user