This commit is contained in:
java110 2023-05-08 15:57:44 +08:00
parent 2b749fbcca
commit fab2f59fbd
2 changed files with 67 additions and 73 deletions

View File

@ -18,57 +18,52 @@
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<input type="checkbox" class="i-checks" @click="checkAll($event)">
</th>
<th class="text-center">
<span><vc:i18n name="费用类型" namespace="createFeeByCombo"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="费用项目" namespace="createFeeByCombo"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="费用标识" namespace="createFeeByCombo"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="计费起始时间" namespace="createFeeByCombo"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="计费结束时间" namespace="createFeeByCombo"></vc:i18n></span>
</th>
</tr>
<tr>
<th class="text-center">
<input type="checkbox" class="i-checks" @click="checkAll($event)">
</th>
<th class="text-center">
<vc:i18n name="费用类型" namespace="createFeeByCombo"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="费用项目" namespace="createFeeByCombo"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="费用标识" namespace="createFeeByCombo"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="计费起始时间" namespace="createFeeByCombo"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="计费结束时间" namespace="createFeeByCombo"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="feeConfig in createFeeByComboInfo.feeConfigs">
<td class="text-center">
<input type="checkbox" class="i-checks checkItem" v-bind:value="feeConfig.configId"
v-model="createFeeByComboInfo.selectConfigIds">
</td>
<td class="text-center">{{feeConfig.feeTypeCdName}}</td>
<td class="text-center">{{feeConfig.feeName}}</td>
<td class="text-center">{{feeConfig.feeFlagName}}</td>
<td class="text-center">
<input v-model="feeConfig.startTime" type="text"
:placeholder="vc.i18n('必填,请填写开始时间','createFeeByCombo')" class="form-control"
:class="'startTime'+feeConfig.configId">
</td>
<td class="text-center" v-if="feeConfig.feeFlag != '1003006'">
<input v-model="feeConfig.endTime" type="text"
:placeholder="vc.i18n('必填,请填写结束时间','createFeeByCombo')" class="form-control"
:class="'endTime'+feeConfig.configId">
</td>
<td class="text-center" v-else>
费用项结束时间
</td>
</tr>
<tr v-for="feeConfig in createFeeByComboInfo.feeConfigs">
<td class="text-center">
<input type="checkbox" class="i-checks checkItem" v-bind:value="feeConfig.configId" v-model="createFeeByComboInfo.selectConfigIds">
</td>
<td class="text-center">{{feeConfig.feeTypeCdName}}</td>
<td class="text-center">{{feeConfig.feeName}}</td>
<td class="text-center">{{feeConfig.feeFlagName}}</td>
<td class="text-center">
<input v-model="feeConfig.startTime" type="text" :placeholder="vc.i18n('必填,请填写开始时间','createFeeByCombo')" class="form-control" :class="'startTime'+feeConfig.configId">
</td>
<td class="text-center" v-if="feeConfig.feeFlag != '1003006'">
<input v-model="feeConfig.endTime" type="text" :placeholder="vc.i18n('必填,请填写结束时间','createFeeByCombo')" class="form-control" :class="'endTime'+feeConfig.configId">
</td>
<td class="text-center" v-else>
费用项结束时间
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="8">
<ul class="pagination float-right"></ul>
</td>
</tr>
<tr>
<td colspan="8">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
</div>
@ -78,13 +73,11 @@
<div class="row">
<div class="col-md-10"></div>
<div class="col-md-1 " style="margin-bottom:10px; text-align:right">
<button type="button" class="btn btn-primary btn-lg btn-block" style="margin-left:10px;"
v-on:click="_createFee()">
<span><vc:i18n name="创建" namespace="createFeeByCombo"></vc:i18n></span>
<button type="button" class="btn btn-primary btn-lg btn-block" style="margin-left:10px;" v-on:click="_createFee()">
<vc:i18n name="创建" namespace="createFeeByCombo"></vc:i18n>
</button>
</div>
</div>
<vc:create path="property/chooseFeeCombo" emitChooseFeeCombo="createFeeByCombo"
emitLoadData="createFeeByCombo">
<vc:create path="property/chooseFeeCombo" emitChooseFeeCombo="createFeeByCombo" emitLoadData="createFeeByCombo">
</vc:create>
</div>
</div>

