mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
车辆加入月租车
This commit is contained in:
parent
e6d4115560
commit
f9e42a9b74
@ -39,20 +39,22 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name="车牌类型" namespace="addCar"></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addCarInfo.carNumType">
|
||||
<select class="custom-select" v-model="addCarInfo.leaseType">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择车牌类型','addCar')}}</option>
|
||||
<option value="H">{{vc.i18n('月租车','addCar')}}</option>
|
||||
<option value="S">{{vc.i18n('出售车辆','addCar')}}</option>
|
||||
<option value="I">{{vc.i18n('内部车','addCar')}}</option>
|
||||
<option value="NM">{{vc.i18n('免费车','addCar')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-show="addCarInfo.carNumType == 'H'">
|
||||
<div class="form-group row" v-show="addCarInfo.leaseType == 'H'">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name="起租时间" namespace="addCar"></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addCarInfo.startTime" type="text" :placeholder="vc.i18n('必填,请填写起租时间','addCar')" class="form-control startTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-show="addCarInfo.carNumType == 'H'">
|
||||
<div class="form-group row" v-show="addCarInfo.leaseType == 'H'">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name="结租时间" namespace="addCar"></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addCarInfo.endTime" type="text" :placeholder="vc.i18n('必填,请填写结租时间','addCar')" class="form-control endTime">
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
remark: "",
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
carNumType: '',
|
||||
leaseType: '',
|
||||
carAttrs: '',
|
||||
attrs: [],
|
||||
value: ''
|
||||
@ -132,8 +132,8 @@
|
||||
});
|
||||
},
|
||||
saveAddCarInfo: function() {
|
||||
let _carNumType = $that.addCarInfo.carNumType;
|
||||
if (_carNumType == 'S') {
|
||||
let _leaseType = $that.addCarInfo.leaseType;
|
||||
if (_leaseType != 'H') {
|
||||
$that.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
|
||||
$that.addCarInfo.endTime = '2037-01-01';
|
||||
}
|
||||
|
||||
@ -46,6 +46,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name="车牌类型" namespace="addCar"></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editCarInfo.leaseType">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择车牌类型','addCar')}}</option>
|
||||
<option value="H">{{vc.i18n('月租车','addCar')}}</option>
|
||||
<option value="S">{{vc.i18n('出售车辆','addCar')}}</option>
|
||||
<option value="I">{{vc.i18n('内部车','addCar')}}</option>
|
||||
<option value="NM">{{vc.i18n('免费车','addCar')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-show="editCarInfo.leaseType == 'H'">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="起租时间" namespace="editCar"></vc:i18n></span>
|
||||
</label>
|
||||
@ -53,7 +65,7 @@
|
||||
<input v-model="editCarInfo.startTime" type="text" :placeholder="vc.i18n('必填,请填写起租时间','editCar')" class="form-control editCarStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="form-group row" v-show="editCarInfo.leaseType == 'H'">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="结租时间" namespace="editCar"></vc:i18n></span>
|
||||
</label>
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
remark: "",
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
carNumType: ''
|
||||
carNumType: '',
|
||||
leaseType: '',
|
||||
},
|
||||
carTypes: [{
|
||||
key: '9901',
|
||||
|
||||
@ -90,6 +90,9 @@
|
||||
<th data-hide="phone" class="text-center">
|
||||
<span><vc:i18n name="车辆品牌" namespace="listOwnerCar"></vc:i18n></span>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<span><vc:i18n name="车牌类型" namespace="listOwnerCar"></vc:i18n></span>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<span><vc:i18n name="车辆类型" namespace="listOwnerCar"></vc:i18n></span>
|
||||
</th>
|
||||
@ -127,6 +130,12 @@
|
||||
<td class="text-center">
|
||||
{{car.carBrand}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{car.leaseTypeName}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{car.carTypeName}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{car.carTypeName}}
|
||||
</td>
|
||||
@ -144,12 +153,18 @@
|
||||
<td v-else class="text-center">
|
||||
车位已释放
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td class="text-center" v-if="car.leaseType == 'H'">
|
||||
{{car.startTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td class="text-center" v-else>
|
||||
-
|
||||
</td>
|
||||
<td class="text-center" v-if="car.leaseType == 'H'">
|
||||
{{car.endTime}}
|
||||
</td>
|
||||
<td class="text-center" v-else>
|
||||
-
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{_getCarState(car)}}
|
||||
</td>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
(function (vc) {
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
@ -19,19 +19,19 @@
|
||||
listColumns: [],
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
_initMethod: function() {
|
||||
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('listOwnerCar', 'listOwnerCarData', function () {
|
||||
_initEvent: function() {
|
||||
vc.on('listOwnerCar', 'listOwnerCarData', function() {
|
||||
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
$that._listOwnerCar(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listOwnerCar: function (_page, _row) {
|
||||
_listOwnerCar: function(_page, _row) {
|
||||
let _params = $that.listOwnerCarInfo.conditions;
|
||||
_params.page = _page;
|
||||
_params.row = _row;
|
||||
@ -42,9 +42,9 @@
|
||||
param.params.carNumLike = param.params.carNumLike.trim();
|
||||
param.params.num = param.params.num.trim();
|
||||
//发送get请求
|
||||
vc.http.apiGet('owner.queryOwnerCars',
|
||||
vc.http.apiGet('/owner.queryOwnerCars',
|
||||
param,
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
var _json = JSON.parse(json);
|
||||
$that.listOwnerCarInfo.total = _json.total;
|
||||
$that.listOwnerCarInfo.records = _json.records;
|
||||
@ -56,46 +56,46 @@
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_addOwnerCar: function () { //出租
|
||||
_addOwnerCar: function() { //出租
|
||||
vc.jumpToPage('/#/pages/property/hireParkingSpace');
|
||||
},
|
||||
_openEditOwnerCar: function (_car) {
|
||||
_openEditOwnerCar: function(_car) {
|
||||
vc.emit('editCar', 'openEditCar', _car);
|
||||
},
|
||||
//查询
|
||||
_queryMethod: function () {
|
||||
_queryMethod: function() {
|
||||
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetMethod: function () {
|
||||
_resetMethod: function() {
|
||||
vc.component.listOwnerCarInfo.conditions.carNumLike = "";
|
||||
vc.component.listOwnerCarInfo.conditions.num = "";
|
||||
vc.component.listOwnerCarInfo.conditions.valid = "";
|
||||
vc.component.listOwnerCarInfo.conditions.carTypeCd = "1001";
|
||||
$that._listOwnerCar(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
_moreCondition: function() {
|
||||
if ($that.listOwnerCarInfo.moreCondition) {
|
||||
$that.listOwnerCarInfo.moreCondition = false;
|
||||
} else {
|
||||
$that.listOwnerCarInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_openDelOwnerCarModel: function (_car) {
|
||||
_openDelOwnerCarModel: function(_car) {
|
||||
vc.emit('deleteOwnerCar', 'openOwnerCarModel', _car);
|
||||
},
|
||||
_deleteCarParkingSpace: function (_car) {
|
||||
_deleteCarParkingSpace: function(_car) {
|
||||
vc.http.apiPost(
|
||||
'owner.deleteCarParkingSpace',
|
||||
JSON.stringify(_car), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
json = JSON.parse(json);
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (res.status == 200 && json.code == 0) {
|
||||
@ -105,22 +105,22 @@
|
||||
}
|
||||
vc.toast(json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_addCarParkingSpace: function (_car) {
|
||||
_addCarParkingSpace: function(_car) {
|
||||
vc.jumpToPage('/#/pages/property/carAddParkingSpace?carId=' + _car.carId);
|
||||
},
|
||||
_toPayFee: function (_car) {
|
||||
_toPayFee: function(_car) {
|
||||
vc.jumpToPage('/#/pages/property/listCarFee?carId=' +
|
||||
_car.carId + '&carNum=' + _car.carNum + '&areaNum=' + _car.areaNum + '&num=' + _car.num);
|
||||
},
|
||||
_toCarMember: function (car) {
|
||||
_toCarMember: function(car) {
|
||||
vc.jumpToPage('/#/pages/property/listOwnerCarMember?carId=' + car.carId)
|
||||
},
|
||||
_getCarState: function (car) {
|
||||
_getCarState: function(car) {
|
||||
if (car.state != null && car.state != '' && car.state != 'undefined' && car.state == '3003') {
|
||||
return "到期";
|
||||
}
|
||||
@ -130,17 +130,17 @@
|
||||
}
|
||||
return "到期";
|
||||
},
|
||||
_openOwnerCarImport: function () {
|
||||
_openOwnerCarImport: function() {
|
||||
vc.emit('importOwnerCar', 'openImportOwnerCarModal', {});
|
||||
},
|
||||
dealCarAttr: function (cars) {
|
||||
$that._getColumns(cars, function () {
|
||||
dealCarAttr: function(cars) {
|
||||
$that._getColumns(cars, function() {
|
||||
cars.forEach(item => {
|
||||
$that._getColumnsValue(item);
|
||||
});
|
||||
});
|
||||
},
|
||||
_getColumnsValue: function (_car) {
|
||||
_getColumnsValue: function(_car) {
|
||||
_car.listValues = [];
|
||||
if (!_car.hasOwnProperty('ownerCarAttrDto') || _car.ownerCarAttrDto.length < 1) {
|
||||
$that.listOwnerCarInfo.listColumns.forEach(_value => {
|
||||
@ -159,9 +159,9 @@
|
||||
_car.listValues.push(_tmpValue);
|
||||
})
|
||||
},
|
||||
_getColumns: function (_cars, _call) {
|
||||
_getColumns: function(_cars, _call) {
|
||||
$that.listOwnerCarInfo.listColumns = [];
|
||||
vc.getAttrSpec('owner_car_attr', function (data) {
|
||||
vc.getAttrSpec('owner_car_attr', function(data) {
|
||||
$that.listOwnerCarInfo.listColumns = [];
|
||||
data.forEach(item => {
|
||||
if (item.listShow == 'Y') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user