sellout.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <view class="">
  3. <!-- <view class="out-wrapper">
  4. 卖出
  5. </view> -->
  6. <view class="jg" style="height: 20rpx;"></view>
  7. <empty v-if="loaded === true && list.length === 0"></empty>
  8. <view class="out-wrapper" v-for="item in list" :class="{'outt': item.status == 2}">
  9. <view class="out-top flex">
  10. <view class="buy-info flex">
  11. <view class="fsz">卖家:</view>
  12. <image :src="item.user.avatar" mode="" class="user-logo fsz"></image>
  13. <view class="user-name fsz clamp">{{item.user.real_name}}</view>
  14. <view class="user-phone fsz">
  15. {{item.user.phone}}
  16. </view>
  17. </view>
  18. <view class="buy-status">{{item.status | status}}</view>
  19. </view>
  20. <view class="item-info">
  21. <view class="info-data">
  22. <view class="info-tit">编号:</view>
  23. <view class="info-val">{{item.order_id}}</view>
  24. </view>
  25. <view class="info-data">
  26. <view class="info-tit">价值:</view>
  27. <view class="info-val">300</view>
  28. </view>
  29. </view>
  30. <view class="upimg">
  31. <view class="up-tit">
  32. 打款凭证:
  33. </view>
  34. <view class="img-wrap" v-if="item.pay_evaluation" @click="lookimg(item.pay_evaluation)">
  35. <image :src="item.pay_evaluation" mode=""></image>
  36. </view>
  37. <view class="" style="color: #0F253A;font-weight: bold;font-size: 26rpx;" v-else>
  38. 买家未上传支付凭证
  39. </view>
  40. </view>
  41. <template v-if="item.status == 2">
  42. <view class="mc-btn pass" @click="passPackage(item)">
  43. 通过
  44. </view>
  45. <view class="mc-btn fail" @click="openrefuse">
  46. 拒绝
  47. </view>
  48. </template>
  49. </view>
  50. <uni-load-more :status="loadingType"></uni-load-more>
  51. <uni-popup ref="refuse" type="center">
  52. <view class="refuse-box">
  53. <view class="box-tit">
  54. 请输入拒绝原因
  55. </view>
  56. <textarea :value="resone" placeholder="请输入拒绝原因" class="resone-wrapper" focus />
  57. <view class="btn-wrap">
  58. <view class="btn" @click="refusFali">
  59. 取消
  60. </view>
  61. <view class="btn" style="color: #000000;" @click="refusOk">
  62. 确定
  63. </view>
  64. </view>
  65. </view>
  66. </uni-popup>
  67. <uni-popup ref="lookimg" type="center">
  68. <view class="pop-wrap" style="position: relative;" >
  69. <movable-area class="popup-box">
  70. <movable-view class="popup-item" :scale="true" direction="all">
  71. <image :src="chooseImg" mode=""></image>
  72. </movable-view>
  73. </movable-area>
  74. <image src="../../static/icon/close.png" mode="" class="close" style="width: 80rpx;height: 80rpx;" @click="closePup"></image>
  75. </view>
  76. </uni-popup>
  77. </view>
  78. </template>
  79. <script>
  80. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  81. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  82. import empty from '@/components/empty';
  83. import { packageOrder, packageAudit } from '@/api/package.js'
  84. import {
  85. tabbar,
  86. tabbar1
  87. } from "@/utils/tabbar.js";
  88. export default {
  89. components: {
  90. uniLoadMore,
  91. empty,
  92. uniPopup
  93. },
  94. filters: {
  95. status(val) {
  96. let str = ''
  97. // 状态:0-预约,1-待支付,2-待审核,3-释放中,4-释放完成,5-重新发放,6-完成,-1-没抢到,-2-审核无效
  98. switch (val) {
  99. case 0:
  100. str = '预约'
  101. break;
  102. case 1:
  103. str = '待支付'
  104. break;
  105. case 2:
  106. str = '待审核'
  107. break;
  108. case 3:
  109. str = '释放中'
  110. break;
  111. case 4:
  112. str = '释放完成'
  113. break;
  114. case 5:
  115. str = '重新发放'
  116. break;
  117. case 6:
  118. str = '完成'
  119. break;
  120. case -1:
  121. str = '没抢到'
  122. break;
  123. case -2:
  124. str = '审核无效'
  125. break;
  126. default:
  127. str = ''
  128. }
  129. return str
  130. }
  131. },
  132. data() {
  133. return {
  134. resone: '', //拒绝理由
  135. tabbar: tabbar,
  136. tabbar1: tabbar1,
  137. current: 2,
  138. list: [],
  139. loadingType: 'more',
  140. page: 1,
  141. limit: 10,
  142. loaded: false,
  143. chooseImg: '',//选择要查看的图片
  144. choose_order: ''
  145. }
  146. },
  147. onLoad() {
  148. console.log('卖出')
  149. this.loadData()
  150. },
  151. //上拉加载更多
  152. onReachBottom() {
  153. this.loadData()
  154. },
  155. methods: {
  156. lookimg(src) {
  157. console.log(src,'chooseImg++++++')
  158. this.chooseImg = src
  159. this.$refs.lookimg.open()
  160. },
  161. loadData() {
  162. let obj = this
  163. if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
  164. return
  165. }
  166. obj.loadingType = 'loading'
  167. packageOrder({
  168. page: obj.page,
  169. limit: obj.limit,
  170. status: 1
  171. }).then(({
  172. data
  173. }) => {
  174. console.log(data)
  175. obj.list = data.data
  176. obj.page++
  177. if (obj.limit == data.data.length) {
  178. obj.loadingType = 'more'
  179. } else {
  180. obj.loadingType = 'noMore'
  181. }
  182. obj.loaded = true
  183. })
  184. },
  185. openrefuse() {
  186. this.$refs.refuse.open()
  187. },
  188. //取消拒绝
  189. refusFali() {
  190. this.resone = ''
  191. this.$refs.refuse.close()
  192. },
  193. //确定拒绝
  194. refusOk() {
  195. let obj = this
  196. if(obj.resone == '') {
  197. obj.$api.msg('请输入拒绝理由')
  198. return
  199. }
  200. packageAudit({
  201. re: obj.resone,
  202. id: obj.choose_order,
  203. status: -2
  204. }).then(res => {
  205. obj.resone = ''
  206. obj.$refs.refuse.close()
  207. obj.page = 0
  208. obj.list = []
  209. obj.loaded = false
  210. obj.loadingType = 'more'
  211. obj.loadData()
  212. })
  213. },
  214. closePup() {
  215. this.chooseImg = ''
  216. this.$refs.lookimg.close()
  217. },
  218. passPackage() {
  219. packageAudit({
  220. re: '',
  221. id: obj.choose_order,
  222. status: 3
  223. }).then(res => {
  224. console.log(res)
  225. obj.$refs.refuse.close()
  226. obj.page = 0
  227. obj.list = []
  228. obj.loaded = false
  229. obj.loadingType = 'more'
  230. obj.loadData()
  231. })
  232. }
  233. }
  234. }
  235. </script>
  236. <style lang="scss" scoped>
  237. .outt {
  238. height: 392rpx;
  239. }
  240. .out-wrapper {
  241. width: 690rpx;
  242. // height: 392rpx;
  243. background: #FFFFFF;
  244. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  245. border-radius: 20rpx;
  246. margin: 0 auto 20rpx;
  247. padding: 30rpx;
  248. position: relative;
  249. .outt {
  250. height: 392rpx;
  251. }
  252. .out-top {
  253. line-height: 46rpx;
  254. justify-content: space-between;
  255. .buy-info {
  256. width: 450rpx;
  257. font-size: 32rpx;
  258. font-family: PingFang SC;
  259. font-weight: bold;
  260. color: #0F253A;
  261. justify-content: flex-start;
  262. .fsz {
  263. flex-shrink: 0;
  264. }
  265. .user-name {
  266. max-width: 180rpx;
  267. }
  268. .user-phone {
  269. padding-left: 10rpx;
  270. font-size: 24rpx;
  271. font-family: PingFang SC;
  272. font-weight: 500;
  273. color: #999999;
  274. }
  275. .user-logo {
  276. display: block;
  277. width: 46rpx;
  278. height: 46rpx;
  279. border-radius: 50%;
  280. // background-color: red;
  281. // padding-right: 10rpx;
  282. margin-right: 10rpx;
  283. }
  284. }
  285. .buy-status {
  286. font-size: 26rpx;
  287. font-family: PingFang SC;
  288. font-weight: 500;
  289. color: #6D7C88;
  290. }
  291. }
  292. .item-info {
  293. width: 100%;
  294. margin-top: 28rpx;
  295. line-height: 50rpx;
  296. font-size: 26rpx;
  297. font-family: PingFang SC;
  298. display: flex;
  299. flex-wrap: wrap;
  300. .info-data {
  301. width: 100%;
  302. display: flex;
  303. .info-tit {
  304. font-weight: 500;
  305. color: #6D7C88;
  306. }
  307. .info-val {
  308. color: #0F253A;
  309. font-weight: bold;
  310. }
  311. }
  312. }
  313. .upimg {
  314. padding-top: 10rpx;
  315. display: flex;
  316. .up-tit {
  317. display: inline-block;
  318. font-size: 26rpx;
  319. font-family: PingFang SC;
  320. font-weight: 500;
  321. color: #6D7C88;
  322. }
  323. .img-wrap {
  324. width: 153rpx;
  325. height: 152rpx;
  326. border-radius: 20rpx;
  327. image {
  328. border-radius: 20rpx;
  329. width: 153rpx;
  330. height: 152rpx;
  331. background-color: red;
  332. }
  333. }
  334. }
  335. .mc-btn {
  336. width: 144rpx;
  337. line-height: 50rpx;
  338. border-radius: 25px;
  339. background: #FFFFFF;
  340. font-size: 26rpx;
  341. font-family: PingFang SC;
  342. font-weight: 500;
  343. text-align: center;
  344. position: absolute;
  345. bottom: 47rpx;
  346. }
  347. .pass {
  348. color: #FF4C4C;
  349. border: 2px solid #FF4C4C;
  350. right: 190rpx;
  351. }
  352. .fail {
  353. color: #999999;
  354. border: 2px solid #EBEBEB;
  355. right: 36rpx;
  356. }
  357. }
  358. .refuse-box {
  359. width: 549rpx;
  360. height: 437rpx;
  361. background: #FFFFFF;
  362. border-radius: 14rpx;
  363. .box-tit {
  364. line-height: 120rpx;
  365. text-align: center;
  366. font-size: 37rpx;
  367. font-family: PingFang SC;
  368. font-weight: bold;
  369. color: #333333;
  370. }
  371. .resone-wrapper {
  372. width: 494rpx;
  373. height: 181rpx;
  374. margin: auto;
  375. background: rgba(224, 224, 224, 0.35);
  376. border-radius: 10px;
  377. padding: 10rpx;
  378. font-size: 28rpx;
  379. }
  380. .btn-wrap {
  381. margin-top: 60rpx;
  382. display: flex;
  383. .btn {
  384. width: 50%;
  385. font-size: 37rpx;
  386. font-family: PingFang SC;
  387. font-weight: 500;
  388. color: #999999;
  389. text-align: center;
  390. }
  391. }
  392. }
  393. .pop-wrap {
  394. width: 522rpx;
  395. height: 800rpx;
  396. // background-color: red;
  397. }
  398. .popup-box {
  399. width: 522rpx;
  400. height: 800rpx;
  401. border-radius: 20rpx;
  402. position: relative;
  403. overflow: hidden;
  404. background-color: #fff;
  405. .popup-item {
  406. width: 100%;
  407. height: 100%;
  408. image {
  409. width: 100%;
  410. // height: 100%;
  411. }
  412. }
  413. }
  414. .close {
  415. display: block;
  416. width: 40rpx;
  417. height: 40rpx;
  418. border: 50%;
  419. position: absolute;
  420. // background-color: red;
  421. bottom: -100rpx;
  422. left: 0;
  423. right: 0;
  424. margin: 0 auto;
  425. }
  426. </style>