Browse Source

Merge branch 'new_web2.0' of http://39.108.172.131:3000/Shannon_mu/SmartCommunity into new_web2.0

Shannon_mu 3 years ago
parent
commit
caa0bcde43

+ 26 - 1
operationSupport/src/views/ownerManagement/houselessHolds/index.vue

@@ -62,7 +62,7 @@
           >
             <i
               class="zoniot_font zoniot-icon-shanchu redText"
-              @click="deleteOne(scope.row.id)"
+              @click="deleteOne(scope.row)"
             ></i>
           </el-tooltip>
         </div>
@@ -101,6 +101,31 @@ export default {
     }
   },
   methods: {
+
+    deleteOne (row) {
+      this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$message({
+          type: 'success',
+          message: '删除成功!'
+        });
+        this.$http.post('/sc-community-web/scResident/unboundHouse/batchDelete', [row.id]).then(({ data, msg, status }) => {
+          this.mixins_search();
+        }).catch(() => { });
+
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+      // alert(1)
+      // var res = [];
+      // res.push(row.id)
+    },
     // 删除
     deleteRow () {
       // 获取选中列表的ids

BIN
smart/src/assets/img/btn_peizhi.png


+ 4 - 1
smart/src/views/accessRecord/index.vue

@@ -40,7 +40,7 @@
     </div>
     <zz-table
       :cols="cols"
-      :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+      :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
       :data="mixins_list"
       :pageset="mixins_pageset"
       @page-change="pageChange"
@@ -149,6 +149,9 @@ export default {
             name: data.list[i].garageName,
             label: data.list[i].parkId
           })
+          this.parkName = data.list[0].garageName
+          this.mixins_query.parkId = data.list[0].parkId
+          this.lookDetails();
         }
       })
     },

+ 1 - 1
smart/src/views/accessRecord/setpPage/details.vue

@@ -100,7 +100,7 @@ export default {
         : this.params.row.carType == 2 ? '月租车'
           : this.params.row.carType == 3 ? '充时车'
             : this.params.row.carType == 4 ? '时租车'
-              : this.params.row.carType == 5 ? '产车'
+              : this.params.row.carType == 5 ? '产车'
                 : this.params.row.carType == 6 ? '计次车'
                   : this.params.row.carType == 7 ? '贵宾卡'
                     : this.params.row.carType == 8 ? '员工卡' : '--';

+ 7 - 14
smart/src/views/channelManagement/index.vue

@@ -6,7 +6,7 @@
         placeholder="输入通道名称查询"
         class="search-input"
         clearable
-        v-model="mixins_query.nodeName"
+        v-model="nodeName"
       ></el-input>
 
       <el-select
@@ -33,7 +33,7 @@
     </div>
     <zz-table
       :cols="cols"
-      :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+      :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
       :data="mixins_list"
       :pageset="mixins_pageset"
       @page-change="pageChange"
@@ -108,6 +108,7 @@ export default {
       mixins_post: 'post',
       nameParkingLot: [],
       nameParkingLotName: '',
+      nodeName: ''
     }
   },
   methods: {
@@ -120,12 +121,14 @@ export default {
             name: data.list[i].garageName,
             label: data.list[i].parkId
           })
