xiaohaizhao пре 2 месеци
родитељ
комит
ba719fd64a

+ 78 - 18
CRM/order/detail.js

@@ -1,27 +1,87 @@
+const _Http = getApp().globalData.http,
+  currency = require("../../utils/currency"),
+  CNY = value => currency(value, {
+    symbol: "¥",
+    precision: 2
+  }).format();
+
 Page({
   data: {
-    orderInfo: {}
+    detail: {},
+    tabsList: [{
+        label: '订单商品',
+        icon: "icon-tabchanpin",
+        model: '#OrderDetails'
+      },
+      {
+        icon: "icon-tabchanpin",
+        label: '付款记录',
+        model: '#PaymentRecord'
+      }
+    ],
+    tabsActive: 0,
+    currentComponent: "OrderDetails"
   },
   onLoad(options) {
-    const id = options.id;
-    this.getOrderDetail(id);
+    if (options.id) {
+      this.getOrderDetail(options.id);
+    }
   },
-  getOrderDetail(id) {
-    // 模拟获取订单详情数据
-    const mockData = {
-      id: id,
-      orderNo: `ORD00${id}`,
-      amount: `${id}000`,
-      status: id === 1 ? '已完成' : id === 2 ? '处理中' : '待处理',
-      customerName: `客户${id}`,
-      createTime: '2026-03-30',
-      items: [
-        { name: '商品1', quantity: 1, price: '500' },
-        { name: '商品2', quantity: 1, price: '500' }
-      ]
-    };
+  onReachBottom() {
+    this.partialRenewal(this.data.currentComponent, false);
+  },
+  onPullDownRefresh() {
+    this.getOrderDetail(this.data.detail.sa_custorderid);
+    wx.stopPullDownRefresh();
+  },
+  tabsChange(e) {
+    const active = e.detail;
+    const currentComponent = this.data.tabsList[active] === "订单商品" ? "OrderDetails" : "PaymentRecord";
     this.setData({
-      orderInfo: mockData
+      tabsActive: active,
+      currentComponent
     });
+    this.partialRenewal(currentComponent, true);
+  },
+  partialRenewal(component, init) {
+    const ref = this.selectComponent(`#${component}`);
+    if (ref) {
+      ref.getList(this.data.detail.sa_custorderid, init);
+    }
+  },
+  getOrderDetail(id) {
+    _Http.basic({
+      "id": "2026031410293201",
+      content: {
+        nocache: true,
+        pageNumber: 1,
+        pageSize: 1,
+        where: {
+          condition: `sa_custorderid = ${id}`,
+          tableid: 2484
+        }
+      }
+    }).then(res => {
+      console.log("订单详情", res)
+      if (res.code != 1) return wx.showToast({
+        title: res.msg,
+        icon: "none"
+      })
+      if (res.data && res.data.length > 0) {
+        const orderData = res.data[0];
+        // 格式化金额数据
+        const formattedData = {
+          ...orderData,
+          showAmount: CNY(orderData.amount || 0),
+          showPayAmount: CNY(orderData.payamount || 0),
+          showUnpaidAmount: CNY((orderData.amount || 0) - (orderData.payamount || 0))
+        };
+        this.setData({
+          detail: formattedData
+        });
+        // 加载商品明细
+        this.partialRenewal("OrderDetails", true);
+      }
+    })
   }
 });

+ 4 - 1
CRM/order/detail.json

@@ -1,4 +1,7 @@
 {
-  "usingComponents": {},
+  "usingComponents": {
+    "OrderDetails": "./modules/orderDetails/index",
+    "PaymentRecord": "./modules/paymentRecord/index"
+  },
   "navigationBarTitleText": "订单详情"
 }

+ 74 - 53
CRM/order/detail.scss

@@ -1,73 +1,94 @@
-.container {
-  padding: 20rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-.info-item {
-  display: flex;
-  align-items: center;
-  padding: 20rpx;
+.intr {
   background-color: #fff;
-  margin-bottom: 10rpx;
-  border-radius: 8rpx;
-}
+  border-radius: 12rpx;
+  padding: 24rpx;
 
-.label {
-  width: 160rpx;
-  font-size: 28rpx;
-  color: #666;
-}
+  .text-red {
+    color: #ff0000;
+  }
 
-.value {
-  flex: 1;
-  font-size: 28rpx;
-  color: #333;
+  .top {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 16rpx;
+
+    .name {
+      font-size: 32rpx;
+      font-weight: bold;
+    }
+
+    .statu {
+      font-size: 24rpx;
+      padding: 4rpx 12rpx;
+      border-radius: 8rpx;
+    }
+  }
+
+  .content {
+    .row {
+      display: flex;
+      flex-wrap: wrap;
+      margin-bottom: 12rpx;
+
+      .exp {
+        flex: 1;
+        font-size: 26rpx;
+        color: #666;
+        line-height: 1.5;
+
+        &.full-width {
+          width: 100%;
+        }
+      }
+    }
+  }
 }
 
 .section-title {
-  font-size: 32rpx;
+  font-size: 28rpx;
   font-weight: bold;
-  margin: 20rpx 0;
+  margin: 20rpx;
   color: #333;
 }
 
 .item-list {
   background-color: #fff;
-  border-radius: 8rpx;
+  border-radius: 12rpx;
+  margin: 0 20rpx 20rpx;
   padding: 20rpx;
-}
 
-.item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 15rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
+  .item {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 16rpx 0;
+    border-bottom: 1rpx solid #f0f0f0;
 
-.item:last-child {
-  border-bottom: none;
-}
+    &:last-child {
+      border-bottom: none;
+    }
 
-.item-name {
-  font-size: 28rpx;
-  color: #333;
-}
+    .item-name {
+      font-size: 26rpx;
+      color: #333;
+    }
 
-.item-info {
-  display: flex;
-  align-items: center;
-}
+    .item-info {
+      display: flex;
+      align-items: center;
 
-.item-quantity {
-  font-size: 26rpx;
-  color: #666;
-  margin-right: 20rpx;
-}
+      .item-quantity {
+        font-size: 24rpx;
+        color: #666;
+        margin-right: 20rpx;
+      }
 
-.item-price {
-  font-size: 28rpx;
-  font-weight: bold;
-  color: #333;
+      .item-price {
+        font-size: 26rpx;
+        color: #ff4d4f;
+        font-weight: bold;
+      }
+    }
+  }
 }

+ 75 - 29
CRM/order/detail.wxml

@@ -1,32 +1,78 @@
-<view class="container">
-  <view class="info-item">
-    <view class="label">订单号</view>
-    <view class="value">{{orderInfo.orderNo}}</view>
-  </view>
-  <view class="info-item">
-    <view class="label">客户名称</view>
-    <view class="value">{{orderInfo.customerName}}</view>
-  </view>
-  <view class="info-item">
-    <view class="label">订单金额</view>
-    <view class="value">¥{{orderInfo.amount}}</view>
-  </view>
-  <view class="info-item">
-    <view class="label">订单状态</view>
-    <view class="value">{{orderInfo.status}}</view>
-  </view>
-  <view class="info-item">
-    <view class="label">创建时间</view>
-    <view class="value">{{orderInfo.createTime}}</view>
+<view class="intr">
+  <view class="top">
+    <view class="name">{{detail.sonum || '--'}}</view>
+    <view class="statu" style="background-color: {{set.color(detail.status)}}; color: #fff;">
+      {{detail.status || '--'}}
+    </view>
   </view>
-  <view class="section-title">商品明细</view>
-  <view class="item-list">
-    <view class="item" wx:for="{{orderInfo.items}}" wx:key="index">
-      <view class="item-name">{{item.name}}</view>
-      <view class="item-info">
-        <view class="item-quantity">x{{item.quantity}}</view>
-        <view class="item-price">¥{{item.price}}</view>
-      </view>
+  <view class="content">
+    <view class="row">
+      <view class="exp full-width">单据日期:{{detail.createdate || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp">客户:{{detail.name || '--'}}</view>
+      <view class="exp">手机号:{{detail.phonenumber || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp">门店:{{detail.storename || '--'}}</view>
+      <view class="exp">订单数量:{{detail.qty || '--'}}</view>
+
+    </view>
+    <view class="row">
+      <view class="exp">订单金额:{{detail.showAmount || '--'}}</view>
+      <view class="exp">未收金额:{{detail.showUnpaidAmount || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp full-width">创建人:{{detail.createby || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp full-width">创建时间:{{detail.createdate || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp full-width">小区及门牌号:{{detail.community || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp full-width">地址:{{detail.address || '--'}}</view>
+    </view>
+    <view class="row">
+      <view class="exp full-width">订单备注:{{detail.remarks || '--'}}</view>
     </view>
   </view>
-</view>
+</view>
+
+<view style="height: 20rpx;" />
+<Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
+  <OrderDetails slot='订单商品' id='OrderDetails' order-id="{{detail.sa_custorderid}}" />
+  <PaymentRecord slot='付款记录' id='PaymentRecord' order-id="{{detail.sa_custorderid}}" />
+</Yl_FunTabs>
+
+<view style="height: 130rpx;" />
+
+<wxs module="set">
+  module.exports = {
+    color: function (statu) {
+      var color = '#999999';
+      switch (statu) {
+        case "待出库":
+          color = '#FA8C16';
+          break;
+        case "部分出库":
+          color = '#1890FF';
+          break;
+        case "已出库":
+        case "已完成":
+          color = '#52C41A';
+          break;
+        case "已关闭":
+        case "已退单":
+        case "已取消":
+          color = '#FF4D4F';
+          break;
+        case "已付款":
+          color = '#722ED1';
+          break;
+      };
+      return color;
+    }
+  }
+</wxs>

+ 76 - 15
CRM/order/index.js

@@ -1,25 +1,86 @@
+const _Http = getApp().globalData.http,
+  currency = require("../../utils/currency"),
+  CNY = value => currency(value, {
+    symbol: "¥",
+    precision: 2
+  }).format();
+
 Page({
   data: {
-    orderList: []
+    list: [],
+    loading: false,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageSize: 20,
+      pageTotal: 1,
+      total: null,
+      where: {
+        condition: "",
+        tablefilter: {
+          sonum: null,
+          status: null,
+          name: null,
+          phonenumber: null,
+          address: null,
+          storename: null
+        },
+        tableid: 2484
+      }
+    }
   },
   onLoad() {
-    this.getOrderList();
+    this.getList(true);
   },
-  getOrderList() {
-    // 模拟获取订单列表数据
-    const mockData = [
-      { id: 1, orderNo: 'ORD001', amount: '1000', status: '已完成' },
-      { id: 2, orderNo: 'ORD002', amount: '2000', status: '处理中' },
-      { id: 3, orderNo: 'ORD003', amount: '3000', status: '待处理' }
-    ];
+  onPullDownRefresh() {
+    this.getList(true);
+    wx.stopPullDownRefresh();
+  },
+  onReachBottom() {
+    if (this.data.content.pageNumber <= this.data.content.pageTotal) {
+      this.getList(false);
+    }
+  },
+  onSearch(e) {
+    const keyword = e.detail.value || "";
     this.setData({
-      orderList: mockData
+      "content.where.condition": keyword,
+      "content.pageNumber": 1
     });
+    this.getList(true);
   },
-  goToDetail(e) {
-    const id = e.currentTarget.dataset.id;
-    wx.navigateTo({
-      url: `./detail?id=${id}`
-    });
+  getList(init) {
+    if (init.detail != undefined) init = init.detail;
+    let content = this.data.content;
+    if (init) {
+      content.pageNumber = 1;
+      this.setData({ loading: true });
+    }
+    _Http.basic({
+      "id": "2026031410293201",
+      content
+    }).then(res => {
+      this.setData({ loading: false });
+      console.log("订单列表", res)
+      this.selectComponent('#ListBox').RefreshToComplete();
+      if (res.code != 1) return wx.showToast({
+        title: res.msg,
+        icon: "none"
+      })
+      // 格式化金额数据
+      const formattedData = res.data.map(item => ({
+        ...item,
+        showAmount: CNY(item.amount || 0),
+        showPayAmount: CNY(item.payamount || 0),
+        showUnpaidAmount: CNY((item.amount || 0) - (item.payamount || 0))
+      }))
+      this.setData({
+        list: res.pageNumber == 1 ? formattedData : this.data.list.concat(formattedData),
+        "content.pageNumber": res.pageNumber + 1,
+        "content.pageSize": res.pageSize,
+        "content.pageTotal": res.pageTotal,
+        "content.total": res.total
+      })
+    })
   }
 });

+ 2 - 1
CRM/order/index.json

@@ -1,4 +1,5 @@
 {
-  "usingComponents": {},
+  "usingComponents": {
+  },
   "navigationBarTitleText": "订单列表"
 }

+ 69 - 31
CRM/order/index.scss

@@ -1,33 +1,71 @@
 .container {
-  padding: 10rpx;
-}
-
-.order-item {
-  padding: 20rpx;
-  background-color: #fff;
-  margin-bottom: 10rpx;
-  border-radius: 8rpx;
-  box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
-}
-
-.order-header {
-  display: flex;
-  justify-content: space-between;
-  margin-bottom: 10rpx;
-}
-
-.order-no {
-  font-size: 28rpx;
-  color: #333;
-}
-
-.order-status {
-  font-size: 28rpx;
-  color: #085CDF;
-}
-
-.order-amount {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
+  background-color: #f5f5f5;
+  min-height: 100vh;
+
+  .text-red {
+    color: #ff0000;
+  }
+
+  .item {
+    background-color: #fff;
+    border-radius: 12rpx;
+    padding: 24rpx;
+    margin-bottom: 20rpx;
+    display: block;
+
+    .top {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-bottom: 16rpx;
+
+      .name {
+        font-size: 32rpx;
+        font-weight: bold;
+      }
+
+      .statu {
+        font-size: 24rpx;
+        padding: 4rpx 12rpx;
+        border-radius: 8rpx;
+      }
+    }
+
+    .content {
+      .row {
+        display: flex;
+        flex-wrap: wrap;
+        margin-bottom: 12rpx;
+
+        .exp {
+          flex: 1;
+          font-size: 26rpx;
+          color: #666;
+          line-height: 1.5;
+
+          &.full-width {
+            width: 100%;
+          }
+        }
+      }
+    }
+  }
+
+  .header {
+    background-color: #f5f5f5;
+  }
+
+  .loading {
+    text-align: center;
+    color: #999;
+    padding: 20rpx 0;
+    font-size: 24rpx;
+  }
+
+  .no-more {
+    text-align: center;
+    color: #999;
+    padding: 20rpx 0;
+    font-size: 24rpx;
+  }
 }

+ 92 - 8
CRM/order/index.wxml

@@ -1,9 +1,93 @@
 <view class="container">
-  <view class="order-item" wx:for="{{orderList}}" wx:key="id" bindtap="goToDetail" data-id="{{item.id}}">
-    <view class="order-header">
-      <view class="order-no">订单号: {{item.orderNo}}</view>
-      <view class="order-status">{{item.status}}</view>
-    </view>
-    <view class="order-amount">金额: ¥{{item.amount}}</view>
-  </view>
-</view>
+  <van-search use-action-slot placeholder='请输入搜索关键词' shape='round' bind:search="onSearch" bind:clear="onSearch" />
+  <view class="header" style="height: 20rpx;"></view>
+  <Yl_ListBox id='ListBox' bind:getlist='getList'>
+    <navigator url="/CRM/order/detail?id={{item.sa_custorderid}}" class="item" wx:for="{{list}}" wx:key="sa_custorderid">
+      <view class="top">
+        <view class="name">{{item.sonum || '--'}}</view>
+        <view class="statu" style="background-color: {{set.color(item.status)}}; color: #fff;">
+          {{item.status || '--'}}
+        </view>
+      </view>
+      <view class="content">
+        <view class="row">
+          <view class="exp">
+            开单日期:{{item.createdate || '--'}}
+          </view>
+        </view>
+        <view class="row">
+          <view class="exp">
+            客户:{{item.name || '--'}}
+          </view>
+          <view class="exp">
+            手机号:{{item.phonenumber || '--'}}
+          </view>
+        </view>
+        <view class="row">
+          <view class="exp">
+            门店:{{item.storename || '--'}}
+          </view>
+          <view class="exp">
+            负责人:{{item.leader || '--'}}
+          </view>
+        </view>
+        <view class="row">
+          <view class="exp">
+            数量:{{item.qty || '--'}}
+          </view>
+          <view class="exp">
+            订单金额:{{item.showAmount || '--'}}
+          </view>
+        </view>
+        <view class="row">
+          <view class="exp">
+            已收款金额:{{item.showPayAmount || '--'}}
+          </view>
+          <view class="exp">
+            付款状态:<text class="{{item.ispaid == 1 ? '' : 'text-red'}}">{{item.ispaid == 1 ? '已收款' : '未收款'}}</text>
+          </view>
+        </view>
+        <view class="row">
+          <view class="exp full-width">
+            地址:{{item.address || '--'}}
+          </view>
+        </view>
+        <view class="row">
+          <view class="exp full-width">
+            备注:{{item.remarks || '--'}}
+          </view>
+        </view>
+      </view>
+    </navigator>
+    <Yl_Empty wx:if="{{list.length==0}}" />
+    <view style="height:150rpx;" />
+  </Yl_ListBox>
+</view>
+<wxs module="set">
+  module.exports = {
+    color: function (statu) {
+      var color = '#999999';
+      switch (statu) {
+        case "待出库":
+          color = '#FA8C16';
+          break;
+        case "部分出库":
+          color = '#1890FF';
+          break;
+        case "已出库":
+        case "已完成":
+          color = '#52C41A';
+          break;
+        case "已关闭":
+        case "已退单":
+        case "已取消":
+          color = '#FF4D4F';
+          break;
+        case "已付款":
+          color = '#722ED1';
+          break;
+      };
+      return color;
+    }
+  }
+</wxs>

+ 73 - 0
CRM/order/modules/orderDetails/index.js

@@ -0,0 +1,73 @@
+const _Http = getApp().globalData.http,
+  currency = require("../../../../utils/currency"),
+  CNY = value => currency(value, {
+    symbol: "¥",
+    precision: 2
+  }).format();
+
+Component({
+  properties: {
+    orderId: {
+      type: String,
+      value: ''
+    }
+  },
+  data: {
+    list: [],
+    loading: false,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageSize: 20,
+      pageTotal: 1,
+      total: null,
+      where: {
+        tablefilter: {
+          itemname: null,
+          itemno: null,
+          model: null,
+          amount: ""
+        }
+      }
+    }
+  },
+  methods: {
+    /* 获取订单明细列表 */
+    getList(id, init) {
+      let content = this.data.content;
+      content.sa_custorderid = id || this.data.orderId || this.data.sa_custorderid;
+      if (init) {
+        content.pageNumber = 1;
+        this.setData({ loading: true });
+      }
+      _Http.basic({
+        "id": "2026031414243401",
+        content
+      }).then(res => {
+        this.setData({ loading: false });
+        console.log("订单明细列表", res)
+        if (res.code != 1) return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        // 格式化金额数据
+        const formattedData = res.data.map(item => {
+          const amount = (item.price || 0) * (item.qty || 0);
+          return {
+            ...item,
+            showPrice: CNY(item.price || 0),
+            showAmount: CNY(amount)
+          };
+        })
+        this.setData({
+          list: res.pageNumber == 1 ? formattedData : this.data.list.concat(formattedData),
+          "content.pageNumber": res.pageNumber + 1,
+          "content.pageSize": res.pageSize,
+          "content.pageTotal": res.pageTotal,
+          "content.total": res.total,
+          "sa_custorderid": content.sa_custorderid
+        })
+      })
+    }
+  }
+})

+ 4 - 0
CRM/order/modules/orderDetails/index.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {
+  }
+}

+ 44 - 0
CRM/order/modules/orderDetails/index.scss

@@ -0,0 +1,44 @@
+.order-details {
+  background-color: #f5f5f5;
+  padding: 20rpx;
+
+  .text-red {
+    color: #ff0000;
+  }
+
+  .card-item {
+    background-color: #fff;
+    border-radius: 12rpx;
+    padding: 24rpx;
+    margin-bottom: 20rpx;
+
+    .card-header {
+      font-size: 32rpx;
+    }
+
+    .exp {
+      font-size: 26rpx;
+      color: #666;
+      line-height: 1.5;
+      margin-top: 8rpx;
+    }
+
+    .exp.full-width {
+      width: 100%;
+    }
+  }
+
+  .loading {
+    text-align: center;
+    color: #999;
+    padding: 20rpx 0;
+    font-size: 24rpx;
+  }
+
+  .no-more {
+    text-align: center;
+    color: #999;
+    padding: 20rpx 0;
+    font-size: 24rpx;
+  }
+}

+ 22 - 0
CRM/order/modules/orderDetails/index.wxml

@@ -0,0 +1,22 @@
+<view class="order-details">
+  <view class="card-item" wx:for="{{list}}" wx:key="index">
+    <view class="card-header">
+      商品编码:{{item.itemno || '--'}}
+    </view>
+    <view class="exp">商品名称:{{item.itemname || '--'}}</view>
+    <view class="exp">商品型号:{{item.model || '--'}}</view>
+    <view class="exp">单位:{{item.unitname || '--'}}</view>
+    <view class="exp">数量:{{item.qty || '--'}}</view>
+    <view class="exp">折扣:{{item.discountrate || '--'}}</view>
+    <view class="exp">单价:{{item.showPrice || '--'}}</view>
+    <view class="exp">金额:{{item.showAmount || '--'}}</view>
+    <view class="exp">已出库数量:{{item.outqty || '--'}}</view>
+    <view class="exp full-width">备注:{{item.remarks || '--'}}</view>
+    <view class="exp full-width">序列号:{{item.sku || '--'}}</view>
+  </view>
+
+  <view wx:if="{{loading}}" class="loading">
+    加载中...
+  </view>
+  <Yl_Empty wx:if="{{list.length==0}}" />
+</view>

+ 72 - 0
CRM/order/modules/paymentRecord/index.js

@@ -0,0 +1,72 @@
+const _Http = getApp().globalData.http,
+  currency = require("../../../../utils/currency"),
+  CNY = value => currency(value, {
+    symbol: "¥",
+    precision: 2
+  }).format();
+
+Component({
+  properties: {
+    orderId: {
+      type: String,
+      value: ''
+    }
+  },
+  data: {
+    list: [],
+    loading: false,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageSize: 20,
+      pageTotal: 1,
+      total: null
+    }
+  },
+  methods: {
+    /* 获取付款记录列表 */
+    getList(id, init) {
+      let content = this.data.content;
+      content.sa_custorderid = id || this.data.orderId || this.data.sa_custorderid;
+      if (init) {
+        content.pageNumber = 1;
+        this.setData({ loading: true });
+      }
+      // 这里使用订单详情API,因为付款记录通常是订单的一部分
+      _Http.basic({
+        "id": "2026031410293201",
+        content: {
+          nocache: true,
+          pageNumber: 1,
+          pageSize: 1,
+          where: {
+            condition: `sa_custorderid = ${content.sa_custorderid}`,
+            tableid: 2484
+          }
+        }
+      }).then(res => {
+        this.setData({ loading: false });
+        console.log("付款记录列表", res)
+        if (res.code != 1) return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        if (res.data && res.data.length > 0) {
+          // 格式化金额数据
+          const formattedData = res.data.map(item => ({
+            ...item,
+            showPayAmount: CNY(item.payamount || 0)
+          }))
+          this.setData({
+            list: formattedData,
+            "content.pageNumber": res.pageNumber + 1,
+            "content.pageSize": res.pageSize,
+            "content.pageTotal": res.pageTotal,
+            "content.total": res.total,
+            "sa_custorderid": content.sa_custorderid
+          })
+        }
+      })
+    }
+  }
+})

+ 4 - 0
CRM/order/modules/paymentRecord/index.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {
+  }
+}

+ 40 - 0
CRM/order/modules/paymentRecord/index.scss

@@ -0,0 +1,40 @@
+.payment-record {
+  background-color: #f5f5f5;
+  padding: 20rpx;
+
+  .text-red {
+    color: #ff0000;
+  }
+
+  .card-item {
+    background-color: #fff;
+    border-radius: 12rpx;
+    padding: 24rpx;
+    margin-bottom: 20rpx;
+
+    .card-header {
+      font-size: 32rpx;
+    }
+
+    .exp {
+      font-size: 26rpx;
+      color: #666;
+      line-height: 1.5;
+      margin-top: 8rpx;
+    }
+  }
+
+  .loading {
+    text-align: center;
+    color: #999;
+    padding: 20rpx 0;
+    font-size: 24rpx;
+  }
+
+  .no-more {
+    text-align: center;
+    color: #999;
+    padding: 20rpx 0;
+    font-size: 24rpx;
+  }
+}

+ 15 - 0
CRM/order/modules/paymentRecord/index.wxml

@@ -0,0 +1,15 @@
+<view class="payment-record">
+  <view class="card-item" wx:for="{{list}}" wx:key="index">
+    <view class="card-header">
+      付款时间:{{item.paytime || '--'}}
+    </view>
+    <view class="exp">付款金额:{{item.showPayAmount || '--'}}</view>
+    <view class="exp">付款方式:{{item.paymode || '--'}}</view>
+    <view class="exp">微信支付订单:{{item.wechatpayorder || '--'}}</view>
+  </view>
+
+  <view wx:if="{{loading}}" class="loading">
+    加载中...
+  </view>
+  <Yl_Empty wx:if="{{list.length==0}}" />
+</view>