buySellDetail.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. <template>
  2. <view class="content">
  3. <view class="top-status">
  4. {{chooseItem.status | statusTitle}}
  5. </view>
  6. <view class="good-info">
  7. <view class="good-img-tit flex">
  8. <image :src="chooseItem.whole.image" mode="" class="good-img"></image>
  9. <view class="good-tit ">
  10. <view class="clamp2">
  11. {{chooseItem.whole.title}}
  12. </view>
  13. <view class="good-time">
  14. {{chooseItem.whole.add_time}}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="flex good-price">
  19. <view class="">
  20. 订单总价
  21. </view>
  22. <view class="">
  23. ¥{{chooseItem.price}}
  24. </view>
  25. </view>
  26. </view>
  27. <view class="user-info">
  28. <view class="top-tit">
  29. <view class="tit-t"></view>
  30. <view class="" style="display: inline-block;">
  31. 订单信息
  32. </view>
  33. </view>
  34. <view class="info-wrap">
  35. <view class="info-tit">
  36. 订单编号:
  37. </view>
  38. <view class="info-val">{{chooseItem.order_id}}</view>
  39. </view>
  40. <view class="info-wrap">
  41. <view class="info-tit">
  42. 所属支行:
  43. </view>
  44. <view class="info-val">{{chooseItem.touser.bank_branch}}</view>
  45. </view>
  46. <view class="info-wrap">
  47. <view class="info-tit">
  48. 开户行:
  49. </view>
  50. <view class="info-val">{{chooseItem.touser.account_Bank}}</view>
  51. </view>
  52. <view class="info-wrap">
  53. <view class="info-tit">
  54. 开户名:
  55. </view>
  56. <view class="info-val">{{chooseItem.touser.bank_name}}</view>
  57. <view class="fz" @click="fz()">
  58. 复制
  59. </view>
  60. </view>
  61. <view class="info-wrap">
  62. <view class="info-tit">
  63. 银行卡号:
  64. </view>
  65. <view class="info-val">45875487854</view>
  66. <view class="fz" @click="fz()">
  67. 复制
  68. </view>
  69. </view>
  70. <view class="info-wrap">
  71. <view class="info-tit">
  72. 支付宝账号:
  73. </view>
  74. <view class="info-val">{{chooseItem.touser.alipay_no}}</view>
  75. <view class="fz" @click="fz()">
  76. 复制
  77. </view>
  78. </view>
  79. <view class="info-wrap">
  80. <view class="info-tit">
  81. 微信收款码:
  82. </view>
  83. <image :src="chooseItem.touser.wx_qr" mode="" class="info-img" @click="lookimg(chooseItem.touser.wx_qr)"></image>
  84. </view>
  85. <view class="info-wrap">
  86. <view class="info-tit">
  87. 卖家电话:
  88. </view>
  89. <view class="info-val">{{chooseItem.touser.bank_card}}</view>
  90. <view class="fz" @click="fz()">
  91. 复制
  92. </view>
  93. </view>
  94. </view>
  95. <view class="up-wrap" v-if="can_addit">
  96. <view class="up-tit">
  97. 上传凭证
  98. </view>
  99. <image src="../../static/img/upimg.png" mode="" class="upimg" v-if="upimg == ''" @click="imgsub()"></image>
  100. <image :src="upimg" mode="" class="upimg" v-else @click="imgsub()"></image>
  101. </view>
  102. <view class="apply-wrap" v-if="can_addit">
  103. <view class="apply-btn" @click="upnew">
  104. 立即支付
  105. </view>
  106. </view>
  107. <uni-popup ref="lookimg" type="center">
  108. <view class="pop-wrap" style="position: relative;" >
  109. <movable-area class="popup-box">
  110. <movable-view class="popup-item" :scale="true" direction="all">
  111. <image :src="chooseImg" mode="aspectFit"></image>
  112. </movable-view>
  113. </movable-area>
  114. <image src="../../static/icon/close.png" mode="" class="close" style="width: 80rpx;height: 80rpx;" @click="closePup"></image>
  115. </view>
  116. </uni-popup>
  117. </view>
  118. </template>
  119. <script>
  120. import { upload} from '@/api/order.js';
  121. import { upEvaluation } from '@/api/whole.js'
  122. export default {
  123. data() {
  124. return {
  125. chooseImg: '',
  126. upimg: '',
  127. chooseItem: '',
  128. can_addit: false
  129. }
  130. },
  131. onLoad(opt) {
  132. if(opt.type == 'look') {
  133. this.can_addit = false
  134. }
  135. if(opt.type == 'up') {
  136. this.can_addit = true
  137. }
  138. this.chooseItem = this.$api.prePage().chooseItem
  139. },
  140. filters: {
  141. statusTitle(val) {
  142. let str = ''
  143. switch (val) {
  144. case -2:
  145. str = '支付超时'
  146. break;
  147. case -1:
  148. str = '待支付'
  149. break;
  150. case 0:
  151. str = '待支付'
  152. break;
  153. case 1:
  154. str = '待审核'
  155. break;
  156. case 2:
  157. str = '收款'
  158. break;
  159. case 3:
  160. str = '重新发放'
  161. break;
  162. case 4:
  163. str = '完成'
  164. break;
  165. default:
  166. str = ''
  167. break
  168. }
  169. return str
  170. }
  171. },
  172. methods: {
  173. imgsub() {
  174. console.log('imgsub');
  175. upload({
  176. filename: ''
  177. }).then(data => {
  178. this.upimg = data[0].url;
  179. // this.$set(this, text, data[0].url)
  180. });
  181. },
  182. upnew() {
  183. let obj = this
  184. if(obj.upimg == '') {
  185. return obj.$api.msg('请上传凭证')
  186. }
  187. upEvaluation({
  188. id: obj.chooseItem.id,
  189. pay_evaluation: obj.upimg
  190. }).then(res => {
  191. obj.$api.prePage().refreshList();
  192. uni.showToast({
  193. title:'支付成功',
  194. duration:2000
  195. });
  196. setTimeout(function() {
  197. uni.navigateBack();
  198. }, 800);
  199. })
  200. },
  201. closePup() {
  202. this.chooseImg = ''
  203. this.$refs.lookimg.close()
  204. },
  205. // 查看大图
  206. lookimg(src) {
  207. console.log(src,'chooseImg++++++')
  208. this.chooseImg = src
  209. this.$refs.lookimg.open()
  210. },
  211. }
  212. }
  213. </script>
  214. <style lang='scss' scoped>
  215. .top-status {
  216. width: 750rpx;
  217. height: 89rpx;
  218. line-height: 89rpx;
  219. padding-left: 20rpx;
  220. background: #FFFFFF;
  221. font-size: 32rpx;
  222. font-family: PingFang SC;
  223. font-weight: bold;
  224. color: #FF4C4C;
  225. line-height: 56rpx;
  226. }
  227. .good-info {
  228. width: 750rpx;
  229. height: 253rpx;
  230. padding: 30rpx;
  231. background: #FFFFFF;
  232. margin: 20rpx 0;
  233. .good-price {
  234. font-size: 26rpx;
  235. font-family: PingFangSC;
  236. font-weight: 500;
  237. color: #333333;
  238. padding-top: 10rpx;
  239. }
  240. .good-img-tit {
  241. justify-content: flex-start;
  242. .good-img {
  243. width: 160rpx;
  244. height: 160rpx;
  245. flex-shrink: 0;
  246. background-color: #eee;
  247. }
  248. .good-tit {
  249. height: 160rpx;
  250. padding: 20rpx 0 0;
  251. flex-shrink: 0;
  252. padding-left: 20rpx;
  253. width: 450rpx;
  254. font-size: 26rpx;
  255. font-family: PingFang SC;
  256. font-weight: 400;
  257. color: #1D2023;
  258. line-height: 40rpx;
  259. display: flex;
  260. flex-direction: column;
  261. justify-content: space-between;
  262. .good-time {
  263. font-size: 22rpx;
  264. font-family: PingFang SC;
  265. font-weight: 400;
  266. color: #999999;
  267. }
  268. }
  269. }
  270. }
  271. .user-info {
  272. padding: 20rpx 30rpx;
  273. background-color: #fff;
  274. margin: 20rpx 0;
  275. .top-tit {
  276. padding-bottom: 20rpx;
  277. .tit-t {
  278. margin-right: 8rpx;
  279. display: inline-block;
  280. width: 3rpx;
  281. height: 25rpx;
  282. background: linear-gradient(0deg, #FA2740, #FE5544);
  283. border-radius: 2rpx;
  284. font-size: 30rpx;
  285. font-family: PingFangSC;
  286. font-weight: 500;
  287. color: #333333;
  288. }
  289. }
  290. }
  291. .info-wrap {
  292. display: flex;
  293. justify-content: flex-start;
  294. align-items: flex-start;
  295. /* text-align: 80rpx; */
  296. font-size: 26rpx;
  297. font-family: PingFang SC;
  298. font-weight: 500;
  299. color: #666666;
  300. line-height: 56rpx;
  301. .info-img {
  302. width: 144rpx;
  303. height: 147rpx;
  304. background-color: #eee;
  305. }
  306. .info-tit {
  307. flex-shrink: 0;
  308. margin-right: 10rpx;
  309. }
  310. .fz {
  311. margin-left: 10rpx;
  312. text-align: center;
  313. width: 88rpx;
  314. height: 45rpx;
  315. line-height: 45rpx;
  316. background: #FFFFFF;
  317. border: 1px solid #DDDDDD;
  318. border-radius: 23rpx;
  319. }
  320. }
  321. .up-wrap {
  322. width: 750rpx;
  323. /* height: 229rpx; */
  324. background: #FFFFFF;
  325. padding: 20rpx 30rpx;
  326. .up-tit {
  327. font-size: 26rpx;
  328. font-family: PingFang SC;
  329. font-weight: 500;
  330. color: #666666;
  331. line-height: 56rpx;
  332. }
  333. .upimg {
  334. display: block;
  335. width: 150rpx;
  336. height: 150rpx;
  337. margin: auto;
  338. }
  339. }
  340. .apply-wrap {
  341. height: 200rpx;
  342. padding-top: 62rpx;
  343. .apply-btn {
  344. text-align: center;
  345. width: 560rpx;
  346. height: 80rpx;
  347. line-height: 80rpx;
  348. background: #E62129;
  349. border-radius: 40rpx;
  350. margin: auto;
  351. font-size: 30rpx;
  352. font-family: PingFang SC;
  353. font-weight: 500;
  354. color: #FFFFFF;
  355. }
  356. }
  357. .pop-wrap {
  358. width: 522rpx;
  359. height: 800rpx;
  360. // background-color: red;
  361. }
  362. .popup-box {
  363. width: 522rpx;
  364. height: 800rpx;
  365. border-radius: 20rpx;
  366. position: relative;
  367. overflow: hidden;
  368. background-color: #fff;
  369. .popup-item {
  370. width: 100%;
  371. height: 100%;
  372. image {
  373. width: 100%;
  374. // height: 100%;
  375. }
  376. }
  377. }
  378. .close {
  379. display: block;
  380. width: 40rpx;
  381. height: 40rpx;
  382. border: 50%;
  383. position: absolute;
  384. // background-color: red;
  385. bottom: -100rpx;
  386. left: 0;
  387. right: 0;
  388. margin: 0 auto;
  389. }
  390. </style>