workbench.vue 32 KB

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