detail.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <view class="container">
  3. <view class="page-block">
  4. <view class="page-title-block">
  5. <view class="title">提现信息</view>
  6. </view>
  7. <view class="content">
  8. <view class="cell flex flex-y-center">
  9. <view class="title-block">
  10. <text>提现状态</text>
  11. </view>
  12. <view class="desc">
  13. <view class="input-box" style="color: red;">{{info.state==1?'待审核' :info.state==2?'通过': info.state==3?'拒绝':''}}</view>
  14. </view>
  15. </view>
  16. <view class="cell flex flex-y-center">
  17. <view class="title-block">
  18. <text>提现姓名</text>
  19. </view>
  20. <view class="desc">
  21. <view class="input-box">{{info.username}}</view>
  22. </view>
  23. </view>
  24. <view class="cell flex flex-y-center">
  25. <view class="title-block">
  26. <text>提现账号</text>
  27. </view>
  28. <view class="desc">
  29. <view class="input-box">{{info.account}}</view>
  30. </view>
  31. </view>
  32. <view class="cell flex flex-y-center">
  33. <view class="title-block">
  34. <text>提现金额</text>
  35. </view>
  36. <view class="desc">
  37. <view class="input-box">¥{{info.tx_cost}}</view>
  38. </view>
  39. </view>
  40. <view class="cell flex flex-y-center">
  41. <view class="title-block">
  42. <text>实际金额</text>
  43. </view>
  44. <view class="desc">
  45. <view class="input-box">¥{{info.sj_cost}}</view>
  46. </view>
  47. </view>
  48. <view class="cell flex flex-y-center">
  49. <view class="title-block">
  50. <text>提现类型:</text>
  51. </view>
  52. <view class="desc">
  53. <view class="input-box">{{info.type==1?'微信':info.type==2?'支付宝':"银行"}}</view>
  54. </view>
  55. </view>
  56. <view class="cell flex flex-y-center" v-if="info.state != 1">
  57. <view class="title-block">
  58. <text>审核时间</text>
  59. </view>
  60. <view class="desc">
  61. <view class="input-box">{{sh_time}}</view>
  62. </view>
  63. </view>
  64. <view class="cell flex flex-y-center" v-if="info.state == 3">
  65. <view class="title-block">
  66. <text>拒绝理由</text>
  67. </view>
  68. <view class="desc">
  69. <view class="input-box">{{info.reason}}</view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view style="height:30rpx;"></view>
  75. <view class="footer-bar" style="height: 100rpx;" v-if="info.state == 1">
  76. <view class="content flex flex-center" style="height: 100rpx;">
  77. <view class="detail-btn flex flex-center" @click="del" style="border-right: 2rpx solid #F4F5F7;">
  78. <image src="../static/images/icon_16.png" mode="aspectFit" class="btn-icon"></image>
  79. <view style="color:#999999">拒绝</view>
  80. </view>
  81. <view class="detail-btn flex flex-center" @click="enit">
  82. <image src="../static/images/icon_17.png" mode="aspectFit" class="btn-icon"></image>
  83. <view style="color:#3387FF">线下打款</view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </template>
  89. <script>
  90. export default {
  91. data() {
  92. return {
  93. info: {},
  94. type:2,
  95. store_id:'',
  96. id:'',
  97. admin_id:'',shop_title:'',
  98. sh_time:'',
  99. }
  100. },
  101. onLoad(e) {
  102. this.store_id = uni.getStorageSync("store_id");
  103. this.admin_id = uni.getStorageSync("admin_id");
  104. this.id = e.id;
  105. this.getData(e.id);
  106. },
  107. methods: {
  108. enit() {
  109. uni.showModal({
  110. title: '提示',
  111. content: '确定已打款吗?',
  112. showCancel: true,
  113. cancelText: '取消',
  114. confirmText: '确定',
  115. success: res => {
  116. if (res.confirm) {
  117. this.request({
  118. url: 'Smdcshop/shared_withdrawal_state',
  119. data: {
  120. id: this.id,
  121. state:2
  122. },
  123. }).then(res => {
  124. console.log(res, "res")
  125. if (res.code === 200 || res.code === "200") {
  126. uni.showToast({
  127. title:res.message,
  128. icon: "none",
  129. })
  130. setTimeout(() => {
  131. this.getData(this.id);
  132. }, 2000)
  133. }
  134. }).catch((res) => {
  135. uni.showToast({
  136. title: res.message,
  137. icon: "none",
  138. })
  139. });
  140. }
  141. },
  142. fail: () => {},
  143. complete: () => {}
  144. });
  145. },
  146. del() {
  147. uni.showModal({
  148. title: '提示',
  149. content: '是否要拒绝吗?',
  150. showCancel: true,
  151. cancelText: '取消',
  152. confirmText: '确定',
  153. success: res => {
  154. if (res.confirm) {
  155. this.request({
  156. url: 'Smdcshop/shared_withdrawal_jujue',
  157. data: {
  158. id: this.id,
  159. reason:'',
  160. },
  161. }).then(res => {
  162. console.log(res, "res")
  163. if (res.code === 200 || res.code === "200") {
  164. uni.showToast({
  165. title:res.message,
  166. icon: "none",
  167. })
  168. setTimeout(() => {
  169. this.getData(this.id);
  170. }, 2000)
  171. }
  172. }).catch((res) => {
  173. uni.showToast({
  174. title: res.message,
  175. icon: "none",
  176. })
  177. });
  178. }
  179. },
  180. fail: () => {},
  181. complete: () => {}
  182. });
  183. },
  184. getData(id) {
  185. this.request({
  186. url: 'Smdcshop/shared_withdrawal_info',
  187. data: {
  188. id: id
  189. }
  190. }).then(res => {
  191. if (res.code == "200") {
  192. this.info = res.data
  193. this.sh_time = filterTime( Number(res.data.sh_time*1000) )
  194. function filterTime(time) {
  195. const date = new Date(time)
  196. const Y = date.getFullYear()
  197. const M = date.getMonth() + 1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1
  198. const D = date.getDate()
  199. const H = date.getHours() // 小时
  200. const K = date.getMinutes() // 分钟
  201. const S = date.getSeconds() // 秒
  202. return `${Y}-${M}-${D} ${H}:${K}:${S}`
  203. }
  204. }
  205. })
  206. }
  207. }
  208. }
  209. </script>
  210. <style>
  211. /* @import url("./static/css/common.css"); */
  212. page {
  213. background-color: #F4F5F7;
  214. }
  215. /* */
  216. .page-block {}
  217. .page-block .page-title-block {
  218. padding: 20rpx 25rpx;
  219. }
  220. .page-block .page-title-block .title {
  221. font-size: 28rpx;
  222. line-height: 40rpx;
  223. color: #999;
  224. }
  225. .page-block .content {
  226. padding: 0 25rpx;
  227. background-color: #fff;
  228. }
  229. .page-block .cell {
  230. min-height: 100rpx;
  231. border-bottom: 1rpx solid #f5f5f5;
  232. }
  233. .page-block .cell:last-child {
  234. border-bottom: none;
  235. }
  236. .page-block .cell .title-block {
  237. min-width: 155rpx;
  238. flex: none;
  239. font-size: 30rpx;
  240. color: #333;
  241. font-weight: 600;
  242. padding-right: 20rpx;
  243. }
  244. .page-block .cell .required::after {
  245. content: "*";
  246. color: #f00;
  247. }
  248. .page-block .cell .desc {
  249. flex: auto;
  250. height: 100%;
  251. }
  252. .page-block .cell .desc .desc-info{
  253. padding:30rpx 0;
  254. font-size: 28rpx;
  255. color: #999;
  256. line-height: 40rpx;
  257. }
  258. .page-block .cell .input-box {
  259. height: 100rpx;
  260. line-height: 100rpx;
  261. font-size: 28rpx;
  262. /* color: #999; */
  263. }
  264. .page-block .radio-btn {
  265. zoom: 0.7;
  266. }
  267. .page-block .radio-text {
  268. margin: 0 40rpx 0 8rpx;
  269. font-size: 28rpx;
  270. color: #999;
  271. }
  272. /* */
  273. .footer-bar {
  274. height: 160rpx;
  275. /*兼容 IOS<11.2*/
  276. padding-bottom: constant(safe-area-inset-bottom);
  277. /*兼容 IOS>11.2*/
  278. padding-bottom: env(safe-area-inset-bottom);
  279. box-sizing: content-box;
  280. }
  281. .footer-bar .content {
  282. width: 100%;
  283. height: 160rpx;
  284. background-color: #fff;
  285. position: fixed;
  286. left: 0;
  287. bottom: 0;
  288. z-index: 100;
  289. /*兼容 IOS<11.2*/
  290. padding-bottom: constant(safe-area-inset-bottom);
  291. /*兼容 IOS>11.2*/
  292. padding-bottom: env(safe-area-inset-bottom);
  293. box-sizing: content-box;
  294. box-shadow: 0 -5rpx 10rpx #eee;
  295. }
  296. .footer-bar .content .btn {
  297. width: 700rpx;
  298. height: 100rpx;
  299. background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
  300. border-radius: 8rpx;
  301. box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(51, 135, 255, 0.20);
  302. text-align: center;
  303. line-height: 100rpx;
  304. font-size: 36rpx;
  305. font-weight: 500;
  306. color: #fff;
  307. }
  308. .footer-bar .content .detail-btn {
  309. width: 50%;
  310. height: 40rpx;
  311. }
  312. .footer-bar .content .detail-btn .btn-icon {
  313. flex: none;
  314. display: block;
  315. width: 32rpx;
  316. height: 32rpx;
  317. margin-right: 8rpx;
  318. }
  319. </style>