From f9e42a9b74a69229aa2f25c4039db00a10f3243f Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Sun, 4 Sep 2022 23:38:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=8A=A0=E5=85=A5=E6=9C=88?= =?UTF-8?q?=E7=A7=9F=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/components/property/addCar/addCar.html | 8 ++- public/components/property/addCar/addCar.js | 6 +- .../components/property/editCar/editCar.html | 14 ++++- public/components/property/editCar/editCar.js | 3 +- .../property/listOwnerCar/listOwnerCar.html | 19 ++++++- .../property/listOwnerCar/listOwnerCar.js | 56 +++++++++---------- 6 files changed, 68 insertions(+), 38 deletions(-) diff --git a/public/components/property/addCar/addCar.html b/public/components/property/addCar/addCar.html index 89d33a245..022032353 100755 --- a/public/components/property/addCar/addCar.html +++ b/public/components/property/addCar/addCar.html @@ -39,20 +39,22 @@
- + +
-
+
-
+
diff --git a/public/components/property/addCar/addCar.js b/public/components/property/addCar/addCar.js index a30ad093f..fc638a46f 100755 --- a/public/components/property/addCar/addCar.js +++ b/public/components/property/addCar/addCar.js @@ -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'; } diff --git a/public/components/property/editCar/editCar.html b/public/components/property/editCar/editCar.html index 456d59b66..0fca7ead5 100755 --- a/public/components/property/editCar/editCar.html +++ b/public/components/property/editCar/editCar.html @@ -46,6 +46,18 @@
+ +
+ +
+
+
@@ -53,7 +65,7 @@
-
+
diff --git a/public/components/property/editCar/editCar.js b/public/components/property/editCar/editCar.js index c54971e5a..e7eb8f460 100755 --- a/public/components/property/editCar/editCar.js +++ b/public/components/property/editCar/editCar.js @@ -14,7 +14,8 @@ remark: "", startTime: '', endTime: '', - carNumType: '' + carNumType: '', + leaseType: '', }, carTypes: [{ key: '9901', diff --git a/public/pages/property/listOwnerCar/listOwnerCar.html b/public/pages/property/listOwnerCar/listOwnerCar.html index 344886ab5..a7f851d3b 100755 --- a/public/pages/property/listOwnerCar/listOwnerCar.html +++ b/public/pages/property/listOwnerCar/listOwnerCar.html @@ -90,6 +90,9 @@ + + + @@ -127,6 +130,12 @@ {{car.carBrand}} + + {{car.leaseTypeName}} + + + {{car.carTypeName}} + {{car.carTypeName}} @@ -144,12 +153,18 @@ 车位已释放 - + {{car.startTime}} - + + - + + {{car.endTime}} + + - + {{_getCarState(car)}} diff --git a/public/pages/property/listOwnerCar/listOwnerCar.js b/public/pages/property/listOwnerCar/listOwnerCar.js index 72ff3a956..ef00034b6 100755 --- a/public/pages/property/listOwnerCar/listOwnerCar.js +++ b/public/pages/property/listOwnerCar/listOwnerCar.js @@ -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') {