This commit is contained in:
java110 2020-12-09 11:46:28 +08:00
commit 125f90bfdd
6 changed files with 165 additions and 132 deletions

View File

@ -12,11 +12,11 @@
<select class="custom-select" v-model="carCreateFeeAddInfo.locationTypeCd">
<option selected disabled value="">必填,请选择收费范围</option>
<option value="1000">小区</option>
<option value="2000">停车场</option>
<option value="3000">停车场</option>
</select>
</div>
</div>
<div class="form-group row" v-else>
</div>
<div class="form-group row" v-else>
<label class="col-sm-2 col-form-label">车辆</label>
<div class="col-sm-10">
<input v-model="carCreateFeeAddInfo.locationTypeCdName" disabled="disabled"
@ -24,6 +24,17 @@
</div>
</div>
<div class="form-group row" v-show="carCreateFeeAddInfo.locationTypeCd == '3000'">
<label class="col-sm-2 col-form-label">停车场</label>
<div class="col-sm-10">
<vc:create path="property/parkingAreaSelect2"
parentModal="carCreateFeeAdd"
callBackListener="carCreateFeeAdd"
callBackFunction="notify"
namespace="carCreateFeeAdd"
></vc:create>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">费用类型</label>
<div class="col-sm-10">
@ -47,6 +58,19 @@
</option>
</select></div>
</div>
<div class="form-group row" v-if="carCreateFeeAddInfo.isMore == true">
<label class="col-sm-2 col-form-label">车位状态</label>
<div class="col-sm-10">
<div class="checkbox custom-control-inline">
<label><input type="checkbox" v-model="carCreateFeeAddInfo.carState"
value="S">已出售</label>
</div>
<div class="checkbox custom-control-inline">
<label><input type="checkbox" v-model="carCreateFeeAddInfo.carState"
value="H">已出租</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">计费起始时间</label>
<div class="col-sm-10">

View File

