123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541 |
- <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
- <seller-base :show="true">
- <title-header />
- <view class="div container">
- <view class="div top-wrapper">
- <view class="div nav-item left-nav-item" @click="goSettingIndex">
- <image mode="aspectFit" src="../../../static/image/seller/icon_setting_nor.png" class="img nav-icon">
- </view>
- <view class="div nav-item right-nav-item" @click="goNews()">
- <image mode="aspectFit" src="../../../static/image/seller/icon_news_nor.png" class="img nav-icon">
- <text class="span" v-if="0"></text>
- </view>
- <view class="div top-info-wrapper">
- <view class="div avatar-wrapper" @click="goSettingIndex">
- <image mode="aspectFit" class="img avatar" v-bind:src="store_info.store_avatar" v-if="isOnline && store_info"/>
- </view>
- <label class="sellername" @click="goSettingIndex">{{sellername}}</label>
- </view>
- </view>
- <flex-line class="div order-header" :is-link="true" @click.native="goSellerorder('')">
- <text class="span">订单管理</text>
- <text class="span" slot="right">查看全部订单</text>
- </flex-line>
- <view class="div order-wrapper">
- <index-order-item
- class="order-item"
- v-on:onclick="goSellerorder('state_new')"
- :src="require('../../../static/image/seller/icon_pay_seller_nor.png')"
- title="待付款"
- :orderNumber = 'seller_info.order_nopay_count'>
- </index-order-item>
- <index-order-item
- class="order-item"
- v-on:onclick="goSellerorder('state_pay')"
- :src="require('../../../static/image/seller/icon_good_seller_nor.png')"
- title="待发货"
- :orderNumber = 'seller_info.order_noship_count'>
- </index-order-item>
- <index-order-item
- class="order-item"
- v-on:onclick="goSellerorder('state_send')"
- :src="require('../../../static/image/seller/icon_consignee_seller_nor.png')"
- title="待收货"
- :orderNumber = 'seller_info.order_noreceipt_count'>
- </index-order-item>
- </view>
- <view class="div manage-wrapper mt-5">
- <index-manage-item
- v-on:onclick="goGoodsonline"
- :src="require('../../../static/image/seller/icon_goods_seller_nor.png')"
- title="商品管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goGoodsclass"
- :src="require('../../../static/image/seller/icon_classify_seller_pre.png')"
- title="店铺分类">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goGoodsspec"
- :src="require('../../../static/image/seller/icon_specifications_seller_pre.png')"
- title="商品规格">
- </index-manage-item>
- <index-manage-item
- v-if="seller && !seller.is_platform_store"
- v-on:onclick="goMoney"
- :src="require('../../../static/image/seller/icon_capital_seller_pre.png')"
- title="店铺资金">
- </index-manage-item>
- <index-manage-item
- v-if="seller && !seller.is_platform_store"
- v-on:onclick="goDeposit"
- :src="require('../../../static/image/seller/icon_deposit_seller_pre.png')"
- title="店铺保证金">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goVrorder"
- :src="require('../../../static/image/seller/icon_order_seller_pre.png')"
- title="虚拟订单">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerbill"
- :src="require('../../../static/image/seller/icon_settle_seller_pre.png')"
- title="结算管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerRefundList(1)"
- :src="require('../../../static/image/seller/icon_refunds_seller_pre.png')"
- title="退款管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerRefundList(2)"
- :src="require('../../../static/image/seller/icon_refund_seller_pre.png')"
- title="退货管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerChatList"
- :src="require('../../../static/image/seller/icon_chat_seller_pre.png')"
- title="聊天列表">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerChainList"
- :src="require('../../../static/image/seller/icon_shop_seller_nor.png')"
- title="门店管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerEvaluateList"
- :src="require('../../../static/image/seller/icon_judge_seller_nor.png')"
- title="评价管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerLiveApplyList"
- :src="require('../../../static/image/seller/icon_live_seller_nor.png')"
- title="直播管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerComplainList"
- :src="require('../../../static/image/seller/icon_letterseller__nor.png')"
- title="投诉管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goConsult"
- :src="require('../../../static/image/seller/icon_consult_seller_nor.png')"
- title="咨询管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goAccount"
- :src="require('../../../static/image/seller/icon_person_seller_nor.png')"
- title="子账户管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerInviter"
- :src="require('../../../static/image/seller/icon_retail_nor.png')"
- title="店铺分销">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerStatisticsGeneral"
- :src="require('../../../static/image/seller/icon_count_seller_nor.png')"
- title="店铺概况统计">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerVoucherList"
- :src="require('../../../static/image/seller/icon_vouchers_nor.png')"
- title="代金券管理">
- </index-manage-item>
- <index-manage-item
- v-on:onclick="goSellerCostList"
- :src="require('../../../static/image/seller/icon_dianpuxiaofei_pre.png')"
- title="店铺消费">
- </index-manage-item>
- </view>
- </view>
- </seller-base>
- </template>
- <script>
- import {getFontSize} from '@/util/common'
- import TitleHeader from '../../TitleHeader'
- import { urlencode } from '@/util/common'
- import SellerBase from '../SellerBase'
- import IndexOrderItem from './IndexOrderItem'
- import IndexManageItem from './IndexManageItem'
- import flexLine from '../../flexLine'
- import { getSellerInfo } from '../../../api/seller'
- import { mapState, mapMutations, mapActions } from 'vuex'
- export default {
- name: 'Index',
- data () {
- return {
- store_info: {},
- seller_info: {},
- statics: {}
- }
- },
- components:{
- TitleHeader,
- flexLine,
- SellerBase,
- IndexManageItem,
- IndexOrderItem
- },
- created: function () {
- this.fetchConfig({})
- if (this.isOnline) {
- getSellerInfo().then(response => {
- if (response && response.result) {
- this.seller_info = response.result.seller_info
- this.store_info = response.result.store_info
- this.statics = response.result.statics
- }
- }
- ).catch(function (error) {
- uni.showToast({icon:'none',title: error.message})
- })
- }
- },
- computed:{
- fontSize(){
- return getFontSize()
- },
- ...mapState({
- isOnline: state => state.seller.isOnline,
- seller: state => state.seller.info,
- config: state => state.config.config
- }),
- sellername () {
- let title = '登录/注册'
- if (this.isOnline) {
- if (this.seller && typeof this.seller !== 'undefined' && JSON.stringify(this.seller) !== '{}') {
- title = this.seller.seller_name
- }
- }
- return title
- }
- },
- methods:{
- goNavigate(path,query=false){
- uni.navigateTo({url:path+(query?('?'+urlencode(query)):'')})
- },
- ...mapMutations({
- memberUpdate: 'memberUpdate'
- }),
- ...mapActions({
- fetchConfig: 'fetchConfig'
- }),
- showLogin () {
- uni.navigateTo({url:'/pages/home/sellerlogin/Login'})
- },
- // 店铺资金 普通店铺显示
- goMoney () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/money/Index'})
- } else {
- this.showLogin()
- }
- },
- // 店铺保证金 普通店铺显示
- goDeposit () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/deposit/Index'})
- } else {
- this.showLogin()
- }
- },
- // 店铺设置
- goSettingIndex () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/setting/Index'})
- } else {
- this.showLogin()
- }
- },
- // 投诉
- goSellerComplainList(){
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/complaint/ComplaintList'})
- } else {
- this.showLogin()
- }
- },
- // 直播
- goSellerLiveApplyList () {
- if (this.isOnline) {
- if (this.config.live_type == 1) {
- uni.navigateTo({url:'/pages/seller/minipro_live/MiniproLiveList'})
- } else {
- uni.navigateTo({url:'/pages/seller/live_apply/LiveApplyList'})
- }
- } else {
- this.showLogin()
- }
- },
- goNews () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/notice/NoticeList'})
- } else {
- this.showLogin()
- }
- },
- goSellerChainList () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/chain/ChainList'})
- } else {
- this.showLogin()
- }
- },
- // 子账户管理
- goAccount () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/account/Index'})
- } else {
- this.showLogin()
- }
- },
- // 商品管理
- goGoodsonline () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/goods/Goodsonline'})
- } else {
- this.showLogin()
- }
- },
- // 商家聊天列表
- goSellerChatList () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/chat/ChatList'})
- } else {
- this.showLogin()
- }
- },
- // 订单列表
- goSellerorder (state) {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/order/OrderList'+'?'+urlencode({ state: state })})
- } else {
- this.showLogin()
- }
- },
- // 退款管理
- goSellerRefundList (refundType) {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/refund/RefundList'+'?'+urlencode({ refund_type: refundType })})
- } else {
- this.showLogin()
- }
- },
- // 评价管理
- goSellerEvaluateList () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/evaluate/EvaluateList'})
- } else {
- this.showLogin()
- }
- },
- // 订单结算
- goSellerbill () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/bill/BillList'})
- } else {
- this.showLogin()
- }
- },
- // 店铺统计
- goSellerStatisticsGeneral () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/statisticsgeneral/Index'})
- } else {
- this.showLogin()
- }
- },
- // 咨询管理
- goConsult () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/consult/ConsultList'})
- } else {
- this.showLogin()
- }
- },
- // 商品规格
- goGoodsspec () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/spec/Index'})
- } else {
- this.showLogin()
- }
- },
- // 店铺分类
- goGoodsclass () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/goodsclass/GoodsClassList'})
- } else {
- this.showLogin()
- }
- },
- // 虚拟订单
- goVrorder () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/vrorder/OrderList'})
- } else {
- this.showLogin()
- }
- },
- // 店铺分销
- goSellerInviter () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/inviter/Index'})
- } else {
- this.showLogin()
- }
- },
- // 代金券管理
- goSellerVoucherList () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/voucher/VoucherList'})
- } else {
- this.showLogin()
- }
- },
- // 店铺消费
- goSellerCostList () {
- if (this.isOnline) {
- uni.navigateTo({url:'/pages/seller/cost/CostList'})
- } else {
- this.showLogin()
- }
-
- }
- }
- }
- </script>
- <style scoped lang='scss'>
- .container {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: stretch;
- background-color: #f0f2f5;
- .top-wrapper {
- position:relative;
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: stretch;
- height:8rem;
- background: linear-gradient(90deg,#f01414,#f01414);
- .top-info-wrapper {
- flex: 1;
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: center;
- }
- }
- .nav-item {
- position: absolute;
- display: flex;
- justify-content: center;
- align-items: center;
- top:0.5rem;
- .span {
- width:0.4rem;
- height:0.4rem;
- background-color: #f0f2f5;
- border-radius: 50%;
- position: absolute;
- top:0.5rem;
- right: 0.5rem;
- }
- }
- .left-nav-item {
- left: 0.5rem;
- }
- .right-nav-item {
- right: 0.5rem;
- }
- .nav-icon {
- width: 1.3rem;
- height: 1.3rem;
- text-align: center;
- color: #fff;
- }
- .avatar-wrapper {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- width:4rem;
- height:4rem;
- border-radius:50%;
- background-color: #fff;
- margin-top:1rem;
- .avatar {
- width:3.6rem;
- height:3.6rem;
- border-radius:50%;
- }
- }
- .sellername {
- width: 100%;
- margin-top:.5rem;
- font-size:$h2;
- color:rgba(255,255,255,1);
- text-align: center;
- margin-left: 0;
- margin-right: 0;
- }
- .info-wrapper {
- width: 100%;
- height: 2rem;
- display: inline-flex;
- flex-direction: row;
- justify-content: flex-start;
- align-content: stretch;
- background-color: rgba(0, 0, 0, 0.1);
- }
- .info-item {
- flex: 1;
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- color: #fff;
- font-size:$h2;
- }
- .order-header {
- background-color: #fff;
- padding:0 $pageSpace;
- }
- .order-wrapper {
- height:4rem;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: stretch;
- background-color: #fff;
- }
- .order-item {
- flex: 1;
- }
- .bottom-wrapper {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: stretch;
- margin-bottom:2rem;
- padding: 0 $pageSpace;
- background-color: #fff;
- }
- .item-icon{
- width:1.2rem;
- height:1.2rem;
- margin-right: .4rem;
- }
-
- .manage-wrapper{background:#fff;}
- }
- </style>
|