xuxy
2024-06-28 b07d5f16634fc4a695fa8e6f6b18c33806f2b05a
update 合伙人的功能
已删除1个文件
已修改22个文件
已重命名19个文件
已复制1个文件
已添加6个文件
2411 ■■■■■ 文件已修改
App.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/self.scss 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/card-list-item/card-list-item.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/footer/main.scss 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/footer/supplier-footer.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
mixin/mixin.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/farmer-home.vue 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.scss 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/supplier-home.vue 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/supplier-login.vue 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/notice/list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/user.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/common/icon-setting.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/partner/user/user-icon-ddgl.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/partner/user/user-icon-jjpz.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/flower/flower-mange-icon-add-flower.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/flower/flower-mange-icon-flower-delete.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/flower/flower-mange-icon-flower-in.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/flower/flower-mange-icon-flower-inpass.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/flower/flower-mange-icon-flower-unpass.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/user/user-icon-kkjl.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/user/user-icon-shlp.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/user/user-icon-spgl.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/supplier/user/user-icon-zdjs.png 补丁 | 查看 | 原始文档 | blame | 历史
static/imgs/footer/footer-home-0.png 补丁 | 查看 | 原始文档 | blame | 历史
static/imgs/footer/footer-home-1.png 补丁 | 查看 | 原始文档 | blame | 历史
static/imgs/footer/footer-self-0.png 补丁 | 查看 | 原始文档 | blame | 历史
static/imgs/footer/footer-self-1.png 补丁 | 查看 | 原始文档 | blame | 历史
static/imgs/home/home-icon-notice.png 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/markup-config/markup-config.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/order-manage/order-manage.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-add.vue 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-manage.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-records/order-records.vue 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-sale/order-sale.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-settlement/order-settlement.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/protocol.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/supplier-info/supplier-info.vue 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/supplier-reg/supplier-reg.vue 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue 1041 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -41,7 +41,7 @@
                    // console.log('init info',res,this.currentInfo)
                    if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
                        uni.reLaunch({
                            url: '/pages/home/farmer-home'
                            url: '/pages/home/supplier-home'
                        })
                    }
                }, 200);
@@ -56,7 +56,7 @@
                    // console.log('init info',res,this.currentInfo)
                    if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
                        // uni.reLaunch({
                        //     url: '/pages/home/farmer-home'
                        //     url: '/pages/home/supplier-home'
                        // })
                    }
                }, 200);
common/self.scss
@@ -672,10 +672,11 @@
.uni-noticebar{
    border-radius: 10rpx;
    height: 68rpx;
    height: 82rpx;
    .self-uni-notice-bar-icon-left{
        width: 58rpx;
        height: 52rpx;
        width: 38rpx;
        height: 38rpx;
        margin-right: 16rpx;
    }
    .self-uni-notice-bar-icon{
        width: 16rpx;
@@ -886,6 +887,9 @@
        line-height: 96rpx;
    }
}
.text-left{
    text-align: left;
}
.img100{
    background-size: 100% 100%;
}
@@ -958,4 +962,15 @@
}
uni-image>img{
    opacity: 1 !important;
}
.component-radio{
    width: 26rpx;
    height: 26rpx;
    min-width: 26rpx;
    min-height: 26rpx;
    border-radius: 50%;
    border: 2rpx solid #20613D;
    &.cur{
        background-color:#20613D;
    }
}
components/card-list-item/card-list-item.vue
@@ -72,7 +72,7 @@
                    <view class="title">{{dto.title}}</view>
                    <view class="flex location">
                        <!-- <uni-icons type="checkbox"></uni-icons> -->
                        <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-clock.png"></image>
                        <!-- <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-clock.png"></image> -->
                        <view>
                            {{dto.startTimeStr&&(dto.startTimeStr.substring(5,10)+'到')}}{{dto.endTimeStr&&dto.endTimeStr.substring(5,10) || ''}}
                        </view>
components/footer/main.scss
@@ -21,6 +21,7 @@
        flex: 1;
        border-radius: 50rpx;
        padding: 8rpx;
        .item {
            font-family: PingFangSC-Regular, PingFang SC;
@@ -69,10 +70,10 @@
//     top: -10px;
// }
.footer-icon{
    width: 28rpx;
    height: 29rpx;
    width: 36rpx;
    height: 36rpx;
}
.footer.farmer-footer{
.footer.supplier-footer{
    left: 50%;
    transform: translateX(-50%);
    background-image: unset;
@@ -93,18 +94,19 @@
            padding-top: 12rpx;
            line-height: 50rpx;
            .footer-icon{
                margin-top: 12rpx;
                margin-top: 8rpx;
            }
        }
        &.cur {
            // font-weight: 600;
            // font-size: 28rpx;
            // color: #000000;
            // text-align: left;
            // font-style: normal;
            background: #E1F0E7;
            border-radius: 50rpx;
            color: var(--topicolor);
        }
    }
    .footer-item.cur {
        // font-weight: 600;
        // font-size: 28rpx;
        // color: #000000;
        // text-align: left;
        // font-style: normal;
        background: #E1F0E7;
        border-radius: 50rpx;
        color: var(--topicolor);
    }
}
components/footer/supplier-footer.vue
文件名从 components/footer/farmer-footer.vue 修改
@@ -1,18 +1,18 @@
<template>
    <view class="footer flex farmer-footer">
    <view class="footer flex supplier-footer">
        <view v-for="(item,index) in tabBar" :key="index" class="footer-item"  :class="[flg==index?'cur':'']">
            <view class="item flex" @click="go(index,item)">
                <view v-if="index==0">
                    <image src="../../static/imgs/footer/footer-home-1.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)"
                <view v-if="index==0" class="  m-l-a m-r-6">
                    <image src="../../static/imgs/footer/footer-home-1.png" class="footer-icon" :class="(''+index)"
                        v-if="flg==0"></image>
                    <image src="../../static/imgs/footer/footer-home-0.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)"
                    <image src="../../static/imgs/footer/footer-home-0.png" class="footer-icon  " :class="(''+index)"
                        v-if="flg!=0"></image>
                </view>
                <view v-if="index==1">
                    <image src="../../static/imgs/footer/footer-self-1.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)"
                <view v-if="index==1" class="m-l-a m-r-2">
                    <image src="../../static/imgs/footer/footer-self-1.png" class="footer-icon" :class="(''+index)"
                        v-if="flg==1"></image>
                    <image src="../../static/imgs/footer/footer-self-0.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)"
                    <image src="../../static/imgs/footer/footer-self-0.png" class="footer-icon" :class="(''+index)"
                        v-if="flg!=1"></image>
                </view>
                <view class="m-l-0 m-r-a">
