D4THYL3\long пре 3 година
родитељ
комит
9d91811e30

+ 8 - 5
smart/src/views/vehicleInformation/index.vue

@@ -116,7 +116,7 @@
           >
             <i
               class="zoniot_font zoniot-icon-bianji"
-              @click="add('edit', scope.row.id)"
+              @click="add( scope.row)"
             ></i>
           </el-tooltip>
 
@@ -153,6 +153,10 @@ export default {
     }
   },
   methods: {
+    add (row) {
+      console.log(row.cardId);
+      this.details(row.cardId);
+    },
     parkingLot (name) {
       this.parkName = name;
     },
@@ -166,7 +170,7 @@ export default {
         return;
       }
     },
-    details () {
+    details (row) {
       // 添加
       new Promise((resolve) => {
         this.$store.dispatch('addPopup', {
@@ -174,7 +178,7 @@ export default {
           width: '900px',
           height: '861px',
           props: {
-            // id: row.id,
+            cardId: row,
             callback: resolve
           },
           // showConfirmButton: true,
@@ -183,7 +187,6 @@ export default {
           title: '新增内部车'
         });
       }).then(() => {
-        debugger;
         this.mixins_search();
       });
 
@@ -211,8 +214,8 @@ export default {
     },
     // 充值
     collections (row) {
-      debugger
       // 充值
+      debugger
       new Promise((resolve) => {
         this.$store.dispatch('addPopup', {
           url: '/vehicleInformation/setpPage/recharge.vue',

+ 73 - 10
smart/src/views/vehicleInformation/setpPage/details.vue

@@ -76,7 +76,7 @@
             <el-select
               placeholder="请选择车牌类型"
               clearable
-              v-model="formDate.carType"
+              v-model="formDate.carTypes"
             >
               <el-option
                 label="临时车"
@@ -392,6 +392,7 @@
 
 
 <script>
+import { parse } from 'path';
 import native from './native.vue'
 export default {
   props: ['params'],
@@ -399,14 +400,15 @@ export default {
     return {
       formDate: {
         userName: '',
-        tel: '17688920088',
+        // tel: '17688920088',
+        tel: '',
         residentId: '',
         remark: '',
         carType: '',
+        carTypes: '',
         ruleId: '',
         beginTime: '',
         parkId: '',
-        beginTime: '',
         id: '',
         sort: ''
       },
@@ -607,6 +609,7 @@ export default {
     // 充值规则
     rechargeRules () {
       // /sc-community-web/parkingCar/queryRechargeRules
+      this.recharge = []
       this.$http
         .get('/sc-community-web/parkingCar/queryRechargeRules', { carType: this.formDate.carType, parkingId: this.formDate.parkId })
         .then(({ data, msg, status }) => {
@@ -625,10 +628,9 @@ export default {
     parkingLotes () {
       if (this.nameParkingLotName.length == 0) {
         this.$message.error('请选择停车场');
-      } else if (this.formDate.carType.length == 0) {
+      } else if (this.formDate.carTypes.length == 0) {
         this.$message.error('请选择车牌类型');
       } else {
-        debugger
         this.rechargeRules();
       }
     },
@@ -765,7 +767,6 @@ export default {
     },
     // 获取可停区域
     parking () {
-      debugger
       if (this.formDate.parkId.length == 0) {
         this.$message.error('请输选择停车场');
       } else {
@@ -774,6 +775,7 @@ 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++) {
@@ -825,7 +827,6 @@ export default {
         this.plateNoInfo.push((this.parkingSpaceSetting[k].licensePlate + this.parkingSpaceSetting[k].license));
 
         for (let j = 0; j < table.length; j++) {
-          debugger
           table[j].lotName = this.parkingSpaceSetting[k].license;
           table[j].carType = this.formDate.carType;
 
@@ -840,7 +841,7 @@ export default {
         houseId: this.formDate.residentId,
         residentId: this.formDate.id,
         remark: this.formDate.remark,
-        cardType: this.formDate.carType,
+        cardType: this.formDate.carTypes,
         beginTime: this.formDate.beginTime,
         parkId: this.formDate.parkId,
 
@@ -854,14 +855,76 @@ export default {
 
 
       }).then(({ data, status, msg }) => {
+        this.params.callback();
       })
-      this.params.callback();
       this.$emit('close');
-
     },
   },
   created () {
     this.nameParking();
+
+
+    this.params.cardId;
+    this.$http.get('/sc-community-web/parkingCar/getVehicleInfor', { id: this.params.cardId }).then(({ data, msg, status }) => {
+      console.log(data);
+      this.formDate.userName = data.userName
+      this.formDate.tel = data.tel
+      this.formDate.resDate = data.houseId
+      this.formDate.remark = data.remark
+      this.formDate.carTypes = data.cardType == 0 ? '临时车'
+        : data.cardType == 1 ? 'VIP车'
+          : data.cardType == 2 ? '月租车'
+            : data.cardType == 3 ? '充时车'
+              : data.cardType == 4 ? '时租车'
+                : 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.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].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
+      }
+
+
+      this.rechargeRules();
+      this.nameParking();
+      this.region();
+
+
+      for (let i = 0; i < carLotStr.length; i++) {
+        this.tableData[i].parkingArea = Number(carLotStr[i].areaId)
+        this.formDate.ruleId = carLotStr.ruleId
+      }
+
+    });
+
+
   }
 }
 </script>

+ 2 - 2
smart/src/views/vehicleInformation/setpPage/native.vue

@@ -95,7 +95,7 @@ export default {
 /deep/.el-tree > .el-tree-node > .el-tree-node__children > .el-tree-node > .el-tree-node__content .el-checkbox {
     display: none;
 }
-/deep/.el-tree
+/* /deep/.el-tree
     > .el-tree-node
     > .el-tree-node__children
     > .el-tree-node
@@ -104,5 +104,5 @@ export default {
     > .el-tree-node__content
     .el-checkbox {
     display: none;
-}
+} */
 </style>

+ 65 - 17
smart/src/views/vehicleInformation/setpPage/recharge.vue

@@ -31,9 +31,9 @@
             <el-col :span="16">
               <el-select v-model="rechargeDays">
                 <el-option
-                  v-for="(itemes,indexes) in RechargeDays"
+                  v-for="(itemes,indexes) in RechargeDaysed"
                   :key="indexes"
-                  :value="itemes.value"
+                  :value="itemes.name"
                   :label="itemes.label"
                   @click.native="recharges(itemes)"
                 ></el-option>
@@ -150,11 +150,11 @@ export default {
   data () {
     return {
       valueselected: '',
-      valueselect: '',//充值类型
+      valueselect: '',//天数
       value1: '',//日期时间
       value2: '',
       rechargeDays: '',//充值时间
-      chargeAmount: '0.01',//收费金额
+      chargeAmount: '',//收费金额
       paymentMethod: '',//支付方式
       inputText: '',//备注
       id: '',
@@ -168,21 +168,45 @@ export default {
 
 
       recharge: [],
-      RechargeDays: [],
+      RechargeDaysed: [],
       complimentaryDays: [],
+      idType: '',
+      valueselectName: "",
+      chargeNumber: '',
+      timeValue1: '',
+      timeValue2: ''
     }
   },
   methods: {
     datePicker () {
-      console.log(this.valueselect);
-      console.log(this.value1);
-      console.log(this.rechargeDays);
-      var time = ((parseInt(this.valueselect) + parseInt(this.rechargeDays)) * 86400000) + this.value1;
+
+      // valueselect赠送
+      // rechargeDays 天数
+      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;
+      } else if (this.idType == 3) {
+        var time = ((parseInt(this.valueselectName) + parseInt(this.rechargeDays)) * 3600000) + this.value1;
+      } else if (this.idType == 4) {
+        var time = this.value1;
+      }
+      // var time = ((parseInt(this.valueselected) + parseInt(this.rechargeDays)) * 86400000) + this.value1;
       var timeCode = new Date(time);
       var year = timeCode.getFullYear();
       var month = timeCode.getMonth() + 1;
       var date = timeCode.getDate();
-      this.value2 = year + "-" + (month.toString().length == 1 ? ('0' + month) : month) + "-" + (date.toString().length == 1 ? ('0' + date) : date)
+      this.value2 = year + "-" + (month.toString().length == 1 ? ('0' + month) : month) + "-" + (date.toString().length == 1 ? ('0' + date) : date);
+
+      var timeCodes = new Date(this.value1);
+      var year = timeCodes.getFullYear();
+      var month = timeCodes.getMonth() + 1;
+      var date = timeCodes.getDate();
+      this.timeValue1 = year + "-" + (month.toString().length == 1 ? ('0' + month) : month) + "-" + (date.toString().length == 1 ? ('0' + date) : date) + ' ' + '00:00:00';
+      this.timeValue2 = this.value2 + ' ' + '23:59:59';
     },
     // 充值规则
     rechargeRules () {
@@ -197,15 +221,18 @@ export default {
               name: data[i].ruleName,
               label: data[i].ruleId
             })
-            this.RechargeDays.push({
-              label: data[i].rechargeAmount * (data[i].rechargeType == 0 ? (1 * 1 / 100) : data[i].rechargeType == 1 ? (1 * 30) : data[i].rechargeType == 2 ? (1 * 24) : data[i].rechargeType == 3 ? (1 * 60) : data[i].rechargeType == 1 ? (1 * 30) + "天" : (1 * 1)) + (data[i].rechargeType == 0 ? '元' : data[i].rechargeType == 1 ? '天' : data[i].rechargeType == 2 ? '天' : data[i].rechargeType == 3 ? '小时' : '次'),
-              name: data[i].rechargeAmount * (data[i].rechargeType == 0 ? (1 * 1 / 100) : data[i].rechargeType == 1 ? (1 * 30) : data[i].rechargeType == 2 ? (1 * 24) : data[i].rechargeType == 3 ? (1 * 60) : data[i].rechargeType == 1 ? (1 * 30) + "天" : (1 * 1)),
+            this.RechargeDaysed.push({
+              label: data[i].rechargeAmount * (data[i].rechargeType == 0 ? (1 * 1 / 100) : data[i].rechargeType == 1 ? (1 * 1) : data[i].rechargeType == 2 ? (1 * 1) : data[i].rechargeType == 3 ? (1 * 1) : (1 * 1)) + (data[i].rechargeType == 0 ? '元' : data[i].rechargeType == 1 ? '月' : data[i].rechargeType == 2 ? '天' : data[i].rechargeType == 3 ? '小时' : '次'),
+              name: data[i].rechargeAmount * (data[i].rechargeType == 0 ? (1 * 1 / 100) : data[i].rechargeType == 1 ? (1 * 1) : data[i].rechargeType == 2 ? (1 * 1) : data[i].rechargeType == 3 ? (1 * 1) : (1 * 1)),
               id: i,
             })
-            console.log(this.RechargeDays);
+            console.log(this.RechargeDaysed);
 
             this.complimentaryDays.push({
-              label: data[i].sentAmount * (data[i].sentType == 0 ? (1 * 1 / 100) : data[i].sentType == 1 ? (1 * 30) : data[i].sentType == 2 ? (1 * 24) : data[i].sentType == 3 ? (1 * 60) : data[i].sentType == 1 ? (1 * 30) + "天" : (1 * 1)) + (data[i].sentType == 0 ? '元' : data[i].sentType == 1 ? '天' : data[i].sentType == 2 ? '天' : data[i].sentType == 3 ? '小时' : '次'),
+              idType: data[i].rechargeType,
+              name: data[i].sentAmount * (data[i].sentType == 0 ? (1 * 1 / 100) : data[i].sentType == 1 ? (1 * 1) : data[i].sentType == 2 ? (1 * 1) : data[i].sentType == 3 ? (1 * 1) : (1 * 1)),
+              label: data[i].sentAmount * (data[i].sentType == 0 ? (1 * 1 / 100) : data[i].sentType == 1 ? (1 * 1) : data[i].sentType == 2 ? (1 * 1) : data[i].sentType == 3 ? (1 * 1) : (1 * 1)) + (data[i].sentType == 0 ? '元' : data[i].sentType == 1 ? '月' : data[i].sentType == 2 ? '月' : data[i].sentType == 3 ? '小时' : '次'),
+              chargeAmount: data[i].basicMoney
             })
 
           }
@@ -216,9 +243,30 @@ export default {
     recharges (item) {
       debugger
       this.id = item.id;
-      debugger
       this.valueselect = this.complimentaryDays[this.id].label;
-    }
+      this.valueselectName = this.complimentaryDays[this.id].name;
+      this.idType = this.complimentaryDays[this.id].idType;
+      this.chargeAmount = this.complimentaryDays[this.id].chargeAmount;
+      this.chargeNumber = item.name;
+    },
+    submit () {
+      this.$http.post('/sc-community-web/parkingCar/carCharge', {
+        amount: this.chargeAmount,
+        carType: this.cardType,
+        cardId: this.cardId,
+        chargeMethod: this.idType,
+        chargeNumber: this.chargeNumber,
+        freeNumber: this.valueselectName,
+        // orderNo: '',
+        parkId: this.parkId,
+        payChannel: this.paymentMethod,
+        remark: this.inputText,
+        validFrom: this.timeValue1,
+        validTo: this.timeValue2
+      }).then(({ data, status, msg }) => {
+      })
+      this.$emit('close');
+    },
   },
   created () {
     console.log('11111')

+ 1 - 1
smart/vue.config.js

@@ -13,7 +13,7 @@ function resolve(dir) {
 }
 
 module.exports = {
-    publicPath: process.env.NODE_ENV === 'sit' ? '/sc-operation' : '/',
+    publicPath: process.env.NODE_ENV === 'sit' ? '/sc-park' : '/',
     productionSourceMap: false,
     filenameHashing: false,
     chainWebpack: (config) => {