+          this.nameParkingLotName = data.list[0].garageName;
+          this.mixins_query.parkId = data.list[0].parkId;
+          this.parkingsearch();
         }
       })
     },
     // 获取点击的停车场名称
     parkingLot (lotname) {
-      // console.log('lotname', lotname);
       this.nameParkingLotName = lotname;
     },
     parkingsearch () {
@@ -133,7 +136,7 @@ export default {
         this.$message.error('请选择停车场名称');
       } else {
         this.mixins_dataUrl = '/sc-community-web/parkingCar/findChannelInfo';
-        this.mixins_query = { parkId: this.mixins_query.parkId, pageIndex: this.mixins_page.pageNum, pageSize: this.mixins_page.pageSize, parkName: this.nameParkingLotName };
+        this.mixins_query = { parkId: this.mixins_query.parkId, pageIndex: this.mixins_page.pageNum, pageSize: this.mixins_page.pageSize, parkName: this.nameParkingLotName, nodeName: this.nodeName };
         this.mixins_search();
       }
 
@@ -141,7 +144,6 @@ export default {
     // 开闸
     switchOn (row) {
       this.$http.post('/sc-community-web/parkingCar/operateChannel', { parkId: this.mixins_query.parkId, type: '0', nodeId: row.id }).then(({ data, status, msg }) => {
-        // console.log('status', status);
         if (status == 0) {
           this.$message.success('开闸成功');
         } else {
@@ -153,7 +155,6 @@ export default {
     // 关闸
     closeGate (row) {
       this.$http.post('/sc-community-web/parkingCar/operateChannel', { parkId: this.mixins_query.parkId, type: '1', nodeId: row.id }).then(({ data, status, msg }) => {
-        // console.log('status', status);
         if (status == 0) {
           this.$message.success('关闸成功');
         } else {
@@ -164,7 +165,6 @@ export default {
     // 强制常开
     forcedNormallyOpen (row) {
       this.$http.post('/sc-community-web/parkingCar/operateChannel', { parkId: this.mixins_query.parkId, type: '2', nodeId: row.id }).then(({ data, status, msg }) => {
-        // console.log('status', status);
         if (status == 0) {
           this.$message.success('强制常开成功');
         } else {
@@ -175,7 +175,6 @@ export default {
     // 结束常开
     endNormallyOpen (row) {
       this.$http.post('/sc-community-web/parkingCar/operateChannel', { parkId: this.mixins_query.parkId, type: '3', nodeId: row.id }).then(({ data, status, msg }) => {
-        // console.log('status', status);
         if (status == 0) {
           this.$message.success('强制常开成功');
         } else {
@@ -185,12 +184,6 @@ export default {
     }
   },
   created () {
-    // 默认查询
-    // this.mixins_dataUrl = '/sc-community-web/parkingCar/findChannelInfo';
-    // this.mixins_query = {};
-    // this.mixins_search();
-    // console.log(this.mixins_query);
-
     // 查询停车场名称
     this.nameParking();
   }

+ 6 - 1
smart/src/views/onSiteVehicles/index.vue

@@ -41,7 +41,7 @@
     </div>
     <zz-table
       :cols="cols"
-      :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+      :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
       :data="mixins_list"
       :pageset="mixins_pageset"
       @page-change="pageChange"
@@ -134,6 +134,9 @@ export default {
             name: data.list[i].garageName,
             label: data.list[i].parkId
           })
+          this.nameParkingLotName = data.list[0].garageName;
+          this.mixins_query.parkId = data.list[0].parkId;
+          this.lookDetails();
         }
       })
     },
@@ -155,6 +158,7 @@ export default {
       }
     },
     lookDetails () {
+      debugger
       if (this.nameParkingLotName.length == 0) {
         this.$message.error('请选择停车场');
       } else {
@@ -181,6 +185,7 @@ export default {
 
     // 调用停车场
     this.nameParking();
+
   }
 }
 </script>

+ 1 - 1
smart/src/views/onSiteVehicles/setpPage/details.vue

@@ -229,7 +229,7 @@ export default {
         : this.params.row.carType == 2 ? '月租车'
           : this.params.row.carType == 3 ? '充时车'
             : this.params.row.carType == 4 ? '时租车'
-              : this.params.row.carType == 5 ? '产车'
+              : this.params.row.carType == 5 ? '产车'
                 : this.params.row.carType == 6 ? '计次车'
                   : this.params.row.carType == 7 ? '贵宾卡'
                     : this.params.row.carType == 8 ? '员工卡' : '--';

+ 1 - 1
smart/src/views/parkingManagement/index.vue

@@ -30,7 +30,7 @@
     </div>
     <zz-table
       :cols="cols"
-      :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+      :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
       :data="mixins_list"
       :pageset="mixins_pageset"
       @page-change="pageChange"

+ 2 - 2
smart/src/views/parkingSpaceManagement/pageJump/parkingLotSaveEdits.vue

@@ -261,10 +261,10 @@ export default {
     garageAreaListQuery () {
       this.garageAreaList = [];
       let onOption = '';
-      this.$http.post('/sc-community/assets/garage/area/list', { garageId: this.ruleForm.garageId }).then((res) => {
+      this.$http.post('/sc-community-web/parkingCar/findParkInfo', { parkid: this.ruleForm.garageId, areaCode: this.ruleForm.communityId }).then((res) => {
         res.data.map((res) => {
           onOption = {
-            label: res.areaName,
+            label: res.garageName,
             id: res.id
           };
           this.garageAreaList.push(onOption);

+ 1 - 1
smart/src/views/parkingSpaceManagement/parkingSpaceList.vue

@@ -66,7 +66,7 @@
     <div>
       <zz-table
         :cols="cols"
-        :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+        :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
         :data="mixins_list"
         :loading="mixins_onQuery"
         :pageset="mixins_pageset"

+ 25 - 12
smart/src/views/rechargeRecord/index.js

@@ -2,14 +2,14 @@ export default {
     data() {
         return {
             cols: [
-                // {
-                //     label: '车主名称',
-                //     prop: '11'
-                // },
-                // {
-                //     label: '手机号',
-                //     prop: '11'
-                // },
+                {
+                    label: '车主名称',
+                    prop: 'userName'
+                },
+                {
+                    label: '手机号',
+                    prop: 'tel'
+                },
                 {
                     label: '车牌号',
                     prop: 'fullCarNoStr'
@@ -59,10 +59,23 @@ export default {
                 //     label: '收费金额',
                 //     prop: '11'
                 // },
-                // {
-                //     label: '支付方式',
-                //     prop: '11'
-                // },
+                {
+                    label: '支付方式',
+                    prop: 'payType',
+                    format(val) {
+                        if (val == 1) {
+                            return '微信';
+                        } else if (val == 2) {
+                            return '支付宝';
+                        } else if (val == 3) {
+                            return '现金';
+                        } else if (val == 4) {
+                            return '预存';
+                        } else if (val == 5) {
+                            return '其他';
+                        }
+                    }
+                },
                 {
                     label: '状态',
                     prop: 'status',

+ 13 - 9
smart/src/views/rechargeRecord/index.vue

@@ -3,10 +3,10 @@
   <div class="main">
     <div class="search">
       <el-input
-        placeholder="输入车牌号"
+        placeholder="输入车牌号/车主名称/手机号"
         class="search-input"
         clearable
-        v-model="mixins_query.plateNo "
+        v-model="mixins_query.plateNo"
       ></el-input>
       <el-select
         placeholder="停车场名称"
@@ -29,6 +29,7 @@
         end-placeholder="充值时间"
         @change="timeToggle"
         :editable="false"
+        v-model="parkingTime"
       ></el-date-picker>
       <!--  -->
       <el-button
@@ -53,7 +54,7 @@
     </div>
     <zz-table
       :cols="cols"
-      :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+      :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
       :data="mixins_list"
       :pageset="mixins_pageset"
       @page-change="pageChange"
@@ -89,7 +90,8 @@ export default {
     return {
       nameParkingLot: [],
       mixins_post: 'post',
-      parkName: '',
+      // parkName: '',
+      parkingTime: ''
     }
   },
   methods: {
@@ -101,19 +103,21 @@ export default {
       let start = '00:00:00',
         end = '23:59:59';
       if (!!e) {
-        this.mixins_query.startDate = `${e[0]} ${start}`;
-        this.mixins_query.endDate = `${e[1]} ${end}`;
+        this.mixins_query.startTime = `${e[0]} ${start}`;
+        this.mixins_query.endTime = `${e[1]} ${end}`;
       } else {
-        this.mixins_query.startDate = ``;
-        this.mixins_query.endDate = ``;
+        this.mixins_query.startTime = ``;
+        this.mixins_query.endTime = ``;
       }
     },
     parkingLot (name) {
       this.parkName = name;
     },
     lookDetails () {
+      console.log(this.mixins_query)
       this.mixins_dataUrl = '/sc-community-web/parkingCar/queryChargeRecord';
-      this.mixins_query = { parkId: this.mixins_query.parkId, parkName: this.parkName };
+      this.mixins_query = { parkId: this.mixins_query.parkId, plateNo: this.mixins_query.plateNo, startTime: this.mixins_query.startTime, endTime: this.mixins_query.endTime };
+      console.log(this.mixins_query)
       this.mixins_search();
     },
     // 获取停车场名称

+ 32 - 15
smart/src/views/rechargeRecord/setpPage/details.vue

@@ -42,7 +42,8 @@ export default {
       interiorCar: [
         {
           name: '车主名称',
-          label: '--'
+          label: ''
+
         }, {
           name: '门牌号码',
           label: '-'
@@ -51,66 +52,82 @@ export default {
           label: ''//platNo
         }, {
           name: '车牌类型',
-          label: ''//carType
+          label: '',//carType
         }, {
           name: '手机号',
-          label: '-'//
+          label: ''//
         }
       ],
       rechargeDetails: [
         {
           name: '收费类型',
-          label: '-'//
+          label: '-'//0
         }, {
           name: '收费类型',
-          label: '-'
+          label: '-'//1
         }, {
           name: '充值数额',
           label: ''//chargeNumber  2
         }, {
           name: '赠送数额',
-          label: '-'
+          label: '-'//3
         }, {
           name: '充值时段',
-          label: '-'
+          label: '-'//4
         }, {
           name: '订单类型',
-          label: '-'
+          label: '-'//5
         }, {
           name: '操作备注',
-          label: '-'
+          label: '-'//6
         }, {
           name: '订单号码',
           label: ''//orderNo  7
         }, {
           name: '操作时间',
-          label: '-'
+          label: '-'//8
         }, {
           name: '审核时间',
-          label: '-'
+          label: '-'//9
         }, {
           name: '操作人员',
-          label: '-'
+          label: '-'//10
         }, {
           name: '审核人员',
-          label: '-'
+          label: '-'//11
         }
       ]
     }
   },
   created () {
-    this.interiorCar[2].label = this.params.row.platNo;
+    this.interiorCar[0].label = this.params.row.userName;
+    this.interiorCar[2].label = this.params.row.fullCarNoStr;
     this.interiorCar[3].label = this.params.row.carType == 0 ? '临时车'
       : this.params.row.carType == 1 ? 'VIP车'
         : this.params.row.carType == 2 ? '月租车'
           : this.params.row.carType == 3 ? '充时车'
             : this.params.row.carType == 4 ? '时租车'
-              : this.params.row.carType == 5 ? '产全车'
+              : this.params.row.carType == 5 ? '产权车'
+                : this.params.row.carType == 6 ? '计次车'
+                  : this.params.row.carType == 7 ? '贵宾卡'
+                    : this.params.row.carType == 8 ? '员工卡' : '--';
+    this.interiorCar[4].label = this.params.row.tel;
+
+    debugger
+    this.rechargeDetails[1].label = this.params.row.carType == 0 ? '临时车'
+      : this.params.row.carType == 1 ? 'VIP车'
+        : this.params.row.carType == 2 ? '月租车'
+          : this.params.row.carType == 3 ? '充时车'
+            : this.params.row.carType == 4 ? '时租车'
+              : this.params.row.carType == 5 ? '产权车'
                 : this.params.row.carType == 6 ? '计次车'
                   : this.params.row.carType == 7 ? '贵宾卡'
                     : this.params.row.carType == 8 ? '员工卡' : '--';
     this.rechargeDetails[2].label = this.params.row.chargeNumber;
+    this.rechargeDetails[3].label = this.params.row.credit || '--';
+    this.rechargeDetails[6].label = this.params.row.remark
     this.rechargeDetails[7].label = this.params.row.orderNo;
+    this.rechargeDetails[8].label = this.params.row.payTime;
   }
 }
 

+ 1 - 1
smart/src/views/temporaryStopCharge/index.vue

@@ -54,7 +54,7 @@
     </div>
     <zz-table
       :cols="cols"
-      :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+      :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
       :data="mixins_list"
       :pageset="mixins_pageset"
       @page-change="pageChange"

+ 18 - 7
smart/src/views/vehicleInformation/index.js

@@ -65,18 +65,29 @@ export default {
                 // },
                 // {
                 //     label: '支付方式',
-                //     prop: '11'
+                //     prop: 'payType',
+                //     format(val) {
+                //         if (val == 1) {
+                //             return '微信';
+                //         } else if (val == 2) {
+                //             return '支付宝';
+                //         } else if (val == 3) {
+                //             return '现金';
+                //         } else if (val == 4) {
+                //             return '预存';
+                //         } else if (val == 5) {
+                //             return '其他';
+                //         }
+                //     }
                 // },
                 {
                     label: '状态',
-                    prop: 'auditStatus',
+                    prop: 'carStatus',
                     format(val) {
-                        if (val == 0) {
-                            return '未审核';
-                        } else if (val == 1) {
-                            return '已审核';
+                        if (val == 1) {
+                            return '已过期';
                         } else if (val == 2) {
-                            return '已拒绝';
+                            return '正常';
                         }
                     }
                 },

+ 12 - 7
smart/src/views/vehicleInformation/index.vue

@@ -4,7 +4,7 @@
   <div class="main">
     <div class="search">
       <el-input
-        placeholder="输入车牌号"
+        placeholder="输入车牌号/车主名称/手机号"
         class="search-input"
         clearable
         v-model="mixins_query.plateNo"
@@ -150,6 +150,7 @@ export default {
       mixins_post: 'post',
       nameParkingLot: [],
       parkName: '',
+      comm: ''
     }
   },
   methods: {
@@ -180,6 +181,8 @@ export default {
     },
     add (row) {
       console.log(row.cardId);
+      debugger
+      this.comm = 'add'
       this.details(row.cardId);
     },
     parkingLot (name) {
@@ -188,11 +191,13 @@ export default {
     addCommand (command) {
       if (command === 'add') {
         // this.addOrEdit('add');
+        this.comm = '';
         this.details();
+
       }
       if (command === 'template') {
         // this.__exportExcel('/sc-community/excel/download/template', { importType: 'FACILITY' });
-        this.__exportExcel('/sc-community-web/parkingCar/getCarInfoExcel');
+        this.__exportExcel('/sc-community-web/excel/download/template', { importType: 'CAR' });
         return;
       }
     },
@@ -208,12 +213,13 @@ export default {
           height: '861px',
           props: {
             cardId: row,
+            comm: this.comm,
             callback: resolve
           },
           // showConfirmButton: true,
           // showCancelButton: true,
           hideStar: true,
-          title: '新增内部车'
+          title: this.comm == 'add' ? '编辑内部车' : '新增内部车'
         });
       }).then(() => {
         this.mixins_search();
@@ -251,16 +257,15 @@ export default {
           width: '511px',
           height: '683px',
           props: {
-            // id: row.id,
-            // callback: resolve
             userName: row.userName,
             cardType: row.cardType,
             parkId: row.parkId,
             cardId: row.cardId,
+            fullCarNoStr: row.fullCarNoStr,
+            residentId: row.residentId,
+            ruleId: row.ruleId,
             callback: resolve,
           },
-          // showConfirmButton: true,
-          // showCancelButton: true,
           hideStar: true,
           title: '充值操作'
         });

+ 5 - 4
smart/src/views/vehicleInformation/setpPage/configure.vue

@@ -121,14 +121,15 @@ export default {
     },
   },
   created () {
+    this.vehiColor();
+    this.vehiColors();
+
     this.form.vehicleType = this.params.form[this.params.id].vehicleType;
-    this.form.vehicleColor = this.params.form[this.params.id].vehicleColor;
-    this.form.vehicleColors = this.params.form[this.params.id].vehicleColors;
+    this.form.vehicleColor = Number(this.params.form[this.params.id].vehicleColor);
+    this.form.vehicleColors = Number(this.params.form[this.params.id].vehicleColors);
     this.form.vehicleBrand = this.params.form[this.params.id].vehicleBrand;
     this.form.id = this.params.id;
 
-    this.vehiColor();
-    this.vehiColors();
   }
 }
 </script>

+ 92 - 40
smart/src/views/vehicleInformation/setpPage/details.vue

@@ -91,7 +91,7 @@
         <el-col :span="9">
           <el-form-item
             label="车牌类型"
-            prop="license"
+            prop="carTypes"
           >
             <el-select
               placeholder="请选择车牌类型"
@@ -165,7 +165,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="9">
+        <!-- <el-col :span="9">
           <el-form-item label="首充时间">
             <el-date-picker
               type="date"
@@ -177,7 +177,7 @@
             >
             </el-date-picker>
           </el-form-item>
-        </el-col>
+        </el-col> -->
       </el-row>
       <div class="formContent-item_title">
         <el-row>
@@ -255,7 +255,7 @@
               <el-input
                 v-model="tableData[scope.$index].positionInformation"
                 @click.native="positionInformation(scope.$index)"
-                placeholder="请输入内容"
+                placeholder="请选择车位"
               ></el-input>
             </template>
 
@@ -263,6 +263,7 @@
           <el-table-column
             label="操作"
             align="center"
+            width="100"
           >
             <template slot-scope="scope">
               <el-tooltip
@@ -395,10 +396,15 @@
                 placement="bottom"
                 content="编辑"
               >
-                <i
-                  class="zoniot_font zoniot-icon-bianji"
-                  @click="addEdit(scope.$index)"
-                ></i>
+                <span>
+                  <img
+                    src="../../../assets/img/btn_peizhi.png"
+                    alt=""
+                    style="width: 15px; height: 13px; margin-left: 10px; cursor: pointer;"
+                    @click="addEdit(scope.$index)"
+                  >
+                </span>
+
               </el-tooltip>
             </template>
 
@@ -414,10 +420,12 @@
 <script>
 import { parse } from 'path';
 import native from './native.vue'
+import configure from './configure.vue';
 export default {
-  props: ['params'],
+  props: ['params', configure],
   data () {
     return {
+      url: '',
       areaNamed: [],
       formDate: {
         userName: '',
@@ -596,8 +604,13 @@ export default {
           { required: true, message: '请输入手机号', trigger: 'blur' },
           { pattern: /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/, message: '请输入正确的电话' }
         ],
+        carTypes: [
+          { required: true, message: '请选择车牌类型', trigger: 'change' }
+        ],
+
       },
 
+
       room: [],
       nameParkingLot: [],
       nameParkingLotName: '',
@@ -623,8 +636,9 @@ export default {
 
 
 
+
+
     parked (item) {
-      debugger
       this.areaNamed.push(item.label);
       // this.tableData.areaName = item.label;
       this.formDate.sort = item.startDate;
@@ -635,7 +649,18 @@ export default {
       // /sc-community-web/parkingCar/queryRechargeRules
       this.recharge = []
       this.$http
-        .get('/sc-community-web/parkingCar/queryRechargeRules', { carType: this.formDate.carType, parkingId: this.formDate.parkId })
+        .get('/sc-community-web/parkingCar/queryRechargeRules', {
+          carType: this.formDate.carTypes == '临时车' ? '0' :
+            this.formDate.carTypes == 'VIP车' ? '1' :
+              this.formDate.carTypes == '月租车' ? '2' :
+                this.formDate.carTypes == '充时车' ? '3' :
+                  this.formDate.carTypes == '时租车' ? '4' :
+                    this.formDate.carTypes == '产权车' ? '5' :
+                      this.formDate.carTypes == '计次车' ? '6' :
+                        this.formDate.carTypes == '贵宾车' ? '7' :
+                          this.formDate.carTypes == '员工卡' ? '8' : this.formDate.carTypes
+          , parkingId: this.formDate.parkId
+        })
         .then(({ data, msg, status }) => {
           console.log('data', data);
 
@@ -669,7 +694,7 @@ export default {
         console.log(this.formDate.tel)
         this.room = [];
         this.$http
-          .get('/sc-community-web/parkingCar/getUserInfo', { phone: this.formDate.tel })
+          .get('/sc-community/parkingCar/getUserInfo', { phone: this.formDate.tel })
           .then(({ data, msg, status }) => {
             for (let i = 0; i < data.houseInfos.length; i++) {
               this.room.push({
@@ -678,6 +703,10 @@ export default {
                 residentId: data.houseInfos[i].residentId,
               })
             }
+
+            this.formDate.resDate = data.houseInfos[0].id;
+            this.formDate.id = data.houseInfos[0].residentId;
+
           })
           .catch(() => { });
       }
@@ -734,7 +763,6 @@ export default {
           title: '选择车位'
         });
       }).then((data) => {
-        debugger
         var id = data[0].id;
         this.tableData[id].positionInformation = data[0].positionInformation;
         this.tableData[id].parkingId = data[0].value;
@@ -800,7 +828,6 @@ export default {
       }
     },
     region () {
-      debugger
       this.$http.post('/sc-community-web/parkingCar/findAreaInfo', { parkId: this.formDate.parkId }).then(({ data, status, msg }) => {
         this.eloption = [];
         for (let i = 0; i < data.length; i++) {
@@ -819,22 +846,29 @@ export default {
     },
     submit () {
       debugger
+      if (this.params.comm == 'add') {
+        // this.url = '/sc-community-web/parkingCar/addVehicleInfor'
+        this.url = '/sc-community-web/parkingCar/updateVehicleInfor'
+      } else {
+        // this.url = '/sc-community-web/parkingCar/updateVehicleInfor'
+        this.url = '/sc-community-web/parkingCar/addVehicleInfor'
+      }
       this.$refs.formDate.validate((valid) => {
         console.log('valid', valid);
         if (valid) {
           var table = [];
-          debugger
-          this.tableData.areaName = (Array.from(new Set(this.areaNamed))).join(',');
-          debugger
           for (let i = 0; i < this.tableData.length; i++) {
+            // this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
+            this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
+            console.log(this.tableData[i]);
+            debugger
             table.push({
               areaId: [this.tableData[i].parkingArea],
               areaName: this.tableData[i].areaName,
               lotCount: this.num,
               lotName: this.tableData[i].positionInformation,
-              // ruleId: this.formDate.ruleId,//暂无
               parkingId: this.tableData[i].parkingId,
-              lotName: '',
+              // lotName: '',
               carType: '',
               ruleId: this.formDate.ruleId,
               sequence: this.formDate.sort,
@@ -842,6 +876,7 @@ export default {
 
 
             })
+
             this.formDate.areaName = this.tableData[i].areaName
           }
           var parkingSpace = [];
@@ -849,11 +884,11 @@ export default {
             parkingSpace.push({
               carNo: this.parkingSpaceSetting[k].licensePlate + this.parkingSpaceSetting[k].license,
               cardNo: this.parkingSpaceSetting[k].accessCredentials,
-              enable: this.parkingSpaceSetting[k].state,
+              enable: this.parkingSpaceSetting[k].state == '启用' ? '1' : this.parkingSpaceSetting[k].state == '禁用' ? '2' : this.parkingSpaceSetting[k].state,
               remark: this.parkingSpaceSetting[k].remarks,
 
 
-              carType: this.formDate.carType,
+              carType: this.form[k].vehicleType,
               carNoColor: this.form[k].vehicleColor,
               carColor: this.form[k].vehicleColors,
               carBrand: this.form[k].vehicleBrand,
@@ -863,24 +898,34 @@ export default {
             this.plateNoInfo.push((this.parkingSpaceSetting[k].licensePlate + this.parkingSpaceSetting[k].license));
 
             for (let j = 0; j < table.length; j++) {
-              table[j].lotName = this.parkingSpaceSetting[k].license;
               table[j].carType = this.formDate.carType;
 
             }
 
-
           }
-          this.$http.post('/sc-community-web/parkingCar/addVehicleInfor', {
+          debugger
+          this.$http.post(this.url, {
+            cardId: this.params.cardId != undefined ? this.params.cardId : '',
             cardName: this.formDate.userName,
             userName: this.formDate.userName,
             tel: this.formDate.tel,
             houseId: this.formDate.residentId,
             residentId: this.formDate.id,
+            // residentId: this.formDate.ruleId,
             remark: this.formDate.remark,
-            cardType: this.formDate.carTypes,
+            cardType: this.formDate.carTypes == '临时车' ? '0' :
+              this.formDate.carTypes == 'VIP车' ? '1' :
+                this.formDate.carTypes == '月租车' ? '2' :
+                  this.formDate.carTypes == '充时车' ? '3' :
+                    this.formDate.carTypes == '时租车' ? '4' :
+                      this.formDate.carTypes == '产权车' ? '5' :
+                        this.formDate.carTypes == '计次车' ? '6' :
+                          this.formDate.carTypes == '贵宾车' ? '7' :
+                            this.formDate.carTypes == '员工卡' ? '8' : this.formDate.carTypes,
             beginTime: this.formDate.beginTime,
             parkId: this.formDate.parkId,
             areaName: this.formDate.areaName,
+            ruleId: this.formDate.ruleId,
 
 
             carLotList: table,
@@ -892,9 +937,17 @@ export default {
 
 
           }).then(({ data, status, msg }) => {
-            this.params.callback();
+            debugger
+            if (status != 0) {
+              this.$message.error(msg);
+            } else if (status == 0) {
+              this.$message.success('成功');
+              this.params.callback();
+              this.$emit('close');
+            }
+
           })
-          this.$emit('close');
+
         } else {
           return false;
         }
@@ -904,7 +957,6 @@ export default {
   },
   created () {
     this.nameParking();
-
     if (this.params.cardId != undefined) {
       this.params.cardId;
       this.$http.get('/sc-community-web/parkingCar/getVehicleInfor', { id: this.params.cardId }).then(({ data, msg, status }) => {
@@ -918,39 +970,33 @@ export default {
             : data.cardType == 2 ? '月租车'
               : data.cardType == 3 ? '充时车'
                 : data.cardType == 4 ? '时租车'
-                  : data.cardType == 5 ? '产车'
+                  : data.cardType == 5 ? '产车'
                     : data.cardType == 6 ? '计次车'
                       : data.cardType == 7 ? '贵宾卡'
                         : '员工卡'
 
 
 
-
         this.nameParkingLotName = '1';//随便
 
         this.formDate.beginTime = data.beginTime
         this.formDate.parkId = data.parkId
         var carLotStr = JSON.parse(data.carLotStr)
         for (let i = 0; i < carLotStr.length; i++) {
-          debugger
-          // this.tableData[i].parkingArea = carLotStr[i].areaId
           this.tableData[i].areaName = carLotStr[i].areaName
           this.tableData[i].carType = data.cardType
           this.tableData[i].lotCount = carLotStr[i].lotCount
           this.tableData[i].positionInformation = carLotStr[i].lotName
-          // this.formDate.ruleId = carLotStr.ruleId
+          this.tableData[i].parkingId = carLotStr[i].parkingId
+          this.formDate.ruleId = carLotStr.ruleId
           this.formDate.sort = carLotStr.sequence
         }
         for (let k = 0; k < data.parkCarDetails.length; k++) {
           this.parkingSpaceSetting[k].licensePlate = (data.fullCarNoStr).substr(0, 1)
           this.parkingSpaceSetting[k].license = (data.fullCarNoStr).substr(1)
-          this.parkingSpaceSetting[k].state = data.parkCarDetails[k].enable == 0 ? '启用' : '禁用'
+          this.parkingSpaceSetting[k].state = data.parkCarDetails[k].enable == 1 ? '启用' : '禁用'
           this.parkingSpaceSetting[k].remarks = data.parkCarDetails[k].remark
 
-          this.formDate.carType = data.cardType
-          this.form[k].vehicleColor = data.parkCarDetails[k].carNoColor
-          this.form[k].vehicleColors = data.parkCarDetails[k].carColor
-          this.form[k].vehicleBrand = data.parkCarDetails[k].carBrand
         }
 
 
@@ -958,12 +1004,18 @@ export default {
         this.nameParking();
         this.region();
 
-
         for (let i = 0; i < carLotStr.length; i++) {
-          debugger
           this.tableData[i].parkingArea = Number(carLotStr[i].areaId)
           this.formDate.ruleId = carLotStr[i].ruleId
         }
+        debugger
+        for (let k = 0; k < data.parkCarDetails.length; k++) {
+          this.formDate.carType = data.cardType;
+          this.form[k].vehicleType = data.parkCarDetails[k].carType;
+          this.form[k].vehicleColor = data.parkCarDetails[k].carNoColor
+          this.form[k].vehicleColors = data.parkCarDetails[k].carColor
+          this.form[k].vehicleBrand = data.parkCarDetails[k].carBrand
+        }
 
       });
     }

+ 66 - 12
smart/src/views/vehicleInformation/setpPage/native.vue

@@ -4,7 +4,7 @@
           :props="defaultProps"
           show-checkbox
     -->
-    <el-tree
+    <!-- <el-tree
       class="filter-tree"
       :data="dataRes"
       @check="checkChange"
@@ -19,7 +19,28 @@
       :filter-node-method="filterNode"
       ref="tree"
     >
-    </el-tree>
+    </el-tree> -->
+
+    <el-scrollbar
+      class="el-scrollbar-byself"
+      style="width: 100%"
+    >
+      <el-tree
+        :data="tenantsTree"
+        show-checkbox
+        node-key="value"
+        :props="treedefaultProps"
+        :default-checked-keys="defaultcheckedkeys"
+        ref="tenantstree"
+        @check-change="checkChange"
+      >
+        <div
+          style="width: 100%"
+          slot-scope="{ node, data }"
+          @click="thisCheck($event, node, data)"
+        >{{ data.name }}</div>
+      </el-tree>
+    </el-scrollbar>
 
   </div>
 </template>
@@ -32,22 +53,36 @@ export default {
   props: ['params'],
   data () {
     return {
-      defaultProps: {
-        children: 'children',
-        label: 'name'
-      },//过滤使用字段
-      dataRes: [],
+      // defaultProps: {
+      //   children: 'children',
+      //   label: 'name'
+      // },//过滤使用字段
+      // dataRes: [],
       checkedData: {},//当前点击的数据
+
+
       Information: '',
+
+
       id: '',
       positionInformation: [],
-      value: ''
+      value: '',
+
+
+      tenantsTree: [],
+      treedefaultProps: {
+        children: 'children',
+        label: 'name'
+      },
+      defaultcheckedkeys: []
     }
   },
 
   methods: {
     /** 控制树形单选 */
     checkChange (data, checked) {
+      this.checkedData = {}
+      debugger
       if (checked) {
         if (!!data.children && data.children.length > 0) {
           console.log("有子节点不可选")
@@ -56,7 +91,7 @@ export default {
           // 注意!!!
           //1、下方的id和属性中 node-key="id"必须是同一个字段  
           //2、$refs.tree 也需要和上方的属性匹配 ref="tree"
-          this.$refs.tree.setCheckedKeys([data.value]);
+          this.$refs.tenantstree.setCheckedKeys([data.value]);
         }
       }
       this.value = this.checkedData.value;
@@ -70,10 +105,29 @@ export default {
       this.$emit('close');
     },
 
-
+    filterTreeData (trData) {
+      trData.map((item, index) => {
+        if (this.isNotEmpty(item.children)) {
+          item.disabled = true;
+          this.filterTreeData(item.children);
+        } else {
+          item.disabled = false;
+        }
+      });
+    },
+    isNotEmpty (arr) {
+      return arr && Array.isArray(arr) && arr.length > 0;
+    },
+    thisCheck (ev, node, data) {
+      if (!data.disabled) {
+        node.checked = !node.checked;
+      }
+    },
     garage () {
       this.$http.get('/sc-community-web/assets/tree/garage/find').then(({ data, status, msg }) => {
         this.dataRes = data;
+        this.filterTreeData(this.dataRes);
+        this.tenantsTree = this.dataRes;
       })
     }
   },
@@ -88,13 +142,13 @@ export default {
 
 
 <style scoped>
-/deep/ .el-tree > .el-tree-node > .el-tree-node__content .el-checkbox {
+/* /deep/ .el-tree > .el-tree-node > .el-tree-node__content .el-checkbox {
     display: none;
 }
 
 /deep/.el-tree > .el-tree-node > .el-tree-node__children > .el-tree-node > .el-tree-node__content .el-checkbox {
     display: none;
-}
+} */
 /* /deep/.el-tree
     > .el-tree-node
     > .el-tree-node__children

+ 31 - 18
smart/src/views/vehicleInformation/setpPage/recharge.vue

@@ -10,7 +10,7 @@
         </el-col>
         <!-- 充值类型 -->
         <el-col :span="24">
-          <el-col :span="4">费用类型</el-col>
+          <el-col :span="4">充值规则</el-col>
           <el-col :span="20">
             <el-select v-model="valueselected">
               <el-option
@@ -107,15 +107,23 @@
             >
               <el-option
                 value="1"
-                label="现金"
+                label="微信"
               ></el-option>
               <el-option
                 value="2"
-                label="微信"
+                label="支付宝"
               ></el-option>
               <el-option
                 value="3"
-                label="支付宝"
+                label="现金"
+              ></el-option>
+              <el-option
+                value="4"
+                label="预存"
+              ></el-option>
+              <el-option
+                value="5"
+                label="其他"
               ></el-option>
             </el-select>
           </el-col>
@@ -176,14 +184,13 @@ export default {
       timeValue1: '',
       timeValue2: '',
       rechargeDate: [],
+      fullCarNoStr: '',
+      residentId: '',
+      ruleId: ''
     }
   },
   methods: {
     rechargeDates (item) {
-      debugger
-      // item.nameId
-      // this.rechargeDate[item.nameId]
-      // this.valueselected = '';
       this.rechargeDays = '';
       this.valueselect = '';
       this.valueselectName = '';
@@ -194,6 +201,7 @@ export default {
       this.RechargeDaysed = [];
       this.complimentaryDays = [];
 
+
       this.RechargeDaysed.push({
         label: this.rechargeDate[item.nameId].rechargeAmount * (this.rechargeDate[item.nameId].rechargeType == 0 ? (1 * 1 / 100) : this.rechargeDate[item.nameId].rechargeType == 1 ? (1 * 1) : this.rechargeDate[item.nameId].rechargeType == 2 ? (1 * 1) : this.rechargeDate[item.nameId].rechargeType == 3 ? (1 * 1) : (1 * 1)) + (this.rechargeDate[item.nameId].rechargeType == 0 ? '元' : this.rechargeDate[item.nameId].rechargeType == 1 ? '月' : this.rechargeDate[item.nameId].rechargeType == 2 ? '天' : this.rechargeDate[item.nameId].rechargeType == 3 ? '小时' : '次'),
         name: this.rechargeDate[item.nameId].rechargeAmount * (this.rechargeDate[item.nameId].rechargeType == 0 ? (1 * 1 / 100) : this.rechargeDate[item.nameId].rechargeType == 1 ? (1 * 1) : this.rechargeDate[item.nameId].rechargeType == 2 ? (1 * 1) : this.rechargeDate[item.nameId].rechargeType == 3 ? (1 * 1) : (1 * 1)),
@@ -207,8 +215,6 @@ export default {
         label: this.rechargeDate[item.nameId].sentAmount * (this.rechargeDate[item.nameId].sentType == 0 ? (1 * 1 / 100) : this.rechargeDate[item.nameId].sentType == 1 ? (1 * 1) : this.rechargeDate[item.nameId].sentType == 2 ? (1 * 1) : this.rechargeDate[item.nameId].sentType == 3 ? (1 * 1) : (1 * 1)) + (this.rechargeDate[item.nameId].sentType == 0 ? '元' : this.rechargeDate[item.nameId].sentType == 1 ? '月' : this.rechargeDate[item.nameId].sentType == 2 ? '天' : this.rechargeDate[item.nameId].sentType == 3 ? '小时' : '次'),
         chargeAmount: this.rechargeDate[item.nameId].basicMoney
       })
-      debugger
-
     },
     datePicker () {
 
@@ -217,7 +223,6 @@ export default {
       if (this.idType == 0) {
         var time = this.value1;
       } else if (this.idType == 1) {
-        debugger
         var time = ((parseInt(this.valueselectName) + parseInt(this.rechargeDays * 30)) * 86400000) + this.value1;
       } else if (this.idType == 2) {
         var time = ((parseInt(this.valueselectName) + parseInt(this.rechargeDays)) * 86400000) + this.value1;
@@ -242,12 +247,15 @@ export default {
     },
     // 充值规则
     rechargeRules () {
-      // /sc-community-web/parkingCar/queryRechargeRules
       this.$http
         .get('/sc-community-web/parkingCar/queryRechargeRules', { carType: this.cardType, parkingId: this.parkId })
         .then(({ data, msg, status }) => {
-          console.log('data', data);
           this.rechargeDate = data;
+          var daraRes = {
+            nameId: ''
+          }
+          daraRes.nameId = this.params.ruleId;
+          this.rechargeDates(daraRes);
           for (let i = 0; i < data.length; i++) {
             this.recharge.push({
               name: data[i].ruleName,
@@ -262,12 +270,11 @@ export default {
         .catch(() => { });
     },
     recharges (item) {
-      debugger
       this.id = item.id;
       this.valueselect = this.complimentaryDays[0].label;
       this.valueselectName = this.complimentaryDays[0].name;
       this.idType = this.complimentaryDays[0].idType;
-      this.chargeAmount = this.complimentaryDays[0].chargeAmount;
+      this.chargeAmount = this.complimentaryDays[0].chargeAmount / 100;
       this.chargeNumber = item.name;
     },
     submit () {
@@ -281,25 +288,31 @@ export default {
         // orderNo: '',
         parkId: this.parkId,
         payChannel: this.paymentMethod,
+        payType: this.paymentMethod,
         remark: this.inputText,
         validFrom: this.timeValue1,
-        validTo: this.timeValue2
+        validTo: this.timeValue2,
+        platNo: this.fullCarNoStr,
+        userId: this.residentId,
       }).then(({ data, status, msg }) => {
       })
       this.$emit('close');
     },
   },
   created () {
-    console.log('11111')
-    this.params;
     this.userName = this.params.userName;
     this.cardType = this.params.cardType;
     this.parkId = this.params.parkId;
     this.cardId = this.params.cardId;
+    this.fullCarNoStr = this.params.fullCarNoStr;
+    this.residentId = this.params.residentId;
+    this.ruleId = this.params.ruleId;
 
+    this.valueselected = this.params.ruleId;
 
     this.rechargeRules();
 
+
   }
 }