buySellDetail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. }).catch(res => {
  182. this.$api.msg('上传的图片过大')
  183. });
  184. },
  185. upnew() {
  186. let obj = this
  187. if(obj.upimg == '') {
  188. return obj.$api.msg('请上传凭证')
  189. }
  190. upEvaluation({
  191. id: obj.chooseItem.id,
  192. pay_evaluation: obj.upimg
  193. }).then(res => {
  194. obj.$api.prePage().refreshList();
  195. uni.showToast({
  196. title:'支付成功',
  197. duration:2000
  198. });
  199. setTimeout(function() {
  200. uni.navigateBack();
  201. }, 800);
  202. })
  203. },
  204. closePup() {
  205. this.chooseImg = ''
  206. this.$refs.lookimg.close()
  207. },
  208. // 查看大图
  209. lookimg(src) {
  210. console.log(src,'chooseImg++++++')
  211. this.chooseImg = src
  212. this.$refs.lookimg.open()
  213. },
  214. copy(value) {
  215. let obj = this;
  216. let content = value; //需要复制的内容
  217. console.log('复制的内容:', content);
  218. content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
  219. const result = uniCopy(content);
  220. if (result === false) {
  221. uni.showToast({
  222. title: '不支持'
  223. });
  224. } else {
  225. uni.showToast({
  226. title: '复制成功',
  227. icon: 'none'
  228. });
  229. }
  230. }
  231. }
  232. }
  233. </script>
  234. <style lang='scss' scoped>
  235. .top-status {
  236. width: 750rpx;
  237. height: 89rpx;
  238. line-height: 89rpx;
  239. padding-left: 20rpx;
  240. background: #FFFFFF;
  241. font-size: 32rpx;
  242. font-family: PingFang SC;
  243. font-weight: bold;
  244. color: #FF4C4C;
  245. line-height: 56rpx;
  246. }
  247. .good-info {
  248. width: 750rpx;
  249. height: 253rpx;
  250. padding: 30rpx;
  251. background: #FFFFFF;
  252. margin: 20rpx 0;
  253. .good-price {
  254. font-size: 26rpx;
  255. font-family: PingFangSC;
  256. font-weight: 500;
  257. color: #333333;
  258. padding-top: 10rpx;
  259. }
  260. .good-img-tit {
  261. justify-content: flex-start;
  262. .good-img {
  263. width: 160rpx;
  264. height: 160rpx;
  265. flex-shrink: 0;
  266. background-color: #eee;
  267. }
  268. .good-tit {
  269. height: 160rpx;
  270. padding: 20rpx 0 0;
  271. flex-shrink: 0;
  272. padding-left: 20rpx;
  273. width: 450rpx;
  274. font-size: 26rpx;
  275. font-family: PingFang SC;
  276. font-weight: 400;
  277. color: #1D2023;
  278. line-height: 40rpx;
  279. display: flex;
  280. flex-direction: column;
  281. justify-content: space-between;
  282. .good-time {
  283. font-size: 22rpx;
  284. font-family: PingFang SC;
  285. font-weight: 400;
  286. color: #999999;
  287. }
  288. }
  289. }
  290. }
  291. .user-info {
  292. padding: 20rpx 30rpx;
  293. background-color: #fff;
  294. margin: 20rpx 0;
  295. .top-tit {
  296. padding-bottom: 20rpx;
  297. .tit-t {
  298. margin-right: 8rpx;
  299. display: inline-block;
  300. width: 3rpx;
  301. height: 25rpx;
  302. background: linear-gradient(0deg, #FA2740, #FE5544);
  303. border-radius: 2rpx;
  304. font-size: 30rpx;
  305. font-family: PingFangSC;
  306. font-weight: 500;
  307. color: #333333;
  308. }
  309. }
  310. }
  311. .info-wrap {
  312. display: flex;
  313. justify-content: flex-start;
  314. align-items: flex-start;
  315. /* text-align: 80rpx; */
  316. font-size: 26rpx;
  317. font-family: PingFang SC;
  318. font-weight: 500;
  319. color: #666666;
  320. line-height: 56rpx;
  321. .info-img {
  322. width: 144rpx;
  323. height: 147rpx;
  324. background-color: #eee;
  325. }
  326. .info-tit {
  327. flex-shrink: 0;
  328. margin-right: 10rpx;
  329. }
  330. .fz {
  331. margin-left: 10rpx;
  332. text-align: center;
  333. width: 88rpx;
  334. height: 45rpx;
  335. line-height: 45rpx;
  336. background: #FFFFFF;
  337. border: 1px solid #DDDDDD;
  338. border-radius: 23rpx;
  339. }
  340. }
  341. .up-wrap {
  342. width: 750rpx;
  343. /* height: 229rpx; */
  344. background: #FFFFFF;
  345. padding: 20rpx 30rpx;
  346. .up-tit {
  347. font-size: 26rpx;
  348. font-family: PingFang SC;
  349. font-weight: 500;
  350. color: #666666;
  351. line-height: 56rpx;
  352. }
  353. .upimg {
  354. display: block;
  355. width: 150rpx;
  356. height: 150rpx;
  357. margin: auto;
  358. }
  359. }
  360. .apply-wrap {
  361. height: 200rpx;
  362. padding-top: 62rpx;
  363. .apply-btn {
  364. text-align: center;
  365. width: 560rpx;
  366. height: 80rpx;
  367. line-height: 80rpx;
  368. background: #E62129;
  369. border-radius: 40rpx;
  370. margin: auto;
  371. font-size: 30rpx;
  372. font-family: PingFang SC;
  373. font-weight: 500;
  374. color: #FFFFFF;
  375. }
  376. }
  377. .pop-wrap {
  378. width: 522rpx;
  379. height: 800rpx;
  380. // background-color: red;
  381. }
  382. .popup-box {
  383. width: 522rpx;
  384. height: 800rpx;
  385. border-radius: 20rpx;
  386. position: relative;
  387. overflow: hidden;
  388. background-color: #fff;
  389. .popup-item {
  390. width: 100%;
  391. height: 100%;
  392. image {
  393. width: 100%;
  394. // height: 100%;
  395. }
  396. }
  397. }
  398. .close {
  399. display: block;
  400. width: 40rpx;
  401. height: 40rpx;
  402. border: 50%;
  403. position: absolute;
  404. // background-color: red;
  405. bottom: -100rpx;
  406. left: 0;
  407. right: 0;
  408. margin: 0 auto;
  409. }
  410. </style>