buySellDetail.vue 9.5 KB

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