xuxueyang
2024-08-02 3efc1c3337127f2836eaf0a2d641c5adafcd3a26
update
已修改5个文件
已添加3个文件
335 ■■■■■ 文件已修改
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/components/home-search.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order-delivery.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/common/icon-station.png 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/delivery/delivery-home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/delivery/delivery.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/delivery/station-delivery.vue 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -49,7 +49,7 @@
    "quickapp" : {},
    /* 快应用特有相关 */
    "mp-weixin" : {
        "appid" : "wx3203fd935a6ffe09",
        "appid" : "wx6d0ecc4e18710458",
        "setting" : {
            "urlCheck" : false,
            "es6" : true,
pages.json
@@ -136,6 +136,13 @@
            {
                "navigationBarTitleText" : "绑定微信"
            }
        },
        {
            "path" : "pages/home/components/home-search",
            "style" :
            {
                "navigationBarTitleText" : "搜鲜花"
            }
        }
    ],
    "subPackages": [{
@@ -271,6 +278,13 @@
                        "navigationBarTitleText": "",
                        "navigationStyle": "custom"
                    }
                },
                {
                    "path" : "delivery/station-delivery",
                    "style" :
                    {
                        "navigationBarTitleText" : "集货站"
                    }
                }
                // #endif
            ]
pages/home/components/home-search.vue
对比新文件
@@ -0,0 +1,77 @@
<template>
    <view class="p15 bg-white">
        <view class="search-container m-t-12 flex">
            <view class="flex1 input">
                <u-input placeholder="请输入花名" v-model="search_flow">
                    <template slot="suffix">
                        <uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons>
                    </template>
                </u-input>
            </view>
        </view>
        <view class="m-t-12">
            <view class="title">搜索历史</view>
            <view class="m-t-12 flex flex-wrap-normal history-item-list">
                <view class="history-item" v-for="item of history" :key="item" @click="searchBy(item)">
                    {{item}}
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                search_flow: '',
                history: [],
            }
        },
        onShow() {
            var k = this.$storage.getItem("cache_home_search")
            this.history = k && JSON.parse(k) || []
        },
        onHide() {
            this.$storage.setItem("cache_home_search", JSON.stringify(this.history))
        },
        methods: {
            buttonSearchFlow() {
                if (this.history.indexOf(name) >= 0) {
                    this.history.splice(this.history.indexOf(name), 1)
                }
                this.history.unshift(name)
                console.log('buttonSearchFlow')
                uni.navigateTo({
                    url: '/sub_pages/customer/trade/list?name=' + this.search_flow
                })
            },
            searchBy(name) {
                if (this.history.indexOf(name) >= 0) {
                    this.history.splice(this.history.indexOf(name), 1)
                }
                this.history.unshift(name)
                uni.navigateTo({
                    url: '/sub_pages/customer/trade/list?name=' + name
                })
            }
        }
    }
</script>
<style lang="scss" scoped>
    .history-item-list {
        .history-item {
            margin-right: 20rpx;
            min-width: 100rpx;
            padding: 10rpx 20rpx;
            margin-bottom: 20rpx;
            text-align: center;
            height: 30rpx;
            line-height: 30rpx;
            font-size: 28rpx;
        }
    }
</style>
pages/order/order-delivery.vue
@@ -6,7 +6,12 @@
            </view>
            <view class="tab-item" :class="[query.status=='ARRIVED'?'cur':'']" @click="changeIndex('ARRIVED')">已入位
            </view>
        </view>
        <view class="m-t-12">
            <view class="m-l-a m-r-20 w-fit flex">
                <radio :checked="selecttoday" @click="changeSelecrRange"></radio>
                <view>只查看今日</view>
            </view>
        </view>
        <view class="p15" style="min-height: calc(100vh - 160rpx);">
            <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