View File

@ -1,4 +1,4 @@
(function (vc) {
(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
@ -13,7 +13,7 @@
comboId: ''
}
},
_initMethod: function () {
_initMethod: function() {
let _payerObjId = vc.getParam('payerObjId');
let _payerObjType = vc.getParam('payerObjType');
let _payerObjName = vc.getParam('payerObjName');
@ -21,17 +21,17 @@
$that.createFeeByComboInfo.payerObjType = _payerObjType;
$that.createFeeByComboInfo.payerObjName = _payerObjName;
},
_initEvent: function () {
vc.on('createFeeByCombo', 'chooseFeeCombo', function (_feeCombo) {
_initEvent: function() {
vc.on('createFeeByCombo', 'chooseFeeCombo', function(_feeCombo) {
$that.createFeeByComboInfo.comboId = _feeCombo.comboId;
$that._listFeeComboMembers(_feeCombo);
})
},
methods: {
_chooseFeeCombo: function () {
_chooseFeeCombo: function() {
vc.emit('chooseFeeCombo', 'openChooseFeeComboModel', {});
},
_listFeeComboMembers: function (_feeCombo) {
_listFeeComboMembers: function(_feeCombo) {
let param = {
params: {
page: 1,
@ -42,7 +42,7 @@
//发送get请求
vc.http.apiGet('/feeComboMember.listFeeComboMember',
param,
function (json, res) {
function(json, res) {
let _feeComboMemberManageInfo = JSON.parse(json);
$that.createFeeByComboInfo.selectConfigIds = [];
_feeComboMemberManageInfo.data.forEach(config => {
@ -54,10 +54,10 @@
$that.$forceUpdate();
setTimeout(() => {
_feeComboMemberManageInfo.data.forEach(config => {
vc.initDate('startTime' + config.configId, function (_value) {
vc.initDate('startTime' + config.configId, function(_value) {
config.startTime = _value;
})
vc.initDate('endTime' + config.configId, function (_value) {
vc.initDate('endTime' + config.configId, function(_value) {
config.endTime = _value;
let start = Date.parse(new Date(config.startTime));
let end = Date.parse(new Date(config.endTime));
@ -68,15 +68,16 @@
})
})
}, 1000)
}, function (errInfo, error) {
},
function(errInfo, error) {
console.log('请求失败处理');
}
);
},
_createFee: function () {
_createFee: function() {
let _fees = [];
$that.createFeeByComboInfo.selectConfigIds.forEach(function (_item) {
$that.createFeeByComboInfo.feeConfigs.forEach(function (_batchFeeItem) {
$that.createFeeByComboInfo.selectConfigIds.forEach(function(_item) {
$that.createFeeByComboInfo.feeConfigs.forEach(function(_batchFeeItem) {
if (_item == _batchFeeItem.configId) {
_fees.push(_batchFeeItem);
}
@ -86,8 +87,8 @@
vc.toast('未选中要创建的费用套餐');
return;
}
for (var i = 0; i, _fees.length; i++) {
var fee = _fees[i];
for (let i = 0; i < _fees.length; i++) {
let fee = _fees[i];
if (fee != null && fee != "" && fee != undefined) {
if (fee.startTime == null || fee.startTime == "" || fee.startTime == undefined) {
vc.toast(_fees[i].feeName + "开始时间不能为空!");
@ -113,7 +114,7 @@
JSON.stringify(_data), {
emulateJSON: true
},
function (json, res) {
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
vc.toast(_json.msg);
@ -122,16 +123,16 @@
return;
}
},
function (errInfo, error) {
function(errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
_back: function () {
_back: function() {
$('#payFeeResult').modal("hide");
vc.getBack();
},
checkAll: function (e) {
checkAll: function(e) {
var checkObj = document.querySelectorAll('.checkItem'); // 获取所有checkbox项
if (e.target.checked) { // 判定全选checkbox的勾选状态
for (var i = 0; i < checkObj.length; i++) {
@ -143,7 +144,7 @@
vc.component.createFeeByComboInfo.selectConfigIds = [];
}
},
_goBack: function () {
_goBack: function() {
vc.goBack();
}
}