workbench.vue 37 KB

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