xuxueyang
2024-08-12 f837b731f571bb53cee99f9bc22a6f74855f3e6c
add 商品结算测试
已修改5个文件
已添加3个文件
513 ■■■■■ 文件已修改
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/supplier-home.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-manage.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-manage/order-manage-flower.vue 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-manage/order-manage-settlement.vue 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-manage/order-manage.vue 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-settlement/order-settlement.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -49,7 +49,7 @@
    "quickapp" : {},
    /* 快应用特有相关 */
    "mp-weixin" : {
        "appid" : "wx1441324401626290",
        "appid" : "wx6d0ecc4e18710458",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
pages.json
@@ -215,6 +215,27 @@
                    "style": {
                        "navigationBarTitleText": "结算单详情"
                    }
                },
                {
                    "path": "order-manage/order-manage",
                    "style": {
                        "navigationBarTitleText": "订单管理",
                        "enablePullDownRefresh": true
                    }
                },
                {
                    "path" : "order-manage/order-manage-settlement",
                    "style" :
                    {
                        "navigationBarTitleText" : "配送结算明细"
                    }
                },
                {
                    "path" : "order-manage/order-manage-flower",
                    "style" :
                    {
                        "navigationBarTitleText" : "配送商品明细"
                    }
                }
                // #endif                
                // #ifdef PUB_PARTNER
pages/home/supplier-home.vue
@@ -135,6 +135,14 @@
                    </view>
                    <view class="order-desc tg">订单管理</view>
                </view>
            <!--     <view class="nav row margin-tb" v-if="selftype==='supplier'"
                    @click="goto('/sub_pages/supplier/order-manage/order-manage',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon ddgl"
                            src="/static/images/partner/user/user-icon-ddgl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">订单统计</view>
                </view> -->
                <view class="nav row margin-tb"
                    @click="goto('/sub_pages/supplier/order-settlement/order-settlement',true)">
