mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
优化代码
This commit is contained in:
parent
002fa05252
commit
6a027f67b2
4
app.js
4
app.js
@ -40,8 +40,8 @@ app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
|
||||
|
||||
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
||||
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
||||
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||
|
||||
//app.listen(3000);
|
||||
app.use(express.json());
|
||||
|
||||
112
public/pages/admin/contractAudit/contractAudit.html
Normal file
112
public/pages/admin/contractAudit/contractAudit.html
Normal file
@ -0,0 +1,112 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</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="请输入合同名称"
|
||||
v-model="contractManageInfo.conditions.contractName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入合同编号"
|
||||
v-model="contractManageInfo.conditions.contractCode" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入合同类型"
|
||||
v-model="contractManageInfo.conditions.contractType" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryContractMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>合同审核</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</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">合同名称</th>
|
||||
<th class="text-center">合同编号</th>
|
||||
<th class="text-center">合同类型</th>
|
||||
<th class="text-center">甲方</th>
|
||||
<th class="text-center">乙方</th>
|
||||
<th class="text-center">经办人</th>
|
||||
<th class="text-center">合同金额</th>
|
||||
<th class="text-center">开始时间</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="contract in contractManageInfo.contracts">
|
||||
<td class="text-center">{{contract.contractName}}</td>
|
||||
<td class="text-center">{{contract.contractCode}}</td>
|
||||
<td class="text-center">{{contract.contractTypeName}}</td>
|
||||
<td class="text-center">{{contract.partyA}}</td>
|
||||
<td class="text-center">{{contract.partyB}}</td>
|
||||
<td class="text-center">{{contract.operator}}</td>
|
||||
<td class="text-center">{{contract.amount}}</td>
|
||||
<td class="text-center">{{contract.startTime}}</td>
|
||||
<td class="text-center">{{contract.endTime}}</td>
|
||||
<td class="text-center">{{contract.stateName}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openAuditContractModal(contract)">审核</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteContractModel(contract)">详情</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="common/audit" callBackListener="contractAudit" callBackFunction="nitify"></vc:create>
|
||||
|
||||
</div>
|
||||
119
public/pages/admin/contractAudit/contractAudit.js
Normal file
119
public/pages/admin/contractAudit/contractAudit.js
Normal file
@ -0,0 +1,119 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
contractManageInfo: {
|
||||
contracts: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
contractId: '',
|
||||
conditions: {
|
||||
contractName: '',
|
||||
contractCode: '',
|
||||
contractType: '',
|
||||
state: '11'
|
||||
},
|
||||
contractId: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('contractAudit', 'nitify', function (_param) {
|
||||
$that._audit(_param);
|
||||
});
|
||||
|
||||
vc.on('contractManage', 'listContract', function (_param) {
|
||||
vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listContracts(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_audit: function (_param) {
|
||||
let _state = "33";
|
||||
|
||||
if (_param.state == '1100') {
|
||||
_state = "22";
|
||||
}
|
||||
let _data = {
|
||||
contractId: $that.contractManageInfo.contractId,
|
||||
state: _state,
|
||||
stateDesc: _param.remark
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'/contract/auditContract',
|
||||
JSON.stringify(_data),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
vc.emit('contractManage', 'listContract', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
_listContracts: function (_page, _rows) {
|
||||
|
||||
vc.component.contractManageInfo.conditions.page = _page;
|
||||
vc.component.contractManageInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: vc.component.contractManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/contract/queryContract',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _contractManageInfo = JSON.parse(json);
|
||||
vc.component.contractManageInfo.total = _contractManageInfo.total;
|
||||
vc.component.contractManageInfo.records = _contractManageInfo.records;
|
||||
vc.component.contractManageInfo.contracts = _contractManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.contractManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAuditContractModal: function (_contract) {
|
||||
$that.contractManageInfo.contractId = _contract.contractId;
|
||||
vc.emit('audit', 'openAuditModal', _contract);
|
||||
},
|
||||
_openDeleteContractModel: function (_contract) {
|
||||
vc.emit('deleteContract', 'openDeleteContractModal', _contract);
|
||||
},
|
||||
_queryContractMethod: function () {
|
||||
vc.component._listContracts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.contractManageInfo.moreCondition) {
|
||||
vc.component.contractManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.contractManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -66,6 +66,7 @@
|
||||
<th class="text-center">合同金额</th>
|
||||
<th class="text-center">开始时间</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -73,17 +74,18 @@
|
||||
<tr v-for="contract in contractManageInfo.contracts">
|
||||
<td class="text-center">{{contract.contractName}}</td>
|
||||
<td class="text-center">{{contract.contractCode}}</td>
|
||||
<td class="text-center">{{contract.contractType}}</td>
|
||||
<td class="text-center">{{contract.contractTypeName}}</td>
|
||||
<td class="text-center">{{contract.partyA}}</td>
|
||||
<td class="text-center">{{contract.partyB}}</td>
|
||||
<td class="text-center">{{contract.operator}}</td>
|
||||
<td class="text-center">{{contract.amount}}</td>
|
||||
<td class="text-center">{{contract.startTime}}</td>
|
||||
<td class="text-center">{{contract.endTime}}</td>
|
||||
<td class="text-center">{{contract.stateName}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditContractModel(contract)">修改</button>
|
||||
v-on:click="_openEditContractModel(contract)">变更</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
<tr v-for="contractType in contractTypeManageInfo.contractTypes">
|
||||
<td class="text-center">{{contractType.contractTypeId}}</td>
|
||||
<td class="text-center">{{contractType.typeName}}</td>
|
||||
<td class="text-center">{{contractType.audit}}</td>
|
||||
<td class="text-center">{{contractType.auditName}}</td>
|
||||
<td class="text-center">{{contractType.remark}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user