sellout.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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;">
  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. this.chooseImg = src
  158. },
  159. loadData() {
  160. let obj = this
  161. if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
  162. return
  163. }
  164. obj.loadingType = 'loading'
  165. packageOrder({
  166. page: obj.page,
  167. limit: obj.limit,
  168. status: 1
  169. }).then(({
  170. data
  171. }) => {
  172. console.log(data)
  173. obj.list = data.data
  174. obj.page++
  175. if (obj.limit == data.data.length) {
  176. obj.loadingType = 'more'
  177. } else {
  178. obj.loadingType = 'noMore'
  179. }
  180. obj.loaded = true
  181. })
  182. },
  183. openrefuse() {
  184. this.$refs.refuse.open()
  185. },
  186. //取消拒绝
  187. refusFali() {
  188. this.resone = ''
  189. this.$refs.refuse.close()
  190. },
  191. //确定拒绝
  192. refusOk() {
  193. let obj = this
  194. if(obj.resone == '') {
  195. obj.$api.msg('请输入拒绝理由')
  196. return
  197. }
  198. packageAudit({
  199. re: obj.resone,
  200. id: obj.choose_order,
  201. status: -2
  202. }).then(res => {
  203. obj.resone = ''
  204. obj.$refs.refuse.close()
  205. obj.page = 0
  206. obj.list = []
  207. obj.loaded = false
  208. obj.loadingType = 'more'
  209. obj.loadData()
  210. })
  211. },
  212. closePup() {
  213. this.chooseImg = ''
  214. this.$refs.lookimg.close()
  215. },
  216. passPackage() {
  217. packageAudit({
  218. re: '',
  219. id: obj.choose_order,
  220. status: 3
  221. }).then(res => {
  222. console.log(res)
  223. obj.$refs.refuse.close()
  224. obj.page = 0
  225. obj.list = []
  226. obj.loaded = false
  227. obj.loadingType = 'more'
  228. obj.loadData()
  229. })
  230. }
  231. }
  232. }
  233. </script>
  234. <style lang="scss" scoped>
  235. .outt {
  236. height: 392rpx;
  237. }
  238. .out-wrapper {
  239. width: 690rpx;
  240. // height: 392rpx;
  241. background: #FFFFFF;
  242. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  243. border-radius: 20rpx;
  244. margin: 0 auto 20rpx;
  245. padding: 30rpx;
  246. position: relative;
  247. .outt {
  248. height: 392rpx;
  249. }
  250. .out-top {
  251. line-height: 46rpx;
  252. justify-content: space-between;
  253. .buy-info {
  254. width: 450rpx;
  255. font-size: 32rpx;
  256. font-family: PingFang SC;
  257. font-weight: bold;
  258. color: #0F253A;
  259. justify-content: flex-start;
  260. .fsz {
  261. flex-shrink: 0;
  262. }
  263. .user-name {
  264. max-width: 180rpx;
  265. }
  266. .user-phone {
  267. padding-left: 10rpx;
  268. font-size: 24rpx;
  269. font-family: PingFang SC;
  270. font-weight: 500;
  271. color: #999999;
  272. }
  273. .user-logo {
  274. width: 46rpx;
  275. height: 46rpx;
  276. border-radius: 50%;
  277. background-color: red;
  278. padding-right: 10rpx;
  279. }
  280. }
  281. .buy-status {
  282. font-size: 26rpx;
  283. font-family: PingFang SC;
  284. font-weight: 500;
  285. color: #6D7C88;
  286. }
  287. }
  288. .item-info {
  289. width: 100%;
  290. margin-top: 28rpx;
  291. line-height: 50rpx;
  292. font-size: 26rpx;
  293. font-family: PingFang SC;
  294. display: flex;
  295. flex-wrap: wrap;
  296. .info-data {
  297. width: 100%;
  298. display: flex;
  299. .info-tit {
  300. font-weight: 500;
  301. color: #6D7C88;
  302. }
  303. .info-val {
  304. color: #0F253A;
  305. font-weight: bold;
  306. }
  307. }
  308. }
  309. .upimg {
  310. padding-top: 10rpx;
  311. display: flex;
  312. .up-tit {
  313. display: inline-block;
  314. font-size: 26rpx;
  315. font-family: PingFang SC;
  316. font-weight: 500;
  317. color: #6D7C88;
  318. }
  319. .img-wrap {
  320. width: 153rpx;
  321. height: 152rpx;
  322. border-radius: 20rpx;
  323. image {
  324. border-radius: 20rpx;
  325. width: 153rpx;
  326. height: 152rpx;
  327. background-color: red;
  328. }
  329. }
  330. }
  331. .mc-btn {
  332. width: 144rpx;
  333. line-height: 50rpx;
  334. border-radius: 25px;
  335. background: #FFFFFF;
  336. font-size: 26rpx;
  337. font-family: PingFang SC;
  338. font-weight: 500;
  339. text-align: center;
  340. position: absolute;
  341. bottom: 47rpx;
  342. }
  343. .pass {
  344. color: #FF4C4C;
  345. border: 2px solid #FF4C4C;
  346. right: 190rpx;
  347. }
  348. .fail {
  349. color: #999999;
  350. border: 2px solid #EBEBEB;
  351. right: 36rpx;
  352. }
  353. }
  354. .refuse-box {
  355. width: 549rpx;
  356. height: 437rpx;
  357. background: #FFFFFF;
  358. border-radius: 14rpx;
  359. .box-tit {
  360. line-height: 120rpx;
  361. text-align: center;
  362. font-size: 37rpx;
  363. font-family: PingFang SC;
  364. font-weight: bold;
  365. color: #333333;
  366. }
  367. .resone-wrapper {
  368. width: 494rpx;
  369. height: 181rpx;
  370. margin: auto;
  371. background: rgba(224, 224, 224, 0.35);
  372. border-radius: 10px;
  373. padding: 10rpx;
  374. font-size: 28rpx;
  375. }
  376. .btn-wrap {
  377. margin-top: 60rpx;
  378. display: flex;
  379. .btn {
  380. width: 50%;
  381. font-size: 37rpx;
  382. font-family: PingFang SC;
  383. font-weight: 500;
  384. color: #999999;
  385. text-align: center;
  386. }
  387. }
  388. }
  389. .pop-wrap {
  390. width: 522rpx;
  391. height: 800rpx;
  392. // background-color: red;
  393. }
  394. .popup-box {
  395. width: 522rpx;
  396. height: 800rpx;
  397. border-radius: 20rpx;
  398. position: relative;
  399. overflow: hidden;
  400. background-color: #fff;
  401. .popup-item {
  402. width: 522rpx;
  403. height: 800rpx;
  404. image {
  405. min-height: 605rpx;
  406. min-width: 522rpx;
  407. }
  408. }
  409. }
  410. .close {
  411. display: block;
  412. width: 40rpx;
  413. height: 40rpx;
  414. border: 50%;
  415. position: absolute;
  416. // background-color: red;
  417. bottom: -100rpx;
  418. left: 0;
  419. right: 0;
  420. margin: 0 auto;
  421. }
  422. </style>