Explorar o código

Merge pull request #576 from tron/lock/release-3.16.0/KIP-17885

feat(KIP-17885): Temp parking frontend |无牌车出入口功能前端功能优化
John-Hong hai 11 meses
pai
achega
83508a56ac

+ 2 - 2
src/api/parking/index.js

@@ -149,10 +149,10 @@ export function invoiceEmails() {
  * @param params.vehicleNo string 临牌
  * @returns {*}
  */
-export function unlicensedCarCheckout(vehicleNo, unlicensed, gateId, buildingId) {
+export function unlicensedCarCheckout(vehicleNo, unlicensed, qrCodeId, buildingId) {
   return window.requestms.post( 
     `/parking/unlicensed-car-checkout`, 
-    { vehicleNo, gateId }, 
+    { vehicleNo, qrCodeId }, 
     { loading: false, timeout: 10000, 'Parking-User': { buildingId } }); 
 }
 // 1.25 车场二维码信息查询(通过CodeID)

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

@@ -611,6 +611,7 @@ export default {
         this.$refs.countDown.reset(); // 停车场重置费用倒计时3分钟
         this.$store.dispatch('order/orderInit', {
           gateId: this.$route.query?.gateId,
+          qrCodeId: this.$route.query?.qrCode,
           vehicleNo: this.$route.query?.vehicleNo,
           endlessLoop: this.endlessLoop,
           callback: (res) => {
@@ -670,6 +671,7 @@ export default {
         this.$store.dispatch('order/orderInit', {
           vehicleNo: this.$route.query.vehicleNo,
           gateId: this.$route.query?.gateId,
+          qrCodeId: this.$route.query?.qrCode,
           endlessLoop: this.endlessLoop,
           callback: (res) => {
             this.orderInitCallBack(res)
@@ -793,6 +795,7 @@ export default {
       this.popup = false;
       this.$store.dispatch('order/orderInit', {
         gateId: this.$route.query?.gateId,
+        qrCodeId: this.$route.query?.qrCode,
         vehicleNo: this.$route.query?.vehicleNo,
         endlessLoop: this.endlessLoop,
         callback: (res) => {

+ 1 - 1
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -1106,7 +1106,7 @@ export default {
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
           ...qrCodesres,
-          gateId: qrCodesres.gateId
+          qrCodeId: code
         });
 
         const query = {

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

@@ -744,6 +744,7 @@ export default {
         this.$store.dispatch('order/orderInit', {
           ...this.$route.query,
           gateId: this.$route.query?.gateId,
+          qrCodeId: this.$route.query?.qrCode,
           vehicleNo: this.$route.query?.vehicleNo,
           endlessLoop: this.endlessLoop,
           callback: (res) => {
@@ -804,6 +805,7 @@ export default {
           ...this.$route.query,
           vehicleNo: this.$route.query.vehicleNo,
           gateId: this.$route.query?.gateId,
+          qrCodeId: this.$route.query?.qrCode,
           endlessLoop: this.endlessLoop,
           callback: (res) => {
             this.orderInitCallBack(res)
@@ -934,6 +936,7 @@ export default {
       this.$store.dispatch('order/orderInit', {
         ...this.$route.query,
         gateId: this.$route.query?.gateId,
+        qrCodeId: this.$route.query?.qrCode,
         vehicleNo: this.$route.query?.vehicleNo,
         endlessLoop: this.endlessLoop,
         callback: (res) => {

+ 1 - 1
src/pages/parkingFeeV2/mixins/parkingFindCarFirst.js

@@ -848,7 +848,7 @@ export default {
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
           ...qrCodesres,
-          gateId: qrCodesres.gateId
+          qrCodeId: code
         });
 
         const query = {

+ 1 - 1
src/pages/parkingFeeV2/parkingFeeMsg.vue

@@ -341,7 +341,7 @@ export default {
         // 如果是无牌车扫码:入场
         const unlicensedCarCheckInres = await unlicensedCarCheckIn({ // 获取无牌车牌
           ...qrCodesres,
-          gateId: qrCodesres.gateId
+          qrCodeId: code
         });
         this.type = 'success'
         this.vehicleNo = unlicensedCarCheckInres.vehicleNo

+ 4 - 3
src/store/order/index.js

@@ -22,11 +22,12 @@ export default {
      * @param dispatch
      * @param state
      * @param gateId      车场闸机口ID
+     * @param qrCodeId    车场出入口code 编号
      * @param vehicleNo   车牌号(包含临牌)
      * @param callback    回调函数,用于接口报错时,展示对应的信息
      * @param endlessLoop 用于判断当前用户是否扫码进入
      */
-    async orderInit( {commit,dispatch,state},{gateId = '',vehicleNo = '',callback,endlessLoop, enquiryFarePolling, buildingId = ''} ) {
+    async orderInit( {commit,dispatch,state},{gateId = '', qrCodeId = '', vehicleNo = '',callback,endlessLoop, enquiryFarePolling, buildingId = ''} ) {
       try {
         commit('clearOrderInfo');
         const unlicensed = vehicleNo.indexOf('临') > -1 || !vehicleNo; // true: 临时车牌;false:普通车牌
@@ -40,8 +41,8 @@ export default {
           message: '正在努力加载中....',
           duration: 0
         });
-        const method = unlicensed && endlessLoop && gateId || !vehicleNo ? unlicensedCarCheckout : checkOut
-        const res = await method(vehicleNo, unlicensed, gateId, buildingId);
+        const method = unlicensed && endlessLoop && qrCodeId || !vehicleNo ? unlicensedCarCheckout : checkOut
+        const res = await method(vehicleNo, unlicensed, qrCodeId, buildingId);
         // const res = checkOutQHResponse
         Toast.clear();
         if ( res?.parkingRecord?.totalFee <= 0 ) {