@@ -241,7 +249,18 @@
        },
        created() {
            //公告
            this.$http.request('get', '/api/pub/announcement/list', {
            var type = ''
            // #ifdef PUB_CUSTOMER
            type = 'customer'
            // #endif
            // #ifdef PUB_SUPPLIER
            type = 'supplier'
            // #endif
            // #ifdef PUB_PARTNER
            type = 'partner'
            // #endif
            this.$http.request('get', '/api/pub/announcement/list/'+type, {
                params: {
                    size: 5,
                    status: 'A'
sub_pages/supplier/flower-manage/flower-manage.vue
@@ -13,9 +13,17 @@
            <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
            <view v-for="(item,index) in list" :key="index" class="m-b-24 flow-manage-list">
                <view class="flow-manage-list-item">
                    <view class="flex">
                        <image class="flower-img img100 m-r-6" :src="item.cover" @click="previewImg(item.cover)">
                        </image>
                    <view class="flex m-r-6">
                        <view class="img flower-img m-r-6">
                            <image class="flower-img img100 " :src="item.cover"
                                :class="[!item.stock?'component-stock-zero':'']" @click="previewImg(item.cover)">
                            </image>
                            <view class="status" :class="[!item.stock?'zero':'']" v-if="item.statusStr">
                                {{ item.statusStr}}
                            </view>
                        </view>
                        <view class="flex1">
                            <view class=" flex">
                                <view class="title">{{item.name}}<span class="level">{{item.levelStr}}</span></view>
@@ -347,6 +355,28 @@
                    height: 118rpx;
                    min-width: 128rpx;
                    min-height: 118rpx;
                    position: relative;
                    .status {
                        position: absolute;
                        min-width: 66rpx;
                        height: 34rpx;
                        background: #20613D;
                        left: 0;
                        top: 0;
                        border-top-left-radius: 8rpx;
                        border-bottom-right-radius: 8rpx;
                        color: #FFFFFF;
                        line-height: 34rpx;
                        font-size: 22rpx;
                        text-align: center;
                    }
                    .status.zero {
                        // background: unset;
                        // font-size: 24rpx;
                    }
                }
                .each-list {
sub_pages/supplier/order-manage/order-manage-flower.vue
对比新文件
@@ -0,0 +1,139 @@
<template>
    <view class="list-container order-sale supplier">
        <view class="p15" style="min-height: calc(100vh - 20rpx);">
            <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
            <view v-for="(item,index) in list" :key="index" @click="toDetail(item)"
                class="m-b-24 order-sale-list list-container">
                <view class="order-sale-item br-4 list-item bg-white">
                    <view class="form">
                        <view class="flex">
                            <view class="form-item flex1">
                                <view class="label">商品名称</view>
                                <view class="value">{{item.flowerName||'-'}}</view>
                            </view>
                            <view class="form-item flex1">
                                <view class="label">数量</view>
                                <view class="value">{{item.num||0}}</view>
                            </view>
                        </view>
                        <view class="flex">
                            <view class="form-item">
                                <view class="label">等级</view>
                                <view class="value">{{item.flowerLevelStr}}</view>
                            </view>
                            <view class="form-item">
                                <view class="label">价格</view>
                                <view class="value">¥{{item.price||'0.00'}}</view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 判断是否到底了,自动吧 -->
        <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
    </view>
</template>
<script>
    import moment from 'moment'
    export default {
        data() {
            return {
                tabIndex: 0,
                query: {
                    day: ''
                }
            }
        },
        onLoad(options) {
            this.query.day = options.day || ''
            this.listApi = '/api/supplier/delivery/mine/list/flower'
            this.getList()
        },
        onReachBottom() {
            this.getMore()
        },
        async onPullDownRefresh() {
            this.page.current = 1
            await this.getList()
            uni.stopPullDownRefresh()
        },
        methods: {
        }
    }
</script>
<style lang="scss" scope>
    .order-sale-list {
        .order-sale-item {
            margin-bottom: 20rpx;
            padding: 22rpx;
            .title {
                font-weight: 600;
                font-size: 28rpx;
                color: #000000;
                line-height: 40rpx;
            }
            .line {
                min-height: 2rpx;
                background-color: #EEEEEE;
                margin-top: 16rpx;
                margin-bottom: 16rpx;
            }
            .form {
                // display: flex;
                // flex-wrap: wrap;
                .form-item {
                    flex: 1;
                    // min-width: 40%;
                    // max-width: 50%;
                    .label {
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #666666;
                        line-height: 34rpx;
                    }
                    .label::after {
                        content: ":";
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #666666;
                        line-height: 34rpx;
                    }
                    .value {
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #000000;
                        line-height: 34rpx;
                        text-align: center;
                        flex: 1;
                    }
                    .value.red {
                        color: #CF0000;
                    }
                }
                .form-item.width100 {
                    max-width: unset;
                }
            }
        }
    }
</style>
sub_pages/supplier/order-manage/order-manage-settlement.vue
对比新文件
@@ -0,0 +1,175 @@
<template>
    <view class="list-container order-sale supplier">
        <view class="p15" style="min-height: calc(100vh - 20rpx);">
            <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
            <view v-for="(item,index) in list" :key="index" @click="toDetail(item)"
                class="m-b-24 order-sale-list list-container">
                <view class="order-sale-item br-4 list-item bg-white">
                    <view class="form">
                        <view class="flex">
                            <view class="form-item flex1">
                                <view class="label">结算单价/均价</view>
                                <view class="value">¥{{item.price||'0.00'}}</view>
                            </view>
                            <view class="form-item flex1">
                                <view class="label">商品数量</view>
                                <view class="value">{{item.flowerNum||0}}</view>
                            </view>
                        </view>
                        <view class="flex">
                            <view class="form-item">
                                <view class="label">订单数量</view>
                                <view class="value">{{item.orderNum}}</view>
                            </view>
                            <view class="form-item">
                                <view class="label">买家数量</view>
                                <view class="value">{{item.customerNum}}</view>
                            </view>
                        </view>
                        <view class="flex">
                            <view class="form-item">
                                <view class="label">服务费</view>
                                <view class="value">{{item.serviceFee}}</view>
                            </view>
                            <view class="form-item">
                                <view class="label">售后理赔</view>
                                <view class="value">{{item.salesFee}}</view>
                            </view>
                        </view>
                        <view class="flex">
                            <view class="form-item">
                                <view class="label">质检扣款</view>
                                <view class="value">{{item.checkFee}}</view>
                            </view>
                            <view class="form-item">
                                <view class="label">集货站运费</view>
                                <view class="value">{{item.stationFee}}</view>
                            </view>
                        </view>
                    </view>
                    <!-- <view class="line"></view> -->
                    <view class="form">
                        <view class="flex">
                            <view class="form-item">
                                <view class="label title-bold">交易合计</view>
                                <view class="value t-red">¥{{item.totalAmount||0}}</view>
                            </view>
                            <view class="form-item">
                                <view class="label title-bold">结算金额</view>
                                <view class="value t-red">¥{{item.settlementAmount||0}}</view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 判断是否到底了,自动吧 -->
        <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
    </view>
</template>
<script>
    import moment from 'moment'
    export default {
        data() {
            return {
                tabIndex: 0,
                query: {
                    day: ''
                }
            }
        },
        onLoad(options) {
            this.query.day = options.day || ''
            this.listApi = '/api/supplier/delivery/mine/list/settlement'
            this.getList()
        },
        onReachBottom() {
            this.getMore()
        },
        async onPullDownRefresh() {
            this.page.current = 1
            await this.getList()
            uni.stopPullDownRefresh()
        },
        methods: {
            toDetail(item) {
                uni.navigateTo({
                    url: `/sub_pages/supplier/order-settlement/order-settlement-detail?id=${item.id}`
                })
            },
        }
    }
</script>
<style lang="scss" scope>
    .order-sale-list {
        .order-sale-item {
            margin-bottom: 20rpx;
            padding: 22rpx;
            .title {
                font-weight: 600;
                font-size: 28rpx;
                color: #000000;
                line-height: 40rpx;
            }
            .line {
                min-height: 2rpx;
                background-color: #EEEEEE;
                margin-top: 16rpx;
                margin-bottom: 16rpx;
            }
            .form {
                // display: flex;
                // flex-wrap: wrap;
                .form-item {
                    flex: 1;
                    // min-width: 40%;
                    // max-width: 50%;
                    .label {
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #666666;
                        line-height: 34rpx;
                    }
                    .label::after {
                        content: ":";
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #666666;
                        line-height: 34rpx;
                    }
                    .value {
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #000000;
                        line-height: 34rpx;
                        text-align: center;
                        flex: 1;
                    }
                    .value.red {
                        color: #CF0000;
                    }
                }
                .form-item.width100 {
                    max-width: unset;
                }
            }
        }
    }
</style>
sub_pages/supplier/order-manage/order-manage.vue
对比新文件
@@ -0,0 +1,101 @@
<template>
    <!-- 列表页面 -->
    <view>
        <view class="p15" style="min-height: calc(100vh - 260rpx);">
            <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
            <view v-for="(item,index) in list" :key="index" class="m-b-24">
                <view class="notice-item flex">
                    <view>{{item.date}}</view>
                    <view class="num m-auto">{{item.num || 0}}</view>
                    <view class="price t-red m-auto">¥{{item.price || 0}}</view>
                    <view class="buttons m-l-a m-r-0">
                        <view @click.stop="toDetailFlower(item)" class="button button-1 m-r-10">
                            商品详情
                        </view>
                        <view @click.stop="toDetailSettlement(item)" class="m-l-10 button button-0">
                            结算详情
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 判断是否到底了,自动吧 -->
        <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                query: {}
            }
        },
        onLoad() {
            this.listApi = '/api/supplier/delivery/mine/list'
            this.getList()
        },
        onReachBottom() {
            this.getMore()
        },
        async onPullDownRefresh() {
            this.page.current = 1
            await this.getList()
            uni.stopPullDownRefresh()
        },
        methods: {
            toDetailFlower(item) {
                uni.navigateTo({
                    url: `/sub_pages/supplier/order-manage/order-manage-flower?date=${item.date}`
                })
            },
            toDetailSettlement(item) {
                uni.navigateTo({
                    url: `/sub_pages/supplier/order-manage/order-manage-settlement?date=${item.date}`
                })
            },
        }
    }
</script>
<style lang="scss" scoped>
    .notice-item {
        padding: 20rpx;
        font-size: 28rpx;
        font-weight: 600;
        background-color: #fff;
        .buttons {
            display: flex;
            margin-left: auto;
            width: fit-content;
            .button {
                // width: 216rpx;
                padding: 10rpx 20rpx;
                line-height: 34rpx;
                font-size: 24rpx;
                height: 34rpx;
                background: #20613D;
                text-align: center;
                border-radius: 30rpx;
            }
            .button-1 {
                background: #fff;
                color: #333;
                border: 2rpx solid #333;
            }
            .button-0 {
                color: #fff;
                border: 2rpx solid #20613D;
            }
        }
    }
</style>
sub_pages/supplier/order-settlement/order-settlement.vue
@@ -59,8 +59,7 @@
                            </view>
                        </view>
                    </view>
                    <view class="line"></view>
                    <!-- <view class="line"></view> -->
                    <view class="form">
                        <view class="flex">
                            <view class="form-item">
@@ -98,8 +97,8 @@
        onLoad() {
            var currentMonthStr = this.$util.toDate(new Date()).substring(0, 8) + '01'
            this.query.startDateStr = currentMonthStr
            var lastMonthDate = new Date(new Date(this.$util.toDate(new Date(currentMonthStr).getTime() + 3600_000 * 24 *
                40).substring(0, 8) + '01').getTime() - 3600_000 * 24 * 1)
            var lastMonthDate = new Date(new Date(this.$util.toDate(new Date(currentMonthStr).getTime() + 3600000 * 24 *
                40).substring(0, 8) + '01').getTime() - 3600000 * 24 * 1)
            this.query.endDateStr = this.$util.toDate(lastMonthDate)
            // #ifdef PUB_PARTNER
            this.listApi = '/api/partner/settlement/list'            
@@ -143,11 +142,6 @@
                }
            },
            toDetail(item) {
                // uni.navigateTo({
                //     url: `/pages/notice/notice?id=${item.id}`
                // })
            }
        }
    }
</script>
@@ -173,8 +167,8 @@
            }
            .form {
                display: flex;
                flex-wrap: wrap;
                // display: flex;
                // flex-wrap: wrap;
                .form-item {
                    flex: 1;
@@ -201,6 +195,8 @@
                        font-size: 24rpx;
                        color: #000000;
                        line-height: 34rpx;
                        text-align: center;
                        flex: 1;
                    }
                    .value.red {