于继渤 před 1 rokem
rodič
revize
8f87937b4d

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

@@ -38,7 +38,13 @@ module.exports = {
       choosecusFrom: { key: 'choosecusFrom', url: '/package-base-select/pages/select-data/select-data', type: 'customerFrom' },
       chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-data/select-data',type:'staff'  },
       chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-data/select-data',type:'org' }, 
-      collection:{ key: 'collection', url: '/package-sales/pages/customer-collection/customer-collection', formMode: 'index', idKey: 'cusId', image:'btn-customer-collection.png' } //跳转客户收款
+      collection:{ key: 'collection', url: '/package-sales/pages/customer-collection/customer-collection', formMode: 'index', idKey: 'cusId', image:'btn-customer-collection.png' }, //跳转客户收款
+
+
+      toSaleOrder:{ key: 'toSaleOrder', url: '/package-sales/pages/order-billing/order-billing', formMode: 'index', idKey: 'cusId' } ,
+      toSaleOrderReturn:{ key: 'toSaleOrderReturn', url: '/package-sales/pages/order-return/order-return', formMode: 'index', idKey: 'cusId' } ,
+
+      
     }
   }
 };

+ 2 - 16
package-basic-data/pages/customer-follow-up/customer-follow-up.js

@@ -156,21 +156,7 @@ Page({
       formData: JSON.stringify(data)
     })
   },
