| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204 |
- <template>
- <view>
- <block v-if="loginStyle == 0">
- <view style="width:100vw;height:500upx;display:flex;align-items:center;justify-content:center;">
- <button class="admin-button-com big blue" @click="pageTo({url:'/admin/home/login'})">点我登录</button>
- <view style="position:absolute;top:360upx;font-size:30upx;">
- <text style="color:red;font-weight:bold;">伙伴和员工</text>
- 需要登录,请联系批发店添加员工
- </view>
- </view>
- </block>
- <block v-else>
- <div class="app-main app-content" v-if="loginStyle == 2">
- <template v-if="lookMoney == 1">
- <div class="user-wrap" :style="{ backgroundImage: `url(${constant.imgUrl}/home/bg_hd_home2.png)` }">
- <div class="user-top">
- <div class="app-size-28">今日概况</div>
- </div>
- <div class="income-amount" @click="pageTo({url:'/admin/stat/kdIncome'})">
- <div>收入</div>
- <div class="price">{{ $util.numberFormat(data.todayData.income) }}</div>
- </div>
- <div class="user-bottom">
- <div class="info-list">
- <div class="info-list-name">访客</div>
- <div class="info-list-value">
- {{ $util.numberFormat(data.todayData.visit) || 0 }}
- </div>
- </div>
- <navigator url="/admin/home/order" open-type="switchTab" class="info-list">
- <div class="info-list-name">订单</div>
- <div class="info-list-value">
- {{ $util.numberFormat(data.todayData.order) || 0 }}
- </div>
- </navigator>
- <div class="info-list" @click="">
- <div class="info-list-name">昨天</div>
- <div class="info-list-value">
- {{ $util.numberFormat(0) || 0 }}
- </div>
- </div>
- </div>
- </div>
- <div class="module-com order-wrap" @click="pageTo({url:'/admin/stat/kdIncome'})">
- <div class="total-blo">
- <div class="total-list2">
- <div class="app-color-3">系统收款</div>
- <div class="list-num">
- <view>{{countStat.systemCount||0}}</view>
- <view>{{countStat.systemIncome?parseFloat(countStat.systemIncome):0}}</view>
- </div>
- </div>
- <div class="total-list2">
- <div class="app-color-3">线下微信</div>
- <div class="list-num">
- <view>{{countStat.kfWxCount||0}}</view>
- <view>{{countStat.kfWxIncome?parseFloat(countStat.kfWxIncome):0}}</view>
- </div>
- </div>
- <div class="total-list2">
- <div class="app-color-3">现金</div>
- <div class="list-num">
- <view>{{countStat.cashCount||0}}</view>
- <view>{{countStat.cashIncome?parseFloat(countStat.cashIncome):0}}</view>
- </div>
- </div>
- <div class="total-list2">
- <div class="app-color-3">赊账</div>
- <div class="list-num">
- <view>{{countStat.debtCount||0}}</view>
- <view>{{countStat.debtIncome?parseFloat(countStat.debtIncome):0}}</view>
- </div>
- </div>
- </div>
- </div>
- </template>
- <div class="module-com news-wrap">
- <div class="news-list" v-for="(item, index) in data.notice" :key="index" @click="noticeFn(item)" >
- <div class="news-left">
- <i class="iconfont iconxiaoxi2 ling"></i>
- <span>{{ item.title }}</span>
- </div>
- <div class="news-right">
- <span>{{ item.action }}</span>
- <i class="iconfont iconxiangyou"></i>
- </div>
- </div>
- </div>
- <view v-if="!$util.isEmpty(data.warning)" style="color:red;font-size:36upx;font-weight:bold;text-align: center;margin-bottom:15upx;">{{ data.warning }}</view>
- <view class="module-com">
- <view class="tabs-head_bx">
- <image @click="goKjKd()" :src="lskd1" mode="widthFix"></image>
- <image @click="goShKd()" :src="lskd2" mode="widthFix"></image>
- </view>
- <div class="tabs-wrap">
- <div class="tabs-list" v-for="(item, index) in tabsData" :key="index" >
- <div @click="goPage(item)">
- <div class="tabs-img">
- <img :src="`${constant.imgUrl}/${item.img}`" alt mode="widthFix" />
- </div>
- <div class="tabs-name">{{ item.name }}</div>
- </div>
- </div>
- </div>
- </view>
- <template v-if="lookMoney == 1">
- <div class="module-com total-wrap">
- <div class="total-tit">总览</div>
- <div class="total-blo">
- <div class="total-list" v-for="(item, index) in overview" :key="index" @click="pageTo(item)">
- <div class="list-num">{{ $util.numberFormat(item.value) }}</div>
- <div class="app-color-3">{{ item.name }}</div>
- </div>
- </div>
- </div>
- </template>
- </div>
- <view class="order-page" v-else>
- <view class="ghs_list_page flex-col">
- <view style="background-color:white;margin-bottom:20upx;">
- <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="pageTo({url:'/admin/shop/myShop'})">我的门店</button>
- <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="pageTo({url:'/admin/staff/list'})">我的员工</button>
- <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="pageTo({url:'/admin/shop/add?id='+loginInfo.shopId})">我的地址</button>
- <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="pageTo({url:'/admin/stat/cgItem'})">采购统计</button>
- <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="goMore()">更多</button>
- </view>
- <view style="text-align:center;font-size:29upx;">您好,{{ loginInfo.admin && loginInfo.admin.name ? loginInfo.admin.name : '' }} {{ loginInfo.admin && loginInfo.admin.mobile ? loginInfo.admin.mobile : '' }}</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.avatar" @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'})"> <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>
- <emptyComponent title="暂无供货商" :is-empty="$util.isEmpty(supplierList)" />
- </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>
- </view>
- </template>
- <script>
- import { mapGetters } from "vuex";
- import { getWeixinId } from "@/api/invite";
- import { getStat,getStrokeCount } from '@/api/console'
- import { consoleIndex } from "@/api/workbench";
- import NotLogin from "@/components/not-login";
- import autoUpdateMixins from "@/mixins/autoUpdate";
- import emptyComponent from "@/components/empty";
- import { ghsList } from "@/api/purchase";
- import { changeDelStatus } from "@/api/ghs";
- import {currentShop} from "@/api/shop";
- import { clearLogin,hasNotice } from "@/api/admin";
- export default {
- name: "workbench",
- components: { NotLogin,emptyComponent },
- 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 },
- isMini:0
- },
- tabsData: [
- { name: "商城", img: `ghs/home/shop2.png`, url: "/admin/cg/mall",pf:1},
- { name: "改价", img: `ghs/home/gj2.png`, url: "/admin/changePrice/list2",pf:1},
- { name: "花材绿植", img: `ghs/home/hcgl2.png`, url: "/admin/item/list2",pf:1 },
- { name: "接花束", img: `ghs/home/shop2.png`, url: "/admin/order/workOrder",pf:1 },
- { name: "拆散", img: `ghs/home/kcyjs2.png`, url: "/admin/part/list",pf:1},
- { name: "损耗", img: `ghs/home/kcyjs2.png`, url: "/admin/breakage/list",pf:1},
- { name: "任务", img: `ghs/home/kcyjs2.png`, url: "/admin/work/list",pf:1 },
- { name: "买花", img: `ghs/home/shop2.png`, url: "/pagesPurchase/order",pf:1 },
- { name: "买花记录", img: `ghs/home/shop2.png`, url: "/pagesPurchase/shopping",pf:1 },
- { name: "花束", img: `ghs/home/hcgl2.png`, url: "/admin/goods/list",pf:1 },
- { name: "客户充值", img: `ghs/home/kcyjs2.png`, url: "/admin/recharge/rechargeCode",pf:1 },
- ],
- totalData: [
- { name: "客户数", value: 0 },
- { name: "总访客", value: 0 },
- { name: "总订单", value: 0 },
- { name: "总收入(元)", value: 0 },
- { name: "总支出(元)", value: 0 },
- { name: "总采购(元)", value: 0 }
- ],
- lskd1: `${this.$constant.imgUrl}/ghs/home/lskd001.jpg`,
- lskd2: `${this.$constant.imgUrl}/ghs/home/lskd002.jpg`,
- lskd3: `${this.$constant.imgUrl}/ghs/home/lskd003.jpg`,
- supplierList: [],
- //登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
- loginStyle :0,
- backAction:'',
- countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
- lookMoney:1,
- currentGhs:{}
- };
- },
- 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)){
- if(Number(newVal.onlyCg) == 1){
- this.loginStyle = 1
- uni.hideTabBar()
- }else{
- this.loginStyle = 2
- uni.showTabBar()
- }
- }
- }
- }
- },
- onPullDownRefresh () {
- this.init();
- uni.stopPullDownRefresh();
- },
- onShow () {
- if(this.backAction == 'login'){
- this.init()
- }
- if(this.backAction == 'cacelMask'){
- console.log(this.backAction)
- this.init()
- this.backAction = ''
- }
- if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
- if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
- if(Number(this.loginInfo.onlyCg) == 1){
- this.loginStyle = 1
- uni.hideTabBar()
- }else{
- this.loginStyle = 2
- uni.showTabBar()
- }
- }
- }
- this.showShopName()
- },
- methods: {
- closeToShow(){
- this.$refs.toShowMore.close()
- },
- 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 })
- }
- })
- },
- goMore(){
- let that = this
- uni.showActionSheet({
- itemList: ['已屏蔽商家', '改进建议','开关商城','也要一个此商城','修改密码','退出登录'],
- success: function (res) {
- if(res.tapIndex == 0){
- that.$util.pageTo({url: '/pagesPurchase/pb'})
- }
- if(res.tapIndex == 1){
- that.suggest()
- }
- 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
- let needNotice = res.data.needNotice ? res.data.needNotice : 0
- if(needNotice == 1){
- this.$util.confirmModal({content:'你已有多个供货商,下单时注意区别,不要下错了哦',okText:'知道了'},() => {
- hasNotice().then(res=>{
- })
- })
- }
- })
- },
- goGd(){
- //选择花材生成制作单和订单
- this.$util.pageTo({url:'/admin/order/workOrder'})
- },
- goKjKd(){
- if(this.myShopInfo && Number(this.myShopInfo.defaultCustomId)>0){
- this.$util.pageTo({url:'/admin/billing/index2?customId='+this.myShopInfo.defaultCustomId})
- }else{
- this.$msg('请设置快捷开单的对应客户')
- }
- },
- goShKd(){
- this.$util.pageTo({url:'/admin/custom/selectCustom'})
- },
- goPage (item) {
- if (item.url === '/admin/billing/priceChange') {
- this.goToMallPt('pages/pay/index')
- return true
- }
- if(this.getLoginInfo.pfShopId && Number(this.getLoginInfo.pfShopId)>0){
- if(item.pf == 0){
- this.$msg('请在批发端操作')
- return false
- }
- }
- this.$util.pageTo(item)
- },
- init () {
- this.getGHSList()
- getWeixinId().then(res => {
- this.getappIdList = res.data
- })
- // #ifdef MP-WEIXIN
- this.isMini = 1
- // #endif
- let that = this
- consoleIndex({isMini:this.isMini}).then(res => {
- this.data = res.data
- if(res.data.menu && !this.$util.isEmpty(res.data.menu)){
- this.tabsData = res.data.menu
- }
- this.lookMoney = res.data.lookMoney
- })
- getStrokeCount().then(res=>{
- if(res.code == 1){
- this.countStat = res.data
- }
- })
- getStat().then(res=>{
- if(res.code == 1){
- that.overview = res.data.overview
- }
- })
- this.showShopName()
- },
- 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'})
- },
- goToMallPt (url) {
- 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) {
- }
- })
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- .app-content {
- padding-bottom: 10upx;
- }
- .module-com {
- margin-bottom: 20upx;
- background-color: #fff;
- }
- .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;
- }
- }
- }
- }
- // 总览
- .total-wrap,
- .order-wrap {
- .total-tit {
- padding: 18upx 0 18upx 20upx;
- border-bottom: 1upx solid $borderColor;
- font-weight: 600;
- font-size: 24upx;
- color: #333333;
- }
- .total-blo {
- @include disFlex(center, space-between);
- flex-wrap: wrap;
- padding: 20upx 0 0;
- .total-list {
- width: 33%;
- text-align: center;
- margin: 20upx 0upx;
- border-right: 1upx solid $borderColor;
- .list-num {
- margin-bottom: 8upx;
- font-size: 36upx;
- font-weight: bold;
- }
- }
- .total-list:nth-child(3n) {
- border-right: none;
- }
- .total-list:nth-child(n + 4) {
- padding-bottom: 0;
- }
- .total-list2 {
- width: 24%;
- text-align: center;
- margin: 20upx 0upx;
- border-right: 1upx solid $borderColor;
- .list-num {
- margin-top:10upx;
- margin-bottom:8upx;
- font-size:26upx;
- font-weight:normal;
- }
- }
- .total-list2:nth-child(4n) {
- border-right: none;
- }
- .total-list2:nth-child(n + 4) {
- padding-bottom: 0;
- }
- }
- }
- .tabs-head_bx {
- display: flex;
- align-items: center;
- padding: 20upx 15upx;
- }
- .tabs-wrap {
- padding: 20upx 10upx;
- @include disFlex(center, flex-start);
- flex-wrap: wrap;
- .tabs-list {
- width: 25%;
- margin-top: 50upx;
- text-align: center;
- .tabs-img {
- width: 100upx;
- height: 100upx;
- margin: 0 auto;
- img {
- height: 100%;
- }
- }
- .tabs-name {
- color: #444444;
- margin-top: 10upx;
- }
- &:nth-child(-n + 4) {
- margin-top: 0;
- }
- }
- }
- // 遮罩层
- .renew-wrap {
- text-align: center;
- .renew-wrap-text {
- margin-top: 30upx;
- margin-bottom: 60upx;
- font-size: 34upx;
- }
- }
- .order-page {
- .ghs_list_page {
- background-color: rgba(255, 255, 255, 1);
- position: relative;
- width: 750upx;
- overflow: hidden;
- .flex-col {
- display: flex;
- flex-direction: column;
- }
- .flex-row {
- display: flex;
- flex-direction: row;
- }
- .justify-start {
- display: flex;
- justify-content: flex-start;
- }
- .justify-center {
- display: flex;
- justify-content: center;
- }
-
- .justify-end {
- display: flex;
- justify-content: flex-end;
- }
- .justify-evenly {
- display: flex;
- justify-content: space-evenly;
- }
- .justify-around {
- display: flex;
- justify-content: space-around;
- }
- .justify-between {
- display: flex;
- justify-content: space-between;
- }
- .align-start {
- display: flex;
- align-items: flex-start;
- }
- .align-center {
- display: flex;
- align-items: center;
- }
- .align-end {
- display: flex;
- align-items: flex-end;
- }
- .ghs_list_area {
- width: 750upx;
- background-color: #ece5e5;
- .group_1 {
- box-shadow: 0px 1px 0px 0px rgba(221, 221, 221, 1);
- background-color: rgba(255, 255, 255, 1);
- width: 750upx;
- height: 128upx;
- margin-top: 2upx;
- .image_1 {
- width: 727upx;
- height: 20upx;
- margin: 11upx 0 0 12upx;
- }
- .block_4 {
- width: 714upx;
- height: 64upx;
- margin: 21upx 0 12upx 24upx;
- .icon_1 {
- width: 20upx;
- height: 34upx;
- margin-top: 16upx;
- }
- .text_1 {
- width: 107upx;
- height: 34upx;
- overflow-wrap: break-word;
- color: rgba(4, 4, 4, 1);
- font-size: 36upx;
- font-family: PingFangSC-Semibold;
- text-align: left;
- white-space: nowrap;
- line-height: 24upx;
- margin: 15upx 0 0 278upx;
- }
- .applet-top-bar_1 {
- width: 174upx;
- height: 64upx;
- margin-left: 135upx;
- }
- }
- }
- .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;
- }
- .tag_3 {
- background-color: rgba(255, 255, 255, 1);
- border-radius: 8px;
- height: 60upx;
- border: 1px solid rgba(221, 221, 221, 1);
- margin-left: 12upx;
- width: 140upx;
- .text_11 {
- width: 101upx;
- height: 25upx;
- overflow-wrap: break-word;
- color: rgba(51, 51, 51, 1);
- font-size: 26upx;
- text-align: left;
- white-space: nowrap;
- line-height: 25upx;
- margin: 17upx 0 0 20upx;
- }
- }
- .tag_4 {
- background-color: rgba(255, 255, 255, 1);
- border-radius: 8px;
- height: 60upx;
- border: 1px solid rgba(221, 221, 221, 1);
- margin-left: 12upx;
- width: 192upx;
- .text_12 {
- width: 153upx;
- height: 25upx;
- overflow-wrap: break-word;
- color: rgba(51, 51, 51, 1);
- font-size: 26upx;
- text-align: left;
- white-space: nowrap;
- line-height: 25upx;
- margin: 17upx 0 0 18upx;
- }
- }
- }
- .box_6 {
- background-color: rgb(248, 242, 242);
- width: 750upx;
- height:95upx;
- .show_clear_area {
- width: 247upx;
- height: 29upx;
- margin: 26upx 0 0 30upx;
- .icon_2 {
- width: 22upx;
- height: 26upx;
- margin-top: 2upx;
- }
- .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;
- }
- }
- .image-text_9 {
- width: 134upx;
- height: 27upx;
- margin: 26upx 29upx 0 310upx;
- .text-group_4 {
- width: 111upx;
- height: 27upx;
- overflow-wrap: break-word;
- color: rgba(255, 40, 66, 1);
- font-size: 30upx;
- font-weight:bold;
- text-align: left;
- white-space: nowrap;
- line-height: 27upx;
- }
- .icon_3 {
- width: 14upx;
- height: 24upx;
- margin-top: 2upx;
- }
- }
- }
- .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;
- }
- }
- }
- }
- }
- }
- </style>
|