| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041 |
- <template>
- <view>
- <block v-if="loginStyle == 0">
- <view style="width:100vw;text-align: center;">
- <!-- #ifdef MP-WEIXIN -->
- <view style="margin-top:50upx;font-size:34upx;margin-bottom:30upx;">个人买花</view>
- <view><button class="admin-button-com big blue" style="width:240upx;" @click="buyItem">去买花</button></view>
- <!-- #endif -->
- <view style="margin-top:100upx;font-size:34upx;margin-bottom:30upx;">花店登录</view>
- <view><button class="admin-button-com big blue" style="width:240upx;" @click="pageTo({url:'/admin/home/login'})">去登录</button></view>
- <view style="font-size:38upx;color:green;text-decoration: underline;margin-top:60upx;" @click="pageTo({url:'/pagesClient/official/apply'})">花店注册</view>
- </view>
- </block>
- <block v-else>
- <!-- ========== 完整功能界面 ========== -->
- <view class="app-main app-content" v-if="loginStyle == 2">
- <template v-if="lookMoney == 1">
- <view class="today-overview-card">
- <view class="today-header">
- <view class="today-title">今日概况</view>
- <zui-svg-icon icon="home-message" color="#FFFFFF" :width="32" :height="29" @click.native="pageTo({url:'/admin/chat/list'})" />
- <view class="red-mind" v-if="unReadMsgNum>0">{{ unReadMsgNum>9?'9+':unReadMsgNum }}</view>
- </view>
- <view class="today-income-section" @click.stop="pageTo({url:'/admin/stat/kdIncome'})">
- <view class="income-label">收入</view>
- <view class="income-value">
- <text class="income-number">{{ $util.numberFormat(data.todayData.income) }}</text>
- </view>
- </view>
- <view class="today-stats" @click.stop="pageTo({url:'/admin/custom/visit'})">
- <view class="stat-item">
- <view class="stat-content">
- <view class="stat-label">访客</view>
- <view class="stat-value">{{ $util.numberFormat(data.todayData.visit) || 0 }}</view>
- </view>
- </view>
- <navigator
- url="/admin/home/order"
- open-type="switchTab"
- class="stat-item"
- @click.stop="pageTo({url:'/admin/home/order'})"
- >
- <view class="stat-content">
- <view class="stat-label">订单</view>
- <view class="stat-value">{{ $util.numberFormat(data.todayData.order) || 0 }}</view>
- </view>
- </navigator>
- <view class="stat-item" @click.stop="">
- <view class="stat-content">
- <view class="stat-label">昨日收入</view>
- <view class="stat-value">{{ $util.numberFormat(data.yesterdayIncome) || 0 }}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <template v-else>
- <view class="today-overview-card">
- <view class="today-header">
- <view class="today-title">今日概况</view>
- <zui-svg-icon icon="home-message" color="#FFFFFF" :width="32" :height="29" @click.native="pageTo({url:'/admin/chat/list'})" />
- <view class="red-mind" v-if="unReadMsgNum>0">{{ unReadMsgNum>9?'9+':unReadMsgNum }}</view>
- </view>
- <view class="today-stats" @click="pageTo({url:'/admin/custom/visit'})">
- <view class="stat-item">
- <view class="stat-content">
- <view class="stat-label">访客</view>
- <view class="stat-value">{{ $util.numberFormat(data.todayData.visit) || 0 }}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <view class="module-com news-wrap">
- <view class="news-list" v-for="(item, index) in data.notice" :key="index" @click="noticeFn(item)" >
- <view class="news-left">
- <i class="iconfont iconxiaoxi2 ling"></i>
- <span>{{ item.title }}</span>
- </view>
- <view class="news-right">
- <span>{{ item.action }}</span>
- <i class="iconfont iconxiangyou"></i>
- </view>
- </view>
- </view>
- <!-- 警告提示区域 -->
- <view v-if="shopInfo.memberLevelSet == 0" class="alert-card alert-card-warning" @click="setMemberLevel">
- <view class="alert-content">
- <view class="alert-title">请设置会员等级</view>
- <view class="alert-action">去设置</view>
- </view>
- </view>
- <view v-if="shopInfo.rechargeWeal == 0" class="alert-card alert-card-warning" @click="setRecharge">
- <view class="alert-content">
- <view class="alert-title">请设置充值规则</view>
- <view class="alert-action">去设置</view>
- </view>
- </view>
- <view v-if="!$util.isEmpty(data.warning)" class="alert-card alert-card-error">
- <view class="alert-content">
- <view class="alert-text">{{ data.warning }}</view>
- </view>
- </view>
- <view class="module-com flower-module">
- <!-- 花束 -->
- <view class="flower-section">
- <view class="section-header">
- <view class="header-line"></view>
- <view class="header-title">绿植花束</view>
- <view class="header-line"></view>
- </view>
- <view class="icon-grid">
- <view class="icon-item" @click="goPage({url: '/admin/cg/mall'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">商城</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/work/list'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">任务</view>
- </view>
- <view class="icon-item" @click="goHsKd">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/pandian2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">开单</view>
- </view>
- <view class="icon-item" @click="goHsKjKd">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/pandian2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">快捷开单</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/goods/category'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">分类</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/goods/categorySort'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">排序</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/goods/list'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">绿植花束</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/goods/add'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">新增</view>
- </view>
- </view>
- </view>
- <!-- 花材 -->
- <view class="flower-section">
- <view class="section-header">
- <view class="header-line"></view>
- <view class="header-title">花材</view>
- <view class="header-line"></view>
- </view>
- <view class="icon-grid">
- <view class="icon-item" @click="goPage({url: '/admin/cg/item'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">商城</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/changePrice/list2'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/gj2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">改价</view>
- </view>
- <view class="icon-item" @click="goItemKd()">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/pandian2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">开单</view>
- </view>
- <view class="icon-item" @click="goItemKjKd()">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/pandian2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">快捷开单</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/part/list'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/kcyjs2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">拆散</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/item/list2'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">花材</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/pagesPurchase/shopping'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/icon_caigou2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">买花记录</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/pagesPurchase/order'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/icon_ghs2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">买花</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/breakage/list'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/kcyjs2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">损耗</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/itemClass/list'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/hcgl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">分类</view>
- </view>
- </view>
- </view>
- <view class="flower-section">
- <view class="section-header">
- <view class="header-line"></view>
- <view class="header-title">更多</view>
- <view class="header-line"></view>
- </view>
- <view class="icon-grid">
- <view class="icon-item" @click.stop="">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/dbck2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">支出</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/staff/list'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/yggl2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">员工</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/stat/profit'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/jyzk2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">利润表</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/picText/picTextList'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/kcyjs2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">图文</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/cg/code'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">收款码</view>
- </view>
- <view class="icon-item" @click="goPage({url: '/admin/order/scanPay'})">
- <view class="icon-wrapper">
- <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/kcyjs2.png`" mode="aspectFit"></image>
- </view>
- <view class="icon-text">收款码流水</view>
- </view>
- </view>
- </view>
- </view>
- <template v-if="lookMoney == 1">
- <view class="module-com overview-module">
- <view class="overview-header">
- <view class="overview-title">总览</view>
- </view>
- <view class="overview-grid">
- <view class="overview-item" v-for="(item, index) in overview" :key="index" @click="pageTo(item)">
- <view class="item-value">{{ $util.numberFormat(item.value) }}</view>
- <view class="item-label">{{ item.name }}</view>
- </view>
- </view>
- </view>
- </template>
- </view>
- <!-- ========== 简化功能界面 ========== -->
- <view class="order-page" v-else>
- <view class="ghs_list_page flex-col">
- <view class="profile-section">
- <view class="profile-header">
- <view class="avatar-container">
- <button
- class="avatar-button"
- open-type="chooseAvatar"
- @chooseavatar="onChooseAvatar"
- >
- <image
- class="avatar"
- :src="shopAvatar()"
- mode="aspectFill"
- />
- </button>
- </view>
- <view class="user-info">
- <text class="username">{{ (shopInfo && shopInfo.shopName == '首店') ? (shopInfo.merchantName || '') : (((shopInfo && shopInfo.merchantName) ? shopInfo.merchantName : '') + (shopInfo && shopInfo.shopName ? (' ' + shopInfo.shopName) : '')) }}</text>
- <text class="user-id">ID {{ shopInfo && shopInfo.id ? shopInfo.id : '' }}</text>
- </view>
- <view class="more-icon">
- <zui-svg-icon icon="home-more" :width="26" color="#FFFFFF" />
- </view>
- </view>
- <view class="function-grid function-grid--overlay" style="padding: 25upx 0upx 30upx 0upx; display: flex; justify-content: space-around; gap: 12upx;">
- <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="pageTo({url:'/admin/shop/myShop'})">
- <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
- 🏪
- </view>
- <text class="function-text function-text--overlay" style="font-size: 22upx;">店铺管理</text>
- </view>
- <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="pageTo({url:'/admin/staff/list'})">
- <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
- 👥
- </view>
- <text class="function-text function-text--overlay" style="font-size: 22upx;">我的员工</text>
- </view>
- <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="pageTo({url:'/admin/shop/add?id='+loginInfo.shopId})">
- <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
- 📍
- </view>
- <text class="function-text function-text--overlay" style="font-size: 22upx;">我的地址</text>
- </view>
- <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="pageTo({url:'/admin/stat/cgItem'})">
- <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
- 📊
- </view>
- <text class="function-text function-text--overlay" style="font-size: 22upx;">采购统计</text>
- </view>
- <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="goMore()">
- <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
- ⋯
- </view>
- <text class="function-text function-text--overlay" style="font-size: 22upx;">更多</text>
- </view>
- </view>
- </view>
- <view style="text-align:center;font-size:28upx;color:#666;padding:16upx 30upx;margin:0 20upx;background:white;border-radius:30upx;">
- <view style="display:inline-flex;align-items:center;background:#fff;padding:10upx 25upx;border-radius:20upx;box-shadow:0 2upx 8upx rgba(0,0,0,0.05);">
- <text style="color:#333;font-weight:500;font-size:28upx;">{{ loginInfo.admin && loginInfo.admin.name ? loginInfo.admin.name : '' }}</text>
- <text style="margin:0 15upx;color:#eee;">|</text>
- <text style="color:#666;font-size:28upx;">{{ loginInfo.admin && loginInfo.admin.mobile ? loginInfo.admin.mobile : '' }}</text>
- </view>
- </view>
- <view v-if="!$util.isEmpty(data.warning)" style="color:red;font-size:36upx;font-weight:bold;text-align:center;margin-bottom:15upx;margin-top:20upx;">{{ data.warning }}</view>
- <template v-if="!$util.isEmpty(ad)">
- <block v-for="(adInfo, adIndex) in ad" :key="adIndex">
- <view style="text-align:center;" @click.stop="pageTo({url:adInfo.url})">
- <image :src="adInfo.banner" mode="widthFix" style="width:97%;margin:0 auto;"></image>
- </view>
- </block>
- </template>
- <template v-if="!$util.isEmpty(supplierList)">
- <view class="ghs_list_area flex-col justify-end">
- <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in supplierList" :key="index">
- <view class="image-text_7 flex-row justify-between">
- <view class="section_1 flex-col">
- <image class="logo" :src="ghsInfo.smallAvatar" @click="enterShop(ghsInfo)" />
- </view>
- <view class="text-group_7 flex-col justify-between" @click="enterShop(ghsInfo)">
- <text class="text_8">{{ghsInfo.name}}</text>
- <text class="text_9">
- <block v-if="ghsInfo.cutStyle && ghsInfo.cutStyle == 1">
- <block v-if="ghsInfo.meetNum == 1 || ghsInfo.meetAmount == 1">
- <block v-if="ghsInfo.meetNum && ghsInfo.meetNum>0 && ghsInfo.cutAmount>0">
- <text style="color:red;font-weight:bold;">
- 全场{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
- </text>
- </block>
- <block v-else>
- <text v-if="ghsInfo.meetAmount && ghsInfo.meetAmount>0 && ghsInfo.cutAmount>0" style="color:red;font-weight:bold;">
- 全场{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
- </text>
- </block>
- </block>
- <block v-else>
- <block v-if="ghsInfo.meetNum && ghsInfo.meetNum>0 && ghsInfo.cutAmount>0">
- <text style="color:red;font-weight:bold;">
- 满{{ghsInfo.meetNum?ghsInfo.meetNum:0}}扎{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
- </text>
- </block>
- <block v-else>
- <text v-if="ghsInfo.meetAmount && ghsInfo.meetAmount>0 && ghsInfo.cutAmount>0" style="color:red;font-weight:bold;">
- 满{{ghsInfo.meetAmount?ghsInfo.meetAmount:0}}元{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
- </text>
- </block>
- </block>
- </block>
- <block v-else>
- <block v-if="ghsInfo.meetNum && ghsInfo.meetNum>0 && ghsInfo.cutAmount>0">
- <text style="color:red;font-weight:bold;">
- 满{{ghsInfo.meetNum?ghsInfo.meetNum:0}}扎优惠{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount):0}}元
- </text>
- </block>
- <block v-else>
- <text v-if="ghsInfo.meetAmount && ghsInfo.meetAmount>0 && ghsInfo.cutAmount>0" style="color:red;font-weight:bold;">
- 满{{ghsInfo.meetAmount?ghsInfo.meetAmount:0}}元优惠{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount):0}}元
- </text>
- </block>
- </block>
- </text>
- </view>
- </view>
- <view class="box_4 flex-col"></view>
- <view class="box_9">
- <view class="tag_2" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})"> <text>欠款变动记录</text> </view>
- <view class="tag_2" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})"> <text>结账记录</text> </view>
- <view class="tag_2" @click="pageTo({url:'/pagesPurchase/shopping?ghsId='+ghsInfo.id+'&ghsName='+ghsInfo.name})"> <text>买花记录</text> </view>
- <view class="tag_2" @click.stop="callUp(ghsInfo)" style="color:green;font-weight:bold;"> <text>联系我们</text> </view>
- </view>
- <view class="box_6 flex-row" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0">
- <view class="show_clear_area flex-row justify-between">
- <text class="waite_clear_order">
- 待结订单 {{ghsInfo.debtNum}}笔 合计¥{{ghsInfo.debtAmount?parseFloat(ghsInfo.debtAmount):0}}
- <text style="margin-left:30upx;" v-if="ghsInfo.remainDebtAmount>0">选订单结 》</text>
- </text>
- </view>
- </view>
- <block v-if="Number(ghsInfo.balance)>0">
- <view class="box_6 flex-row" v-if="ghsInfo.remainDebtAmount>0" @click.stop="recharge(ghsInfo)">
- <view class="show_clear_area flex-row justify-between">
- <text class="waite_clear_order" style="color:#3385ff;">
- <text v-if="Number(ghsInfo.balance)>0">减去余额¥{{ ghsInfo.balance ? parseFloat(ghsInfo.balance) : 0 }}</text>
- <text v-if="ghsInfo.remainDebtAmount>0" style="margin-left:15upx;">实欠¥{{ ghsInfo.remainDebtAmount }}</text>
- <text style="margin-left:30upx;">按金额结 》</text>
- </text>
- </view>
- </view>
- <view class="box_6 flex-row" v-if="ghsInfo.remainDebtAmount<0" @click.stop="recharge(ghsInfo)">
- <view class="show_clear_area flex-row justify-between">
- <text class="waite_clear_order" style="color:#3385ff;">
- <text>账户余额¥{{ Math.abs(ghsInfo.remainDebtAmount) }}</text>
- <text style="margin-left:30upx;">已结清</text>
- </text>
- </view>
- </view>
- </block>
- <block v-if="ghsInfo.live == 1">
- <view class="button_7 flex-col" @click.stop="goKmCg(ghsInfo)" v-if="ghsInfo.openKmCg && ghsInfo.openKmCg == 1"><text class="text_13">昆明直采</text></view>
- <view class="button_4 flex-col" v-if="ghsInfo.isOpen == 1" @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
- <view class="button_5 flex-col" v-else @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
- </block>
- <block v-else>
- <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">买花</text></view>
- </block>
- <text style="position:absolute;left:677upx;top:17upx;color:#CCCCCC;" @click.stop="getMore(ghsInfo)">更多</text>
- </view>
- </view>
- </template>
- <block v-else>
- <view style="margin:60upx auto 40upx auto;font-weight:bold;font-size:36upx;text-align: center;">暂无供货商</view>
- </block>
- <view style="text-align:center;margin-top:50upx;margin-bottom:182upx;color:#827171;font-size:28upx;">
- <text style="margin-right:20upx;">中花汇提供技术支持</text>
- <text style="margin-right:20upx;">|</text>
- <text @click="toPhone()">联系软件公司</text>
- </view>
- </view>
- </view>
- </block>
- <uni-popup ref="toShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
- <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
- <view style="width:100vw;margin-top:8upx;"><button @click="rechargeChange()">充值记录</button></view>
- <view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动</button></view>
- <view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">删除此商家</button></view>
- <view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
- </view>
- </uni-popup>
- <!-- 多供货商提示弹框 -->
- <uni-popup ref="supplierNoticePopup" background-color="#fff" type="center" :animation="true" class="supplier-notice-popup">
- <view class="supplier-notice-container">
- <!-- 头部 -->
- <view class="supplier-notice-header">
- <text class="supplier-notice-title">您已有多个供货商</text>
- </view>
-
- <!-- 中间供货商列表 -->
- <view class="supplier-notice-content">
- <view class="supplier-list">
- <view class="supplier-item" v-for="(supplier, index) in displaySupplierList" :key="index">
- <view class="supplier-icon">🏪</view>
- <text class="supplier-name">{{ supplier.name }}</text>
- </view>
- </view>
- </view>
-
- <!-- 底部提示 -->
- <view class="supplier-notice-footer">
- <text class="supplier-notice-tip">买花时注意区分,避免下错</text>
- <view class="supplier-notice-buttons">
- <button class="admin-button-com default" @click="remindLater">下次提醒</button>
- <button class="admin-button-com blue" @click="closeSupplierNotice">知道了</button>
- </view>
- </view>
- </view>
- </uni-popup>
-
- <!-- 商城选项弹框 -->
- <uni-popup ref="mallOptionsPopup" type="center" mask-background-color="rgba(0,0,0,0.4)">
- <view class="mall-options-container">
- <view class="mall-options-buttons">
- <view class="mall-option-btn" @click="copyMallLink">
- <view class="option-icon">📋</view>
- <text class="option-text">复制链接</text>
- </view>
- <view class="mall-option-btn" @click="openMallDirect">
- <view class="option-icon">🚀</view>
- <text class="option-text">直接打开</text>
- </view>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import { mapGetters } from "vuex";
- import { getWeixinId } from "@/api/invite";
- import { getShortUrl } from "@/api/main";
- import { getStat } from '@/api/console' //getStrokeCount 已弃用
- import { consoleIndex } from "@/api/workbench";
- import autoUpdateMixins from "@/mixins/autoUpdate";
- import { ghsList } from "@/api/purchase";
- import { changeDelStatus,hasMoreGhs } from "@/api/ghs";
- import {currentShop, uploadShopAvatar} from "@/api/shop";
- import { clearLogin,hasNotice } from "@/api/admin";
- import { unReadMsgCount } from "@/api/chat";
- import { APIHOST } from "@/config";
- export default {
- name: "workbench",
- mixins: [autoUpdateMixins],
- data () {
- return {
- overview:[],
- ad:[],
- showAd:1,
- constant: this.$constant,
- getappIdList: {},
- data: {
- admin: {},
- asset: {},
- notice: {},
- todayData: { income:0.00, order:0, custom:0, expend:0.00, visit:0 },
- isMini:0
- },
- yesterdayIncome: 0,
- supplierList: [],
- //登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
- loginStyle :0,
- backAction:'',
- lookMoney:1,
- currentGhs:{},
- displaySupplierList: [],// 用于显示在弹框中的供货商列表
- shopInfo:[],
- urlNo:1,
- shortUrlList:[],
- unReadMsgNum:0, //未读消息数
- };
- },
- computed: {
- ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo",myShopInfo:"getMyShopInfo" })
- },
- watch: {
- //只需要采购花材的花店不显示底部菜单
- loginInfo(newVal) {
- if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
- if(!this.$util.isEmpty(newVal.onlyCg)){
- this.handleLoginStyle(newVal.onlyCg)
- }
- }
- }
- },
- onPullDownRefresh () {
- this.init();
- uni.stopPullDownRefresh();
- },
- onLoad(){
- getWeixinId().then(res => {
- this.getappIdList = res.data
- })
- },
- onShow () {
- this.unReadMsgNum = 0; // 重置未读消息数
-
- this.init();
- // if(this.backAction == 'login'){
- // this.init()
- // }
- // if(this.backAction == 'cacelMask'){
- // this.init()
- // this.backAction = ''
- // }
- // 判断是否登录
- if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
- if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
- this.handleLoginStyle(this.loginInfo.onlyCg)
- }
- // this.getUnReadMsgCount()
- this.showShopName()
- }
- },
- onShareAppMessage(res) {
- return {
- title: "花掌柜,花店管家婆",
- desc: "",
- imageUrl: "",
- path: "admin/home/workbench",
- }
- },
- methods: {
- onChooseAvatar(e){
- if(this.loginInfo && this.loginInfo.staff && this.loginInfo.staff.founder != 2){
- this.$msg('门店LOGO请老板修改')
- return
- }
- if(e && e.detail && e.detail.avatarUrl){
- let avatarUrl = e.detail.avatarUrl
- this.updateShopAvatar(avatarUrl)
- }else{
- this.$msg('获取头像失败')
- }
- },
- updateShopAvatar(avatarUrl){
- let token = uni.getStorageSync('token') || ''
- let url = APIHOST + '/upload/save-file'
- uni.uploadFile({
- url: url,
- filePath: avatarUrl,
- name: 'file',
- header: { token: token },
- formData: {},
- success: (res) => {
- try{
- const ret = JSON.parse(res.data)
- if(ret.code == 1){
- this.shopInfo.avatar = ret.data.shortUrl
- this.$msg('头像已更新')
- uni.setStorageSync('shopAvatar', this.shopInfo.avatar)
- //请后端,上传新的头像地址,同步更新xhGhsCustom里面的头像地址
- uploadShopAvatar({ id: this.shopInfo.id, avatar: ret.data.shortUrl }).then(res => {
- if(res.code == 1){
- // this.$msg('头像上传成功')
- }else{
- // this.$msg(res.msg || '上传失败')
- console.log(res.msg || '上传失败')
- }
- })
- }else{
- this.$msg(ret.msg || '上传失败')
- }
- }catch(err){
- this.$msg('服务异常')
- }
- },
- fail: () => {
- this.$msg('上传失败')
- }
- })
- },
- shopAvatar(){
- const avatar = (this.shopInfo && this.shopInfo.avatar) ? this.shopInfo.avatar : '/hhb_small.png?x-oss-process=image/resize,m_fill,h_130,w_130'
- if(!avatar){
- return ''
- }
- if(/^https?:\/\//i.test(avatar)){
- return avatar
- }
- return this.$constant.imgUrl + (avatar.indexOf('/') === 0 ? avatar : ('/' + avatar))
- },
- buyItem() {
- let that = this
- // #ifdef MP-WEIXIN
- uni.navigateToMiniProgram({
- //姜枫-2021.04.13
- appId: that.getappIdList.mall.miniAppId,
- path: 'pages/home/recent',
- //develop 开发版 trial 体验版 release 正式版
- envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
- extraData: {},
- success (res) {
- }
- })
- // #endif
- // #ifdef APP-PLUS
- that.$msg("请用微信打开")
- // #endif
- },
- init () {
- this.getGHSList()
- // #ifdef MP-WEIXIN
- this.isMini = 1
- // #endif
-
- consoleIndex({isMini:this.isMini}).then(res => {
- this.data = res.data
- this.lookMoney = res.data.lookMoney
- })
- getStat().then(res=>{
- if(res.code == 1){
- this.overview = res.data.overview
- }
- })
- this.showShopName()
- this.getUnReadMsgCount()
- },
- handleLoginStyle(onlyCg){
- if(Number(onlyCg) == 1){
- this.loginStyle = 1
- uni.hideTabBar()
- this.toRemindCustom()
- }else{
- this.loginStyle = 2
- uni.showTabBar()
- this.getMallData()
- }
- },
- getMallData(){
- getShortUrl().then(res=>{
- if(res.code == 1){
- this.shortUrlList = res.data?res.data:[]
- }
- })
- },
- goItemKjKd(){
- if(this.myShopInfo && Number(this.myShopInfo.defaultCustomId)>0){
- this.$util.pageTo({url:'/admin/billing/index2?customId='+this.myShopInfo.defaultCustomId})
- }else{
- this.$msg('请设置快捷开单的对应客户')
- }
- },
- goItemKd(){
- this.$util.pageTo({url:'/admin/custom/selectCustom'})
- },
- goHsKjKd(){
- if(this.myShopInfo && Number(this.myShopInfo.defaultCustomId)>0){
- this.$util.pageTo({url:'/admin/billing/hs?customId='+this.myShopInfo.defaultCustomId})
- }else{
- this.$msg('请设置快捷开单的对应客户')
- }
- },
- goHsKd(){
- this.$util.pageTo({url:'/admin/custom/selectCustom?style=3'})
- },
- setRecharge(){
- this.$util.pageTo({url:'/admin/recharge/discount'})
- },
- setMemberLevel(){
- this.$util.pageTo({url:'/admin/member/level'})
- },
- closeToShow(){
- this.$refs.toShowMore.close()
- },
- // 显示供货商提示弹框
- showSupplierNotice() {
- // 设置要显示的供货商列表,最多显示5个
- this.displaySupplierList = this.supplierList.filter(item => item.name).slice(0, 5)
- this.$refs.supplierNoticePopup.open('center')
- },
- // 关闭供货商提示弹框
- closeSupplierNotice() {
- this.$refs.supplierNoticePopup.close()
- // 调用已有的接口标记已通知
- hasNotice().then(res => { })
- },
- // 下次提醒
- remindLater() {
- this.$refs.supplierNoticePopup.close()
- // 不调用hasNotice接口,保持提醒状态
- },
- getMore(info){
- this.currentGhs = info
- this.$refs.toShowMore.open('top')
- },
- callUp (ghs) {
- let mobileList = []
- if (!this.$util.isEmpty(ghs.telephone)){
- mobileList.push(ghs.telephone)
- }
- if (!this.$util.isEmpty(ghs.telephone2)){
- mobileList.push(ghs.telephone2)
- }
- if(this.$util.isEmpty(mobileList)){
- this.$msg('没有联系电话')
- return false
- }
- uni.showActionSheet({
- itemList: mobileList,
- success: function (respond) {
- let currentIndex = respond.tapIndex
- let mobile = mobileList[currentIndex]
- uni.makePhoneCall({ phoneNumber: mobile })
- }
- })
- },
- toPhone(){
- this.$util.pageTo({url: '/pagesPurchase/contact'})
- },
- showShopName(){
- currentShop().then(res => {
- if(res.code == 1){
- let sjName = res.data.merchantName ? res.data.merchantName : ''
- let shopName = res.data.shopName ? res.data.shopName : ''
- let title = shopName == '首店' ? sjName : sjName+' '+shopName
- uni.setNavigationBarTitle({ title: title })
- this.shopInfo = res.data?res.data:[]
- if(this.shopInfo.avatar) {
- uni.setStorageSync('shopAvatar', this.shopInfo.avatar);
- }else{
- uni.setStorageSync('shopAvatar', '');
- }
- }
- })
- },
- goMore(){
- let that = this
- let shopkeeper = this.loginInfo.staff && this.loginInfo.staff.founder == 2 //判断店主(老板)
- let items = shopkeeper ? ['已删除商家', '改进建议', '开关商城', '也要一个此商城', '修改密码', '退出登录'] : ['已删除商家', '我已离职', '开关商城', '也要一个此商城', '修改密码', '退出登录'];
- uni.showActionSheet({
- itemList: items,
- success: function (res) {
- if(res.tapIndex == 0){
- that.$util.pageTo({url: '/pagesPurchase/pb'})
- }
- if(res.tapIndex == 1){
- if(shopkeeper){
- // 店主显示改进建议
- that.suggest()
- }else{
- // 员工显示离职
- that.$util.pageTo({url: '/admin/staff/dimission'})
- }
- }
- if(res.tapIndex == 2){
- that.$util.pageTo({url:'/pagesPurchase/open'})
- }
- if(res.tapIndex == 3){
- that.openPfShop()
- }
- if(res.tapIndex == 4){
- that.$util.pageTo({url:'/admin/shop/password'})
- }
- if(res.tapIndex == 5){
- that.$util.confirmModal({content:'确认退出?'},() => {
- // #ifdef APP-PLUS
- uni.clearStorage()
- that.$store.commit("setLoginInfo", {})
- plus.runtime.restart()
- // #endif
- // #ifdef MP-WEIXIN
- clearLogin().then(res=>{
- if(res.code == 1){
- uni.clearStorage()
- that.$store.commit("setLoginInfo", {})
- uni.reLaunch({url:'/admin/home/workbench'})
- }
- })
- // #endif
- })
- }
- }
- });
- },
- openPfShop(){
- let that = this
- that.$util.confirmModal({content:'请添加客服微信申请:15280215347',okText:'复制微信'},() => {
- uni.setClipboardData({
- data: '15280215347',
- success: function() {
- that.$msg("复制成功")
- }
- })
- })
- },
- suggest(){
- let that = this
- that.$util.confirmModal({content:'请添加客服微信反馈:15280215347',okText:'复制微信'},() => {
- uni.setClipboardData({
- data: '15280215347',
- success: function() {
- that.$msg("复制成功")
- }
- })
- })
- },
- bookItem(item){
- const { id } = item
- this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
- },
- goBalanceChange(info){
- this.closeToShow()
- this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+info.id})
- },
- rechargeChange(){
- this.closeToShow()
- this.pageTo({url: '/admin/ghs/rechargeChange?ghsId='+this.currentGhs.id})
- },
- balanceChange(){
- this.closeToShow()
- this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+this.currentGhs.id})
- },
- bpSj(){
- let that = this
- that.$util.confirmModal({content:'确认删除此商家?',okText:'确认'},() => {
- that.confirmPb(that.currentGhs)
- })
- },
- recharge(currentGhs){
- this.pageTo({url: '/admin/ghs/pay?id='+currentGhs.id+'&salt='+currentGhs.salt})
- },
- confirmPb(ghs){
- let that = this
- changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
- if(res.code == 1){
- that.closeToShow()
- that.getGHSList()
- }
- })
- },
- fillCg(item){
- this.pageTo({url:'/pagesPurchase/addCg?ghsId='+item.id+'&ghsName='+item.name})
- },
- goKmCg(currentGhs){
- let self = this
- // #ifdef MP-WEIXIN
- uni.navigateToMiniProgram({
- appId: currentGhs.kmCgAppId,
- path: currentGhs.kmCgUrl,
- //develop 开发版 trial 体验版 release 正式版
- envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
- extraData: {},
- success (res) {}
- })
- // #endif
- // #ifdef APP-PLUS
- self.$msg('开发中')
- // #endif
- },
- enterShop(item) {
- let that = this
- if(item.isOpen == 0){
- this.$msg('已休店,请选择其它门店')
- return false
- }
- that.pageTo({url: '/pagesPurchase/ghsProduct?id='+item.id})
- },
- enterShop2(item) {
- let that = this
- if(item.isOpen == 0){
- this.$msg('已休店,请选择其它门店')
- return false
- }
- that.pageTo({url: '/pagesPurchase/ghsProduct2?id='+item.id})
- },
- whyHave(){
- this.$util.confirmModal({content:'付款金额不足消欠款单时,存为余额下次使用'},() => {})
- },
- settleAccounts (item) {
- this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
- },
- gotoDetails (val) {
- this.pageTo({ url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id, type:2 })
- },
- getGHSList () {
- return ghsList().then(res => {
- this.supplierList = res.data.list
- this.ad = res.data.ad ? res.data.ad : []
- this.showAd = res.data.showAd ? res.data.showAd : 0
- })
- },
- goPage (item) {
- if(this.getLoginInfo.pfShopId && Number(this.getLoginInfo.pfShopId)>0){
- if(item.pf == 0){
- this.$msg('开发中')
- return false
- }
- }
- this.$util.pageTo(item)
- },
- toRemindCustom(){
- if(this.loginStyle==1){
- hasMoreGhs().then(ret=>{
- if(ret.data.needNotice == 1){
- this.showSupplierNotice()
- }
- })
- }
- },
- noticeFn (item) {
- this.$util.pageTo({ url: item.page })
- },
- goToWastage () {
- this.$util.pageTo({url:'/admin/breakage/list'})
- },
- goToKindStat(){
- this.$util.pageTo({url:'/admin/stat/kind'})
- },
- goToProfit () {
- this.$util.pageTo({url:'/admin/stat/profit'})
- },
- // 显示商城选项弹框
- showMallOptions(no) {
- this.urlNo = no
- this.$refs.mallOptionsPopup.open('center')
- },
- // 关闭商城选项弹框
- closeMallOptions() {
- this.$refs.mallOptionsPopup.close()
- },
- // 直接打开商城
- openMallDirect() {
- this.closeMallOptions()
- let url = ''
- //花束商城
- if(this.urlNo == 1){
- url = 'pages/home/category'
- }
- //相册
- if(this.urlNo == 2){
- url = 'pages/home/mall'
- }
- //绿植花材商城
- if(this.urlNo == 3){
- url = 'pages/item/item'
- }
- this.goToMallPt(url)
- },
- // 复制商城链接
- copyMallLink() {
- this.closeMallOptions()
- let currentShortUrl = ''
- let text = ""
- //花束商城
- if(this.urlNo == 1){
- currentShortUrl = this.shortUrlList['goodsUrl']
- text = "点击下面链接,打开商城\n\n"+currentShortUrl+"\n\n链接是我们小程序,放心点击"
- }
- //相册
- if(this.urlNo == 2){
- currentShortUrl = this.shortUrlList['imgUrl']
- text = "点击下面链接,打开相册\n\n"+currentShortUrl+"\n\n链接是我们小程序,放心点击"
- }
- //绿植花材商城
- if(this.urlNo == 3){
- currentShortUrl = this.shortUrlList['itemUrl']
- text = "点击下面链接,打开商城\n\n"+currentShortUrl+"\n\n链接是我们小程序,放心点击"
- }
- uni.setClipboardData({
- data: text,
- success: () => {
- this.$msg('已复制')
- },
- fail: () => {
- this.$msg('复制失败')
- }
- })
- },
- goToMallPt (url) {
- // #ifdef MP-WEIXIN
- let self = this
- uni.navigateToMiniProgram({
- appId: this.getappIdList.mall.miniAppId,
- path: url + '?account=' + self.loginInfo.shopId,
- //develop 开发版 trial 体验版 release 正式版
- envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
- extraData: {
- 'hdShopAdminId': self.loginInfo.shopAdminId
- },
- success (res) {}
- })
- // #endif
- // #ifdef APP-PLUS
- let that = this
- if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
- plus.share.getServices(function(s){
- var sweixin
- for (var i = 0; i < s.length; i++) {
- var t = s[i];
- if (t.id == 'weixin') {
- sweixin = t;
- }
- }
- if (sweixin && sweixin.nativeClient) {
- let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.mall ? that.dictInfo.miniOriginalId.current.mall : ''
- console.log(miniOriginalId)
- sweixin.launchMiniProgram({
- id: miniOriginalId,
- path: '/'+url+'?account='+that.loginInfo.shopId,
- type: 0
- });
- } else {
- that.$msg("没有找到微信服务")
- //that.$msg("获取微信失败:" + e.message)
- console.log(JSON.stringify(e));
- }
- }, function(e){
- that.$msg("没有找到微信服务哦")
- //that.$msg("获取微信失败:" + e.message)
- console.log(JSON.stringify(e));
- });
- } else {
- this.$msg("即将跳转小程序,请安装微信")
- return false
- }
- // #endif
- },
- getUnReadMsgCount(){
- unReadMsgCount().then(res=>{
- if(res.code == 1){
- this.unReadMsgNum = res.data.msg_count
- }
- })
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .app-content {
- padding-bottom: 10upx;
- }
- .module-com {
- margin-bottom: 37upx;
- background-color: #fff;
- }
- // 今日概况卡片
- .today-overview-card {
- background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
- padding: 0;
- margin: 0 0 -20upx 0;
- overflow: hidden;
-
- .today-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30upx 30upx 20upx;
-
- .today-title {
- font-size: 34upx;
- font-weight: 600;
- color: #ffffff;
- }
- }
-
- .today-income-section {
- padding: 20upx 30upx 40upx 30upx;
- text-align: center;
- position: relative;
-
- &:active {
- background: rgba(0, 0, 0, 0.05);
- }
-
- .income-label {
- font-size: 26upx;
- color: rgba(255, 255, 255, 0.9);
- margin-bottom: 16upx;
- }
-
- .income-value {
- display: flex;
- align-items: baseline;
- justify-content: center;
- margin-bottom: 12upx;
-
- .currency-symbol {
- font-size: 32upx;
- color: #ffffff;
- font-weight: 500;
- margin-right: 8upx;
- }
-
- .income-number {
- font-size: 56upx;
- font-weight: 700;
- color: #ffffff;
- line-height: 1;
- }
- }
-
- .income-hint {
- font-size: 24upx;
- color: rgba(255, 255, 255, 0.9);
- display: flex;
- align-items: center;
- justify-content: center;
-
- &::after {
- content: '>';
- margin-left: 8upx;
- font-weight: 600;
- }
- }
- }
-
- .today-stats {
- display: flex;
- padding: 0;
-
- .stat-item {
- flex: 1;
- padding: 10upx 0 50upx 0;
- position: relative;
- text-align: center;
-
- &:not(:last-child)::after {
- content: '';
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 1upx;
- height: 60upx;
- background: rgba(255, 255, 255, 0.2);
- }
-
- &:active {
- background: rgba(0, 0, 0, 0.1);
- }
-
- .stat-content {
- text-align: center;
-
- .stat-label {
- font-size: 26upx;
- color: rgba(255, 255, 255, 0.9);
- margin-bottom: 8upx;
- }
-
- .stat-value {
- font-size: 36upx;
- font-weight: 600;
- color: #ffffff;
- }
- }
- }
- }
- }
- .user-wrap {
- padding: 20upx 30upx 34upx 30upx;
- color: #fff;
- text-align: center;
- background-size: 100% 380upx;
- background-repeat: no-repeat;
- .user-top {
- @include disFlex(center, space-between);
- .open-bt_bx {
- display: flex;
- align-items: center;
- line-height: 1upx;
- & > button {
- padding: 0;
- line-height: auto;
- background-color: transparent;
- border: 1px solid #ffffff;
- border-radius: 22upx;
- padding: 10upx 17upx !important;
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #ffffff;
- & > .iconfont {
- font-size: 25upx;
- padding-right: 10upx;
- }
- }
- }
- }
- .income-amount {
- margin-top: 36upx;
- margin-bottom: 37upx;
- .price {
- font-size: 50upx;
- font-weight: bold;
- margin-top: 4upx;
- }
- }
- .user-bottom {
- @include disFlex(center, space-around);
- .info-list-name {
- color: white;
- }
- .info-list-value {
- font-size: 36upx;
- font-weight: bold;
- margin-top: 4upx;
- }
- }
- }
- // 消息
- .news-wrap {
- .news-list {
- @include disFlex(center, space-between);
- padding: 30upx 24upx 30upx 30upx;
- border-bottom: 1px solid $borderColor;
- font-size: 26upx;
- color: $fontColor2;
- &:active {
- background-color: $backColor;
- }
- & > div {
- @include disFlex(center, flex-start);
- }
- .news-left {
- .iconfont {
- color: $mainColor;
- margin-right: 10upx;
- }
- .ling {
- font-size: 28upx;
- }
- span{
- font-size:29upx;
- }
- }
- .news-right {
- font-size: 26upx;
- color: $mainColor;
- transform: scale(0.9);
- @include disFlex(flex-end, flex-start);
- .iconfont {
- font-size: 24upx;
- margin-left: 10upx;
- margin-bottom: 6upx;
- }
- }
- }
- }
- // 数据总览模块
- .overview-module {
- background: #ffffff;
- border-radius: 16upx;
- padding: 0;
- overflow: hidden;
-
- .overview-header {
- background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
- padding: 30upx 30upx 20upx;
- border-bottom: 1upx solid #f0f0f0;
-
- .overview-title {
- font-size: 32upx;
- font-weight: 600;
- color: #333;
- margin-bottom: 8upx;
- }
-
- .overview-subtitle {
- font-size: 24upx;
- color: #999;
- }
- }
-
- .overview-grid {
- display: flex;
- flex-wrap: wrap;
- padding: 10upx;
-
- .overview-item {
- width: 33.33%;
- padding: 30upx 0;
- text-align: center;
- position: relative;
- transition: all 0.3s ease;
-
- &:not(:nth-child(3n)) {
- &::after {
- content: '';
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 1upx;
- height: 60upx;
- background: #f0f0f0;
- }
- }
-
- &:nth-child(n+4) {
- &::before {
- content: '';
- position: absolute;
- left: 15%;
- right: 15%;
- top: 0;
- height: 1upx;
- background: #f0f0f0;
- }
- }
-
- &:active {
- background: #f8fafb;
- }
-
- .item-value {
- font-size: 36upx;
- font-weight: 600;
- color: #105a2b;
- margin-bottom: 10upx;
- line-height: 1;
- }
-
- .item-label {
- font-size: 26upx;
- color: #666;
- line-height: 1;
- }
- }
- }
- }
- // 新的花束花礼和绿植花材样式
- .flower-module {
- padding: 0;
-
- .flower-section {
- padding: 30upx 20upx;
-
-
- .section-header {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 30upx;
-
- .header-line {
- flex: 1;
- height: 1upx;
- background: linear-gradient(to right, transparent, #e0e0e0);
-
- &:last-child {
- background: linear-gradient(to left, transparent, #e0e0e0);
- }
- }
-
- .header-title {
- padding: 0 30upx;
- font-size: 32upx;
- font-weight: 600;
- color: #333;
- }
- }
-
- .icon-grid {
- display: flex;
- flex-wrap: wrap;
- margin: -10upx;
-
- .icon-item {
- width: 25%;
- padding: 10upx;
- text-align: center;
-
- .icon-wrapper {
- width: 120upx;
- height: 120upx;
- margin: 0 auto 4upx;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
-
- &:active {
- transform: scale(0.95);
- }
-
- .icon-image {
- width: 95upx;
- height: 95upx;
- }
- }
-
- .icon-text {
- font-size: 26upx;
- color: #333;
- line-height: 1.2;
- }
- }
- }
- }
- }
- .order-page {
- .ghs_list_page {
- background-color: rgba(255, 255, 255, 1);
- position: relative;
- width: 750upx;
- overflow: hidden;
- .profile-section {
- background-color: #09C567;
- padding: 30upx 30upx 0upx 30upx;
- border-radius: 0;
- .profile-header {
- display: flex;
- align-items: center;
- .avatar-container {
- width: 120upx;
- height: 120upx;
- border-radius: 60upx;
- overflow: hidden;
- background-color: rgba(255,255,255,0.2);
- border: 1upx solid #ffffff;
- .avatar-button {
- background: none !important;
- border: none !important;
- padding: 0 !important;
- margin: 0 !important;
- line-height: 1;
- display: block;
- width: 120upx;
- height: 120upx;
- color: transparent !important;
- &::after { border: none !important; }
- }
- .avatar {
- width: 120upx;
- height: 120upx;
- border-radius: 60upx;
- }
- }
- .user-info {
- flex: 1;
- margin-left: 24upx;
- .username {
- display: block;
- font-size: 36upx;
- font-weight: bold;
- color: #ffffff;
- }
- .user-id {
- display: block;
- margin-top: 6upx;
- font-size: 26upx;
- color: #ffffff;
- }
- }
- .more-icon {
- margin-left: 12upx;
- width: 60upx;
- height: 60upx;
- border-radius: 30upx;
- align-items: center;
- justify-content: center;
- display: flex;
- // background: rgba(255,255,255,0.15);
- // border: 1upx solid rgba(255,255,255,0.35);
- }
- }
- .function-grid--overlay {
- background: transparent;
- }
- .function-item--overlay {
- border-color: rgba(255,255,255,0.5);
- background: rgba(255,255,255,0.12);
- }
- .function-text--overlay {
- color: #ffffff;
- }
- }
- .flex-col {
- display: flex;
- flex-direction: column;
- }
- .flex-row {
- display: flex;
- flex-direction: row;
- }
- .justify-end {
- display: flex;
- justify-content: flex-end;
- }
- .justify-between {
- display: flex;
- justify-content: space-between;
- }
- .ghs_list_area {
- width: 750upx;
- background-color: #ece5e5;
- .ghs_box {
- background-color: rgba(255, 255, 255, 1);
- position: relative;
- width: 750upx;
- height: auto;
- margin-bottom:35upx;
- .image-text_7 {
- width: 674upx;
- height: 120upx;
- margin: 40upx 0 0 31upx;
- .section_1 {
- width: 120upx;
- height: 120upx;
- .logo{
- width:120upx;
- height:120upx;
- border-radius:10upx;
- }
- }
- .text-group_7 {
- width: 533upx;
- height: 99upx;
- margin-top: 5upx;
- .text_8 {
- display:inline-block;
- width: 550upx;
- height: 38upx;
- color: rgba(51, 51, 51, 1);
- font-size: 36upx;
- font-weight:bold;
- text-align: left;
- white-space: nowrap;
- line-height:38upx;
- overflow:hidden;
- }
- .text_9 {
- width: 533upx;
- height: 25upx;
- overflow-wrap: break-word;
- color: rgba(153, 153, 153, 1);
- font-size: 28upx;
- text-align: left;
- white-space: nowrap;
- line-height: 24upx;
- margin-top: 10upx;
- }
- }
- }
- .box_4 {
- background-color: rgba(238, 238, 238, 1);
- width: 750upx;
- height: 1upx;
- margin-top: 40upx;
- }
- .box_9 {
- width: 100%;
- height: 60upx;
- margin: 23upx 0 22upx 15upx;
- .tag_2 {
- background-color: rgba(255, 255, 255, 1);
- border-radius: 8px;
- height: 60upx;
- line-height:60upx;
- border: 2px solid rgba(221, 221, 221, 1);
- color: rgba(51, 51, 51, 1);
- font-size: 30upx;
- margin:0 16upx 0 0;
- text-align:center;
- float:left;
- padding-left:15upx;
- padding-right:15upx;
- }
- }
- .box_6 {
- background-color: rgb(248, 242, 242);
- width: 750upx;
- height:95upx;
- .show_clear_area {
- width: 247upx;
- height: 29upx;
- margin: 26upx 0 0 30upx;
- .waite_clear_order {
- width: 214upx;
- height: 29upx;
- overflow-wrap: break-word;
- color: rgba(255, 40, 66, 1);
- font-size: 31upx;
- font-weight:bold;
- text-align: left;
- white-space: nowrap;
- line-height: 29upx;
- }
- }
- }
- .button_4 {
- height: 80upx;
- line-height:80upx;
- text-align:center;
- background-color:#09C567;
- background-size: 137upx 137upx;
- width: 130upx;
- position: absolute;
- left: 570upx;
- top: 95upx;
- border-radius:39upx;
- .text_13 {
- color: rgba(255, 255, 255, 1);
- font-size: 30upx;
- font-weight:bold;
- }
- }
- .button_5 {
- height: 80upx;
- line-height:80upx;
- text-align:center;
- background-color:#CCCCCC;
- background-size: 137upx 137upx;
- width: 130upx;
- position: absolute;
- left: 570upx;
- top: 95upx;
- border-radius:39upx;
- .text_13 {
- color: rgba(255, 255, 255, 1);
- font-size: 30upx;
- font-weight:bold;
- }
- }
- .button_6 {
- height: 80upx;
- line-height:80upx;
- text-align:center;
- background-color:rgb(152, 153, 197);
- background-size: 137upx 137upx;
- width: 170upx;
- position: absolute;
- left: 540upx;
- top: 95upx;
- border-radius:39upx;
- .text_13 {
- color: rgba(255, 255, 255, 1);
- font-size: 30upx;
- font-weight:bold;
- }
- }
- .button_7 {
- height: 80upx;
- line-height:80upx;
- text-align:center;
- background-color:#09C567;
- background-size: 137upx 137upx;
- width: 180upx;
- position: absolute;
- left: 330upx;
- top: 95upx;
- border-radius:39upx;
- .text_13 {
- color: rgba(255, 255, 255, 1);
- font-size: 30upx;
- font-weight:bold;
- }
- }
- }
- }
- }
- }
- /* 商城选项弹框样式 */
- .mall-options-container {
- width: 600upx;
- background-color: #fff;
- border-radius: 24upx;
- overflow: hidden;
- animation: popup-in 0.3s ease-out;
-
- .mall-options-buttons {
- padding: 50upx 40upx 50upx;
- display: flex;
- flex-direction: column;
- gap: 40upx;
- align-items: center;
-
- .mall-option-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 32upx 40upx;
- background-color: #f8f9fa;
- border-radius: 20upx;
- transition: all 0.2s ease;
- width: 100%;
-
- &:active {
- background-color: #e9ecef;
- transform: scale(0.98);
- }
-
- .option-icon {
- font-size: 56upx;
- margin-right: 30upx;
- width: 70upx;
- text-align: center;
- }
-
- .option-text {
- font-size: 42upx;
- color: #333;
- font-weight: 500;
- }
- }
- }
- }
- @keyframes popup-in {
- 0% {
- opacity: 0;
- transform: scale(0.8) translateY(20upx);
- }
- 100% {
- opacity: 1;
- transform: scale(1) translateY(0);
- }
- }
- /* 供货商提示弹框样式 */
- .supplier-notice-popup {
- .supplier-notice-container {
- width: 650upx;
- background-color: #fff;
- border-radius: 20upx;
- overflow: hidden;
-
- .supplier-notice-header {
- padding: 40upx 30upx 20upx;
- text-align: center;
- background-color: #f8f9fa;
- border-bottom: 1upx solid #e9ecef;
-
- .supplier-notice-title {
- font-size: 36upx;
- font-weight: bold;
- color: #333;
- }
- }
-
- .supplier-notice-content {
- padding: 20upx 0;
-
- .supplier-list {
- padding: 0 30upx;
-
- .supplier-item {
- display: flex;
- align-items: center;
- padding: 20upx 0;
- border-bottom: 1upx solid #f0f0f0;
-
- &:last-child {
- border-bottom: none;
- }
-
- .supplier-icon {
- width: 60upx;
- height: 60upx;
- background-color: #e3f2fd;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 32upx;
- margin-right: 20upx;
- }
-
- .supplier-name {
- font-size: 32upx;
- color: #333;
- flex: 1;
- font-weight: 500;
- }
- }
- }
- }
-
- .supplier-notice-footer {
- padding: 30upx;
- text-align: center;
- background-color: #f8f9fa;
- border-top: 1upx solid #e9ecef;
-
- .supplier-notice-tip {
- display: block;
- font-size: 40upx;
- font-weight: bold;
- color: red;
- margin-bottom: 30upx;
- line-height: 1.4;
- }
-
- .supplier-notice-buttons {
- display: flex;
- justify-content: space-between;
- gap: 20upx;
-
- .admin-button-com {
- flex: 1;
- margin: 0;
- padding: 20upx 0;
- height: auto;
- line-height: normal;
- font-size: 34upx;
- font-weight: bold;
- }
- }
- }
- }
- }
- .red-mind{
- width: 42upx;
- height: 42upx;
- line-height: 38upx;
- font-size: 28upx;
- font-weight: 700;
- text-align: center;
- position: absolute;
- right: 16upx;
- top: 10upx;
- color: white;
- background-color: red;
- border: 1upx solid red;
- border-radius: 26upx;
- display: inline-block;
- }
- // 警告提示区域样式
- .alert-card {
- margin: 15upx 10upx;
- border-radius: 16upx;
- overflow: hidden;
- box-shadow: 0 4upx 12upx rgba(0, 0, 0, 0.08);
- transition: all 0.3s ease;
- border: 3upx solid;
-
- &:active {
- transform: translateY(2upx);
- box-shadow: 0 2upx 8upx rgba(0, 0, 0, 0.06);
- }
-
- .alert-content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 30upx 24upx;
- min-height: 100upx;
-
- .alert-title {
- font-size: 38upx;
- font-weight: 600;
- flex: 1;
- line-height: 1.4;
- }
-
- .alert-action {
- font-size: 32upx;
- font-weight: 600;
- white-space: nowrap;
- margin-left: 20upx;
- padding: 12upx 24upx;
- border-radius: 8upx;
- transition: all 0.2s ease;
-
- &:active {
- background-color: rgba(255, 255, 255, 0.6);
- }
- }
-
- .alert-text {
- font-size: 36upx;
- font-weight: 600;
- line-height: 1.6;
- text-align: center;
- width: 100%;
- }
- }
- }
- .alert-card-warning {
- background: #fffbf0;
- border-color: #fffbf0;
-
- .alert-content {
- .alert-title {
- color: #d48806;
- }
-
- .alert-action {
- color: #ffa940;
- border: 2upx solid #ffa940;
- }
- }
- }
- .alert-card-error {
- background: linear-gradient(135deg, #fff2f0 0%, #fff7f5 100%);
- border-color: #fff7f5;
-
- .alert-content {
- .alert-text {
- color: #d9363e;
- }
- }
- }
- </style>
|