Просмотр исходного кода

Merge branch 'develop' of http://124.70.211.186:3000/zxh/E_WeChat into develop

zhaoxiaohai 2 лет назад
Родитель
Сommit
21c2baaa62

+ 2 - 1
app.json

@@ -45,7 +45,8 @@
         "toolBill/modules/selectProduct/index",
         "toolBill/modules/selectOrder/index",
         "borrow/index",
-        "borrow/detail"
+        "borrow/detail",
+        "betweenFee/index"
       ]
     },
     {

+ 4 - 0
components/Yl_Filtrate/index.js

@@ -74,6 +74,10 @@ Component({
                         return v;
                     })
                 })
+                this.setData({
+                    startdate:'',
+                    enddate:''
+                })
                 this.triggerEvent("handle", {})
             } else if (name == 'confirm') {
                 let obj = {};

+ 97 - 0
packageA/betweenFee/index.js

@@ -0,0 +1,97 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        loading: true,
+        active: 1,
+        amount: 0,
+        "content": {
+            "isExport": 0,
+            "sys_enterpriseid":"",
+            "isCheck":0,
+            "pageNumber": 1,
+            "pageTotal": 1,
+            "pageSize": 20,
+            total: 0,
+            "where": {
+                "condition": "",
+                "status": "",
+                "brandname": "",
+                "tradefield": ""
+            },
+            sort: []
+        },
+        filter: []
+    },
+    onLoad(options) {
+        this.getList()
+    },
+    /* 处理筛选 */
+    handleFilter({
+        detail
+    }) {
+        this.setData({
+            'content.where.startdate':detail.startdate,
+            'content.where.enddate':detail.enddate,
+        })
+        this.getList(true)
+    },
+    /* 获取产品 */
+    getList(init = false) {
+        if (init.detail != undefined) init = init.detail;
+        let content = this.data.content;
+        if (init) content.pageNumber = 1;
+        if (content.pageNumber > content.pageTotal) return;
+        _Http.basic({
+            "id": 20230104194002,
+            content
+        }).then(res => {
+            console.log("订单列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            this.setData({
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+                "content.pageNumber": res.pageNumber + 1,
+                "content.pageTotal": res.pageTotal,
+                "content.sort": res.sort,
+                "content.total": res.total,
+                loading: false,
+                amount: res.tips.rebate || 0
+            })
+            console.log(this.data.list);
+        })
+    },
+    /* 搜索 */
+    onSearch({
+        detail
+    }) {
+        console.log(detail);
+        this.setData({
+            "content.where.condition": detail
+        });
+        this.getList(true)
+    },
+    /* 切换tabs */
+    tabsChange(e) {
+        let status = "";
+        switch (e.detail.title) {
+            case '全部':
+                status = "";
+                break;
+            default:
+                status = e.detail.title
+                break;
+        }
+        this.setData({
+            active: e.detail.index,
+            "content.where.status": status
+        });
+        this.getList(true);
+    },
+    onReady() {
+        this.setListHeight()
+    },
+    /* 设置页面高度 */
+    setListHeight() {
+        this.selectComponent("#ListBox").setHeight(".tips", this);
+    },
+})

+ 5 - 0
packageA/betweenFee/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "List": "./modules/list/index"
+  }
+}

+ 11 - 0
packageA/betweenFee/index.scss

@@ -0,0 +1,11 @@
+.tips {
+	width: 750rpx;
+	text-align: center;
+	height: 64rpx;
+	line-height: 64rpx;
+	background: #FFEFD9;
+	font-size: 28rpx;
+	font-family: PingFang SC-Semibold, PingFang SC;
+	font-weight: 600;
+	color: #FA8C16;
+}

+ 19 - 0
packageA/betweenFee/index.wxml

@@ -0,0 +1,19 @@
+<import src="index.skeleton.wxml" />
+<template is="skeleton" wx:if="{{loading}}" />
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
+    <van-tab title="全部" />
+    <van-tab title="新建" />
+    <van-tab title="提交" />
+    <van-tab title="审核" />
+</van-tabs>
+<view class="tips">
+    共计{{content.total}}单,合计¥{{amount}}
+</view>
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+    <List list="{{list}}" />
+</Yl_ListBox>
+<!-- 新建浮动按钮 -->
+<Float />
+<!-- 筛选条件 -->
+<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{true}}' />

+ 5 - 0
packageA/betweenFee/modules/list/index.js

@@ -0,0 +1,5 @@
+Component({
+  properties: {
+    list: Array
+  },
+})

+ 4 - 0
packageA/betweenFee/modules/list/index.json

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

+ 82 - 0
packageA/betweenFee/modules/list/index.scss

