Explorar o código

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

zhoux hai 1 ano
pai
achega
e2b0252f8c

+ 2 - 1
api/pages/mst/customer.js

@@ -11,7 +11,8 @@ module.exports = {
   customerService: {
     // 前缀
     prefix: 'mdm-server/mst/customer/',
-    selectByCondNoPage:'select_by_cond_no_page'
+    selectByCondNoPage:'select_by_cond_no_page',
+    selectCustomerById:'select_customer'
   },
   routeUrl: {
     customer: {

+ 22 - 1
package-sales/pages/customer-collection/refund/refund.js

@@ -38,6 +38,7 @@ Page({
     contentSaveList: [{ code: 'need', title: mixins.$t("cusReturnCollectionAmt"), type: 'str' }, { code: 'amount', content: 0, type: 'number' }],
     routeObjName: 'cusReceiptPayment',
     accountService: app.globalData['accountService'],
+    customerService: app.globalData['customerService'],
   },
   /**
 * @desc : 计算需收款
@@ -189,7 +190,26 @@ Page({
     });
   },
 
-
+  /**
+  * @desc : //销售出库跳转客户退款-查询客户
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  getCustomerId(id) {
+    return this.excute(this.data.customerService, this.data.customerService.selectCustomerById + '/' + id, {}).then(res => {
+      if (res.data.code == 200) {
+        console.log('res-getCustomerId', res)
+        let data = res.data.data
+        let formData = JSON.parse(this.data.formData)
+        formData.objInfo.receiptResidue = data.receiptResidue,
+          formData.objInfo.receivableResidue = data.receivableResidue,
+          formData.objInfo.cusDebt = (data.receivableResidue ? data.receivableResidue : 0) - (data.receiptResidue ? data.receiptResidue : 0)
+        this.setData({
+          formData: JSON.stringify(formData)
+        })
+      }
+    });
+  },
 
 
   /**
@@ -251,6 +271,7 @@ Page({
       this.setData({
         formData: JSON.stringify(formData)
       })
+      this.getCustomerId(formData.cusId)
     }
 
   },