@ -1,47 +1,51 @@
(function(vc) {
(function (vc) {
vc.extends({
data: {
carCreateFeeAddInfo: {
feeTypeCds:[],
feeConfigs:[],
parkingAreas:[],
feeTypeCds: [],
feeConfigs: [],
parkingAreas: [],
locationTypeCd: '',
locationObjId: '',
carId: '',
feeTypeCd:'',
configId:'',
carState:'SH',
isMore:false,
locationTypeCdName:'',
startTime: vc.dateTimeFormat(new Date().getTime())
feeTypeCd: '',
configId: '',
carState: ['H','S'],
isMore: false,
locationTypeCdName: '',
startTime: vc.dateTimeFormat(new Date().getTime()),
paId: ''
}
},
_initMethod: function() {
vc.getDict('pay_fee_config',"fee_type_cd",function(_data){
_initMethod: function () {
vc.getDict('pay_fee_config', "fee_type_cd", function (_data) {
vc.component.carCreateFeeAddInfo.feeTypeCds = _data;
});
vc.initDateTime('carCreateFeeStartTime',function(_value){
vc.initDateTime('carCreateFeeStartTime', function (_value) {
$that.carCreateFeeAddInfo.startTime = _value;
})
vc.component._loadParkingAreas();
},
_initEvent: function() {
_initEvent: function () {
vc.on('carCreateFeeAdd', 'openCarCreateFeeAddModal',
function(_param) {
vc.component.carCreateFeeAddInfo.isMore =_param.isMore;
if(!_param.isMore){
vc.component.carCreateFeeAddInfo.locationTypeCd = '2000';
vc.component.carCreateFeeAddInfo.locationObjId = _param.car.carId;
vc.component.carCreateFeeAddInfo.carId = _param.car.carId;
vc.component.carCreateFeeAddInfo.locationTypeCdName = _param.car.carNum;
}
$('#carCreateFeeAddModel').modal('show');
function (_param) {
vc.component.carCreateFeeAddInfo.isMore = _param.isMore;
if (!_param.isMore) {
vc.component.carCreateFeeAddInfo.locationTypeCd = '2000';
vc.component.carCreateFeeAddInfo.locationObjId = _param.car.carId;
vc.component.carCreateFeeAddInfo.carId = _param.car.carId;
vc.component.carCreateFeeAddInfo.locationTypeCdName = _param.car.carNum;
}
$('#carCreateFeeAddModel').modal('show');
});
});
vc.on("carCreateFeeAdd", "notify", function (param) {
$that.carCreateFeeAddInfo.paId = param.paId;
})
},
methods: {
@ -49,61 +53,63 @@
return vc.validate.validate({
carCreateFeeAddInfo: vc.component.carCreateFeeAddInfo
},
{
'carCreateFeeAddInfo.locationTypeCd': [{
limit: "required",
param: "",
errInfo: "收费范围不能为空"
},
{
limit: "num",
param: "",
errInfo: "收费范围格式错误"
},
],
'carCreateFeeAddInfo.locationObjId': [{
limit: "required",
param: "",
errInfo: "收费对象不能为空"
}
],
'carCreateFeeAddInfo.feeTypeCd': [{
limit: "required",
param: "",
errInfo: "费用类型不能为空"
}
],
'carCreateFeeAddInfo.configId': [{
limit: "required",
param: "",
errInfo: "费用项目不能为空"
}
],
'carCreateFeeAddInfo.carState': [{
limit: "required",
param: "",
errInfo: "出账类型不能为空"
}
],
'carCreateFeeAddInfo.startTime': [{
limit: "required",
param: "",
errInfo: "计费起始时间不能为空"
},
{
limit: "datetime",
param: "",
errInfo: "计费起始时间格式错误 YYYY-MM-DD hh:mm:ss"
}]
});
'carCreateFeeAddInfo.locationTypeCd': [{
limit: "required",
param: "",
errInfo: "收费范围不能为空"
},
{
limit: "num",
param: "",
errInfo: "收费范围格式错误"
},
],
'carCreateFeeAddInfo.locationObjId': [{
limit: "required",
param: "",
errInfo: "收费对象不能为空"
}
],
'carCreateFeeAddInfo.feeTypeCd': [{
limit: "required",
param: "",
errInfo: "费用类型不能为空"
}
],
'carCreateFeeAddInfo.configId': [{
limit: "required",
param: "",
errInfo: "费用项目不能为空"
}
],
'carCreateFeeAddInfo.carState': [{
limit: "required",
param: "",
errInfo: "出账类型不能为空"
}
],
'carCreateFeeAddInfo.startTime': [{
limit: "required",
param: "",
errInfo: "计费起始时间不能为空"
},
{
limit: "datetime",
param: "",
errInfo: "计费起始时间格式错误 YYYY-MM-DD hh:mm:ss"
}]
});
},
saveCarCreateFeeInfo: function() {
saveCarCreateFeeInfo: function () {
vc.component.carCreateFeeAddInfo.communityId = vc.getCurrentCommunity().communityId;
if (vc.component.carCreateFeeAddInfo.locationTypeCd == '1000') { // 小区ID
vc.component.carCreateFeeAddInfo.locationObjId = vc.component.carCreateFeeAddInfo.communityId;
} else if (vc.component.carCreateFeeAddInfo.locationTypeCd == '2000') {
vc.component.carCreateFeeAddInfo.locationObjId = vc.component.carCreateFeeAddInfo.carId;
}else if (vc.component.carCreateFeeAddInfo.locationTypeCd == '3000') {
vc.component.carCreateFeeAddInfo.locationObjId = vc.component.carCreateFeeAddInfo.paId;
} else {
vc.toast("收费范围错误");
return;
@ -119,93 +125,94 @@
vc.http.post('parkingSpaceCreateFeeAdd', 'save', JSON.stringify(vc.component.carCreateFeeAddInfo), {
emulateJSON: true
},
function(json, res) {
if (res.status == 200) {
//关闭model
var _json = JSON.parse(json);
$('#carCreateFeeAddModel').modal('hide');
vc.component.clearAddFeeConfigInfo();
vc.emit('listParkingSpaceFee', 'notify',{});
vc.emit('simplifyCarFee', 'notify',{});
vc.toast("创建收费成功,总共["+_json.totalCar+"]车位,成功["+_json.successCar+"],失败["+_json.errorCar+"]",8000);
return;
}
vc.toast(json);
function (json, res) {
if (res.status == 200) {
//关闭model
var _json = JSON.parse(json);
$('#carCreateFeeAddModel').modal('hide');
vc.component.clearAddFeeConfigInfo();
vc.emit('listParkingSpaceFee', 'notify', {});
vc.emit('simplifyCarFee', 'notify', {});
vc.toast("创建收费成功,总共[" + _json.totalCar + "]车位,成功[" + _json.successCar + "],失败[" + _json.errorCar + "]", 8000);
return;
}
vc.toast(json);
},
function(errInfo, error) {
console.log('请求失败处理');
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
vc.toast(errInfo);
});
});
},
clearAddFeeConfigInfo: function() {
clearAddFeeConfigInfo: function () {
var _feeTypeCds = vc.component.carCreateFeeAddInfo.feeTypeCds;
var _parkingAreas = vc.component.carCreateFeeAddInfo.parkingAreas;
vc.component.carCreateFeeAddInfo = {
feeTypeCds:[],
feeConfigs:[],
parkingAreas:[],
feeTypeCds: [],
feeConfigs: [],
parkingAreas: [],
locationTypeCd: '',
locationObjId: '',
psId: '',
feeTypeCd:'',
configId:'',
billType:'',
carState:'SH',
isMore:false,
locationTypeCdName:'',
startTime: vc.dateTimeFormat(new Date().getTime())
feeTypeCd: '',
configId: '',
billType: '',
carState: ['H','S'],
isMore: false,
locationTypeCdName: '',
startTime: vc.dateTimeFormat(new Date().getTime()),
paId: ''
};
vc.component.carCreateFeeAddInfo.feeTypeCds = _feeTypeCds;
vc.component.carCreateFeeAddInfo.parkingAreas = _parkingAreas;
},
_changeCarFeeTypeCd:function(_feeTypeCd){
_changeCarFeeTypeCd: function (_feeTypeCd) {
var param = {
params: {
page:1,
row:20,
communityId:vc.getCurrentCommunity().communityId,
feeTypeCd:_feeTypeCd,
isDefault:'F',
valid:'1'
page: 1,
row: 20,
communityId: vc.getCurrentCommunity().communityId,
feeTypeCd: _feeTypeCd,
isDefault: 'F',
valid: '1'
}
};
//发送get请求
vc.http.get('parkingSpaceCreateFeeAdd', 'list', param,
function(json, res) {
var _feeConfigManageInfo = JSON.parse(json);
vc.component.carCreateFeeAddInfo.feeConfigs = _feeConfigManageInfo.feeConfigs;
},
function(errInfo, error) {
console.log('请求失败处理');
});
function (json, res) {
var _feeConfigManageInfo = JSON.parse(json);
vc.component.carCreateFeeAddInfo.feeConfigs = _feeConfigManageInfo.feeConfigs;
},
function (errInfo, error) {
console.log('请求失败处理');
});
},
_loadParkingAreas:function(_feeTypeCd){
_loadParkingAreas: function (_feeTypeCd) {
var param = {
params: {
page:1,
row:20,
communityId:vc.getCurrentCommunity().communityId,
page: 1,
row: 20,
communityId: vc.getCurrentCommunity().communityId,
}
};
//发送get请求
vc.http.get('parkingSpaceCreateFeeAdd', 'listParkingArea', param,
function(json, res) {
if(res.status == 200){
var _parkingAreaInfo = JSON.parse(json);
vc.component.carCreateFeeAddInfo.parkingAreas = _parkingAreaInfo.parkingAreas;
}
},
function(errInfo, error) {
console.log('请求失败处理');
});
function (json, res) {
if (res.status == 200) {
var _parkingAreaInfo = JSON.parse(json);
vc.component.carCreateFeeAddInfo.parkingAreas = _parkingAreaInfo.parkingAreas;
}
},
function (errInfo, error) {
console.log('请求失败处理');
});
}
}
});

View File

@ -6,9 +6,9 @@
<option v-for="(item,index) in simplifyCarFeeInfo.ownerCars" :value="item.carId">{{item.carNum}}</option>
</select>
</div>
<div class="col-lg-8 text-right">
<div class="col-lg-4 text-right">
</div>
<div class="col-lg-2 text-right" v-if="simplifyCarFeeInfo.carId">
<div class="col-lg-6 text-right" v-if="simplifyCarFeeInfo.carId">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openSimplifyCarAddMeterWaterModal()">

View File

@ -31,7 +31,7 @@
</div>
<fieldset class="layui-elem-field layui-field-title">
<legend class="text-white">
<vc:i18n name="systemName"></vc:i18n>
<vc:i18n name="subSystemName"></vc:i18n>
</legend>
</fieldset>
<div id="component" class="layui-form" action="" method="post">

View File

@ -6,6 +6,7 @@
window.lang={
"systemName":"CommunityManagement",
"systemSimpleName":"HC",
"subSystemName": "CommunityManagement",
"companyTeam":"java110 team",
"welcome":"welcome community management",
"signOut":"sign out",

View File

@ -5,6 +5,7 @@
window.lang = {
"systemName": "HC小区管理系统",
"systemSimpleName": "HC",
"subSystemName": "小区管理系统",
"companyTeam": "java110 团队",
"welcome": "欢迎访问HC小区管理系统",
"signOut": "退出",