mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
118d4f264a
commit
dc6df87b77
@ -0,0 +1,56 @@
|
|||||||
|
<div id="applyDeleteFeeBatchModel" class="modal fade" tabindex="-1" 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 ">费用取消申请</h3>
|
||||||
|
<div class="ibox-content">
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-2 col-form-label">批次号</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input v-model="applyDeleteFeeBatchInfo.batchId" type="text"
|
||||||
|
disabled='disabled'
|
||||||
|
placeholder="必填,请填写批次号" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-2 col-form-label">员工</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input v-model="applyDeleteFeeBatchInfo.createUserName" type="text" disabled="disabled"
|
||||||
|
class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-2 col-form-label">创建时间</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input v-model="applyDeleteFeeBatchInfo.createTime" type="text" disabled="disabled"
|
||||||
|
class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-2 col-form-label">取消原因</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea v-model="applyDeleteFeeBatchInfo.remark" placeholder="请填写取消原因"
|
||||||
|
class="form-control">
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ibox-content">
|
||||||
|
<button class="btn btn-primary float-right" type="button"
|
||||||
|
v-on:click="saveApplyRoomDiscountRecordInfo()">
|
||||||
|
<i class="fa fa-check"></i> 保存
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||||
|
data-dismiss="modal">
|
||||||
|
<i class="fa fa-times"></i> 取消
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
(function (vc) {
|
||||||
|
vc.extends({
|
||||||
|
propTypes: {
|
||||||
|
callBackListener: vc.propTypes.string, //父组件名称
|
||||||
|
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
applyDeleteFeeBatchInfo: {
|
||||||
|
batchId: '',
|
||||||
|
createUserName: '',
|
||||||
|
createTime: '',
|
||||||
|
remark: '',
|
||||||
|
communityId: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_initMethod: function () {
|
||||||
|
},
|
||||||
|
_initEvent: function () {
|
||||||
|
vc.on('applyDeleteFeeBatch', 'openApply', function (_param) {
|
||||||
|
$that.clearApplyDeleteFeeBatchInfo();
|
||||||
|
vc.copyObject(_param, $that.applyDeleteFeeBatchInfo);
|
||||||
|
$('#applyDeleteFeeBatchModel').modal('show');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
applyDeleteFeeBatchInfoValidate() {
|
||||||
|
return vc.validate.validate({
|
||||||
|
applyDeleteFeeBatchInfo: vc.component.applyDeleteFeeBatchInfo
|
||||||
|
}, {
|
||||||
|
'applyDeleteFeeBatchInfo.batchId': [
|
||||||
|
{
|
||||||
|
limit: "required",
|
||||||
|
param: "",
|
||||||
|
errInfo: "批次不能为空"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'applyDeleteFeeBatchInfo.remark': [
|
||||||
|
{
|
||||||
|
limit: "required",
|
||||||
|
param: "",
|
||||||
|
errInfo: "取消原因不能为空"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveApplyDeleteFeeBatchInfo: function () {
|
||||||
|
if (!vc.component.applyDeleteFeeBatchInfoValidate()) {
|
||||||
|
vc.toast(vc.validate.errInfo);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vc.component.applyDeleteFeeBatchInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||||
|
//不提交数据将数据 回调给侦听处理
|
||||||
|
if (vc.notNull($props.callBackListener)) {
|
||||||
|
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.applyDeleteFeeBatchInfo);
|
||||||
|
$('#applyDeleteFeeBatchModel').modal('hide');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vc.http.apiPost(
|
||||||
|
'/payFeeBatch.applyDeletePayFeeBatchCmd',
|
||||||
|
JSON.stringify(vc.component.applyDeleteFeeBatchInfo),
|
||||||
|
{
|
||||||
|
emulateJSON: true
|
||||||
|
},
|
||||||
|
function (json, res) {
|
||||||
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
|
let _json = JSON.parse(json);
|
||||||
|
if (_json.code == 0) {
|
||||||
|
//关闭model
|
||||||
|
$('#applyDeleteFeeBatchModel').modal('hide');
|
||||||
|
vc.component.clearApplyDeleteFeeBatchInfo();
|
||||||
|
vc.emit('pagination', 'page_event', 1);
|
||||||
|
location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vc.message(_json.msg);
|
||||||
|
},
|
||||||
|
function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
vc.message(errInfo);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clearApplyDeleteFeeBatchInfo: function () {
|
||||||
|
vc.component.applyDeleteFeeBatchInfo = {
|
||||||
|
batchId: '',
|
||||||
|
createUserName: '',
|
||||||
|
createTime: '',
|
||||||
|
remark: '',
|
||||||
|
communityId: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})(window.vc);
|
||||||
@ -23,13 +23,13 @@
|
|||||||
<td class="text-center">{{payFee.batchId}}</td>
|
<td class="text-center">{{payFee.batchId}}</td>
|
||||||
<td class="text-center">{{payFee.createUserName}}</td>
|
<td class="text-center">{{payFee.createUserName}}</td>
|
||||||
<td class="text-center">{{payFee.createTime}}</td>
|
<td class="text-center">{{payFee.createTime}}</td>
|
||||||
<td class="text-center">{{payFee.remark}}</td>
|
<td class="text-center">{{payFee.remark || '无'}}</td>
|
||||||
<td class="text-center">{{payFee.stateName}}</td>
|
<td class="text-center">{{payFee.stateName}}</td>
|
||||||
<td class="text-center">{{payFee.msg}}</td>
|
<td class="text-center">{{payFee.msg}}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn-white btn btn-xs" v-if="payFee.state == 2006001"
|
<button class="btn-white btn btn-xs" v-if="payFee.state == 2006001"
|
||||||
v-on:click="_openPayFeeBatchAuditModel(payFee)">申请取消
|
v-on:click="_openApply(payFee)">申请取消
|
||||||
</button>
|
</button>
|
||||||
<button class="btn-white btn btn-xs" v-if="payFee.state == 2007001"
|
<button class="btn-white btn btn-xs" v-if="payFee.state == 2007001"
|
||||||
v-on:click="_openPayFeeBatchAuditModel(payFee)">审核
|
v-on:click="_openPayFeeBatchAuditModel(payFee)">审核
|
||||||
@ -52,5 +52,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<vc:create path="property/applyDeleteFeeBatch" callBackListener="payFeeBatch" callBackFunction="notifyAuditInfo"></vc:create>
|
||||||
<vc:create path="common/audit" callBackListener="payFeeBatch" callBackFunction="notifyAuditInfo"></vc:create>
|
<vc:create path="common/audit" callBackListener="payFeeBatch" callBackFunction="notifyAuditInfo"></vc:create>
|
||||||
</div>
|
</div>
|
||||||
@ -60,6 +60,9 @@
|
|||||||
_queryPayFeeBatchMethod: function () {
|
_queryPayFeeBatchMethod: function () {
|
||||||
vc.component._listPayFeeBatchs(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listPayFeeBatchs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
},
|
},
|
||||||
|
_openApply:function(_payFee){
|
||||||
|
vc.emit('applyDeleteFeeBatch', 'openApply',_payFee);
|
||||||
|
},
|
||||||
_auditPayFeeBatchState: function (_auditInfo) {
|
_auditPayFeeBatchState: function (_auditInfo) {
|
||||||
vc.component.payFeeBatchInfo.payFeeBatch.state = _auditInfo.state;
|
vc.component.payFeeBatchInfo.payFeeBatch.state = _auditInfo.state;
|
||||||
//vc.component.payFeeBatchInfo.payFeeBatch.remark = _auditInfo.remark;
|
//vc.component.payFeeBatchInfo.payFeeBatch.remark = _auditInfo.remark;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user