workbench.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204
  1. <template>
  2. <view>
  3. <block v-if="loginStyle == 0">
  4. <view style="width:100vw;height:500upx;display:flex;align-items:center;justify-content:center;">
  5. <button class="admin-button-com big blue" @click="pageTo({url:'/admin/home/login'})">点我登录</button>
  6. <view style="position:absolute;top:360upx;font-size:30upx;">
  7. <text style="color:red;font-weight:bold;">伙伴和员工</text>
  8. 需要登录,请联系批发店添加员工
  9. </view>
  10. </view>
  11. </block>
  12. <block v-else>
  13. <div class="app-main app-content" v-if="loginStyle == 2">
  14. <template v-if="lookMoney == 1">
  15. <div class="user-wrap" :style="{ backgroundImage: `url(${constant.imgUrl}/home/bg_hd_home2.png)` }">
  16. <div class="user-top">
  17. <div class="app-size-28">今日概况</div>
  18. </div>
  19. <div class="income-amount" @click="pageTo({url:'/admin/stat/kdIncome'})">
  20. <div>收入</div>
  21. <div class="price">{{ $util.numberFormat(data.todayData.income) }}</div>
  22. </div>
  23. <div class="user-bottom">
  24. <div class="info-list">
  25. <div class="info-list-name">访客</div>
  26. <div class="info-list-value">
  27. {{ $util.numberFormat(data.todayData.visit) || 0 }}
  28. </div>
  29. </div>
  30. <navigator url="/admin/home/order" open-type="switchTab" class="info-list">
  31. <div class="info-list-name">订单</div>
  32. <div class="info-list-value">
  33. {{ $util.numberFormat(data.todayData.order) || 0 }}
  34. </div>
  35. </navigator>
  36. <div class="info-list" @click="">
  37. <div class="info-list-name">昨天</div>
  38. <div class="info-list-value">
  39. {{ $util.numberFormat(0) || 0 }}
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="module-com order-wrap" @click="pageTo({url:'/admin/stat/kdIncome'})">
  45. <div class="total-blo">
  46. <div class="total-list2">
  47. <div class="app-color-3">系统收款</div>
  48. <div class="list-num">
  49. <view>{{countStat.systemCount||0}}</view>
  50. <view>{{countStat.systemIncome?parseFloat(countStat.systemIncome):0}}</view>
  51. </div>
  52. </div>
  53. <div class="total-list2">
  54. <div class="app-color-3">线下微信</div>
  55. <div class="list-num">
  56. <view>{{countStat.kfWxCount||0}}</view>
  57. <view>{{countStat.kfWxIncome?parseFloat(countStat.kfWxIncome):0}}</view>
  58. </div>
  59. </div>
  60. <div class="total-list2">
  61. <div class="app-color-3">现金</div>
  62. <div class="list-num">
  63. <view>{{countStat.cashCount||0}}</view>
  64. <view>{{countStat.cashIncome?parseFloat(countStat.cashIncome):0}}</view>
  65. </div>
  66. </div>
  67. <div class="total-list2">
  68. <div class="app-color-3">赊账</div>
  69. <div class="list-num">
  70. <view>{{countStat.debtCount||0}}</view>
  71. <view>{{countStat.debtIncome?parseFloat(countStat.debtIncome):0}}</view>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </template>
  77. <div class="module-com news-wrap">
  78. <div class="news-list" v-for="(item, index) in data.notice" :key="index" @click="noticeFn(item)" >
  79. <div class="news-left">
  80. <i class="iconfont iconxiaoxi2 ling"></i>
  81. <span>{{ item.title }}</span>
  82. </div>
  83. <div class="news-right">
  84. <span>{{ item.action }}</span>
  85. <i class="iconfont iconxiangyou"></i>
  86. </div>
  87. </div>
  88. </div>
  89. <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>
  90. <view class="module-com">
  91. <view class="tabs-head_bx">
  92. <image @click="goKjKd()" :src="lskd1" mode="widthFix"></image>
  93. <image @click="goShKd()" :src="lskd2" mode="widthFix"></image>
  94. </view>
  95. <div class="tabs-wrap">
  96. <div class="tabs-list" v-for="(item, index) in tabsData" :key="index" >
  97. <div @click="goPage(item)">
  98. <div class="tabs-img">
  99. <img :src="`${constant.imgUrl}/${item.img}`" alt mode="widthFix" />
  100. </div>
  101. <div class="tabs-name">{{ item.name }}</div>
  102. </div>
  103. </div>
  104. </div>
  105. </view>
  106. <template v-if="lookMoney == 1">
  107. <div class="module-com total-wrap">
  108. <div class="total-tit">总览</div>
  109. <div class="total-blo">
  110. <div class="total-list" v-for="(item, index) in overview" :key="index" @click="pageTo(item)">
  111. <div class="list-num">{{ $util.numberFormat(item.value) }}</div>
  112. <div class="app-color-3">{{ item.name }}</div>
  113. </div>
  114. </div>
  115. </div>
  116. </template>
  117. </div>
  118. <view class="order-page" v-else>
  119. <view class="ghs_list_page flex-col">
  120. <view style="background-color:white;margin-bottom:20upx;">
  121. <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>
  122. <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>
  123. <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>
  124. <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>
  125. <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="goMore()">更多</button>
  126. </view>
  127. <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>
  128. <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>
  129. <template v-if="!$util.isEmpty(ad)">
  130. <block v-for="(adInfo, adIndex) in ad" :key="adIndex">
  131. <view style="text-align:center;" @click.stop="pageTo({url:adInfo.url})">
  132. <image :src="adInfo.banner" mode="widthFix" style="width:97%;margin:0 auto;"></image>
  133. </view>
  134. </block>
  135. </template>
  136. <template v-if="!$util.isEmpty(supplierList)">
  137. <view class="ghs_list_area flex-col justify-end">
  138. <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in supplierList" :key="index">
  139. <view class="image-text_7 flex-row justify-between">
  140. <view class="section_1 flex-col">
  141. <image class="logo" :src="ghsInfo.avatar" @click="enterShop(ghsInfo)" />
  142. </view>
  143. <view class="text-group_7 flex-col justify-between" @click="enterShop(ghsInfo)">
  144. <text class="text_8">{{ghsInfo.name}}</text>
  145. <text class="text_9">
  146. <block v-if="ghsInfo.cutStyle && ghsInfo.cutStyle == 1">
  147. <block v-if="ghsInfo.meetNum == 1 || ghsInfo.meetAmount == 1">
  148. <block v-if="ghsInfo.meetNum && ghsInfo.meetNum>0 && ghsInfo.cutAmount>0">
  149. <text style="color:red;font-weight:bold;">
  150. 全场{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
  151. </text>
  152. </block>
  153. <block v-else>
  154. <text v-if="ghsInfo.meetAmount && ghsInfo.meetAmount>0 && ghsInfo.cutAmount>0" style="color:red;font-weight:bold;">
  155. 全场{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
  156. </text>
  157. </block>
  158. </block>
  159. <block v-else>
  160. <block v-if="ghsInfo.meetNum && ghsInfo.meetNum>0 && ghsInfo.cutAmount>0">
  161. <text style="color:red;font-weight:bold;">
  162. 满{{ghsInfo.meetNum?ghsInfo.meetNum:0}}扎{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
  163. </text>
  164. </block>
  165. <block v-else>
  166. <text v-if="ghsInfo.meetAmount && ghsInfo.meetAmount>0 && ghsInfo.cutAmount>0" style="color:red;font-weight:bold;">
  167. 满{{ghsInfo.meetAmount?ghsInfo.meetAmount:0}}元{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount*100).toString().replace(/0/g,''):0}}折
  168. </text>
  169. </block>
  170. </block>
  171. </block>
  172. <block v-else>
  173. <block v-if="ghsInfo.meetNum && ghsInfo.meetNum>0 && ghsInfo.cutAmount>0">
  174. <text style="color:red;font-weight:bold;">
  175. 满{{ghsInfo.meetNum?ghsInfo.meetNum:0}}扎优惠{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount):0}}元
  176. </text>
  177. </block>
  178. <block v-else>
  179. <text v-if="ghsInfo.meetAmount && ghsInfo.meetAmount>0 && ghsInfo.cutAmount>0" style="color:red;font-weight:bold;">
  180. 满{{ghsInfo.meetAmount?ghsInfo.meetAmount:0}}元优惠{{ghsInfo.cutAmount?parseFloat(ghsInfo.cutAmount):0}}元
  181. </text>
  182. </block>
  183. </block>
  184. </text>
  185. </view>
  186. </view>
  187. <view class="box_4 flex-col"></view>
  188. <view class="box_9">
  189. <view class="tag_2" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})"> <text>欠款变动记录</text> </view>
  190. <view class="tag_2" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})"> <text>结账记录</text> </view>
  191. <view class="tag_2" @click="pageTo({url:'/pagesPurchase/shopping'})"> <text>买花记录</text> </view>
  192. <view class="tag_2" @click.stop="callUp(ghsInfo)" style="color:green;font-weight:bold;"> <text>联系我们</text> </view>
  193. </view>
  194. <view class="box_6 flex-row" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0">
  195. <view class="show_clear_area flex-row justify-between">
  196. <text class="waite_clear_order">
  197. 待结订单 {{ghsInfo.debtNum}}笔 合计¥{{ghsInfo.debtAmount?parseFloat(ghsInfo.debtAmount):0}}
  198. <text style="margin-left:30upx;" v-if="ghsInfo.remainDebtAmount>0">选订单结 》</text>
  199. </text>
  200. </view>
  201. </view>
  202. <block v-if="Number(ghsInfo.balance)>0">
  203. <view class="box_6 flex-row" v-if="ghsInfo.remainDebtAmount>0" @click.stop="recharge(ghsInfo)">
  204. <view class="show_clear_area flex-row justify-between">
  205. <text class="waite_clear_order" style="color:#3385ff;">
  206. <text v-if="Number(ghsInfo.balance)>0">减去余额¥{{ ghsInfo.balance ? parseFloat(ghsInfo.balance) : 0 }}</text>
  207. <text v-if="ghsInfo.remainDebtAmount>0" style="margin-left:15upx;">实欠¥{{ ghsInfo.remainDebtAmount }}</text>
  208. <text style="margin-left:30upx;">按金额结 》</text>
  209. </text>
  210. </view>
  211. </view>
  212. <view class="box_6 flex-row" v-if="ghsInfo.remainDebtAmount<0" @click.stop="recharge(ghsInfo)">
  213. <view class="show_clear_area flex-row justify-between">
  214. <text class="waite_clear_order" style="color:#3385ff;">
  215. <text>账户余额¥{{ Math.abs(ghsInfo.remainDebtAmount) }}</text>
  216. <text style="margin-left:30upx;">已结清</text>
  217. </text>
  218. </view>
  219. </view>
  220. </block>
  221. <block v-if="ghsInfo.live == 1">
  222. <view class="button_7 flex-col" @click.stop="goKmCg(ghsInfo)" v-if="ghsInfo.openKmCg && ghsInfo.openKmCg == 1"><text class="text_13">昆明直采</text></view>
  223. <view class="button_4 flex-col" v-if="ghsInfo.isOpen == 1" @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
  224. <view class="button_5 flex-col" v-else @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
  225. </block>
  226. <block v-else>
  227. <view class="button_6 flex-col" @click="fillCg(ghsInfo)"><text class="text_13">录采购单</text></view>
  228. </block>
  229. <text style="position:absolute;left:677upx;top:17upx;color:#CCCCCC;" @click.stop="getMore(ghsInfo)">更多</text>
  230. </view>
  231. </view>
  232. </template>
  233. <block v-else>
  234. <emptyComponent title="暂无供货商" :is-empty="$util.isEmpty(supplierList)" />
  235. </block>
  236. <view style="text-align:center;margin-top:50upx;margin-bottom:182upx;color:#827171;font-size:28upx;">
  237. <text style="margin-right:20upx;">中花汇提供技术支持</text>
  238. <text style="margin-right:20upx;">|</text>
  239. <text @click="toPhone()">联系软件公司</text>
  240. </view>
  241. </view>
  242. </view>
  243. </block>
  244. <uni-popup ref="toShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
  245. <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;">
  246. <view style="width:100vw;margin-top:8upx;"><button @click="rechargeChange()">充值记录</button></view>
  247. <view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动明细</button></view>
  248. <view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">屏蔽此商家</button></view>
  249. <view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
  250. </view>
  251. </uni-popup>
  252. </view>
  253. </template>
  254. <script>
  255. import { mapGetters } from "vuex";
  256. import { getWeixinId } from "@/api/invite";
  257. import { getStat,getStrokeCount } from '@/api/console'
  258. import { consoleIndex } from "@/api/workbench";
  259. import NotLogin from "@/components/not-login";
  260. import autoUpdateMixins from "@/mixins/autoUpdate";
  261. import emptyComponent from "@/components/empty";
  262. import { ghsList } from "@/api/purchase";
  263. import { changeDelStatus } from "@/api/ghs";
  264. import {currentShop} from "@/api/shop";
  265. import { clearLogin,hasNotice } from "@/api/admin";
  266. export default {
  267. name: "workbench",
  268. components: { NotLogin,emptyComponent },
  269. mixins: [autoUpdateMixins],
  270. data () {
  271. return {
  272. overview:[],
  273. ad:[],
  274. showAd:1,
  275. constant: this.$constant,
  276. getappIdList: {},
  277. data: {
  278. admin: {},
  279. asset: {},
  280. notice: {},
  281. todayData: { income:0.00, order:0, custom:0, expend:0.00 },
  282. isMini:0
  283. },
  284. tabsData: [
  285. { name: "商城", img: `ghs/home/shop2.png`, url: "/admin/cg/mall",pf:1},
  286. { name: "改价", img: `ghs/home/gj2.png`, url: "/admin/changePrice/list2",pf:1},
  287. { name: "花材绿植", img: `ghs/home/hcgl2.png`, url: "/admin/item/list2",pf:1 },
  288. { name: "接花束", img: `ghs/home/shop2.png`, url: "/admin/order/workOrder",pf:1 },
  289. { name: "拆散", img: `ghs/home/kcyjs2.png`, url: "/admin/part/list",pf:1},
  290. { name: "损耗", img: `ghs/home/kcyjs2.png`, url: "/admin/breakage/list",pf:1},
  291. { name: "任务", img: `ghs/home/kcyjs2.png`, url: "/admin/work/list",pf:1 },
  292. { name: "买花", img: `ghs/home/shop2.png`, url: "/pagesPurchase/order",pf:1 },
  293. { name: "买花记录", img: `ghs/home/shop2.png`, url: "/pagesPurchase/shopping",pf:1 },
  294. { name: "花束", img: `ghs/home/hcgl2.png`, url: "/admin/goods/list",pf:1 },
  295. { name: "客户充值", img: `ghs/home/kcyjs2.png`, url: "/admin/recharge/rechargeCode",pf:1 },
  296. ],
  297. totalData: [
  298. { name: "客户数", value: 0 },
  299. { name: "总访客", value: 0 },
  300. { name: "总订单", value: 0 },
  301. { name: "总收入(元)", value: 0 },
  302. { name: "总支出(元)", value: 0 },
  303. { name: "总采购(元)", value: 0 }
  304. ],
  305. lskd1: `${this.$constant.imgUrl}/ghs/home/lskd001.jpg`,
  306. lskd2: `${this.$constant.imgUrl}/ghs/home/lskd002.jpg`,
  307. lskd3: `${this.$constant.imgUrl}/ghs/home/lskd003.jpg`,
  308. supplierList: [],
  309. //登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
  310. loginStyle :0,
  311. backAction:'',
  312. countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
  313. lookMoney:1,
  314. currentGhs:{}
  315. };
  316. },
  317. computed: {
  318. ...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo",myShopInfo:"getMyShopInfo" })
  319. },
  320. watch: {
  321. //只需要采购花材的花店不显示底部菜单
  322. loginInfo(newVal) {
  323. if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentShopId > 0){
  324. if(!this.$util.isEmpty(newVal.onlyCg)){
  325. if(Number(newVal.onlyCg) == 1){
  326. this.loginStyle = 1
  327. uni.hideTabBar()
  328. }else{
  329. this.loginStyle = 2
  330. uni.showTabBar()
  331. }
  332. }
  333. }
  334. }
  335. },
  336. onPullDownRefresh () {
  337. this.init();
  338. uni.stopPullDownRefresh();
  339. },
  340. onShow () {
  341. if(this.backAction == 'login'){
  342. this.init()
  343. }
  344. if(this.backAction == 'cacelMask'){
  345. console.log(this.backAction)
  346. this.init()
  347. this.backAction = ''
  348. }
  349. if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0){
  350. if(!this.$util.isEmpty(this.loginInfo.onlyCg)){
  351. if(Number(this.loginInfo.onlyCg) == 1){
  352. this.loginStyle = 1
  353. uni.hideTabBar()
  354. }else{
  355. this.loginStyle = 2
  356. uni.showTabBar()
  357. }
  358. }
  359. }
  360. this.showShopName()
  361. },
  362. methods: {
  363. closeToShow(){
  364. this.$refs.toShowMore.close()
  365. },
  366. getMore(info){
  367. this.currentGhs = info
  368. this.$refs.toShowMore.open('top')
  369. },
  370. callUp (ghs) {
  371. let mobileList = []
  372. if (!this.$util.isEmpty(ghs.telephone)){
  373. mobileList.push(ghs.telephone)
  374. }
  375. if (!this.$util.isEmpty(ghs.telephone2)){
  376. mobileList.push(ghs.telephone2)
  377. }
  378. if(this.$util.isEmpty(mobileList)){
  379. this.$msg('没有联系电话')
  380. return false
  381. }
  382. uni.showActionSheet({
  383. itemList: mobileList,
  384. success: function (respond) {
  385. let currentIndex = respond.tapIndex
  386. let mobile = mobileList[currentIndex]
  387. uni.makePhoneCall({ phoneNumber: mobile })
  388. }
  389. })
  390. },
  391. toPhone(){
  392. this.$util.pageTo({url: '/pagesPurchase/contact'})
  393. },
  394. showShopName(){
  395. currentShop().then(res => {
  396. if(res.code == 1){
  397. let sjName = res.data.merchantName ? res.data.merchantName : ''
  398. let shopName = res.data.shopName ? res.data.shopName : ''
  399. let title = shopName == '首店' ? sjName : sjName+' '+shopName
  400. uni.setNavigationBarTitle({ title: title })
  401. }
  402. })
  403. },
  404. goMore(){
  405. let that = this
  406. uni.showActionSheet({
  407. itemList: ['已屏蔽商家', '改进建议','开关商城','也要一个此商城','修改密码','退出登录'],
  408. success: function (res) {
  409. if(res.tapIndex == 0){
  410. that.$util.pageTo({url: '/pagesPurchase/pb'})
  411. }
  412. if(res.tapIndex == 1){
  413. that.suggest()
  414. }
  415. if(res.tapIndex == 2){
  416. that.$util.pageTo({url:'/pagesPurchase/open'})
  417. }
  418. if(res.tapIndex == 3){
  419. that.openPfShop()
  420. }
  421. if(res.tapIndex == 4){
  422. that.$util.pageTo({url:'/admin/shop/password'})
  423. }
  424. if(res.tapIndex == 5){
  425. that.$util.confirmModal({content:'确认退出?'},() => {
  426. // #ifdef APP-PLUS
  427. uni.clearStorage()
  428. that.$store.commit("setLoginInfo", {})
  429. plus.runtime.restart()
  430. // #endif
  431. // #ifdef MP-WEIXIN
  432. clearLogin().then(res=>{
  433. if(res.code == 1){
  434. uni.clearStorage()
  435. that.$store.commit("setLoginInfo", {})
  436. uni.reLaunch({url:'/admin/home/workbench'})
  437. }
  438. })
  439. // #endif
  440. })
  441. }
  442. }
  443. });
  444. },
  445. openPfShop(){
  446. let that = this
  447. that.$util.confirmModal({content:'请添加客服微信申请:15280215347',okText:'复制微信'},() => {
  448. uni.setClipboardData({
  449. data: '15280215347',
  450. success: function() {
  451. that.$msg("复制成功")
  452. }
  453. })
  454. })
  455. },
  456. suggest(){
  457. let that = this
  458. that.$util.confirmModal({content:'请添加客服微信反馈:15280215347',okText:'复制微信'},() => {
  459. uni.setClipboardData({
  460. data: '15280215347',
  461. success: function() {
  462. that.$msg("复制成功")
  463. }
  464. })
  465. })
  466. },
  467. bookItem(item){
  468. const { id } = item
  469. this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
  470. },
  471. goBalanceChange(info){
  472. this.closeToShow()
  473. this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+info.id})
  474. },
  475. rechargeChange(){
  476. this.closeToShow()
  477. this.pageTo({url: '/admin/ghs/rechargeChange?ghsId='+this.currentGhs.id})
  478. },
  479. balanceChange(){
  480. this.closeToShow()
  481. this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+this.currentGhs.id})
  482. },
  483. bpSj(){
  484. let that = this
  485. that.$util.confirmModal({content:'确认屏蔽此商家?',okText:'确认'},() => {
  486. that.confirmPb(that.currentGhs)
  487. })
  488. },
  489. recharge(currentGhs){
  490. this.pageTo({url: '/admin/ghs/pay?id='+currentGhs.id+'&salt='+currentGhs.salt})
  491. },
  492. confirmPb(ghs){
  493. let that = this
  494. changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
  495. if(res.code == 1){
  496. that.closeToShow()
  497. that.getGHSList()
  498. }
  499. })
  500. },
  501. fillCg(item){
  502. this.pageTo({url:'/pagesPurchase/addCg?ghsId='+item.id+'&ghsName='+item.name})
  503. },
  504. goKmCg(currentGhs){
  505. let self = this
  506. // #ifdef MP-WEIXIN
  507. uni.navigateToMiniProgram({
  508. appId: currentGhs.kmCgAppId,
  509. path: currentGhs.kmCgUrl,
  510. //develop 开发版 trial 体验版 release 正式版
  511. envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
  512. extraData: {},
  513. success (res) {}
  514. })
  515. // #endif
  516. // #ifdef APP-PLUS
  517. self.$msg('开发中')
  518. // #endif
  519. },
  520. enterShop(item) {
  521. let that = this
  522. if(item.isOpen == 0){
  523. this.$msg('已休店,请选择其它门店')
  524. return false
  525. }
  526. that.pageTo({url: '/pagesPurchase/ghsProduct?id='+item.id})
  527. },
  528. enterShop2(item) {
  529. let that = this
  530. if(item.isOpen == 0){
  531. this.$msg('已休店,请选择其它门店')
  532. return false
  533. }
  534. that.pageTo({url: '/pagesPurchase/ghsProduct2?id='+item.id})
  535. },
  536. whyHave(){
  537. this.$util.confirmModal({content:'付款金额不足消欠款单时,存为余额下次使用'},() => {})
  538. },
  539. settleAccounts (item) {
  540. this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
  541. },
  542. gotoDetails (val) {
  543. this.pageTo({ url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id, type:2 })
  544. },
  545. getGHSList () {
  546. return ghsList().then(res => {
  547. this.supplierList = res.data.list
  548. this.ad = res.data.ad ? res.data.ad : []
  549. this.showAd = res.data.showAd ? res.data.showAd : 0
  550. let needNotice = res.data.needNotice ? res.data.needNotice : 0
  551. if(needNotice == 1){
  552. this.$util.confirmModal({content:'你已有多个供货商,下单时注意区别,不要下错了哦',okText:'知道了'},() => {
  553. hasNotice().then(res=>{
  554. })
  555. })
  556. }
  557. })
  558. },
  559. goGd(){
  560. //选择花材生成制作单和订单
  561. this.$util.pageTo({url:'/admin/order/workOrder'})
  562. },
  563. goKjKd(){
  564. if(this.myShopInfo && Number(this.myShopInfo.defaultCustomId)>0){
  565. this.$util.pageTo({url:'/admin/billing/index2?customId='+this.myShopInfo.defaultCustomId})
  566. }else{
  567. this.$msg('请设置快捷开单的对应客户')
  568. }
  569. },
  570. goShKd(){
  571. this.$util.pageTo({url:'/admin/custom/selectCustom'})
  572. },
  573. goPage (item) {
  574. if (item.url === '/admin/billing/priceChange') {
  575. this.goToMallPt('pages/pay/index')
  576. return true
  577. }
  578. if(this.getLoginInfo.pfShopId && Number(this.getLoginInfo.pfShopId)>0){
  579. if(item.pf == 0){
  580. this.$msg('请在批发端操作')
  581. return false
  582. }
  583. }
  584. this.$util.pageTo(item)
  585. },
  586. init () {
  587. this.getGHSList()
  588. getWeixinId().then(res => {
  589. this.getappIdList = res.data
  590. })
  591. // #ifdef MP-WEIXIN
  592. this.isMini = 1
  593. // #endif
  594. let that = this
  595. consoleIndex({isMini:this.isMini}).then(res => {
  596. this.data = res.data
  597. if(res.data.menu && !this.$util.isEmpty(res.data.menu)){
  598. this.tabsData = res.data.menu
  599. }
  600. this.lookMoney = res.data.lookMoney
  601. })
  602. getStrokeCount().then(res=>{
  603. if(res.code == 1){
  604. this.countStat = res.data
  605. }
  606. })
  607. getStat().then(res=>{
  608. if(res.code == 1){
  609. that.overview = res.data.overview
  610. }
  611. })
  612. this.showShopName()
  613. },
  614. noticeFn (item) {
  615. this.$util.pageTo({ url: item.page })
  616. },
  617. goToWastage () {
  618. this.$util.pageTo({url:'/admin/breakage/list'})
  619. },
  620. goToKindStat(){
  621. this.$util.pageTo({url:'/admin/stat/kind'})
  622. },
  623. goToProfit () {
  624. this.$util.pageTo({url:'/admin/stat/profit'})
  625. },
  626. goToMallPt (url) {
  627. let self = this
  628. uni.navigateToMiniProgram({
  629. appId: this.getappIdList.mall.miniAppId,
  630. path: url + '?account=' + self.loginInfo.shopId,
  631. //develop 开发版 trial 体验版 release 正式版
  632. envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
  633. extraData: {
  634. 'hdShopAdminId': self.loginInfo.shopAdminId
  635. },
  636. success (res) {
  637. }
  638. })
  639. },
  640. }
  641. };
  642. </script>
  643. <style lang="scss" scoped>
  644. .app-content {
  645. padding-bottom: 10upx;
  646. }
  647. .module-com {
  648. margin-bottom: 20upx;
  649. background-color: #fff;
  650. }
  651. .user-wrap {
  652. padding: 20upx 30upx 34upx 30upx;
  653. color: #fff;
  654. text-align: center;
  655. background-size: 100% 380upx;
  656. background-repeat: no-repeat;
  657. .user-top {
  658. @include disFlex(center, space-between);
  659. .open-bt_bx {
  660. display: flex;
  661. align-items: center;
  662. line-height: 1upx;
  663. & > button {
  664. padding: 0;
  665. line-height: auto;
  666. background-color: transparent;
  667. border: 1px solid #ffffff;
  668. border-radius: 22upx;
  669. padding: 10upx 17upx !important;
  670. font-size: 24upx;
  671. font-family: PingFang SC;
  672. font-weight: 400;
  673. color: #ffffff;
  674. & > .iconfont {
  675. font-size: 25upx;
  676. padding-right: 10upx;
  677. }
  678. }
  679. }
  680. }
  681. .income-amount {
  682. margin-top: 36upx;
  683. margin-bottom: 37upx;
  684. .price {
  685. font-size: 50upx;
  686. font-weight: bold;
  687. margin-top: 4upx;
  688. }
  689. }
  690. .user-bottom {
  691. @include disFlex(center, space-around);
  692. .info-list-name {
  693. color: white;
  694. }
  695. .info-list-value {
  696. font-size: 36upx;
  697. font-weight: bold;
  698. margin-top: 4upx;
  699. }
  700. }
  701. }
  702. // 消息
  703. .news-wrap {
  704. .news-list {
  705. @include disFlex(center, space-between);
  706. padding: 30upx 24upx 30upx 30upx;
  707. border-bottom: 1px solid $borderColor;
  708. font-size: 26upx;
  709. color: $fontColor2;
  710. &:active {
  711. background-color: $backColor;
  712. }
  713. & > div {
  714. @include disFlex(center, flex-start);
  715. }
  716. .news-left {
  717. .iconfont {
  718. color: $mainColor;
  719. margin-right: 10upx;
  720. }
  721. .ling {
  722. font-size: 28upx;
  723. }
  724. span{
  725. font-size:29upx;
  726. }
  727. }
  728. .news-right {
  729. font-size: 26upx;
  730. color: $mainColor;
  731. transform: scale(0.9);
  732. @include disFlex(flex-end, flex-start);
  733. .iconfont {
  734. font-size: 24upx;
  735. margin-left: 10upx;
  736. margin-bottom: 6upx;
  737. }
  738. }
  739. }
  740. }
  741. // 总览
  742. .total-wrap,
  743. .order-wrap {
  744. .total-tit {
  745. padding: 18upx 0 18upx 20upx;
  746. border-bottom: 1upx solid $borderColor;
  747. font-weight: 600;
  748. font-size: 24upx;
  749. color: #333333;
  750. }
  751. .total-blo {
  752. @include disFlex(center, space-between);
  753. flex-wrap: wrap;
  754. padding: 20upx 0 0;
  755. .total-list {
  756. width: 33%;
  757. text-align: center;
  758. margin: 20upx 0upx;
  759. border-right: 1upx solid $borderColor;
  760. .list-num {
  761. margin-bottom: 8upx;
  762. font-size: 36upx;
  763. font-weight: bold;
  764. }
  765. }
  766. .total-list:nth-child(3n) {
  767. border-right: none;
  768. }
  769. .total-list:nth-child(n + 4) {
  770. padding-bottom: 0;
  771. }
  772. .total-list2 {
  773. width: 24%;
  774. text-align: center;
  775. margin: 20upx 0upx;
  776. border-right: 1upx solid $borderColor;
  777. .list-num {
  778. margin-top:10upx;
  779. margin-bottom:8upx;
  780. font-size:26upx;
  781. font-weight:normal;
  782. }
  783. }
  784. .total-list2:nth-child(4n) {
  785. border-right: none;
  786. }
  787. .total-list2:nth-child(n + 4) {
  788. padding-bottom: 0;
  789. }
  790. }
  791. }
  792. .tabs-head_bx {
  793. display: flex;
  794. align-items: center;
  795. padding: 20upx 15upx;
  796. }
  797. .tabs-wrap {
  798. padding: 20upx 10upx;
  799. @include disFlex(center, flex-start);
  800. flex-wrap: wrap;
  801. .tabs-list {
  802. width: 25%;
  803. margin-top: 50upx;
  804. text-align: center;
  805. .tabs-img {
  806. width: 100upx;
  807. height: 100upx;
  808. margin: 0 auto;
  809. img {
  810. height: 100%;
  811. }
  812. }
  813. .tabs-name {
  814. color: #444444;
  815. margin-top: 10upx;
  816. }
  817. &:nth-child(-n + 4) {
  818. margin-top: 0;
  819. }
  820. }
  821. }
  822. // 遮罩层
  823. .renew-wrap {
  824. text-align: center;
  825. .renew-wrap-text {
  826. margin-top: 30upx;
  827. margin-bottom: 60upx;
  828. font-size: 34upx;
  829. }
  830. }
  831. .order-page {
  832. .ghs_list_page {
  833. background-color: rgba(255, 255, 255, 1);
  834. position: relative;
  835. width: 750upx;
  836. overflow: hidden;
  837. .flex-col {
  838. display: flex;
  839. flex-direction: column;
  840. }
  841. .flex-row {
  842. display: flex;
  843. flex-direction: row;
  844. }
  845. .justify-start {
  846. display: flex;
  847. justify-content: flex-start;
  848. }
  849. .justify-center {
  850. display: flex;
  851. justify-content: center;
  852. }
  853. .justify-end {
  854. display: flex;
  855. justify-content: flex-end;
  856. }
  857. .justify-evenly {
  858. display: flex;
  859. justify-content: space-evenly;
  860. }
  861. .justify-around {
  862. display: flex;
  863. justify-content: space-around;
  864. }
  865. .justify-between {
  866. display: flex;
  867. justify-content: space-between;
  868. }
  869. .align-start {
  870. display: flex;
  871. align-items: flex-start;
  872. }
  873. .align-center {
  874. display: flex;
  875. align-items: center;
  876. }
  877. .align-end {
  878. display: flex;
  879. align-items: flex-end;
  880. }
  881. .ghs_list_area {
  882. width: 750upx;
  883. background-color: #ece5e5;
  884. .group_1 {
  885. box-shadow: 0px 1px 0px 0px rgba(221, 221, 221, 1);
  886. background-color: rgba(255, 255, 255, 1);
  887. width: 750upx;
  888. height: 128upx;
  889. margin-top: 2upx;
  890. .image_1 {
  891. width: 727upx;
  892. height: 20upx;
  893. margin: 11upx 0 0 12upx;
  894. }
  895. .block_4 {
  896. width: 714upx;
  897. height: 64upx;
  898. margin: 21upx 0 12upx 24upx;
  899. .icon_1 {
  900. width: 20upx;
  901. height: 34upx;
  902. margin-top: 16upx;
  903. }
  904. .text_1 {
  905. width: 107upx;
  906. height: 34upx;
  907. overflow-wrap: break-word;
  908. color: rgba(4, 4, 4, 1);
  909. font-size: 36upx;
  910. font-family: PingFangSC-Semibold;
  911. text-align: left;
  912. white-space: nowrap;
  913. line-height: 24upx;
  914. margin: 15upx 0 0 278upx;
  915. }
  916. .applet-top-bar_1 {
  917. width: 174upx;
  918. height: 64upx;
  919. margin-left: 135upx;
  920. }
  921. }
  922. }
  923. .ghs_box {
  924. background-color: rgba(255, 255, 255, 1);
  925. position: relative;
  926. width: 750upx;
  927. height: auto;
  928. margin-bottom:35upx;
  929. .image-text_7 {
  930. width: 674upx;
  931. height: 120upx;
  932. margin: 40upx 0 0 31upx;
  933. .section_1 {
  934. width: 120upx;
  935. height: 120upx;
  936. .logo{
  937. width:120upx;
  938. height:120upx;
  939. border-radius:10upx;
  940. }
  941. }
  942. .text-group_7 {
  943. width: 533upx;
  944. height: 99upx;
  945. margin-top: 5upx;
  946. .text_8 {
  947. display:inline-block;
  948. width: 550upx;
  949. height: 38upx;
  950. color: rgba(51, 51, 51, 1);
  951. font-size: 36upx;
  952. font-weight:bold;
  953. text-align: left;
  954. white-space: nowrap;
  955. line-height:38upx;
  956. overflow:hidden;
  957. }
  958. .text_9 {
  959. width: 533upx;
  960. height: 25upx;
  961. overflow-wrap: break-word;
  962. color: rgba(153, 153, 153, 1);
  963. font-size: 28upx;
  964. text-align: left;
  965. white-space: nowrap;
  966. line-height: 24upx;
  967. margin-top: 10upx;
  968. }
  969. }
  970. }
  971. .box_4 {
  972. background-color: rgba(238, 238, 238, 1);
  973. width: 750upx;
  974. height: 1upx;
  975. margin-top: 40upx;
  976. }
  977. .box_9 {
  978. width: 100%;
  979. height: 60upx;
  980. margin: 23upx 0 22upx 15upx;
  981. .tag_2 {
  982. background-color: rgba(255, 255, 255, 1);
  983. border-radius: 8px;
  984. height: 60upx;
  985. line-height:60upx;
  986. border: 2px solid rgba(221, 221, 221, 1);
  987. color: rgba(51, 51, 51, 1);
  988. font-size: 30upx;
  989. margin:0 16upx 0 0;
  990. text-align:center;
  991. float:left;
  992. padding-left:15upx;
  993. padding-right:15upx;
  994. }
  995. .tag_3 {
  996. background-color: rgba(255, 255, 255, 1);
  997. border-radius: 8px;
  998. height: 60upx;
  999. border: 1px solid rgba(221, 221, 221, 1);
  1000. margin-left: 12upx;
  1001. width: 140upx;
  1002. .text_11 {
  1003. width: 101upx;
  1004. height: 25upx;
  1005. overflow-wrap: break-word;
  1006. color: rgba(51, 51, 51, 1);
  1007. font-size: 26upx;
  1008. text-align: left;
  1009. white-space: nowrap;
  1010. line-height: 25upx;
  1011. margin: 17upx 0 0 20upx;
  1012. }
  1013. }
  1014. .tag_4 {
  1015. background-color: rgba(255, 255, 255, 1);
  1016. border-radius: 8px;
  1017. height: 60upx;
  1018. border: 1px solid rgba(221, 221, 221, 1);
  1019. margin-left: 12upx;
  1020. width: 192upx;
  1021. .text_12 {
  1022. width: 153upx;
  1023. height: 25upx;
  1024. overflow-wrap: break-word;
  1025. color: rgba(51, 51, 51, 1);
  1026. font-size: 26upx;
  1027. text-align: left;
  1028. white-space: nowrap;
  1029. line-height: 25upx;
  1030. margin: 17upx 0 0 18upx;
  1031. }
  1032. }
  1033. }
  1034. .box_6 {
  1035. background-color: rgb(248, 242, 242);
  1036. width: 750upx;
  1037. height:95upx;
  1038. .show_clear_area {
  1039. width: 247upx;
  1040. height: 29upx;
  1041. margin: 26upx 0 0 30upx;
  1042. .icon_2 {
  1043. width: 22upx;
  1044. height: 26upx;
  1045. margin-top: 2upx;
  1046. }
  1047. .waite_clear_order {
  1048. width: 214upx;
  1049. height: 29upx;
  1050. overflow-wrap: break-word;
  1051. color: rgba(255, 40, 66, 1);
  1052. font-size: 31upx;
  1053. font-weight:bold;
  1054. text-align: left;
  1055. white-space: nowrap;
  1056. line-height: 29upx;
  1057. }
  1058. }
  1059. .image-text_9 {
  1060. width: 134upx;
  1061. height: 27upx;
  1062. margin: 26upx 29upx 0 310upx;
  1063. .text-group_4 {
  1064. width: 111upx;
  1065. height: 27upx;
  1066. overflow-wrap: break-word;
  1067. color: rgba(255, 40, 66, 1);
  1068. font-size: 30upx;
  1069. font-weight:bold;
  1070. text-align: left;
  1071. white-space: nowrap;
  1072. line-height: 27upx;
  1073. }
  1074. .icon_3 {
  1075. width: 14upx;
  1076. height: 24upx;
  1077. margin-top: 2upx;
  1078. }
  1079. }
  1080. }
  1081. .button_4 {
  1082. height: 80upx;
  1083. line-height:80upx;
  1084. text-align:center;
  1085. background-color:#09C567;
  1086. background-size: 137upx 137upx;
  1087. width: 130upx;
  1088. position: absolute;
  1089. left: 570upx;
  1090. top: 95upx;
  1091. border-radius:39upx;
  1092. .text_13 {
  1093. color: rgba(255, 255, 255, 1);
  1094. font-size: 30upx;
  1095. font-weight:bold;
  1096. }
  1097. }
  1098. .button_5 {
  1099. height: 80upx;
  1100. line-height:80upx;
  1101. text-align:center;
  1102. background-color:#CCCCCC;
  1103. background-size: 137upx 137upx;
  1104. width: 130upx;
  1105. position: absolute;
  1106. left: 570upx;
  1107. top: 95upx;
  1108. border-radius:39upx;
  1109. .text_13 {
  1110. color: rgba(255, 255, 255, 1);
  1111. font-size: 30upx;
  1112. font-weight:bold;
  1113. }
  1114. }
  1115. .button_6 {
  1116. height: 80upx;
  1117. line-height:80upx;
  1118. text-align:center;
  1119. background-color:rgb(152, 153, 197);
  1120. background-size: 137upx 137upx;
  1121. width: 170upx;
  1122. position: absolute;
  1123. left: 540upx;
  1124. top: 95upx;
  1125. border-radius:39upx;
  1126. .text_13 {
  1127. color: rgba(255, 255, 255, 1);
  1128. font-size: 30upx;
  1129. font-weight:bold;
  1130. }
  1131. }
  1132. .button_7 {
  1133. height: 80upx;
  1134. line-height:80upx;
  1135. text-align:center;
  1136. background-color:#09C567;
  1137. background-size: 137upx 137upx;
  1138. width: 180upx;
  1139. position: absolute;
  1140. left: 330upx;
  1141. top: 95upx;
  1142. border-radius:39upx;
  1143. .text_13 {
  1144. color: rgba(255, 255, 255, 1);
  1145. font-size: 30upx;
  1146. font-weight:bold;
  1147. }
  1148. }
  1149. }
  1150. }
  1151. }
  1152. }
  1153. </style>