buySellDetail.vue 9.2 KB

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