liuyao 1 год назад
Родитель
Сommit
641326a69c

+ 89 - 10
package-accounts-manage/pages/daily-reconciliation-statement/daily-reconciliation-statement.js

@@ -18,14 +18,14 @@ Page({
     // 查询条件
     // 查询条件
     searchContent: [
     searchContent: [
       {
       {
-        code: 'accDate', 
+        code: 'accDate',
         title: mixins.$t('pastThirthtyDays'),
         title: mixins.$t('pastThirthtyDays'),
-        defaultValue: 5, 
+        defaultValue: 5,
         searchType: Constants.searchType.date
         searchType: Constants.searchType.date
       },
       },
-      { 
-        code: 'mac', 
-        title: mixins.$t('settlement'),  
+      {
+        code: 'mac',
+        title: mixins.$t('settlement'),
         dropType: 'settlement'
         dropType: 'settlement'
       },
       },
     ],
     ],
@@ -188,10 +188,89 @@ Page({
     * @date : 2024/7/12 15:21
     * @date : 2024/7/12 15:21
     * @author : 刘尧
     * @author : 刘尧
    */
    */
-  toDetail(e){
-    if(this.data.freeVersionFlag){
-      console.log('toDetail', e);
-    }else{
+  toDetail(e) {
+    if (this.data.freeVersionFlag) {
+      // 免费版走下面
+      const data = e.currentTarget.dataset.item
+      let routeObjName = 'cusReceiptPayment'
+      if (data.cusName) {
+        const route = app.globalData['routeUrl'][routeObjName]
+        let customerEfundFlag = true //true 为退款
+        if (data.amtRes > 0) {
+          customerEfundFlag = false
+        } else if (data.amtRes < 0) {
+          customerEfundFlag = true //true 为退款
+        }
+        let url = route.detail.url
+        if (customerEfundFlag) {
+          url = route.editRefundDetail.url
+        }
+        let _this = this;
+        wx.navigateTo({
+          url: url,
+          events: {
+            // 保存成功后刷新页面
+            refresh: function (data) {
+              // 刷新一览界面
+              _this.searchData();
+            }
+          },
+          success: function (res) {
+            let params = {
+              id: data.rpId,
+              formMode: Constants.formMode.other
+            }
+            res.eventChannel.emit('params', params);
+          }
+        })
+      }
+      if (data.supName) {
+        routeObjName = 'supReceiptPayment'
+        const route = app.globalData['routeUrl'][routeObjName]
+        if (data.amtRes > 0) {
+          let _this = this;
+          let url = route.detail.url
+          wx.navigateTo({
+            url: url,
+            events: {
+              // 保存成功后刷新页面
+              refresh: function (data) {
+                // 刷新一览界面
+                _this.searchData();
+              }
+            },
+            success: function (res) {
+              let params = {
+                id: data.rpId,
+                formMode: Constants.formMode.other
+              }
+              res.eventChannel.emit('params', params);
+            }
+          })
+        } else if (data.amtRes < 0) {
+          let _this = this;
+          let url = route.detailRefund.url
+          wx.navigateTo({
+            url: url,
+            events: {
+              // 保存成功后刷新页面
+              refresh: function (data) {
+                // 刷新一览界面
+                _this.searchData();
+              }
+            },
+            success: function (res) {
+              let params = {
+                id: data.rpId,
+                formMode: Constants.formMode.other
+              }
+              res.eventChannel.emit('params', params);
+            }
+          })
+        }
+      }
+    } else {
+      // 专业版走这里
       if (e) {
       if (e) {
         let item = null;
         let item = null;
         if (e.currentTarget.dataset.item) {
         if (e.currentTarget.dataset.item) {
@@ -215,5 +294,5 @@ Page({
       this.open(e);
       this.open(e);
     }
     }
   }
   }
- 
+
 })
 })

+ 1 - 0
package-sales/pages/customer-collection/customer-collection.js

@@ -153,6 +153,7 @@ Page({
       url = this.data.route.editRefundDetail.url
       url = this.data.route.editRefundDetail.url
     }
     }
     let _this = this;
     let _this = this;
+    console.log('url', url);
     wx.navigateTo({
     wx.navigateTo({
       url: url,
       url: url,
       events: {
       events: {