@@ -105,15 +110,17 @@
                query: {
                    status: '',
                },
                selecttoday: true,
            }
        },
        onLoad(options) {
            if (options.status) {
                this.query.status = options.status || ''
            }
            //目前应该是admin(质检人员不会用这个页面)
            this.listApi = '/api/supplier/delivery/list/today'
            this.listApi = '/api/supplier/delivery/list'
            // this.listApi = '/api/supplier/delivery/list'
            this.getList()
@@ -133,6 +140,19 @@
            uni.stopPullDownRefresh()
        },
        methods: {
            changeSelecrRange() {
                this.selecttoday = !this.selecttoday
                this.$nextTick(() => {
                    if (this.selecttoday) {
                        this.listApi = '/api/supplier/delivery/list/today'
                    } else {
                        this.listApi = '/api/supplier/delivery/list'
                    }
                    this.refreshList()
                })
            },
            changeIndex(status) {
                if (this.query.status !== status) {
                    this.query.status = status
@@ -156,12 +176,14 @@
            background-color: #fff;
            margin-bottom: 20rpx;
            padding: 22rpx;
            .each-item{
                .label{
            .each-item {
                .label {
                    min-width: 120rpx;
                }
                .label:after{
                .label:after {
                    content: ":";
                    margin-right: 10rpx;
                }
static/common/icon-station.png
sub_pages/partner/delivery/delivery-home.vue
@@ -41,7 +41,7 @@
        </view>
        <view class="user-utils m-20">
            <view class="user-util m-t-12 flex" @click="goto('/sub_pages/partner/delivery/delivery',true)">
            <view class="user-util m-t-12 flex" @click="goto('/sub_pages/partner/delivery/station-delivery',true)">
                <view class="title">质检列表</view>
                <view class="right-icon">
                    <uni-icons type="right"></uni-icons>
sub_pages/partner/delivery/delivery.vue
@@ -17,15 +17,18 @@
                status_columns: [],
            }
        },
        onLoad() {
            this.listApi = '/api/delivery/list'
        onLoad(options) {
            this.query.stationId = options.stationId || ''
            this.query.stationName = options.stationName || ''
            this.listApi = '/api/delivery/list/today'
            this.getList()
            this.$http.request('get', '/api/station/list', {
                params: {}
            }).then(res => {
                var data = res.data
                this.columns_station = [data || []]
            })
            // this.$http.request('get', '/api/station/list', {
            //     params: {}
            // }).then(res => {
            //     var data = res.data
            //     this.columns_station = [data || []]
            // })
            this.$http.request('get', '/api/code/value', {
                params: {
                    type: 'DELIVERY_ORDER_STATUS'
@@ -121,8 +124,8 @@
                    配送单状态:{{ query.statusStr || '全部' }}
                    <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
                </view>
                <view class="flex1" @click="show_select_station=true">
                <!-- @click="show_select_station=true" -->
                <view class="flex1">
                    集货站:{{ query.stationName || '全部' }}
                    <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
                </view>
@@ -169,7 +172,8 @@
                        <view class="button button-1 m-l-15 m-r-0" v-if="item.status==='ARRIVED'"
                            @click="compelete(item)">质检完成</view>
                        <view class="button button-0 m-l-a m-r-0" @click="toDetail(item)">
                            {{item.status==='ARRIVED'?'前往质检':'查看详情'}}</view>
                            {{item.status==='ARRIVED'?'前往质检':'查看详情'}}
                        </view>
                    </view>
                </view>
sub_pages/partner/delivery/station-delivery.vue
对比新文件
@@ -0,0 +1,178 @@
<script>
    export default {
        data() {
            return {
                query: {
                    stationId: '',
                    stationName: '',
                },
            }
        },
        onLoad(options) {
            this.listApi = '/api/delivery/list/today'
            this.getList()
        },
        onReachBottom() {
            this.getMore()
        },
        async onPullDownRefresh() {
            this.page.current = 1
            await this.getList()
            uni.stopPullDownRefresh()
        },
        methods: {
            toDetail(item) {
                uni.navigateTo({
                    url: `/sub_pages/partner/delivery/delivery-detail?stationId=${item.id}&stationName=${item.name}`
                })
            },
        }
    }
</script>
<template>
    <!-- 列表页面 -->
    <view class="page-delivery">
        <view class="p15" style="min-height: calc(100vh - 260rpx);">
            <view class="search-container m-t-12 flex">
                <view class="flex1 input">
                    <u-input placeholder="请输入集货站名称" v-model="query.stationName">
                        <template slot="suffix">
                            <uni-icons color="#20613D" type="search" size="24" @click="refreshList"></uni-icons>
                        </template>
                    </u-input>
                </view>
            </view>
            <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="delivery-item bg-white br-4 p10 flex">
                    <view>
                        <image src="/static/common/icon-station.png" class="icon-station m-r-10 img100 icon"></image>
                    </view>
                    <view>
                        <view class="title">
                            {{ item.name }}
                        </view>
                        <view class="flex">
                            <view class="form-item flex1">
                                <view class="form-item-label">供货数</view>
                                <view class="form-item-value t-red">{{ item.stationName || '-' }}</view>
                            </view>
                            <view class="form-item flex1">
                                <view class="form-item-label">供货数</view>
                                <view class="form-item-value t-red">{{ item.stationName || '-' }}</view>
                            </view>
                        </view>
                        <view class="flex buttons">
                            <view class="button button-0 m-l-a m-r-0" @click="toDetail(item)">
                                查看详情
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<style lang="scss" scoped>
    .page-delivery {
        .delivery-item {
            .icon-station {
                width: 72rpx;
                height: 72rpx;
            }
            .title {
                font-weight: 600;
                font-size: 32rpx;
                color: #000000;
                line-height: 40rpx;
            }
            .form-item {
                line-height: 40rpx;
                font-size: 28rpx;
                color: #666;
                display: flex;
                .form-item-label {
                    min-width: 120rpx;
                }
                .form-item-label::after {
                    content: ":";
                    margin-right: 20rpx;
                }
            }
            .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;
                }
            }
        }
        .search-container {
            display: flex;
            margin: 12rpx 0rpx 20rpx 0rpx;
            position: relative;
            z-index: 1;
            .input {
                // flex: 1;
                // max-width: 400rpx;
                background-color: #fff !important;
                // line-height: 58rpx;
                // height: 58rpx;
                border-radius: 8rpx;
            }
            .button {
                min-width: 120rpx;
                max-width: 120rpx;
                margin-left: auto;
                margin-right: 0rpx;
                text-align: right;
                line-height: 70rpx !important;
                // height: 58rpx !important;
                // display: flex;
            }
        }
    }
</style>