@@ -0,0 +1,82 @@
+.item {
+    width: 100vw;
+    padding-left: 30rpx;
+    box-sizing: border-box;
+    margin-bottom: 20rpx;
+    background-color: #ffffff;
+
+
+    .top {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        height: 80rpx;
+        width: 100%;
+        border-bottom: 1rpx solid #ddd;
+        box-sizing: border-box;
+        padding-right: 30rpx;
+
+        .tags {
+            text {
+                display: inline-block;
+                height: 40rpx;
+                line-height: 40rpx;
+                background: #E7EEFF;
+                border-radius: 20rpx;
+                padding: 0 15rpx;
+                font-size: 20rpx;
+                color: #3874F6;
+                margin-right: 10rpx;
+            }
+        }
+
+        .statu {
+            font-size: 28rpx;
+        }
+    }
+
+    .content {
+        position: relative;
+
+        .num {
+            height: 40rpx;
+            line-height: 40rpx;
+            font-size: 28rpx;
+            color: #333333;
+            padding: 20rpx 0;
+        }
+
+        .exp {
+            height: 34rpx;
+            font-size: 24rpx;
+            margin-bottom: 8rpx;
+            color: #999999;
+        }
+
+        .amount {
+            position: absolute;
+            font-size: 28rpx;
+            color: #FF3B30;
+            bottom: 0;
+            right: 30rpx;
+        }
+    }
+
+    .bottom {
+        height: 72rpx;
+        line-height: 72rpx;
+        margin-top: 12rpx;
+        border-top: 1rpx solid #ddd;
+        box-sizing: border-box;
+        padding-right: 30rpx;
+        font-size: 24rpx;
+        color: #666666;
+    }
+}
+
+/* 文本行数限制 */
+.line-1 {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+}

+ 54 - 0
packageA/betweenFee/modules/list/index.wxml

@@ -0,0 +1,54 @@
+<navigator url="#" class="item" wx:for="{{list}}" wx:key="sonum">
+    <view class="top">
+        单据日期 : {{item.billdate || ' --'}} <text style="color:{{set.color(item.status)}}">{{item.status}}</text>
+    </view>
+    <view class="content">
+        <view class="num">
+            单号:{{item.sonum}}
+        </view>
+        <view class="exp">
+            单据号(订单/退货单):{{item.billno || '--'}}
+        </view>
+        <view class="exp">
+            居间合同号:{{item.billno_contract || '--'}}
+        </view>
+        <view class="amount">
+            居间费:¥{{item.rebate || '--'}}元
+        </view>
+        <view class="exp">
+            备注{{item.remarks || '--'}}
+        </view>
+    </view>
+
+    <view wx:if="{{item.contacts.length}}" class="bottom line-1">
+        <text style="margin-right: 10rpx;">{{item.contacts[0].name}}</text>
+        <text style="margin-right: 10rpx;">{{item.contacts[0].phonenumber}}</text>
+        <text style="margin-right: 10rpx;">{{item.contacts[0].address}}</text>
+    </view>
+    <view wx:else class="bottom">
+        暂无更多信息
+    </view>
+</navigator>
+
+<Yl_Empty wx:if="{{list.length==0}}" />
+
+
+<wxs module="set">
+    module.exports = {
+        color: function (statu) {
+            var color = '#999999';
+            switch (statu) {
+                case "审核":
+                    color = '#FA8C16';
+                    break;
+                case "提交":
+                    color = '#52C41A';
+                    break;
+                case "新建":
+                    color = '#333333';
+                    break;
+            };
+            return color;
+        }
+    }
+</wxs>

+ 5 - 1
packageA/remitVoucher/index.js

@@ -40,7 +40,11 @@ Page({
   handleFilter({
     detail
   }) {
-    console.log(detail)
+    this.setData({
+      'content.where.startdate':detail.startdate,
+      'content.where.enddate':detail.enddate,
+    })
+    this.getList(true)
   },
   getList(init = false) {
     if (init.detail != undefined) init = init.detail;

+ 1 - 1
packageA/remitVoucher/index.wxml

@@ -14,4 +14,4 @@
 <!-- 新建浮动按钮 -->
 <Yl_FloatingButton bindtap="toAdd" />
 <!-- 筛选条件 -->
-<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />
+<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{true}}' />

+ 7 - 0
packageA/toolBill/index.js

@@ -15,6 +15,8 @@ Page({
             "where": {
                 "condition": "",
                 "status": "",
+                "startdate":"",
+                "enddate":""
             },
             sort: []
         },
@@ -28,6 +30,11 @@ Page({
         detail
     }) {
         console.log(detail)
+        this.setData({
+            'content.where.startdate':detail.startdate,
+            'content.where.enddate':detail.enddate,
+        })
+        this.getList(true)
     },
     /* 获取产品 */
     getList(init = false) {

+ 1 - 1
packageA/toolBill/index.wxml

@@ -17,4 +17,4 @@
 <!-- 新建浮动按钮 -->
 <Yl_FloatingButton bindtap="toAdd" />
 <!-- 筛选条件 -->
-<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />
+<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{true}}' />

+ 7 - 0
pages/tabbar/home/index.js

@@ -109,6 +109,13 @@ Page({
 				bColor: "#FCF6EF",
 				icon: "icon-shujuchaxun"
 			})
+			gridList.push({
+				name: "居间费结算",
+				path: "/packageA/betweenFee/index",
+				color: "#F29C37",
+				bColor: "#FCF6EF",
+				icon: "icon-shujuchaxun"
+			})
 			/* ------------------------------- */
 			gridList.push({
 				name: "数据查询",