mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化修改
This commit is contained in:
parent
9b641fd13e
commit
e0b200435c
@ -1,4 +1,4 @@
|
|||||||
<div id="editTempCarFeeConfigModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
<div id="editTempCarFeeConfigModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3 col-form-label padding-lr-sm text-right">停车场</label>
|
<label class="col-sm-3 col-form-label padding-lr-sm text-right">停车场</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input v-model="editTempCarFeeConfigInfo.feeName" disabled type="text" placeholder="必填,请填写标准名称"
|
<input v-model="editTempCarFeeConfigInfo.areaNum" disabled type="text" placeholder="必填,请填写停车场"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,11 +21,22 @@
|
|||||||
_initEvent: function () {
|
_initEvent: function () {
|
||||||
vc.on('editTempCarFeeConfig', 'openEditTempCarFeeConfigModal', function (_params) {
|
vc.on('editTempCarFeeConfig', 'openEditTempCarFeeConfigModal', function (_params) {
|
||||||
vc.component.refreshEditTempCarFeeConfigInfo();
|
vc.component.refreshEditTempCarFeeConfigInfo();
|
||||||
|
vc.copyObject(_params, vc.component.editTempCarFeeConfigInfo);
|
||||||
|
$that.editTempCarFeeConfigInfo.attrs = _params.tempCarFeeConfigAttrs;
|
||||||
|
$that.editTempCarFeeConfigInfo.startTime = vc.dateFormat($that.editTempCarFeeConfigInfo.startTime);
|
||||||
|
$that.editTempCarFeeConfigInfo.endTime = vc.dateFormat($that.editTempCarFeeConfigInfo.endTime);
|
||||||
$that._loadEditTempCarFeeRules();
|
$that._loadEditTempCarFeeRules();
|
||||||
$('#editTempCarFeeConfigModel').modal('show');
|
$('#editTempCarFeeConfigModel').modal('show');
|
||||||
vc.copyObject(_params, vc.component.editTempCarFeeConfigInfo);
|
|
||||||
vc.component.editTempCarFeeConfigInfo.communityId = vc.getCurrentCommunity().communityId;
|
vc.component.editTempCarFeeConfigInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#editTempCarFeeConfigModel').on('show.bs.modal', function (e) {
|
||||||
|
$(this).css('display', 'block');
|
||||||
|
let modalWidth = $(window).width() * 0.7;
|
||||||
|
$(this).find('.modal-dialog').css({
|
||||||
|
'max-width': modalWidth
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
editTempCarFeeConfigValidate: function () {
|
editTempCarFeeConfigValidate: function () {
|
||||||
@ -120,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
vc.http.apiPost(
|
vc.http.apiPost(
|
||||||
'tempCarFeeConfig.updateTempCarFeeConfig',
|
'fee.updateTempCarFeeConfig',
|
||||||
JSON.stringify(vc.component.editTempCarFeeConfigInfo),
|
JSON.stringify(vc.component.editTempCarFeeConfigInfo),
|
||||||
{
|
{
|
||||||
emulateJSON: true
|
emulateJSON: true
|
||||||
@ -162,7 +173,7 @@
|
|||||||
params: {
|
params: {
|
||||||
page: 1,
|
page: 1,
|
||||||
row: 100,
|
row: 100,
|
||||||
token: '123'
|
ruleId: $that.editTempCarFeeConfigInfo.ruleId
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//发送get请求
|
//发送get请求
|
||||||
@ -171,11 +182,21 @@
|
|||||||
function (json, res) {
|
function (json, res) {
|
||||||
let _feeDiscountManageInfo = JSON.parse(json);
|
let _feeDiscountManageInfo = JSON.parse(json);
|
||||||
$that.editTempCarFeeConfigInfo.rules = _feeDiscountManageInfo.data;
|
$that.editTempCarFeeConfigInfo.rules = _feeDiscountManageInfo.data;
|
||||||
|
$that._freshCarFeeConfigRule($that.editTempCarFeeConfigInfo.rules[0].tempCarFeeRuleSpecs)
|
||||||
}, function (errInfo, error) {
|
}, function (errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
_freshCarFeeConfigRule: function (_attrs) {
|
||||||
|
$that.editTempCarFeeConfigInfo.attrs.forEach(item => {
|
||||||
|
_attrs.forEach(attrItem =>{
|
||||||
|
if (item.specCd == attrItem.specId) {
|
||||||
|
item.specName = attrItem.specName;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user