소스 검색

Merge pull request #570 from John-Hong/release-3.15.0

feat(KIP-17684): unlicensed-car-check-in和unlicensed-car-checkout保留bui…
Tron 11 달 전
부모
커밋
46cbbbdc8a

+ 8 - 3
src/api/parking/index.js

@@ -70,7 +70,9 @@ export function currentUnlicensedPlate() {
 }
  */
 export function unlicensedCarCheckIn(params) {
-  return window.requestms.post(`/parking/unlicensed-car-check-in`, params, { loading: true });
+  return window.requestms.post(`/parking/unlicensed-car-check-in`, params, { loading: true, 'Parking-User': {
+    buildingId: params.buildingId
+  }});
 }
 export function unlicensedCarGetVehicle(qrcode) {
   return window.requestms.get(`/parking/unlicensed-car-get-vehicle-no?qrCodeId=${qrcode}`, { loading: true });
@@ -147,8 +149,11 @@ export function invoiceEmails() {
  * @param params.vehicleNo string 临牌
  * @returns {*}
  */
-export function unlicensedCarCheckout(vehicleNo, unlicensed, gateId) {
-  return window.requestms.post(`/parking/unlicensed-car-checkout`, { vehicleNo, gateId }, { loading: false, timeout: 10000 });
+export function unlicensedCarCheckout(vehicleNo, unlicensed, gateId, buildingId) {
+  return window.requestms.post( 
+    `/parking/unlicensed-car-checkout`, 
+    { vehicleNo, gateId }, 
+    { loading: false, timeout: 10000, 'Parking-User': { buildingId } }); 
 }
 // 1.25 车场二维码信息查询(通过CodeID)
 /**

+ 2 - 0
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -1086,6 +1086,7 @@ export default {
         // return
         if (this.unlicensedInfo?.type === 'unlicensedOut') {
           const query = {
+            ...qrCodesres,
             ...this.$route.query,
             gateId: qrCodesres.gateId,
             vehicleNo: '',
@@ -1104,6 +1105,7 @@ export default {
         }
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
+          ...qrCodesres,
           gateId: qrCodesres.gateId
         });
 

+ 3 - 0
src/pages/parkingFeeV2/mixins/parkingFeeDetail.js

@@ -742,6 +742,7 @@ export default {
       const orderInit = () => {
         this.$refs.countDown.reset(); // 停车场重置费用倒计时3分钟
         this.$store.dispatch('order/orderInit', {
+          ...this.$route.query,
           gateId: this.$route.query?.gateId,
           vehicleNo: this.$route.query?.vehicleNo,
           endlessLoop: this.endlessLoop,
@@ -800,6 +801,7 @@ export default {
         this.isPay = false
         // return
         this.$store.dispatch('order/orderInit', {
+          ...this.$route.query,
           vehicleNo: this.$route.query.vehicleNo,
           gateId: this.$route.query?.gateId,
           endlessLoop: this.endlessLoop,
@@ -930,6 +932,7 @@ export default {
       this.isPay = false;
       this.popup = false;
       this.$store.dispatch('order/orderInit', {
+        ...this.$route.query,
         gateId: this.$route.query?.gateId,
         vehicleNo: this.$route.query?.vehicleNo,
         endlessLoop: this.endlessLoop,

+ 2 - 0
src/pages/parkingFeeV2/mixins/parkingFindCarFirst.js

@@ -828,6 +828,7 @@ export default {
         });
         if (this.unlicensedInfo?.type === 'unlicensedOut') {
           const query = {
+            ...qrCodesres,
             ...this.$route.query,
             gateId: qrCodesres.gateId,
             vehicleNo: '',
@@ -846,6 +847,7 @@ export default {
         }
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
+          ...qrCodesres,
           gateId: qrCodesres.gateId
         });
 

+ 2 - 0
src/pages/parkingFeeV2/parkingFeeMsg.vue

@@ -329,6 +329,7 @@ export default {
             this.$router.replace({
               path: 'parkingFeeDetail',
               query: {
+                ...qrCodesres,
                 gateId: qrCodesres.gateId,
                 vehicleNo: '',
                 type: 'unlicensedOut'
@@ -339,6 +340,7 @@ export default {
         }
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
+          ...qrCodesres,
           gateId: qrCodesres.gateId
         });
         this.type = 'success'

+ 2 - 0
src/pages/parkingFeeV2/qrCodeLicensedCar.vue

@@ -340,6 +340,7 @@ export default {
             this.$router.replace({
               path: 'parkingFeeDetail',
               query: {
+                ...qrCodesres,
                 gateId: qrCodesres.gateId,
                 vehicleNo: '',
                 type: 'unlicensedOut'
@@ -350,6 +351,7 @@ export default {
         }
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
+          ...qrCodesres,
           gateId: qrCodesres.gateId
         });
         this.type = 'success'

+ 2 - 2
src/store/order/index.js

@@ -26,7 +26,7 @@ export default {
      * @param callback    回调函数,用于接口报错时,展示对应的信息
      * @param endlessLoop 用于判断当前用户是否扫码进入
      */
-    async orderInit( {commit,dispatch,state},{gateId = '',vehicleNo = '',callback,endlessLoop, enquiryFarePolling} ) {
+    async orderInit( {commit,dispatch,state},{gateId = '',vehicleNo = '',callback,endlessLoop, enquiryFarePolling, buildingId = ''} ) {
       try {
         commit('clearOrderInfo');
         const unlicensed = vehicleNo.indexOf('临') > -1 || !vehicleNo; // true: 临时车牌;false:普通车牌
@@ -41,7 +41,7 @@ export default {
           duration: 0
         });
         const method = unlicensed && endlessLoop && gateId || !vehicleNo ? unlicensedCarCheckout : checkOut
-        const res = await method(vehicleNo, unlicensed, gateId);
+        const res = await method(vehicleNo, unlicensed, gateId, buildingId);
         // const res = checkOutQHResponse
         Toast.clear();
         if ( res?.parkingRecord?.totalFee <= 0 ) {