pb.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <template>
  2. <view class="ghs_list_page flex-col">
  3. <view class="search-wrap">
  4. <view class="search-inner">
  5. <AppSearchModule placeholder="搜索批发店" @input="searchFn" />
  6. </view>
  7. </view>
  8. <template v-if="!$util.isEmpty(list.data)">
  9. <view class="ghs_list_area flex-col justify-end">
  10. <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in list.data" :key="index">
  11. <view class="image-text_7 flex-row justify-between">
  12. <view class="section_1 flex-col">
  13. <image class="logo" :src="ghsInfo.avatar" />
  14. </view>
  15. <view class="text-group_7 flex-col justify-between">
  16. <text class="text_8">{{ghsInfo.name}}</text>
  17. <text class="text_9"></text>
  18. </view>
  19. </view>
  20. <view class="box_4 flex-col"></view>
  21. <view class="box_9">
  22. <view class="tag_2" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})"> <text>挂账变动记录</text> </view>
  23. <view class="tag_2" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})"> <text>结账记录</text> </view>
  24. <view class="tag_2" @click="pageTo({url:'/pagesPurchase/shopping'})"> <text>买花记录</text> </view>
  25. </view>
  26. <view class="box_6 flex-row" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0">
  27. <view class="show_clear_area flex-row justify-between">
  28. <image class="icon_2" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps2pvfa1l5i34w5vqj2k7b3kejml3i3nmrba1421bf-caa2-491b-8773-af413df7e96d.png" />
  29. <text class="waite_clear_order">待结订单&nbsp;{{ghsInfo.debtNum}}笔&nbsp;¥{{ghsInfo.debtAmount?parseFloat(ghsInfo.debtAmount):0}}</text>
  30. </view>
  31. <view class="image-text_9 flex-row justify-between">
  32. <text class="text-group_4">去结账</text>
  33. <image class="icon_3" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps83ag7scu3a8bfq22ciodg5hiu0x9cesxjbfb4c9ca-ee3f-45ec-a6d7-6f166e13d6e6.png" />
  34. </view>
  35. </view>
  36. <view class="button_4 flex-col" @click="recover(ghsInfo)"><text class="text_13">恢复</text></view>
  37. </view>
  38. </view>
  39. </template>
  40. <block v-else>
  41. <emptyComponent title="没有记录" />
  42. </block>
  43. </view>
  44. </template>
  45. <script>
  46. import emptyComponent from "@/components/empty";
  47. import AppSearchModule from "@/components/module/app-search";
  48. import { ghsList } from "@/api/purchase";
  49. import { changeDelStatus } from "@/api/ghs";
  50. import { list } from "@/mixins";
  51. export default {
  52. components: {
  53. emptyComponent,
  54. AppSearchModule
  55. },
  56. mixins: [list],
  57. data () {
  58. return {
  59. seekVal: ''
  60. }
  61. },
  62. onReachBottom () {
  63. if (!this.list.finished) {
  64. this.getGhsList().then(res => {
  65. uni.stopPullDownRefresh()
  66. });
  67. } else {
  68. uni.stopPullDownRefresh()
  69. }
  70. },
  71. onPullDownRefresh() {
  72. this.resetList()
  73. this.getGhsList().then(res => {
  74. uni.stopPullDownRefresh();
  75. })
  76. },
  77. onUnload(){
  78. //返回上一页带参数
  79. let pages = getCurrentPages();
  80. let prevPage = pages[ pages.length - 2 ];
  81. //修改上一页data里面的xjData
  82. prevPage.$vm.backAction = 'cacelMask'
  83. },
  84. methods: {
  85. recover(ghs){
  86. let that = this
  87. that.$util.confirmModal({content:'确认恢复?',okText:'确认'},() => {
  88. that.confirmRecover(ghs)
  89. })
  90. },
  91. confirmRecover(ghs){
  92. let that = this
  93. changeDelStatus({delStatus:0,ghsId:ghs.id}).then(res=>{
  94. if(res.code == 1){
  95. that.resetList()
  96. that.getGhsList()
  97. }
  98. })
  99. },
  100. init() {
  101. this.getGhsList()
  102. },
  103. searchFn(e) {
  104. const keyword = (e || '').trim()
  105. if (!keyword) {
  106. return
  107. }
  108. if (keyword === this.seekVal) {
  109. return
  110. }
  111. this.seekVal = keyword
  112. this.resetList()
  113. this.getGhsList()
  114. },
  115. getGhsList () {
  116. return ghsList({ delStatus: 1, page: this.list.page, name: this.seekVal || '' }).then(res => {
  117. this.completes(res)
  118. })
  119. },
  120. settleAccounts (item) {
  121. this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
  122. },
  123. gotoDetails (val) {
  124. this.pageTo({ url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id, type:2 })
  125. }
  126. }
  127. }
  128. </script>
  129. <style lang='scss' scoped>
  130. .ghs_list_page {
  131. background-color: rgba(255, 255, 255, 1);
  132. position: relative;
  133. width: 750upx;
  134. padding-top: 100upx;
  135. overflow: hidden;
  136. .search-wrap {
  137. position: fixed;
  138. top: 0;
  139. left: 0;
  140. z-index: 10;
  141. width: 750upx;
  142. height: 100upx;
  143. display: flex;
  144. align-items: center;
  145. padding: 0 24upx;
  146. box-sizing: border-box;
  147. background: #fff;
  148. box-shadow: 0 2upx 8upx rgba(0, 0, 0, 0.06);
  149. }
  150. .search-inner {
  151. width: 100%;
  152. flex: 1;
  153. ::v-deep .app-search-module {
  154. width: 100%;
  155. }
  156. }
  157. .flex-col {
  158. display: flex;
  159. flex-direction: column;
  160. }
  161. .flex-row {
  162. display: flex;
  163. flex-direction: row;
  164. }
  165. .justify-start {
  166. display: flex;
  167. justify-content: flex-start;
  168. }
  169. .justify-center {
  170. display: flex;
  171. justify-content: center;
  172. }
  173. .justify-end {
  174. display: flex;
  175. justify-content: flex-end;
  176. }
  177. .justify-evenly {
  178. display: flex;
  179. justify-content: space-evenly;
  180. }
  181. .justify-around {
  182. display: flex;
  183. justify-content: space-around;
  184. }
  185. .justify-between {
  186. display: flex;
  187. justify-content: space-between;
  188. }
  189. .align-start {
  190. display: flex;
  191. align-items: flex-start;
  192. }
  193. .align-center {
  194. display: flex;
  195. align-items: center;
  196. }
  197. .align-end {
  198. display: flex;
  199. align-items: flex-end;
  200. }
  201. .ghs_list_area {
  202. width: 750upx;
  203. background-color: #ece5e5;
  204. .group_1 {
  205. box-shadow: 0px 1px 0px 0px rgba(221, 221, 221, 1);
  206. background-color: rgba(255, 255, 255, 1);
  207. width: 750upx;
  208. height: 128upx;
  209. margin-top: 2upx;
  210. .image_1 {
  211. width: 727upx;
  212. height: 20upx;
  213. margin: 11upx 0 0 12upx;
  214. }
  215. .block_4 {
  216. width: 714upx;
  217. height: 64upx;
  218. margin: 21upx 0 12upx 24upx;
  219. .icon_1 {
  220. width: 20upx;
  221. height: 34upx;
  222. margin-top: 16upx;
  223. }
  224. .text_1 {
  225. width: 107upx;
  226. height: 34upx;
  227. overflow-wrap: break-word;
  228. color: rgba(4, 4, 4, 1);
  229. font-size: 36upx;
  230. font-family: PingFangSC-Semibold;
  231. text-align: left;
  232. white-space: nowrap;
  233. line-height: 24upx;
  234. margin: 15upx 0 0 278upx;
  235. }
  236. .applet-top-bar_1 {
  237. width: 174upx;
  238. height: 64upx;
  239. margin-left: 135upx;
  240. }
  241. }
  242. }
  243. .ghs_box {
  244. background-color: rgba(255, 255, 255, 1);
  245. position: relative;
  246. width: 750upx;
  247. height: auto;
  248. margin-bottom:35upx;
  249. .image-text_7 {
  250. width: 674upx;
  251. height: 120upx;
  252. margin: 40upx 0 0 31upx;
  253. .section_1 {
  254. width: 120upx;
  255. height: 120upx;
  256. .logo{
  257. width:120upx;
  258. height:120upx;
  259. border-radius:10upx;
  260. }
  261. }
  262. .text-group_7 {
  263. width: 533upx;
  264. height: 99upx;
  265. margin-top: 5upx;
  266. .text_8 {
  267. display:inline-block;
  268. width: 550upx;
  269. height: 38upx;
  270. color: rgba(51, 51, 51, 1);
  271. font-size: 36upx;
  272. font-weight:bold;
  273. text-align: left;
  274. white-space: nowrap;
  275. line-height:38upx;
  276. overflow:hidden;
  277. text-overflow:ellipsis;
  278. }
  279. .text_9 {
  280. width: 533upx;
  281. height: 25upx;
  282. overflow-wrap: break-word;
  283. color: rgba(153, 153, 153, 1);
  284. font-size: 26upx;
  285. text-align: left;
  286. white-space: nowrap;
  287. line-height: 24upx;
  288. margin-top: 10upx;
  289. }
  290. }
  291. }
  292. .box_4 {
  293. background-color: rgba(238, 238, 238, 1);
  294. width: 750upx;
  295. height: 1upx;
  296. margin-top: 40upx;
  297. }
  298. .box_9 {
  299. width: 100%;
  300. height: 60upx;
  301. margin: 23upx 0 22upx 30upx;
  302. .tag_2 {
  303. background-color: rgba(255, 255, 255, 1);
  304. border-radius: 8px;
  305. height: 60upx;
  306. line-height:60upx;
  307. border: 2px solid rgba(221, 221, 221, 1);
  308. color: rgba(51, 51, 51, 1);
  309. font-size: 30upx;
  310. margin:0 25upx 0 0;
  311. text-align:center;
  312. float:left;
  313. padding-left:15upx;
  314. padding-right:15upx;
  315. }
  316. .tag_3 {
  317. background-color: rgba(255, 255, 255, 1);
  318. border-radius: 8px;
  319. height: 60upx;
  320. border: 1px solid rgba(221, 221, 221, 1);
  321. margin-left: 12upx;
  322. width: 140upx;
  323. .text_11 {
  324. width: 101upx;
  325. height: 25upx;
  326. overflow-wrap: break-word;
  327. color: rgba(51, 51, 51, 1);
  328. font-size: 26upx;
  329. text-align: left;
  330. white-space: nowrap;
  331. line-height: 25upx;
  332. margin: 17upx 0 0 20upx;
  333. }
  334. }
  335. .tag_4 {
  336. background-color: rgba(255, 255, 255, 1);
  337. border-radius: 8px;
  338. height: 60upx;
  339. border: 1px solid rgba(221, 221, 221, 1);
  340. margin-left: 12upx;
  341. width: 192upx;
  342. .text_12 {
  343. width: 153upx;
  344. height: 25upx;
  345. overflow-wrap: break-word;
  346. color: rgba(51, 51, 51, 1);
  347. font-size: 26upx;
  348. text-align: left;
  349. white-space: nowrap;
  350. line-height: 25upx;
  351. margin: 17upx 0 0 18upx;
  352. }
  353. }
  354. }
  355. .box_6 {
  356. background-color: rgb(248, 242, 242);
  357. width: 750upx;
  358. height:85upx;
  359. .show_clear_area {
  360. width: 247upx;
  361. height: 29upx;
  362. margin: 26upx 0 0 30upx;
  363. .icon_2 {
  364. width: 22upx;
  365. height: 26upx;
  366. margin-top: 2upx;
  367. }
  368. .waite_clear_order {
  369. width: 214upx;
  370. height: 29upx;
  371. overflow-wrap: break-word;
  372. color: rgba(255, 40, 66, 1);
  373. font-size: 30upx;
  374. font-weight:bold;
  375. text-align: left;
  376. white-space: nowrap;
  377. line-height: 29upx;
  378. }
  379. }
  380. .image-text_9 {
  381. width: 134upx;
  382. height: 27upx;
  383. margin: 26upx 29upx 0 310upx;
  384. .text-group_4 {
  385. width: 111upx;
  386. height: 27upx;
  387. overflow-wrap: break-word;
  388. color: rgba(255, 40, 66, 1);
  389. font-size: 30upx;
  390. font-weight:bold;
  391. text-align: left;
  392. white-space: nowrap;
  393. line-height: 27upx;
  394. }
  395. .icon_3 {
  396. width: 14upx;
  397. height: 24upx;
  398. margin-top: 2upx;
  399. }
  400. }
  401. }
  402. .button_4 {
  403. height: 80upx;
  404. line-height:80upx;
  405. text-align:center;
  406. background-color:#e88f0b;
  407. background-size: 137upx 137upx;
  408. width: 180upx;
  409. position: absolute;
  410. left: 515upx;
  411. top: 105upx;
  412. border-radius:10upx;
  413. .text_13 {
  414. color: rgba(255, 255, 255, 1);
  415. font-size: 30upx;
  416. font-weight:bold;
  417. }
  418. }
  419. .button_5 {
  420. height: 80upx;
  421. line-height:80upx;
  422. text-align:center;
  423. background-color:#CCCCCC;
  424. background-size: 137upx 137upx;
  425. width: 130upx;
  426. position: absolute;
  427. left: 585upx;
  428. top: 105upx;
  429. border-radius:39upx;
  430. .text_13 {
  431. color: rgba(255, 255, 255, 1);
  432. font-size: 30upx;
  433. font-weight:bold;
  434. }
  435. }
  436. .button_6 {
  437. height: 80upx;
  438. line-height:80upx;
  439. text-align:center;
  440. background-color:rgb(18, 175, 18);
  441. background-size: 137upx 137upx;
  442. width: 130upx;
  443. position: absolute;
  444. left: 390upx;
  445. top: 105upx;
  446. border-radius:39upx;
  447. .text_13 {
  448. color: rgba(255, 255, 255, 1);
  449. font-size: 30upx;
  450. font-weight:bold;
  451. }
  452. }
  453. }
  454. }
  455. }
  456. </style>