-  /**
- * @desc : 保存处理
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
-  handleData() {
-    let pages = getCurrentPages();
-    let prevPage = pages[pages.length - 3]; //上二页
-    prevPage.setData({
-      refreshByAdd: true
-    })
-    wx.navigateBack({
-      data: 2
-    })
-  },
+
 
   /**
  * @desc : 顶部选择
@@ -220,7 +206,7 @@ Page({
    * @author : 于继渤
    */
   setCus(formData, item) {
-    // formData.cusId = item.cusId
+    formData.cusId = item.cusId ? item.cusId : null
     formData.cusName = item.cusName
     formData.cusCode = item.cusCode
     formData.cusPhone = item.cusPhone

+ 69 - 2
package-basic-data/pages/customer-list/detail/detail.js

@@ -20,10 +20,14 @@ Page({
   data: {
     // 路由
     routeObjName: 'customer',
-    imageUrl:config.image_url + '/static/img/',
+    imageUrl: config.image_url + '/static/img/',
     cusFollowService: app.globalData['cusFollowService'],
+    orderService: app.globalData['orderService'],
+    cusReceiptPaymentService: app.globalData['cusReceiptPaymentService'],
     item: {},
     customerFollowList: [],
+    paymentRecordsList: [],
+    refundRecordsList: [],
     active: 0,
     // 主键Id
     primaryKey: 'cusId',
@@ -104,5 +108,68 @@ Page({
       item: data
     })
     this.getCusFollowList(data.cusId)
-  }
+    this.getPayRecords(data.cusId, '收付款类型-收款')
+    this.getPayRecords(data.cusId, '收付款类型-退收款')
+  },
+
+  /**
+   * @desc : 跳转
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  toJump(e) {
+    let key = e.currentTarget.dataset.key
+    let url = null
+
+    if (key == 'sale') {
+      url = this.data.route.toSaleOrder.url
+    }
+    if (key == 'receipt') {
+      url = this.data.route.collection.url
+    }
+    if (key == 'saleReturn') {
+      url = this.data.route.toSaleOrderReturn.url
+
+    }
+    let that = this
+    wx.navigateTo({
+      url: url,
+      events: {
+        // 保存成功后刷新页面
+        refresh: function (data) {
+        }
+      },
+      success: function (res) {
+        res.eventChannel.emit('params', { id: that.data.item.cusId, formMode: 'index' });
+      }
+    })
+  },
+
+
+  /**
+   * @desc : 收款记录
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  getPayRecords(cusId, type) {
+    let params = {}
+    params.objectId = cusId
+    params.rpTypeList = [type]
+    this.excute(this.data.cusReceiptPaymentService, this.data.cusReceiptPaymentService.selectByCond, params).then(res => {
+      if (res.data.code == 200) {
+        if (type == '收付款类型-收款') {
+          this.setData({
+            paymentRecordsList: res.data.data.list
+          })
+        } else {
+          this.setData({
+            refundRecordsList: res.data.data.list
+          })
+        }
+
+      }
+    })
+  },
+
+
 })

+ 32 - 31
package-basic-data/pages/customer-list/detail/detail.wxml

@@ -59,17 +59,17 @@
 
       <view class="number">
         <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{9999}}"></dk-cell>
+          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.outboundNotAmount ? item.outboundNotAmount : 0}}"></dk-cell>
         </view>
         <view class="oreder-summary-detail">
-          未出库
+          未出库({{item.outboundNotQuantity}}单)
         </view>
       </view>
     </view>
     <view style="display: flex;">
       <view class="number">
         <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{9999}}"></dk-cell>
+          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.receiptResidue ? item.receiptResidue : 0}}"></dk-cell>
         </view>
         <view class="oreder-summary-detail">
           收款总额
@@ -78,7 +78,7 @@
 
       <view class="number">
         <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{9999}}">
+          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.receivableResidue ? item.receivableResidue : 0}}">
           </dk-cell>
         </view>
         <view class="oreder-summary-detail">
@@ -88,10 +88,10 @@
 
       <view class="number">
         <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{9999}}"></dk-cell>
+          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.outboundReturnAmount ? item.outboundReturnAmount : 0 }}"></dk-cell>
         </view>
         <view class="oreder-summary-detail">
-          退货({{SumDataList.rejectQuantity}}单)
+          退货({{item.outboundReturnQuantity}}单)
         </view>
       </view>
     </view>
@@ -100,19 +100,19 @@
 
 <van-cell border="{{ false }}">
   <view style=" display:flex;height: 102rpx;width:100%;">
-    <view class="order-button" style="background: linear-gradient(76.18deg, #87B8F1 5.1%, #F0F5FF 88.86%);border: 1px solid #8BBAF2;position: relative;" bindtap="toChooseGoods" data-item="{{form}}">
+    <view class="order-button" style="background: linear-gradient(76.18deg, #87B8F1 5.1%, #F0F5FF 88.86%);border: 1px solid #8BBAF2;position: relative;" bindtap="toJump" data-key="sale">
       <image class="scan-image-icon-3" fit="fill" src="{{imageUrl+'/customer_detail_icon_02.png'}}"></image>
       <view style="color:#0458C0;font-weight:bold;font-size: 14px;z-index: 2;">
         销售订单
       </view>
     </view>
-    <view class="order-button" style="background: linear-gradient(76.18deg, #87A5F1 5.1%, #F0F5FF 88.86%);border: 1px solid #8DAAF2;margin-left: 23rpx;position: relative;" bindtap="toCollectionAdd" data-item="{{form}}">
+    <view class="order-button" style="background: linear-gradient(76.18deg, #87A5F1 5.1%, #F0F5FF 88.86%);border: 1px solid #8DAAF2;margin-left: 23rpx;position: relative;" bindtap="toJump" data-key="receipt">
       <image class="scan-image-icon-3" fit="fill" src="{{imageUrl+'/customer_detail_icon_01.png'}}"></image>
       <view style="color:#253FC9;font-weight:bold;font-size: 14px;z-index: 2;">
         收款单
       </view>
     </view>
-    <view class="order-button" style="background: linear-gradient(76.18deg, #7BCDEF 5.1%, #F0FDFF 88.86%);border: 1px solid #85D1F1;margin-left: 23rpx;position: relative;" bindtap="toSelectOrder" data-item="{{form}}">
+    <view class="order-button" style="background: linear-gradient(76.18deg, #7BCDEF 5.1%, #F0FDFF 88.86%);border: 1px solid #85D1F1;margin-left: 23rpx;position: relative;" bindtap="toJump" data-key="saleReturn">
       <image class="scan-image-icon-3" fit="fill" src="{{imageUrl+'/customer_detail_icon_03.png'}}"></image>
       <view style="color:#0B8DB7;font-weight:bold;font-size: 14px;z-index: 2;">
         销售退货
@@ -742,18 +742,19 @@
 
 
   <van-tab title-style="color:#96A7C5;" title="收款记录">
-    <view style="margin-bottom: 1vw;" wx:for="{{listFee}}" wx:for-index="index">
+    <view style="margin-bottom: 1vw;" wx:for="{{paymentRecordsList}}" wx:for-index="index">
 
       <view class="table-show">
         <view class="table-show-detail">
-          <view style="display:flex;background-color:#FBF6EF;">
-            <image style="width:5vw;height:5vw;align-self:center;margin: 2vw;" src="{{imageUrl + 'customer-assignment.png'}}">
-            </image>
-            <view>
-              <view style="font-weight:bold;font-size: 26rpx;">{{item.receiptNo}}</view>
-              <view style="font-size: 12px;color:#95A8CB;">{{item.opCreateTime}}</view>
+          <view style="display:flex;background: linear-gradient(95.33deg, #ADC6FF -2.27%, #F0F5FF 60.66%),radial-gradient(35.34% 100.27% at 10.78% 50%, rgba(159, 197, 255, 0.6) 0%, rgba(255, 255, 255, 0.426) 56.69%);border-radius: 15rpx  15rpx  0rpx  0rpx;padding: 20rpx;">
+            <view style="width: 10%;display: flex;align-items: center;">
+              <image style="width:20px;height:20px;" src="{{imageUrl + 'customer_detail_icon_04.png'}}"> </image>
             </view>
-            <view style="color: #00A7B5;font-size: 13px;align-self:center;flex:1;margin-left: 35px; display: flex;" bindtap="toOriginal_order_collection" data-item="{{item}}">
+
+            <view style="display: flex;align-items: center;width: 60%;">
+              <view style="font-weight:bold;font-size: 26rpx;">{{item.rpNo}}</view>
+            </view>
+            <view style="color: #00A7B5;font-size: 13px;align-items:center;display: flex;justify-content: right;width: 30%;" bindtap="toOriginal_order_collection" data-item="{{item}}">
               <view>查看原单 </view>
               <van-icon name="arrow" />
             </view>
@@ -781,7 +782,7 @@
                     </dk-text>
                   </view>
                   <view class="table-content-class">
-                    {{item.docCode}}
+                    {{item.rpTypeName}}
                   </view>
 
                 </view>
@@ -789,7 +790,7 @@
                 <view style="text-align:right;width: 50%;">
                   <!-- <dk-text fontSize="17" color="#CAA977" value=" ¥{{item.sumAmount}}">
                   </dk-text> -->
-                  <dk-cell height="46rpx" contentRight="{{true}}" spaceWidth="15rpx" fontSize="17" contentColor="#CAA977" fontWeight="" title=" " content="{{item.sumAmount ? item.sumAmount : 0}}"></dk-cell>
+                  <dk-cell height="46rpx" contentRight="{{true}}" spaceWidth="15rpx" fontSize="17" contentColor="#CAA977" fontWeight="" title=" " content="{{item.receiptResidue ? item.receiptResidue : 0}}"></dk-cell>
                 </view>
               </view>
 
@@ -805,18 +806,18 @@
     <van-empty wx:if="{{listFee.length==0}}" description="暂无数据" />
   </van-tab>
   <van-tab title-style="color:#96A7C5;" title="退款记录">
-    <view style="margin-bottom: 1vw;" wx:for="{{listRefund}}" wx:for-index="index">
-
+    <view style="margin-bottom: 1vw;" wx:for="{{refundRecordsList}}" wx:for-index="index">
       <view class="table-show">
         <view class="table-show-detail">
-          <view style="display:flex;background-color:#FBF6EF;">
-            <image style="width:5vw;height:5vw;align-self:center;margin: 2vw;" src="{{imageUrl + 'customer-assignment.png'}}">
-            </image>
-            <view>
-              <view style="font-weight:bold;font-size: 26rpx;">{{item.refundNo}}</view>
-              <view style="font-size: 12px;color:#95A8CB;">{{item.opCreateTime}}</view>
+          <view style="display:flex;background: linear-gradient(95.33deg, #ADC6FF -2.27%, #F0F5FF 60.66%),radial-gradient(35.34% 100.27% at 10.78% 50%, rgba(159, 197, 255, 0.6) 0%, rgba(255, 255, 255, 0.426) 56.69%);border-radius: 15rpx  15rpx  0rpx  0rpx;padding: 20rpx;">
+            <view style="width: 10%;display: flex;align-items: center;">
+              <image style="width:20px;height:20px;" src="{{imageUrl + 'customer_detail_icon_04.png'}}"> </image>
             </view>
-            <view style="color: #00A7B5;font-size: 13px;align-self:center;flex:1;margin-left: 35px; display: flex;" bindtap="toRefund" data-item="{{item}}">
+
+            <view style="display: flex;align-items: center;width: 60%;">
+              <view style="font-weight:bold;font-size: 26rpx;">{{item.rpNo}}</view>
+            </view>
+            <view style="color: #00A7B5;font-size: 13px;align-items:center;display: flex;justify-content: right;width: 30%;" bindtap="toOriginal_order_collection" data-item="{{item}}">
               <view>查看原单 </view>
               <van-icon name="arrow" />
             </view>
@@ -840,11 +841,11 @@
               <view style="display: flex;justify-content:space-between;">
                 <view style="display: flex; width: 50%;">
                   <view class="table-content-row-font">
-                    <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="退款类型">
+                    <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="款类型">
                     </dk-text>
                   </view>
                   <view class="table-content-class">
-                    {{item.docCode}}
+                    {{item.rpTypeName}}
                   </view>
 
                 </view>
@@ -852,7 +853,7 @@
                 <view style="text-align:right;width: 50%;">
                   <!-- <dk-text fontSize="17" color="#CAA977" value=" ¥{{item.sumAmount}}">
                   </dk-text> -->
-                  <dk-cell height="46rpx" contentRight="{{true}}" spaceWidth="15rpx" fontSize="17" contentColor="#CAA977" fontWeight="" title=" " content="{{item.refundAmount ? item.refundAmount : 0}}"></dk-cell>
+                  <dk-cell height="46rpx" contentRight="{{true}}" spaceWidth="15rpx" fontSize="17" contentColor="#CAA977" fontWeight="" title=" " content="{{item.sumAmtRec ? item.sumAmtRec : 0}}"></dk-cell>
                 </view>
               </view>
 

+ 0 - 1
package-basic-data/pages/customer-list/detail/detail.wxss

@@ -190,7 +190,6 @@ page {
 }
 
 .table-show-detail {
-  background: #FFFFFF;
   box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);
   border-radius: 15rpx;
 }

+ 1 - 0
package-sales/pages/order-billing/order-billing.js

@@ -204,6 +204,7 @@ Page({
     if (!params.outStatusList) {
       params.outStatusList = this.data.outStatus == 'all' ? [] : this.data.outStatus
     }
+    params.cusId = this.data.id ? this.data.id : null
     params.viewVoidedDocuments = params.viewVoidedDocuments ? true : false
     delete params['deliveryDate']
     return params

+ 1 - 0
package-sales/pages/order-return/order-return.js

@@ -136,6 +136,7 @@ Page({
 setSearchParams(params) {
   //销售状态
   params.outTypeList = [Constants.outType.intoReturn]
+  params.cusId = this.data.id ? this.data.id : null
   return params
 },