@@ -33,13 +33,13 @@
                tabBar: [
                    {
                        "pagePath": "/pages/home/farmer-home",
                        "pagePath": "/pages/home/supplier-home",
                        "iconPath": "/static/tabbar/home.png",
                        "selectedIconPath": "/static/tabbar/home_s.png",
                        "text": "工作台"
                    },
                    {
                        "pagePath": "/pages/user/farmer-user",
                        "pagePath": "/pages/user/supplier-user",
                        "iconPath": "/static/tabbar/my.png",
                        "selectedIconPath": "/static/tabbar/my_s.png",
                        "text": "我的"
main.js
@@ -48,8 +48,8 @@
import farmerfooter from '@/components/footer/farmer-footer'
Vue.component('farmer-footer', farmerfooter)
import supplierfooter from '@/components/footer/supplier-footer'
Vue.component('supplier-footer', supplierfooter)
import nodata from '@/components/no-data'
Vue.component('no-data', nodata)
// import bfooter from '@/components/footer/bussincess-footer'
manifest.json
@@ -1,5 +1,5 @@
{
    "name" : "hmy_farmer",
    "name" : "hmy_supplier",
    "appid" : "__UNI__EF9B7A3",
    "description" : "",
    "versionName" : "1.0.0",
mixin/mixin.js
@@ -13,7 +13,7 @@
                return state.hasLogin || false
            },
            selftype: state => {
                return state.type || ''
                return (state.currentInfo || {}).type || ''
            },
            currentInfo: state => {
                return state.currentInfo || {}
package-lock.json
@@ -1,5 +1,5 @@
{
  "name": "hmy_farmer",
  "name": "hmy_supplier",
  "lockfileVersion": 2,
  "requires": true,
  "packages": {
package.json
@@ -6,7 +6,7 @@
                "BROWSER": "Chrome",
                "env": {
                    "UNI_PLATFORM": "MP",
                    "SERVER_COMMON": "FARMER"
                    "SERVER_COMMON": "supplier"
                },
                "define": {
                    "H5-SERVERLOCAL": true
pages.json
@@ -4,25 +4,25 @@
        "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
    },
    "pages": [{
            "path": "pages/login/farmer-login",
            "path": "pages/login/supplier-login",
            "style": {
                "navigationBarTitleText": "登录",
                "enablePullDownRefresh": false,
                "navigationStyle": "custom"
            }
        }, {
            "path": "pages/home/farmer-home",
            "path": "pages/home/supplier-home",
            "style": {
                "navigationBarTitleText": "首页",
                "enablePullDownRefresh": false,
                "enablePullDownRefresh": true,
                "navigationStyle": "custom"
            }
        }, {
            "path": "pages/user/farmer-user",
            "path": "pages/user/supplier-user",
            "style": {
                "navigationBarTitleText": "我的",
                "enablePullDownRefresh": false,
                "enablePullDownRefresh": true,
                "navigationStyle": "custom"
            }
        },
@@ -58,9 +58,9 @@
    ],
    "subPackages": [{
        "root": "sub_pages/farmer",
        "root": "sub_pages/supplier",
        "pages": [{
                "path": "farmer-info/farmer-info",
                "path": "supplier-info/supplier-info",
                "style": {
                    "navigationBarTitleText": "信息维护",
                    "enablePullDownRefresh": false
@@ -103,15 +103,43 @@
                }
            },
            {
                "path": "farmer-reg/farmer-reg",
                "path": "supplier-reg/supplier-reg",
                "style": {
                    "navigationBarTitleText": "申请入住",
                    "navigationStyle": "custom"
                }
            },
            {
                "path" : "protocol",
                "style" :
                {
                    "navigationBarTitleText" : "协议",
                    "enablePullDownRefresh" : false
                }
            }
        ]
    },{
        "root": "sub_pages/partner",
        "pages": [{
            "path" : "order-manage/order-manage",
            "style" :
            {
                "navigationBarTitleText" : "订单管理",
                "enablePullDownRefresh" : false
            }
        },
        {
            "path" : "markup-config/markup-config",
            "style" :
            {
                "navigationBarTitleText" : "加价配置",
                "enablePullDownRefresh" : false
            }
        }
        ]
    }],
    "globalStyle": {
        "navigationBarTextStyle": "black",
pages/home/farmer-home.vue
文件已删除
pages/home/home.scss
@@ -1,7 +1,7 @@
.main-container{
    // background-image: url('../../static/images/farmer/home/bg.png');
    background: #E1F0E7;
    // background-image: url('../../static/images/supplier/home/bg.png');
    background-color: #E1F0E7;
    // https://hmy-flower.oss-cn-shanghai.aliyuncs.com/2a/2aa62e6bd1f74456b005d3f57daa54adbg.png
    .top-bg{
@@ -86,13 +86,14 @@
.main-container.farmer.home{
    // background-image: url('../../static/images/farmer/home/bg.png');
.main-container.home{
    background-image: url('https://hmy-flower.oss-cn-shanghai.aliyuncs.com/2a/2aa62e6bd1f74456b005d3f57daa54adbg.png');
    min-height: 99vh;
    padding: 30rpx;
    .item-container{
        padding: 22rpx 28rpx;
        background-color: #fff;
        border-radius: 8rpx;
        .title{
            font-weight: 600;
            font-size: 32rpx;
@@ -175,16 +176,59 @@
            }
            .title{
                margin-top: 12rpx;
                font-weight: 400;
            }
            
        }
        .tj-panel.pink{
            background: #E7F6EB;
            margin-left: auto;
            .title{
                color: #936E32;
            }
        }
        .tj-panel.green{
            background: #FDF4E5;
            margin-left: auto;
            .title{
                color: #20613D;
            }
        }
    }
    .item-container.partner{
        padding-bottom: 0rpx;
        .tj-container{
            .tj-each{
                // width: fit-content;
                flex: 1;
                .num.total{
                    text-align: left;
                }
                .num.status{
                    font-size: 24rpx;
                    text-align: right;
                    // margin-left: auto;
                    // margin-right: 0rpx;
                    // display: inline-block;
                }
            }
            .tj-each:first-child{
                margin-left: 0rpx;
                margin-right: auto;
                flex: unset;
            }
            .tj-each:last-child{
                margin-left: 0rpx;
                margin-right: auto;
                flex: unset;
            }
        }
        .line{
            margin-top: 0rpx;
            margin-bottom: 0rpx;
        }
    }
    .order-icon{
@@ -203,11 +247,18 @@
            // margin-top: 24rpx;
        }
        .order-desc{
            font-size: 28rpx;
            font-size: 24rpx;
            color: #000000;
            text-align: center;
            margin-top: 12rpx;
        }
        .order-desc.syst{
            margin-top: 0rpx;
        }
        .order-desc.wbsp{
            margin-top: 0rpx;
        }
        .img-c{
            // min-height: 68rpx;
            // width: fit-content;
@@ -219,10 +270,20 @@
            // margin-left: auto;
            // margin-right: auto;
        }
        .order-icon.ddgl{
            margin-top: 8rpx;
            width: 42rpx;
            height: 52rpx;
        }
        .order-icon.jjpz{
            margin-top: 8rpx;
            width: 42rpx;
            height: 52rpx;
        }
        .order-icon.zdjs{
            // margin-top: -8rpx;
            width: 54rpx;
            height: 58rpx;
            margin-top: 8rpx;
            width: 42rpx;
            height: 52rpx;
        }
        .order-icon.spgl{
            margin-top: 6rpx;
@@ -231,18 +292,20 @@
        }
        .order-icon.shlp{
            // margin-top: 16rpx;
            margin-top: -1rpx;
            margin-top: 10rpx;
            width: 54rpx;
            height: 58rpx;
        }
        .order-icon.kkjl{
            // margin-top: 12rpx;
            // margin-top: 0rpx;
            margin-top: -3rpx;
            // margin-top: -3rpx;
            margin-top: 10rpx;
            width: 58rpx;
            height: 58rpx;
        }
    }
    
}
}
pages/home/home.vue
@@ -110,7 +110,7 @@
        </view>
        <view style="padding-bottom:200rpx">
        </view>
        <farmer-footer flg="0"></farmer-footer>
        <supplier-footer flg="0"></supplier-footer>
    </view>
</template>
pages/home/supplier-home.vue
对比新文件
@@ -0,0 +1,295 @@
<template>
    <view class="main-container home relative">
        <!--         <image class="component-bg"
        src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png" mode="scaleToFill" />
         -->
        <!--         <view>
            我的
        </view> -->
        <!-- 背景图 -->
        <view class="top-bg" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
            <view class="title" style="position: relative;">
                首页
            </view>
            <view class="flex user-info" v-if="currentInfo&&(currentInfo.id)">
                <!-- 头像 -->
                <image class="user-icon" v-if="!currentInfo.picture" src="../../static/imgs/home/home-shop-top-icon.png"
                    mode="aspectFit"></image>
                <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image>
                <view class="name">
                    <view class="t1">{{currentInfo.nickName || currentInfo.loginName || '-'}}<span
                            v-if="currentInfo.supplierDTO&&currentInfo.supplierDTO.status!=='P'">
                            ({{currentInfo.supplierDTO?currentInfo.supplierDTO.statusStr:''}})</span>
                    </view>
                    <view class="t2">{{currentInfo.tel || '暂无电话'}}</view>
                </view>
            </view>
        </view>
        <view class="item-container" :class="[selftype?selftype:'']">
            <view class="title">我的收益</view>
            <view class="flex tj-container" v-if="selftype==='partner'">.
                <view class="tj-each">
                    <view class="num total">
                        ¥999.80
                    </view>
                </view>
                <view class="tj-each" style="flex: 1;">
                    <view class="num status">
                        待结算
                    </view>
                </view>
            </view>
            <view class="line"></view>
            <view class="flex tj-container" v-if="selftype==='supplier'">
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        上月成交
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        今日成交
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        近30天成交
                    </view>
                </view>
            </view>
            <view class="flex tj-container">
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        今日订单数
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        昨日订单数
                    </view>
                </view>
                <view class="tj-each">
                    <view class="num">
                        0扎
                    </view>
                    <view class="name">
                        本月订单数
                    </view>
                </view>
            </view>
        </view>
        <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;">
            <view class="rate-view flex1" style="max-width: 140rpx;">
                <view class="title">售后率</view>
                <view class="title" style="color: red;">0.02%</view>
            </view>
            <view class="tj-panel  pink flex1">
                <view class="name">今日待配送</view>
                <view class="title">12扎</view>
            </view>
            <view class="tj-panel green flex1">
                <view class="name green">今日配送汇总</view>
                <view class="title">12扎</view>
            </view>
        </view>
        <view class="m-t-12" @click="getNoticeMore">
            <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon
                :scrollable="scrollable" :text="currentNotice.title" :key="currentNotice.id" />
            <span v-if="!currentNotice||!currentNotice.id">&nbsp;</span>
        </view>
        <view class="item-container">
            <view class="title">常用功能</view>
            <view class="flex order-icons m-t-12">
                <view class="nav row margin-tb" v-if="selftype==='partner'"
                    @click="goto('/sub_pages/partner/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)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon zdjs"
                            src="/static/images/supplier/user/user-icon-zdjs.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">账单结算</view>
                </view>
                <view class="nav row margin-tb" @click="toFlowManage" v-if="selftype==='supplier'">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon spgl"
                            src="/static/images/supplier/user/user-icon-spgl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc cqw">商品管理</view>
                </view>
                <view class="nav row margin-tb" v-if="selftype==='partner'"
                    @click="goto('/sub_pages/partner/markup-config/markup-config',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon jjpz"
                            src="/static/images/partner/user/user-icon-jjpz.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">加价配置</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-sale/order-sale',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon shlp"
                            src="/static/images/supplier/user/user-icon-shlp.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc syst">售后理赔</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-records/order-records',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon kkjl"
                            src="/static/images/supplier/user/user-icon-kkjl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc wbsp">扣款记录</view>
                </view>
            </view>
        </view>
        <view style="padding-bottom:200rpx">
        </view>
        <supplier-footer flg="0"></supplier-footer>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                CustomBar: uni.getStorageSync('CustomBar'),
                StatusBar: uni.getStorageSync('StatusBar'),
                tcode: '',
                inviterName: '',
                // StatusBar:0,
                //公告的
                noticeList: [],
                currentNoticeIndex: 0,
                currentNotice: {
                },
                scrollable: false,
            };
        },
        async onPullDownRefresh() {
            await this.$store.dispatch('getCurrentInfo')
            uni.stopPullDownRefresh()
        },
        onLoad(options) {
            const url = options.q ? decodeURIComponent(options.q) : '';
            const urlcode = options.url && decodeURIComponent(options.url) || ''
        },
        created() {
            //公告
            this.$http.request('get', '/api/announcement/page', {
                params: {
                    size: 5,
                    status: 'A'
                }
            }).then(res => {
                if (res.code == 0) {
                    this.noticeList = (res.data && res.data.records || [])
                    console.log('this.noticeList', this.noticeList)
                    if (this.noticeList.length > 0) {
                        this.currentNotice = this.noticeList[0]
                        if (this.currentNotice.title && this.currentNotice.title.length >= 30) {
                            this.scrollable = true
                        } else {
                            this.scrollable = false
                        }
                        let that = this
                        if (this.noticeList.length >= 1) {
                            setInterval(() => {
                                console.log('interval,1')
                                that.currentNoticeIndex += 1
                                that.currentNoticeIndex %= that.noticeList.length
                                that.currentNotice = that.noticeList[that.currentNoticeIndex]
                                that.scrollable = false
                                that.$nextTick(() => {
                                    if (that.currentNotice.title && that.currentNotice.title
                                        .length >= 30) {
                                        that.scrollable = true
                                    } else {
                                        that.scrollable = false
                                    }
                                })
                            }, 8000)
                        }
                    }
                }
            })
        },
        methods: {
            async toFlowManage() {
                if (!this.currentInfo.supplierDTO) {
                    await this.$message.confirm('尚未入住店铺信息,是否前往入住?')
                    this.goto('/sub_pages/supplier/supplier-info/supplier-info', true)
                    return
                }
                if (this.currentInfo.supplierDTO) {
                    if (this.currentInfo.supplierDTO.status == 'P') {
                    } else {
                        if (this.currentInfo.supplierDTO.status == 'R') {
                            await this.$message.confirm('店铺信息审核不通过,是否前往修改信息?')
                            this.goto('/sub_pages/supplier/supplier-info/supplier-info', true)
                            return
                        } else {
                            this.$message.showToast('审核中请耐心等待')
                            return
                        }
                    }
                }
                this.goto('/sub_pages/supplier/flower-manage/flower-manage', true)
            },
            getNoticeMore() {
                uni.navigateTo({
                    url: '/pages/notice/list?id=' + this.currentNotice.id
                })
            },
        }
    }
</script>
<style lang="scss" scoped>
    @import "../user/user.scss";
    @import "./home.scss";
</style>
<style lang="scss" scoped>
</style>
pages/login/login.scss
@@ -1,6 +1,6 @@
.login-container{
        min-height: 99vh;
        // background-image: url('@/static/images/farmer/login/bg.png');
        // background-image: url('@/static/images/supplier/login/bg.png');
        
        .nav-title{
            font-weight: 400;
pages/login/supplier-login.vue
文件名从 pages/login/farmer-login.vue 修改
@@ -1,8 +1,10 @@
<template>
    <view class="main-container login-container img100 relative" style="margin-top: 0rpx;">
        <!-- background-image:url('@/static/images/farmer/login/bg.png') -->
        <!-- background-image:url('@/static/images/supplier/login/bg.png') -->
        <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png" mode="scaleToFill" />
        <image class="component-bg"
            src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png"
            mode="scaleToFill" />
        <view class="t-login top-bg">
            <view class="nav-title">登录</view>
            <view class="login">
@@ -18,12 +20,12 @@
                        <input type="text" :password="true" name="password" placeholder="请输入密码" v-model="password" />
                    </view>
                    <view class="t-a input" v-if="loginType=='code'">
                        <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" />
                        <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
                            {{getCodeText}}
                        </view>
                        <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" />
                    </view>
@@ -49,6 +51,17 @@
    // import gzmzApi from '@/api/gzmzApi.js'
    // import myCache from '@/utils/myCache.js'
    export default {
        props: {
            // apitype: 'loginSupplier',
            apitype: {
                type:String,
                default(){
                    return 'loginSupplier'
                    // return 'loginPartner'
                }
            },
        },
        data() {
            return {
                openId: '-1',
@@ -70,32 +83,44 @@
            };
        },
        methods: {
            getCode() {
            async getCode() {
                uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
                if (this.getCodeisWaiting) {
                    return;
                }
                if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { //校验手机号码是否有误
                    uni.showToast({
                        title: '请填写正确手机号码',
                        icon: "none"
                    });
                    this.$message.showToast('请填写正确手机号码')
                    return false;
                }
                this.getCodeText = "发送中..." //发送验证码
                this.getCodeisWaiting = true;
                this.getCodeBtnColor = "rgba(255,255,255,0.5)" //追加样式,修改颜色
                this.getCodeBtnColor = "#000" //追加样式,修改颜色
                //示例用定时器模拟请求效果
                //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
                setTimeout(() => {
                const {
                    code
                } = await this.$http.request('post', '/api/sms/send/code', {
                    data: {
                        tel: this.phoneNumber,
                        userType: 'supplier'
                    }
                })
                if (code == 0) {
                    uni.showToast({
                        title: '验证码已发送',
                        icon: "none"
                    }); //弹出提示框
                    //示例默认1234,生产中请删除这一句。
                    // this.code = '1234'; //发送验证码,进行填入
                    });
                    this.setTimer(); //调用定时器方法
                }, 1000)
                }
                // setTimeout(() => {
                //     uni.showToast({
                //         title: '验证码已发送',
                //         icon: "none"
                //     }); //弹出提示框
                //     //示例默认1234,生产中请删除这一句。
                //     // this.code = '1234'; //发送验证码,进行填入
                //     this.setTimer(); //调用定时器方法
                // }, 1000)
            },
            //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
            setTimer() {
@@ -120,7 +145,7 @@
                //     url: '/pages/index/index'
                // })
                uni.redirectTo({
                    url: '/sub_pages/farmer/farmer-reg/farmer-reg'
                    url: '/sub_pages/supplier/supplier-reg/supplier-reg'
                })
            },
@@ -132,19 +157,37 @@
                    title: '登陆中'
                });
                var that = this;
                if (!that.userName) {
                    uni.showToast({
                        title: '请输入用户名',
                        icon: 'none'
                    });
                    return;
                if (this.loginType == 'pwd') {
                    if (!that.userName) {
                        uni.showToast({
                            title: '请输入用户名',
                            icon: 'none'
                        });
                        return;
                    }
                    if (!that.password) {
                        uni.showToast({
                            title: '请输入密码',
                            icon: 'none'
                        });
                        return;
                    }
                }
                if (!that.password) {
                    uni.showToast({
                        title: '请输入密码',
                        icon: 'none'
                    });
                    return;
                if (this.loginType == 'code') {
                    if (!that.tel) {
                        uni.showToast({
                            title: '请输入手机号',
                            icon: 'none'
                        });
                        return;
                    }
                    if (!that.smsCode) {
                        uni.showToast({
                            title: '请输入手机验证码',
                            icon: 'none'
                        });
                        return;
                    }
                }
                // if (this.pcfvalue == undefined) {
                //     util.showMyToast('必须勾选《用户服务协议》及《隐私政策》');
@@ -153,12 +196,14 @@
                let post = {
                    username: this.userName,
                    password: this.password,
                    tel: this.phoneNumber,
                    smsCode: this.smsCode
                    // openId: '123456789'
                }
                // const {
                // code
                // } = await this.$http.request('get', '/api/login/admin')
                const resp = await this.$store.dispatch('loginSupplier', post);
                const resp = await this.$store.dispatch(this.apitype, post);
                // uni.hideLoading()
                if (resp.code == 0) {
pages/notice/list.vue
@@ -6,7 +6,7 @@
            <view v-for="(item,index) in list" :key="index" class="m-b-24">
                <view @click.stop="toDetail(item)" class="notice-item">
                    <view>{{item.title}}</view>
                    <view class="time">{{item.updatedDate}}</view>
                    <view class="time">{{item.publishDate}}</view>
                </view>
            </view>
        </view>
pages/user/supplier-user.vue
文件名从 pages/user/farmer-user.vue 修改
@@ -5,7 +5,9 @@
        </view> -->
        <!-- 背景图 -->
        <view class="top-bg img100 relative" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }">
            <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png" mode="scaleToFill" />
            <image class="component-bg"
                src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png"
                mode="scaleToFill" />
            <view class="title" style="position: relative;">
                我的
@@ -18,20 +20,25 @@
                <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image>
                <view class="name">
                    <view class="t1">{{currentInfo.nickName || '-'}}</view>
                    <view class="t1">{{currentInfo.nickName || currentInfo.loginName || '-'}}<span
                            v-if="currentInfo.supplierDTO&&currentInfo.supplierDTO.status!=='P'">
                            ({{currentInfo.supplierDTO?currentInfo.supplierDTO.statusStr:''}})</span>
                    </view>
                    <view class="t2">{{currentInfo.tel || '暂无电话'}}</view>
                </view>
                <image class="icon-setting" src="../../static/common/icon-setting.png" mode="aspectFit"></image>
            </view>
        </view>
        <view class="user-utils m-20">
            <view class="user-util m-b-5 flex" @click="goto('/pages/user/user-info/user-info',true)">
            <view class="user-util m-t-12 flex" @click="goto('/pages/user/user-info/user-info',true)">
                <view class="title">个人信息</view>
                <view class="right-icon">
                    <uni-icons type="right"></uni-icons>
                </view>
            </view>
            <view class="user-util m-t-12 flex" @click="goto('/sub_pages/farmer/farmer-info/farmer-info',true)">
            <view class="user-util m-t-12 flex" v-if="selftype==='supplier'"
                @click="goto('/sub_pages/supplier/supplier-info/supplier-info',true)">
                <view class="title">店铺信息</view>
                <view class="right-icon">
                    <uni-icons type="right"></uni-icons>
@@ -43,15 +50,23 @@
                    <uni-icons type="right"></uni-icons>
                </view>
            </view>
            <view class="user-util m-t-12 " @click="callTel">
            <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='supplier'">
                <view class="title">我的客服</view>
                <view class="flex">
                    <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image>
                    <view class="name">
                        客服电话: <span class="topic-gray">{{tel}}</span>
                        客服电话 :  &nbsp;&nbsp; <span class="topic-gray">{{tel}}</span>
                    </view>
                </view>
            </view>
<!--             <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='partner'">
                <view class="name">
                    账号: <span class="topic-gray">{{tel}}</span>
                </view>
                <view class="name">
                    密码: <span class="topic-gray">{{tel}}</span>
                </view>
            </view> -->
        </view>
@@ -61,7 +76,7 @@
        <view style="padding-bottom:200rpx">
        </view>
        <farmer-footer flg="1"></farmer-footer>
        <supplier-footer flg="1"></supplier-footer>
    </view>
@@ -87,6 +102,10 @@
        created() {
        },
        async onPullDownRefresh() {
            await this.$store.dispatch('getCurrentInfo')
            uni.stopPullDownRefresh()
        },
        methods: {
            async clearlogout() {
@@ -94,7 +113,7 @@
                this.$store.commit('updateLogin', false)
                uni.reLaunch({
                    url: '/pages/login/farmer-login'
                    url: '/pages/login/supplier-login'
                })
            },
            async callTel() {
pages/user/user.scss
@@ -7,7 +7,7 @@
    .top-bg{
    
        padding: 32rpx;
        // background-image: url('../../static/images/farmer/user/bg.png');
        // background-image: url('../../static/images/supplier/user/bg.png');
        height: 438rpx;
        max-height: 438rpx;
@@ -60,6 +60,7 @@
        // background: #FFFFFF;
        border-radius: 16rpx;
        // line-height:  116rpx;
        position: relative;
        .name{
            font-weight: 600;
            font-size: 32rpx;
@@ -74,6 +75,13 @@
            margin-right: 30rpx;
            border-radius: 50%;
        }
        .icon-setting{
            position: absolute;
            right: 0rpx;
            top: -30rpx;
            height: 54rpx;
            width: 54rpx;
        }
    
    }
    .order-info{
static/common/icon-setting.png
static/images/partner/user/user-icon-ddgl.png
static/images/partner/user/user-icon-jjpz.png
static/images/supplier/flower/flower-mange-icon-add-flower.png

static/images/supplier/flower/flower-mange-icon-flower-delete.png

static/images/supplier/flower/flower-mange-icon-flower-in.png

static/images/supplier/flower/flower-mange-icon-flower-inpass.png

static/images/supplier/flower/flower-mange-icon-flower-unpass.png

static/images/supplier/user/user-icon-kkjl.png

static/images/supplier/user/user-icon-shlp.png

static/images/supplier/user/user-icon-spgl.png

static/images/supplier/user/user-icon-zdjs.png

static/imgs/footer/footer-home-0.png

static/imgs/footer/footer-home-1.png

static/imgs/footer/footer-self-0.png

static/imgs/footer/footer-self-1.png

static/imgs/home/home-icon-notice.png

store/index.js
@@ -231,7 +231,7 @@
                            state.isBind = true
                            storage.setItem("token", resp.data.access_token || "")
                            state.hasLogin = true
                            if(inviter){
                            if (inviter) {
                                storage.removeItem('inviter');
                                storage.removeItem('inviterTime');
                                storage.removeItem('inviterName');
@@ -245,18 +245,47 @@
                        }
                        return resp
                    },
                    loginSupplier: async function({
                    regSupplier: async function({
                        commit,
                        dispatch,
                        state
                    }, data) {
                        {
                            const resp = await http.request('post', '/api/login/supplier'+(data.phoneNumber?'/phone':''), {
                            const resp = await http.request('post', '/api/register/supplier', {
                                data: {
                                    username: data.username,
                                    password: data.password,
                                    tel:data.phoneNumber,
                                    smsCode:data.smsCode || ''
                                    tel: data.phoneNumber || data.tel,
                                    smsCode: data.smsCode || ''
                                },
                                params: {
                                    clientType: data.clientType || 'app'
                                }
                            })
                            console.log('resp', resp)
                            if (resp && resp.code == 0) {
                            } else {
                            }
                            return resp
                        }
                    },
                    loginPartner: async function({
                        commit,
                        dispatch,
                        state
                    }, data) {
                        {
                            const resp = await http.request('post', '/api/login/partner' + (data
                                .phoneNumber ? '/phone' : ''), {
                                data: {
                                    username: data.username,
                                    password: data.password,
                                    tel: data.phoneNumber || data.tel,
                                    smsCode: data.smsCode || ''
                                },
                                params: {
                                    clientType: data.clientType || 'app'
@@ -270,7 +299,7 @@
                                storage.setItem('token', resp.data.access_token)
                                commit("updateLogin", true)
                                await dispatch('getCurrentInfo')
                                console.log('login,reLaunch')
                                // #ifdef APP
                                var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
@@ -294,7 +323,67 @@
                                //     url: '/views/app/app-home/app-home'
                                // })
                                uni.reLaunch({
                                    url: '/pages/home/farmer-home'
                                    url: '/pages/home/supplier-home'
                                })
                            } else {
                                // this.$message.showToast('登录失败')
                            }
                            return resp
                        }
                    },
                    loginSupplier: async function({
                        commit,
                        dispatch,
                        state
                    }, data) {
                        {
                            const resp = await http.request('post', '/api/login/supplier' + (data
                                .phoneNumber ? '/phone' : ''), {
                                data: {
                                    username: data.username,
                                    password: data.password,
                                    tel: data.phoneNumber || data.tel,
                                    smsCode: data.smsCode || ''
                                },
                                params: {
                                    clientType: data.clientType || 'app'
                                }
                            })
                            console.log('resp', resp)
                            if (resp && resp.code == 0) {
                                // await getCurrentInfo()
                                // // this.$message.showToast('登录成功')
                                // console.log(resp)
                                storage.setItem('token', resp.data.access_token)
                                commit("updateLogin", true)
                                await dispatch('getCurrentInfo')
                                console.log('login,reLaunch')
                                // #ifdef APP
                                var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件
                                KeepAliveModule && KeepAliveModule.startLocation({
                                    intervalTime: 5000, //定位间隔时间
                                    gaodeApiKey: "0eef1axxxxxx7964", //高德地图Key,已停用,引入插件配置
                                    locationMode: 1, //定位模式
                                    purpose: 0, //定位场景
                                    ifUpload: true, //是否上报服务器
                                    uploadUrl: "http://bio51-api.fixbug.fun/api/current/employee/location", //上报接口
                                    params: "{'lat':'1','lng':'3'}", //其他参数
                                    headers: "{'authorization1':'Bearer xOHeJhg'}",
                                }, function(res) {
                                    console.log("启用结果:", res);
                                    let ret = KeepAliveModule.getCurrentLocation();
                                    console.log("启用结果2:", ret);
                                });
                                // #endif
                                // uni.redirectTo({
                                //     url: '/views/app/app-home/app-home'
                                // })
                                uni.reLaunch({
                                    url: '/pages/home/supplier-home'
                                })
                            } else {
                                // this.$message.showToast('登录失败')
sub_pages/partner/markup-config/markup-config.vue
对比新文件
@@ -0,0 +1,22 @@
<template>
    <view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
            }
        },
        methods: {
        }
    }
</script>
<style>
</style>
sub_pages/partner/order-manage/order-manage.vue
copy from sub_pages/farmer/order-settlement/order-settlement.vue copy to sub_pages/partner/order-manage/order-manage.vue
文件从 sub_pages/farmer/order-settlement/order-settlement.vue 复制
@@ -1,8 +1,8 @@
<template>
    <view class="list-container order-settlement farmer">
    <view class="list-container order-settlement supplier">
        <view class="component-tab-container m-t-12">
            <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view>
            <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view>
            <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">带配送</view>
            <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">已配送</view>
        </view>
        
        <view class="p15" style="min-height: calc(100vh - 160rpx);">
@@ -10,53 +10,12 @@
            <view v-for="(item,index) in list" :key="index" class="m-b-24 order-settlement-list list-container">
                <view class="order-settlement-item list-item">
                    <view class="title flex">
                        <image class="icon-date m-r-6 m-t-2" src="@/static/common/icon-date.png"></image>
                        <view>{{item.title}}</view>
                        <view>
                            订单:27799880327543
                        </view>
                        <view class="status m-l-a m-r-0">已结算</view>
                    </view>
                    <view class="line"></view>
                    <view class="form">
                        <view class="form-item">
                            <view class="label">均价</view>
                            <view class="value">¥32.00</view>
                        </view>
                        <view class="form-item">
                            <view class="label">买家</view>
                            <view class="value">1位</view>
                        </view>
                        <view class="form-item">
                            <view class="label">数量</view>
                            <view class="value red">1扎</view>
                        </view>
                        <view class="form-item">
                            <view class="label">商家赔付</view>
                            <view class="value red">1</view>
                        </view>
                        <view class="form-item">
                            <view class="label">服务费</view>
                            <view class="value">¥32.00</view>
                        </view>
                        <view class="form-item">
                            <view class="label">理赔</view>
                            <view class="value">¥32.00</view>
                        </view>
                        <view class="form-item">
                            <view class="label">运费</view>
                            <view class="value">¥32.00</view>
                        </view>
                    </view>
                    <view class="line"></view>
                    <view class="flex">
                        <view class="flex1 tj">
                            <view class="label">交易合计:</view>
                            <view class="value">¥32.00</view>
                        </view>
                        <view class="flex1 tj text-right">
                            <view class="label">结算金额:</view>
                            <view class="value">¥32.00</view>
                        </view>
                    </view>
                    <view class="button-green-1">确认配送完成</view>
                </view>
            </view>
        </view>
sub_pages/supplier/flower-manage/flower-add.vue
文件名从 sub_pages/farmer/flower-manage/flower-add.vue 修改
@@ -3,29 +3,38 @@
        <view>
            <view class="form-item">
                <view class="label required">商品分类</view>
                <view class="m-l-a m-r-0 flex " :class="[!dto.category?'desc-gray':'']" @click="()=>{
                <!--                 <view class="m-l-a m-r-0 flex " :class="[!dto.category?'desc-gray':'']" @click="()=>{
                    // show_select_category=true
                    $refs.picker_category.showPicker()
                }">
                    <view>{{dto.categoryStr||dto.category || '请选择'}}</view>
                    <u-icon class="m-l-a" name="arrow-right"></u-icon>
                </view> -->
                <view class="m-l-a m-r-0 flex " :class="[!dto['category']?'desc-gray':'']">
                    <uni-data-picker @change="(e)=>{PickCategory(dto,e)}" placeholder="" @search="updateSearch"
                        :localdata="columns_categorys_picker">
                        {{dto.categoryStr||dto.category || '请选择'}}
                    </uni-data-picker>
                    <u-icon class="m-l-a" name="arrow-right"></u-icon>
                </view>
            </view>
            <view class="form-item before-line">
                <view class="label required">商品名称</view>
                <view class="m-l-a m-r-0 flex">
                    <input v-model="dto.name" placeholder="请输入商品名称" style="margin-top: 16px;text-align: right;"></input>
                    <input v-model="dto.name" placeholder="请选择分类" disabled
                        style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <view class="form-item before-line">
                <view class="label required">商品单位</view>
                <view class="m-l-a m-r-0 flex">
                    <input v-model="dto.unit" placeholder="请输入商品单位" style="margin-top: 16px;text-align: right;"></input>
                    <input v-model="dto.unit" placeholder="请选择分类" disabled
                        style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <view class="form-item before-line">
                <view class="label required">商品颜色</view>
                <!--     <view class="m-l-a m-r-0 flex " :class="[!dto.color?'desc-gray':'']" @click="()=>{
@@ -35,7 +44,7 @@
                    <u-icon class="m-l-a" name="arrow-right"></u-icon>
                </view> -->
                <view class="m-l-a m-r-0 flex">
                    <input v-model="dto.color" placeholder="请输入商品颜色"
                    <input v-model="dto.color" placeholder="请选择分类" disabled
                        style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
@@ -202,8 +211,8 @@
                id: '',
                dto: {
                    id: '',
                    name: '',
                    category: '',
                    name: '',
                    unit: '',
                    color: '',
                    cover: '',
@@ -217,6 +226,9 @@
                show_select_category: false,
                show_select_level: false,
                columns_categorys: [],
                columns_categorys_picker: [],
                columns_categorys_dict: {},
                columns_categorys_search: '',
                columns_levels: [],
                //     columns_params: [], //弹窗选择具体的值
                // cancel: {
@@ -232,13 +244,16 @@
                // ]
            }
        },
        async onLoad(options) {
            //tree
            this.$http.request('get', '/api/flower/category/tree', {}).then(res => {
                var data = res.data
                this.columns_categorys = data || []
                console.log('columns_categorys', this.columns_categorys)
                // console.log('columns_categorys', this.columns_categorys)
                //递归mao
                this.mapCategoryTree(this.columns_categorys_picker, this.columns_categorys)
                // console.log('columns_categorys_picker', this.columns_categorys_picker)
                // this.columns_categorys = [data || []]
                // this.columns_categorys[0].unshift({
                //     label: '全部',
@@ -288,6 +303,79 @@
        },
        methods: {
            async updateSearch(search) {
                this.columns_categorys_search = search || ''
                this.columns_categorys_picker = []
                this.mapCategoryTree(this.columns_categorys_picker, this.columns_categorys)
                console.log('change updateSearch', search, this.columns_categorys_picker)
            },
            async PickCategory(item, e) {
                console.log('PickCategory', item, e)
                if (e.detail.value) {
                    if (this.dto.category) {
                        await this.$message.confirm('修改分类将清空商品参数,确定修改吗')
                    } {
                        var currentnode = this.columns_categorys_dict['@' + e.detail.value[e.detail.value.length - 1]
                            .value]
                        // console.log('currentnode',currentnode,this.columns_categorys_dict,'@'+e.detail.value[e.detail.value.length - 1].value)
                        this.dto.categoryStr = currentnode.name
                        this.dto.category = currentnode.id
                        this.dto.name = currentnode.name
                        this.dto.unit = currentnode.unit
                        this.dto.color = currentnode.color
                        //递归获取category的其他数据,用来做map?
                        this.$message.showLoading()
                        await this.refresh_category()
                        this.$message.hideLoading()
                    }
                }
            },
            mapCategoryTree(node, arr) {
                var has = true
                if (arr) {
                    var hasTrue = false
                    if(!this.columns_categorys_search){
                        hasTrue = true
                    }
                    for (var item of arr) {
                        has = true
                        if (this.columns_categorys_search) {
                            has = false
                        }
                        var tmp = {
                            ...item,
                            name: item.name,
                            text: item.name,
                            label: item.name,
                            value: item.id,
                            children: undefined
                        }
                        if (item.name == this.columns_categorys_search) {
                            has = true
                        }
                        this.columns_categorys_dict['@' + item.id] = item
                        if (item.children && item.children.length > 0) {
                            tmp.children = []
                            var childrenhas = this.mapCategoryTree(tmp.children, item.children)
                            if (childrenhas) {
                                has = true
                                hasTrue = true
                            }
                        } else {
                            tmp.children = undefined
                        }
                        if (hasTrue || has) {
                            console.log('has ',tmp)
                            node.push(tmp)
                        } else {
                            console.log('not has ',tmp)
                        }
                    }
                }
                return hasTrue
            },
            async confirmPickerCategory(picker) {
                console.log('confirmPickerCategory', picker)
                var id = picker.value
@@ -298,6 +386,10 @@
                    }
                    this.dto.categoryStr = name
                    this.dto.category = id
                    // name: '',
                    // unit: '',
                    // color: '',
                    //递归获取category的其他数据,用来做map?
                    this.$message.showLoading()
                    await this.refresh_category()
                    this.$message.hideLoading()
sub_pages/supplier/flower-manage/flower-manage.vue
文件名从 sub_pages/farmer/flower-manage/flower-manage.vue 修改
@@ -255,23 +255,23 @@
            },
            toDetail(item) {
                uni.navigateTo({
                    url: '/sub_pages/farmer/flower-manage/flower-add?id=' + item.id
                    url: '/sub_pages/supplier/flower-manage/flower-add?id=' + item.id
                })
            },
            toDetailAdd(item) {
                uni.navigateTo({
                    url: '/sub_pages/farmer/flower-manage/flower-add?copyId=' + item.id
                    url: '/sub_pages/supplier/flower-manage/flower-add?copyId=' + item.id
                })
            },
            clickButton(type) {
                if (type == 'add') {
                    //添加页面
                    uni.navigateTo({
                        url: '/sub_pages/farmer/flower-manage/flower-add'
                        url: '/sub_pages/supplier/flower-manage/flower-add'
                    })
                } else {
                    uni.navigateTo({
                        url: '/sub_pages/farmer/flower-manage/flower-manage?type=' + type
                        url: '/sub_pages/supplier/flower-manage/flower-manage?type=' + type
                    })
                }
            },
@@ -393,27 +393,27 @@
            }
            .button-add {
                background-image: url('@/static/images/farmer/flower/flower-mange-icon-add-flower.png');
                background-image: url('@/static/images/supplier/flower/flower-mange-icon-add-flower.png');
            }
            .button-search-in {
                background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-in.png');
                background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-in.png');
            }
            .button-search-unpass {
                background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-unpass.png');
                background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-unpass.png');
            }
            .button-search-inpass {
                background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-inpass.png');
                background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-inpass.png');
            }
            .button-search-delete {
                background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-delete.png');
                background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-delete.png');
            }
        }
sub_pages/supplier/order-records/order-records.vue
sub_pages/supplier/order-sale/order-sale.vue
文件名从 sub_pages/farmer/order-sale/order-sale.vue 修改
@@ -1,5 +1,5 @@
<template>
    <view class="list-container order-sale farmer">
    <view class="list-container order-sale supplier">
        <view class="component-tab-container m-t-12">
            <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view>
            <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view>
sub_pages/supplier/order-settlement/order-settlement.vue
文件名从 sub_pages/farmer/order-settlement/order-settlement.vue 修改
@@ -1,5 +1,5 @@
<template>
    <view class="list-container order-settlement farmer">
    <view class="list-container order-settlement supplier">
        <view class="component-tab-container m-t-12">
            <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view>
            <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view>
sub_pages/supplier/protocol.vue
对比新文件
@@ -0,0 +1,22 @@
<template>
    <view>
        入住协议todo
    </view>
</template>
<script>
    export default {
        data() {
            return {
            }
        },
        methods: {
        }
    }
</script>
<style>
</style>
sub_pages/supplier/supplier-info/supplier-info.vue
文件名从 sub_pages/farmer/farmer-info/farmer-info.vue 修改
@@ -283,14 +283,29 @@
        methods: {
            PickArea(item, e) {
                // console.log('PickArea', item, e)
                console.log('PickArea', item, e)
                if (e.detail.value) {
                    if (!!e.detail.value[0])
                        this.dto.province = e.detail.value[0].value
                    if (!!e.detail.value[1])
                        this.dto.city = e.detail.value[1].value
                    if (!!e.detail.value[2])
                        this.dto.region = e.detail.value[2].value
                    this.dto.province = ''
                    this.dto.city = ''
                    this.dto.region = ''
                    if(e.detail.value.length<=3){
                        if (!!e.detail.value[0])
                            this.dto.province = e.detail.value[0].value
                        if (!!e.detail.value[1])
                            this.dto.city = e.detail.value[1].value
                        if (!!e.detail.value[2])
                            this.dto.region = e.detail.value[2].value
                    }else{
                        //说明有重复的
                        var plusnum = e.detail.value.length - 3
                        if (!!e.detail.value[plusnum+0])
                            this.dto.province = e.detail.value[plusnum+0].value
                        if (!!e.detail.value[plusnum+1])
                            this.dto.city = e.detail.value[plusnum+1].value
                        if (!!e.detail.value[plusnum+2])
                            this.dto.region = e.detail.value[plusnum+2].value
                    }
                    this.$forceUpdate()
                }
@@ -312,6 +327,8 @@
                // console.log('area', JSON.parse(res.data))
                this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll('name',
                    'text')) || []
                console.log('area', this.regionDataPlus)
            },
@@ -339,20 +356,20 @@
                    }
                    if (!this.dto.pictures) {
                        this.dto.pictures = []
                    }else if(typeof this.dto.pictures == 'string'){
                    } else if (typeof this.dto.pictures == 'string') {
                        this.dto.pictures = JSON.parse(this.dto.pictures)
                    }
                    if (!this.dto.idCards) {
                        this.dto.idCards = []
                    }else if(typeof this.dto.idCards == 'string'){
                    } else if (typeof this.dto.idCards == 'string') {
                        this.dto.idCards = JSON.parse(this.dto.idCards)
                    }
                    // if (this.dto.idCards.length > 0) {
                    //     this.dto.idcardType = '身份证'
                    // }
                    if (this.dto.idcardType == '1') {
                        this.dto.idcardType = '身份证'
                    }
                    this.dto.userId = this.currentInfo.id
                }
                this.$message.hideLoading()
@@ -370,15 +387,15 @@
                    }
                    if (!this.dto.pictures) {
                        this.dto.pictures = []
                    }else if(typeof this.dto.pictures == 'string'){
                    } else if (typeof this.dto.pictures == 'string') {
                        this.dto.pictures = JSON.parse(this.dto.pictures)
                    }
                    if (!this.dto.idCards) {
                        this.dto.idCards = []
                    }else if(typeof this.dto.idCards == 'string'){
                    } else if (typeof this.dto.idCards == 'string') {
                        this.dto.idCards = JSON.parse(this.dto.idCards)
                    }
                    if (this.dto.idCards.length > 0) {
                    if (this.dto.idcardType == '1') {
                        this.dto.idcardType = '身份证'
                    }
                }
@@ -393,6 +410,7 @@
                var dto = {
                    ...this.dto,
                    idcardType: this.dto.idcardType === '身份证' ? "1" : '2'
                }
                this.$message.showLoading()
                const re = await this.$http.request('post', '/api/supplier/addOrUpdate', {
@@ -403,6 +421,7 @@
                    this.$message.showToast('操作成功')
                    //需要标记加一下
                    this.$store.dispatch('sign_add', 'application');
                    this.$store.dispatch('getCurrentInfo')
                    this.backpage()
                }
sub_pages/supplier/supplier-reg/supplier-reg.vue
文件名从 sub_pages/farmer/farmer-reg/farmer-reg.vue 修改
@@ -1,7 +1,9 @@
<template>
    <view class="main-container login-container img100 relative" style="margin-top: 0rpx;">
        <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png" mode="scaleToFill" />
        <image class="component-bg"
            src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png"
            mode="scaleToFill" />
        <view class="t-login top-bg">
            <view class="nav-title">注册</view>
@@ -9,17 +11,17 @@
                <form class="cl">
                    <view class="t-a titles-top">
                        <view class="title-1">HELLO</view>
                        <view class="title-2">欢迎注册<span class="title-3">花满芜</span></view>
                        <view class="title-2">欢迎入住<span class="title-3">花满芜</span></view>
                    </view>
                    <view class="t-a input" v-if="loginType=='code'">
                        <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" />
                        <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
                            {{getCodeText}}
                        </view>
                        <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" />
                    </view>
@@ -33,6 +35,14 @@
                    <view class="flex">
                        <view class="topic-font m-l-a m-r-0" @click="toLogin">前往登录</view>
                    </view>
                    <view class="flex flex-wrap-normal" style="position: fixed;bottom: 40rpx;left: 40rpx;right: 40rpx;">
                        <view :style="{'margin-top': '8rpx','margin-right': '12rpx','font-size':'24rpx'}"
                        @click="protocal=!protocal"
                         class="component-radio" :class="[protocal?'cur':'']">
                        </view>
                        <view class="topic-gray" @click="toProtocol">请仔细阅读《花满芜合伙人供应商入口小程序隐私保护指引》如您同意该指引,请勾选开始使用本小程序</view>
                    </view>
                </form>
            </view>
@@ -60,11 +70,17 @@
                getCodeText: '获取验证码',
                getCodeBtnColor: "#20613D",
                getCodeisWaiting: false,
                Timer: undefined
                Timer: undefined,
                protocal:false
            };
        },
        methods: {
            getCode() {
            toProtocol(){
                uni.navigateTo({
                    url:'/sub_pages/supplier/protocol'
                })
            },
            async getCode() {
                uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
                if (this.getCodeisWaiting) {
                    return;
@@ -78,18 +94,30 @@
                }
                this.getCodeText = "发送中..." //发送验证码
                this.getCodeisWaiting = true;
                this.getCodeBtnColor = "rgba(255,255,255,0.5)" //追加样式,修改颜色
                this.getCodeBtnColor = "#000" //追加样式,修改颜色
                //示例用定时器模拟请求效果
                //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
                setTimeout(() => {
                const {
                    code
                } = await this.$http.request('post', '/api/sms/send/code', {
                    data: {
                        tel: this.phoneNumber,
                        userType: 'supplier'
                    }
                })
                if (code == 0) {
                    uni.showToast({
                        title: '验证码已发送',
                        icon: "none"
                    }); //弹出提示框
                    //示例默认1234,生产中请删除这一句。
                    // this.code = '1234'; //发送验证码,进行填入
                    });
                    this.setTimer(); //调用定时器方法
                }, 1000)
                }
                // setTimeout(() => {
                //     //弹出提示框
                //     //示例默认1234,生产中请删除这一句。
                //     // this.code = '1234'; //发送验证码,进行填入
                // }, 1000)
            },
            //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
            setTimer() {
@@ -111,7 +139,7 @@
            },
            toLogin() {
                uni.redirectTo({
                    url: '/pages/login/farmer-login'
                    url: '/pages/login/supplier-login'
                })
            },
@@ -123,9 +151,16 @@
                    title: '登陆中'
                });
                var that = this;
                if (!that.userName) {
                if (!that.phoneNumber) {
                    uni.showToast({
                        title: '请输入用户名',
                        title: '请输入手机号',
                        icon: 'none'
                    });
                    return;
                }
                if (!that.smsCode) {
                    uni.showToast({
                        title: '请输入手机验证码',
                        icon: 'none'
                    });
                    return;
@@ -142,14 +177,15 @@
                //     return;
                // }
                let post = {
                    username: this.userName,
                    tel: this.phoneNumber,
                    smsCode: this.smsCode,
                    password: this.password,
                    // openId: '123456789'
                }
                // const {
                // code
                // } = await this.$http.request('get', '/api/login/admin')
                const resp = await this.$store.dispatch('loginSupplier', post);
                const resp = await this.$store.dispatch('regSupplier', post);
                // uni.hideLoading()
                if (resp.code == 0) {
@@ -159,9 +195,13 @@
                    // if (userRes.status) {
                    //     myCache.cache("userInfo", JSON.stringify(userRes.data))
                    // }
                    // setTimeout(() => {
                    //     uni.navigateBack();
                    // }, 1000);
                    uni.showToast({
                        title: '注册成功!',
                        icon: 'none'
                    });
                    setTimeout(() => {
                        this.toLogin()
                    }, 1000);
                } else {
                    uni.showToast({
uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue
@@ -1,551 +1,590 @@
<template>
  <view class="uni-data-tree">
    <view class="uni-data-tree-input" @click="handleInput">
      <slot :options="options" :data="inputSelected" :error="errorMessage">
        <view class="input-value" :class="{'input-value-border': border}">
          <text v-if="errorMessage" class="selected-area error-text">{{errorMessage}}</text>
          <view v-else-if="loading && !isOpened" class="selected-area">
            <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
          </view>
          <scroll-view v-else-if="inputSelected.length" class="selected-area" scroll-x="true">
            <view class="selected-list">
              <view class="selected-item" v-for="(item,index) in inputSelected" :key="index">
                <text class="text-color">{{item.text}}</text><text v-if="index<inputSelected.length-1"
                  class="input-split-line">{{split}}</text>
              </view>
            </view>
          </scroll-view>
          <text v-else class="selected-area placeholder">{{placeholder}}</text>
          <view v-if="clearIcon && !readonly && inputSelected.length" class="icon-clear" @click.stop="clear">
            <uni-icons type="clear" color="#c0c4cc" size="24"></uni-icons>
          </view>
          <view class="arrow-area" v-if="(!clearIcon || !inputSelected.length) && !readonly ">
            <view class="input-arrow"></view>
          </view>
        </view>
      </slot>
    </view>
    <view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
    <view class="uni-data-tree-dialog" v-if="isOpened">
      <view class="uni-popper__arrow"></view>
      <view class="dialog-caption">
        <view class="title-area">
          <text class="dialog-title">{{popupTitle}}</text>
        </view>
        <view class="dialog-close" @click="handleClose">
          <view class="dialog-close-plus" data-id="close"></view>
          <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
        </view>
      </view>
      <data-picker-view class="picker-view" ref="pickerView" v-model="dataValue" :localdata="localdata"
        :preload="preload" :collection="collection" :field="field" :orderby="orderby" :where="where"
        :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" :map="map"
        :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick">
      </data-picker-view>
    </view>
  </view>
    <view class="uni-data-tree">
        <view class="uni-data-tree-input" @click="handleInput">
            <slot :options="options" :data="inputSelected" :error="errorMessage">
                <view class="input-value" :class="{'input-value-border': border}">
                    <text v-if="errorMessage" class="selected-area error-text">{{errorMessage}}</text>
                    <view v-else-if="loading && !isOpened" class="selected-area">
                        <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
                    </view>
                    <scroll-view v-else-if="inputSelected.length" class="selected-area" scroll-x="true">
                        <view class="selected-list">
                            <view class="selected-item" v-for="(item,index) in inputSelected" :key="index">
                                <text class="text-color">{{item.text}}</text><text v-if="index<inputSelected.length-1"
                                    class="input-split-line">{{split}}</text>
                            </view>
                        </view>
                    </scroll-view>
                    <text v-else class="selected-area placeholder">{{placeholder}}</text>
                    <view v-if="clearIcon && !readonly && inputSelected.length" class="icon-clear" @click.stop="clear">
                        <uni-icons type="clear" color="#c0c4cc" size="24"></uni-icons>
                    </view>
                    <view class="arrow-area" v-if="(!clearIcon || !inputSelected.length) && !readonly ">
                        <view class="input-arrow"></view>
                    </view>
                </view>
            </slot>
        </view>
        <view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
        <view class="uni-data-tree-dialog" v-if="isOpened">
            <view class="uni-popper__arrow"></view>
            <view class="dialog-caption">
                <view class="title-area">
                    <text class="dialog-title">{{popupTitle}}</text>
                </view>
                <view class="dialog-close" @click="handleClose">
                    <view class="dialog-close-plus" data-id="close"></view>
                    <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
                </view>
            </view>
            <view v-if="false"
                style="margin-left:40rpx;margin-right:40rpx;; border-bottom:1px solid #eee;padding-bottom:20rpx;display:flex">
                <input v-model="search" style="height:60rpx;line-height:60rpx;color:#000" placeholder="请输入搜索内容"></input>
                <button @click="()=>{search='';updateSearch()}"
                    style="height:60rpx;line-height:60rpx;margin-left:auto;margin-right:0rpx">清空</button>
                <button @click="updateSearch"
                    style="height:60rpx;line-height:60rpx;margin-left:auto;margin-right:0rpx">搜索</button>
            </view>
            <data-picker-view class="picker-view" ref="pickerView" v-model="dataValue" :localdata="localdata"
                :preload="preload" :collection="collection" :field="field" :orderby="orderby" :where="where"
                :key="showpicker"
                :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true"
                :map="map" :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick">
            </data-picker-view>
        </view>
    </view>
</template>
<script>
  import dataPicker from "../uni-data-pickerview/uni-data-picker.js"
  import DataPickerView from "../uni-data-pickerview/uni-data-pickerview.vue"
    import dataPicker from "../uni-data-pickerview/uni-data-picker.js"
    import DataPickerView from "../uni-data-pickerview/uni-data-pickerview.vue"
  /**
   * DataPicker 级联选择
   * @description 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
   * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
   * @property {String} popup-title 弹出窗口标题
   * @property {Array} localdata 本地数据,参考
   * @property {Boolean} border = [true|false] 是否有边框
   * @property {Boolean} readonly = [true|false] 是否仅读
   * @property {Boolean} preload = [true|false] 是否预加载数据
   * @value true 开启预加载数据,点击弹出窗口后显示已加载数据
   * @value false 关闭预加载数据,点击弹出窗口后开始加载数据
   * @property {Boolean} step-searh = [true|false] 是否分布查询
   * @value true 启用分布查询,仅查询当前选中节点
   * @value false 关闭分布查询,一次查询出所有数据
   * @property {String|DBFieldString} self-field 分布查询当前字段名称
   * @property {String|DBFieldString} parent-field 分布查询父字段名称
   * @property {String|DBCollectionString} collection 表名
   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
   * @property {String} orderby 排序字段及正序倒叙设置
   * @property {String|JQLString} where 查询条件
   * @event {Function} popupshow 弹出的选择窗口打开时触发此事件
   * @event {Function} popuphide 弹出的选择窗口关闭时触发此事件
   */
  export default {
    name: 'UniDataPicker',
    emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue','inputclick'],
    mixins: [dataPicker],
    components: {
      DataPickerView
    },
    props: {
      options: {
        type: [Object, Array],
        default () {
          return {}
        }
      },
      popupTitle: {
        type: String,
        default: '请选择'
      },
      placeholder: {
        type: String,
        default: '请选择'
      },
      heightMobile: {
        type: String,
        default: ''
      },
      readonly: {
        type: Boolean,
        default: false
      },
      clearIcon: {
        type: Boolean,
        default: true
      },
      border: {
        type: Boolean,
        default: true
      },
      split: {
        type: String,
        default: '/'
      },
      ellipsis: {
        type: Boolean,
        default: true
      }
    },
    data() {
      return {
        isOpened: false,
        inputSelected: []
      }
    },
    created() {
      this.$nextTick(() => {
        this.load();
      })
    },
    watch: {
    /**
     * DataPicker 级联选择
     * @description 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
     * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
     * @property {String} popup-title 弹出窗口标题
     * @property {Array} localdata 本地数据,参考
     * @property {Boolean} border = [true|false] 是否有边框
     * @property {Boolean} readonly = [true|false] 是否仅读
     * @property {Boolean} preload = [true|false] 是否预加载数据
     * @value true 开启预加载数据,点击弹出窗口后显示已加载数据
     * @value false 关闭预加载数据,点击弹出窗口后开始加载数据
     * @property {Boolean} step-searh = [true|false] 是否分布查询
     * @value true 启用分布查询,仅查询当前选中节点
     * @value false 关闭分布查询,一次查询出所有数据
     * @property {String|DBFieldString} self-field 分布查询当前字段名称
     * @property {String|DBFieldString} parent-field 分布查询父字段名称
     * @property {String|DBCollectionString} collection 表名
     * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
     * @property {String} orderby 排序字段及正序倒叙设置
     * @property {String|JQLString} where 查询条件
     * @event {Function} popupshow 弹出的选择窗口打开时触发此事件
     * @event {Function} popuphide 弹出的选择窗口关闭时触发此事件
     */
    export default {
        name: 'UniDataPicker',
        emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue', 'inputclick'],
        mixins: [dataPicker],
        components: {
            DataPickerView
        },
        props: {
            options: {
                type: [Object, Array],
                default () {
                    return {}
                }
            },
            popupTitle: {
                type: String,
                default: '请选择'
            },
            placeholder: {
                type: String,
                default: '请选择'
            },
            heightMobile: {
                type: String,
                default: ''
            },
            readonly: {
                type: Boolean,
                default: false
            },
            clearIcon: {
                type: Boolean,
                default: true
            },
            border: {
                type: Boolean,
                default: true
            },
            split: {
                type: String,
                default: '/'
            },
            ellipsis: {
                type: Boolean,
                default: true
            }
        },
        data() {
            return {
                isOpened: false,
                inputSelected: [],
                search: '',
                showpicker:(new Date().getTime()),
            }
        },
        created() {
            this.$nextTick(() => {
                this.load();
            })
        },
        watch: {
            localdata: {
                handler() {
                    console.log('localdata update')
                    this.load()
                },
        deep: true
                deep: true
            },
    },
    methods: {
      clear() {
        this._dispatchEvent([]);
      },
      onPropsChange() {
        this._treeData = [];
        this.selectedIndex = 0;
            // search() {
            //     handler() {},
            // }
        },
        methods: {
            async updateSearch() {
                //todo 递归搜索下面的数据,,并标记为可展示的
                console.log('updateSearch',this.localdata)
                await this.$emit('search',this.search)
                // console.log('updateSearch',this.localdata)
                setTimeout(() => {
                    console.log('updateSearch2',this.localdata)
                    this.showpicker = new Date().getTime()
                    // this.load()
                    this.$refs.pickerView.updateData({
                        treeData: this.localdata,
                        selected: [],
                        selectedIndex: this.selectedIndex
                    })
                }, 200)
                // this.$nextTick(()=>{
                //     // this.showpicker = true
                //     this.showpicker = new Date().getTime()
                //     this._treeData = [];
                //     this.selectedIndex = 0;
                //     this.load();
                // })
            },
            clear() {
                this._dispatchEvent([]);
            },
            onPropsChange() {
                this._treeData = [];
                this.selectedIndex = 0;
        this.load();
      },
      load() {
        if (this.readonly) {
          this._processReadonly(this.localdata, this.dataValue);
          return;
        }
                this.load();
            },
            load() {
                if (this.readonly) {
                    this._processReadonly(this.localdata, this.dataValue);
                    return;
                }
        // 回显本地数据
        if (this.isLocalData) {
          this.loadData();
          this.inputSelected = this.selected.slice(0);
        } else if (this.isCloudDataList || this.isCloudDataTree) { // 回显 Cloud 数据
          this.loading = true;
          this.getCloudDataValue().then((res) => {
            this.loading = false;
            this.inputSelected = res;
          }).catch((err) => {
            this.loading = false;
            this.errorMessage = err;
          })
        }
      },
      show() {
        this.isOpened = true
        setTimeout(() => {
          this.$refs.pickerView.updateData({
            treeData: this._treeData,
            selected: this.selected,
            selectedIndex: this.selectedIndex
          })
        }, 200)
        this.$emit('popupopened')
      },
      hide() {
        this.isOpened = false
        this.$emit('popupclosed')
      },
      handleInput() {
        if (this.readonly) {
                // 回显本地数据
                if (this.isLocalData) {
                    this.loadData();
                    this.inputSelected = this.selected.slice(0);
                } else if (this.isCloudDataList || this.isCloudDataTree) { // 回显 Cloud 数据
                    this.loading = true;
                    this.getCloudDataValue().then((res) => {
                        this.loading = false;
                        this.inputSelected = res;
                    }).catch((err) => {
                        this.loading = false;
                        this.errorMessage = err;
                    })
                }
            },
            show() {
                this.isOpened = true
                setTimeout(() => {
                    this.$refs.pickerView.updateData({
                        treeData: this._treeData,
                        selected: this.selected,
                        selectedIndex: this.selectedIndex
                    })
                }, 200)
                this.$emit('popupopened')
            },
            hide() {
                this.isOpened = false
                this.$emit('popupclosed')
            },
            handleInput() {
                if (this.readonly) {
                    this.$emit('inputclick')
          return
        }
        this.show()
      },
      handleClose(e) {
        this.hide()
      },
      onnodeclick(e) {
        this.$emit('nodeclick', e)
      },
      ondatachange(e) {
        this._treeData = this.$refs.pickerView._treeData
      },
      onchange(e) {
        this.hide()
        this.$nextTick(() => {
          this.inputSelected = e;
        })
        this._dispatchEvent(e)
      },
      _processReadonly(dataList, value) {
        var isTree = dataList.findIndex((item) => {
          return item.children
        })
        if (isTree > -1) {
          let inputValue
          if (Array.isArray(value)) {
            inputValue = value[value.length - 1]
            if (typeof inputValue === 'object' && inputValue.value) {
              inputValue = inputValue.value
            }
          } else {
            inputValue = value
          }
          this.inputSelected = this._findNodePath(inputValue, this.localdata)
          return
        }
                    return
                }
                this.show()
            },
            handleClose(e) {
                this.hide()
            },
            onnodeclick(e) {
                this.$emit('nodeclick', e)
            },
            ondatachange(e) {
                this._treeData = this.$refs.pickerView._treeData
            },
            onchange(e) {
                this.hide()
                this.$nextTick(() => {
                    this.inputSelected = e;
                })
                this._dispatchEvent(e)
            },
            _processReadonly(dataList, value) {
                var isTree = dataList.findIndex((item) => {
                    return item.children
                })
                if (isTree > -1) {
                    let inputValue
                    if (Array.isArray(value)) {
                        inputValue = value[value.length - 1]
                        if (typeof inputValue === 'object' && inputValue.value) {
                            inputValue = inputValue.value
                        }
                    } else {
                        inputValue = value
                    }
                    this.inputSelected = this._findNodePath(inputValue, this.localdata)
                    return
                }
        if (!this.hasValue) {
          this.inputSelected = []
          return
        }
                if (!this.hasValue) {
                    this.inputSelected = []
                    return
                }
        let result = []
        for (let i = 0; i < value.length; i++) {
          var val = value[i]
          var item = dataList.find((v) => {
            return v.value == val
          })
          if (item) {
            result.push(item)
          }
        }
        if (result.length) {
          this.inputSelected = result
        }
      },
      _filterForArray(data, valueArray) {
        var result = []
        for (let i = 0; i < valueArray.length; i++) {
          var value = valueArray[i]
          var found = data.find((item) => {
            return item.value == value
          })
          if (found) {
            result.push(found)
          }
        }
        return result
      },
      _dispatchEvent(selected) {
        let item = {}
        if (selected.length) {
          var value = new Array(selected.length)
          for (var i = 0; i < selected.length; i++) {
            value[i] = selected[i].value
          }
          item = selected[selected.length - 1]
        } else {
          item.value = ''
        }
        if (this.formItem) {
          this.formItem.setValue(item.value)
        }
                let result = []
                for (let i = 0; i < value.length; i++) {
                    var val = value[i]
                    var item = dataList.find((v) => {
                        return v.value == val
                    })
                    if (item) {
                        result.push(item)
                    }
                }
                if (result.length) {
                    this.inputSelected = result
                }
            },
            _filterForArray(data, valueArray) {
                var result = []
                for (let i = 0; i < valueArray.length; i++) {
                    var value = valueArray[i]
                    var found = data.find((item) => {
                        return item.value == value
                    })
                    if (found) {
                        result.push(found)
                    }
                }
                return result
            },
            _dispatchEvent(selected) {
                let item = {}
                if (selected.length) {
                    var value = new Array(selected.length)
                    for (var i = 0; i < selected.length; i++) {
                        value[i] = selected[i].value
                    }
                    item = selected[selected.length - 1]
                } else {
                    item.value = ''
                }
                if (this.formItem) {
                    this.formItem.setValue(item.value)
                }
        this.$emit('input', item.value)
        this.$emit('update:modelValue', item.value)
        this.$emit('change', {
          detail: {
            value: selected
          }
        })
      }
    }
  }
                this.$emit('input', item.value)
                this.$emit('update:modelValue', item.value)
                this.$emit('change', {
                    detail: {
                        value: selected
                    }
                })
            }
        }
    }
</script>
<style>
  .uni-data-tree {
    flex: 1;
    position: relative;
    font-size: 14px;
  }
    .uni-data-tree {
        flex: 1;
        position: relative;
        font-size: 14px;
    }
  .error-text {
    color: #DD524D;
  }
    .error-text {
        color: #DD524D;
    }
  .input-value {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    font-size: 14px;
    /* line-height: 35px; */
    padding: 0 10px;
    padding-right: 5px;
    overflow: hidden;
    height: 35px;
    /* #ifndef APP-NVUE */
    box-sizing: border-box;
    /* #endif */
  }
    .input-value {
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        font-size: 14px;
        /* line-height: 35px; */
        padding: 0 10px;
        padding-right: 5px;
        overflow: hidden;
        height: 35px;
        /* #ifndef APP-NVUE */
        box-sizing: border-box;
        /* #endif */
    }
  .input-value-border {
    border: 1px solid #e5e5e5;
    border-radius: 5px;
  }
    .input-value-border {
        border: 1px solid #e5e5e5;
        border-radius: 5px;
    }
  .selected-area {
    flex: 1;
    overflow: hidden;
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
  }
    .selected-area {
        flex: 1;
        overflow: hidden;
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: row;
    }
  .load-more {
    /* #ifndef APP-NVUE */
    margin-right: auto;
    /* #endif */
    /* #ifdef APP-NVUE */
    width: 40px;
    /* #endif */
  }
    .load-more {
        /* #ifndef APP-NVUE */
        margin-right: auto;
        /* #endif */
        /* #ifdef APP-NVUE */
        width: 40px;
        /* #endif */
    }
  .selected-list {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
    flex-wrap: nowrap;
    /* padding: 0 5px; */
  }
    .selected-list {
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: row;
        flex-wrap: nowrap;
        /* padding: 0 5px; */
    }
  .selected-item {
    flex-direction: row;
    /* padding: 0 1px; */
    /* #ifndef APP-NVUE */
    white-space: nowrap;
    /* #endif */
  }
    .selected-item {
        flex-direction: row;
        /* padding: 0 1px; */
        /* #ifndef APP-NVUE */
        white-space: nowrap;
        /* #endif */
    }
  .text-color {
    color: #333;
  }
    .text-color {
        color: #333;
    }
  .placeholder {
    color: grey;
    font-size: 12px;
  }
    .placeholder {
        color: grey;
        font-size: 12px;
    }
  .input-split-line {
    opacity: .5;
  }
    .input-split-line {
        opacity: .5;
    }
  .arrow-area {
    position: relative;
    width: 20px;
    /* #ifndef APP-NVUE */
    margin-bottom: 5px;
    margin-left: auto;
    display: flex;
    /* #endif */
    justify-content: center;
    transform: rotate(-45deg);
    transform-origin: center;
  }
    .arrow-area {
        position: relative;
        width: 20px;
        /* #ifndef APP-NVUE */
        margin-bottom: 5px;
        margin-left: auto;
        display: flex;
        /* #endif */
        justify-content: center;
        transform: rotate(-45deg);
        transform-origin: center;
    }
  .input-arrow {
    width: 7px;
    height: 7px;
    border-left: 1px solid #999;
    border-bottom: 1px solid #999;
  }
    .input-arrow {
        width: 7px;
        height: 7px;
        border-left: 1px solid #999;
        border-bottom: 1px solid #999;
    }
  .uni-data-tree-cover {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .4);
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: column;
    z-index: 100;
  }
    .uni-data-tree-cover {
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, .4);
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: column;
        z-index: 100;
    }
  .uni-data-tree-dialog {
    position: fixed;
    left: 0;
    /* #ifndef APP-NVUE */
    top: 20%;
    /* #endif */
    /* #ifdef APP-NVUE */
    top: 200px;
    /* #endif */
    right: 0;
    bottom: 0;
    background-color: #FFFFFF;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: column;
    z-index: 102;
    overflow: hidden;
    /* #ifdef APP-NVUE */
    width: 750rpx;
    /* #endif */
  }
    .uni-data-tree-dialog {
        position: fixed;
        left: 0;
        /* #ifndef APP-NVUE */
        top: 20%;
        /* #endif */
        /* #ifdef APP-NVUE */
        top: 200px;
        /* #endif */
        right: 0;
        bottom: 0;
        background-color: #FFFFFF;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: column;
        z-index: 102;
        overflow: hidden;
        /* #ifdef APP-NVUE */
        width: 750rpx;
        /* #endif */
    }
  .dialog-caption {
    position: relative;
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
    /* border-bottom: 1px solid #f0f0f0; */
  }
    .dialog-caption {
        position: relative;
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: row;
        /* border-bottom: 1px solid #f0f0f0; */
    }
  .title-area {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    align-items: center;
    /* #ifndef APP-NVUE */
    margin: auto;
    /* #endif */
    padding: 0 10px;
  }
    .title-area {
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        align-items: center;
        /* #ifndef APP-NVUE */
        margin: auto;
        /* #endif */
        padding: 0 10px;
    }
  .dialog-title {
    /* font-weight: bold; */
    line-height: 44px;
  }
    .dialog-title {
        /* font-weight: bold; */
        line-height: 44px;
    }
  .dialog-close {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
    align-items: center;
    padding: 0 15px;
  }
    .dialog-close {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        flex-direction: row;
        align-items: center;
        padding: 0 15px;
    }
  .dialog-close-plus {
    width: 16px;
    height: 2px;
    background-color: #666;
    border-radius: 2px;
    transform: rotate(45deg);
  }
    .dialog-close-plus {
        width: 16px;
        height: 2px;
        background-color: #666;
        border-radius: 2px;
        transform: rotate(45deg);
    }
  .dialog-close-rotate {
    position: absolute;
    transform: rotate(-45deg);
  }
    .dialog-close-rotate {
        position: absolute;
        transform: rotate(-45deg);
    }
  .picker-view {
    flex: 1;
    overflow: hidden;
  }
    .picker-view {
        flex: 1;
        overflow: hidden;
    }
  .icon-clear {
    display: flex;
    align-items: center;
  }
    .icon-clear {
        display: flex;
        align-items: center;
    }
  /* #ifdef H5 */
  @media all and (min-width: 768px) {
    .uni-data-tree-cover {
      background-color: transparent;
    }
    /* #ifdef H5 */
    @media all and (min-width: 768px) {
        .uni-data-tree-cover {
            background-color: transparent;
        }
    .uni-data-tree-dialog {
      position: absolute;
      top: 55px;
      height: auto;
      min-height: 400px;
      max-height: 50vh;
      background-color: #fff;
      border: 1px solid #EBEEF5;
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
      border-radius: 4px;
      overflow: unset;
    }
        .uni-data-tree-dialog {
            position: absolute;
            top: 55px;
            height: auto;
            min-height: 400px;
            max-height: 50vh;
            background-color: #fff;
            border: 1px solid #EBEEF5;
            box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
            border-radius: 4px;
            overflow: unset;
        }
    .dialog-caption {
      display: none;
    }
        .dialog-caption {
            display: none;
        }
    .icon-clear {
      /* margin-right: 5px; */
    }
  }
        .icon-clear {
            /* margin-right: 5px; */
        }
    }
  /* #endif */
    /* #endif */
  /* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
  /* #ifndef APP-NVUE */
  .uni-popper__arrow,
  .uni-popper__arrow::after {
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 6px;
  }
    /* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
    /* #ifndef APP-NVUE */
    .uni-popper__arrow,
    .uni-popper__arrow::after {
        position: absolute;
        display: block;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
        border-width: 6px;
    }
  .uni-popper__arrow {
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
    top: -6px;
    left: 10%;
    margin-right: 3px;
    border-top-width: 0;
    border-bottom-color: #EBEEF5;
  }
    .uni-popper__arrow {
        filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
        top: -6px;
        left: 10%;
        margin-right: 3px;
        border-top-width: 0;
        border-bottom-color: #EBEEF5;
    }
  .uni-popper__arrow::after {
    content: " ";
    top: 1px;
    margin-left: -6px;
    border-top-width: 0;
    border-bottom-color: #fff;
  }
    .uni-popper__arrow::after {
        content: " ";
        top: 1px;
        margin-left: -6px;
        border-top-width: 0;
        border-bottom-color: #fff;
    }
  /* #endif */
</style>
    /* #endif */
</style>