user_bills.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <template>
  2. <div id="mainBody">
  3. <div v-if="user">
  4. <div class="user-name">用户:{{user.nickname}}({{user.uid}})</div>
  5. <div
  6. class="user-info"
  7. >订单数量:{{totalCount}},收入金额:{{income_success_sum}}元,支出金额:{{expense_success_sum}}元,客栈账户余额 {{balance}}元,薪资账户余额 {{recharge}}元,冻结余额 {{income}}元</div>
  8. <el-table :data="finaceList" border style="width: 100%">
  9. <el-table-column prop label="订单名称">
  10. <template slot-scope="scope">
  11. <span class="lblue point">
  12. <nuxt-link
  13. target="_blank"
  14. :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
  15. >{{scope.row.product_title}}</nuxt-link>
  16. </span>
  17. </template>
  18. </el-table-column>
  19. <el-table-column label="实际金额">
  20. <template slot-scope="scope">
  21. <template v-if="scope.row.channel != 'admin_confirm'">
  22. <!-- 技术信用-->
  23. <div
  24. v-if="scope.row.product_type == 13"
  25. >
  26. <!--退款-->
  27. <span
  28. v-if="scope.row.order_type == 8"
  29. >{{(scope.row.real_amount).toFixed(2)}}
  30. </span>
  31. <template v-else-if="scope.row.order_type == 4">
  32. <!--如果不是余额购买-->
  33. <span v-if="scope.row.channel != 'balance'" class="red">
  34. +{{(scope.row.real_amount).toFixed(2)}}
  35. </span>
  36. <span v-else>
  37. +{{(scope.row.real_amount).toFixed(2)}}
  38. </span>
  39. </template>
  40. <span v-else>{{(scope.row.real_amount).toFixed(2)}}</span>
  41. </div>
  42. <!-- 提现-->
  43. <div v-else-if="scope.row.product_type == 200">
  44. <span class="green">
  45. {{(scope.row.real_amount).toFixed(2)}}
  46. </span>
  47. </div>
  48. <!-- 充值-->
  49. <div v-else-if="scope.row.product_type == 3">
  50. <div v-if="scope.row.operator_uid==41266">
  51. +{{(scope.row.real_amount).toFixed(2)}}
  52. </div>
  53. <div v-else>
  54. <span class="red">+{{(scope.row.real_amount).toFixed(2)}}</span>
  55. </div>
  56. </div>
  57. <!-- 扣款-->
  58. <div v-else-if="scope.row.product_type == 300">
  59. <div v-if="scope.row.operator_uid==41266">
  60. +{{(scope.row.real_amount).toFixed(2)}}
  61. </div>
  62. <div v-else>
  63. <span class="red">+{{(scope.row.real_amount).toFixed(2)}}</span>
  64. </div>
  65. </div>
  66. <!-- 云端意向金-->
  67. <div v-else-if="scope.row.product_type == 8">
  68. <!--如果不是余额购买-->
  69. <span v-if="scope.row.channel != 'balance'" class="red">
  70. +{{(scope.row.real_amount).toFixed(2)}}
  71. </span>
  72. <span v-else>
  73. +{{(scope.row.real_amount).toFixed(2)}}
  74. </span>
  75. </div>
  76. <!-- 雇佣-->
  77. <div v-else-if="scope.row.product_type == 4">
  78. <!--退款-->
  79. <span v-if="scope.row.order_type == 8" >{{(scope.row.real_amount).toFixed(2)}}</span>
  80. <!--结薪-->
  81. <span v-else-if="scope.row.order_type == 5" >{{(scope.row.real_amount).toFixed(2)}}</span>
  82. <template v-else-if="scope.row.order_type == 4 || scope.row.order_type == 1">
  83. <!--如果不是余额购买-->
  84. <span v-if="scope.row.channel != 'balance'" class="red">
  85. +{{(scope.row.real_amount).toFixed(2)}}
  86. </span>
  87. <span v-else>
  88. +{{(scope.row.real_amount).toFixed(2)}}
  89. </span>
  90. </template>
  91. <span v-else>{{(scope.row.real_amount).toFixed(2)}}</span>
  92. </div>
  93. <!-- 云端押金-->
  94. <div v-else-if="scope.row.product_type == 400">
  95. <!--退款-->
  96. <span v-if="scope.row.order_type == 8" >{{(scope.row.real_amount).toFixed(2)}}</span>
  97. <template v-else-if="scope.row.order_type == 1">
  98. <!--如果不是余额购买-->
  99. <span v-if="scope.row.channel != 'balance'" class="red">
  100. +{{(scope.row.real_amount).toFixed(2)}}
  101. </span>
  102. <span v-else>
  103. +{{(scope.row.real_amount).toFixed(2)}}
  104. </span>
  105. </template>
  106. <span v-else>{{(scope.row.real_amount).toFixed(2)}}</span>
  107. </div>
  108. <!-- 云端工作-->
  109. <div v-else-if="scope.row.product_type == 9">
  110. <!--退款-->
  111. <span v-if="scope.row.order_type == 8" >{{(scope.row.real_amount).toFixed(2)}}</span>
  112. <!--结薪-->
  113. <template v-else-if="scope.row.order_type == 5">
  114. <!--如果不是余额购买-->
  115. <span v-if="scope.row.channel != 'balance' && scope.row.channel != 'qingtuanbao'" class="green">
  116. {{(scope.row.real_amount).toFixed(2)}}
  117. </span>
  118. <span v-else>
  119. {{(scope.row.real_amount).toFixed(2)}}
  120. </span>
  121. </template>
  122. <!--托管-->
  123. <template v-else-if="scope.row.order_type == 1">
  124. <!--如果不是余额购买-->
  125. <span v-if="scope.row.channel != 'balance'" class="red">
  126. +{{(scope.row.real_amount).toFixed(2)}}
  127. </span>
  128. <span v-else>
  129. +{{(scope.row.real_amount).toFixed(2)}}
  130. </span>
  131. </template>
  132. <span v-else>{{(scope.row.real_amount).toFixed(2)}}</span>
  133. </div>
  134. <!-- 整包-->
  135. <div v-else-if="scope.row.product_type == 2">
  136. <!--退款-->
  137. <span v-if="scope.row.order_type == 8" >{{(scope.row.real_amount).toFixed(2)}}</span>
  138. <!--结薪-->
  139. <template v-else-if="scope.row.order_type == 5">
  140. <!--如果不是余额购买-->
  141. <span v-if="scope.row.channel != 'balance' && scope.row.channel != 'qingtuanbao'" class="green">
  142. {{(scope.row.real_amount).toFixed(2)}}
  143. </span>
  144. <span v-else>
  145. {{(scope.row.real_amount).toFixed(2)}}
  146. </span>
  147. </template>
  148. <!--托管-->
  149. <template v-else-if="scope.row.order_type == 1">
  150. <!--如果不是余额购买-->
  151. <span v-if="scope.row.channel != 'balance' && scope.row.channel != 'qingtuanbao'" class="red">
  152. +{{(scope.row.real_amount).toFixed(2)}}
  153. </span>
  154. <span v-else>
  155. +{{(scope.row.real_amount).toFixed(2)}}
  156. </span>
  157. </template>
  158. <!--解冻-->
  159. <template v-else-if="scope.row.order_type == 7">
  160. <!--如果不是余额购买-->
  161. <span v-if="scope.row.channel != 'balance' && scope.row.channel != 'qingtuanbao'" class="green">
  162. {{(scope.row.real_amount).toFixed(2)}}
  163. </span>
  164. <span v-else>
  165. {{(scope.row.real_amount).toFixed(2)}}
  166. </span>
  167. </template>
  168. <span v-else>{{(scope.row.real_amount).toFixed(2)}}</span>
  169. </div>
  170. <!-- 查看机会-->
  171. <div v-else-if="scope.row.product_type == 1">
  172. <!--如果不是余额购买-->
  173. <span v-if="scope.row.channel != 'balance'" class="red">
  174. +{{(scope.row.real_amount).toFixed(2)}}
  175. </span>
  176. <span v-else>
  177. +{{(scope.row.real_amount).toFixed(2)}}
  178. </span>
  179. </div>
  180. <!-- 其他-->
  181. <div v-else>
  182. <!--如果不是余额购买-->
  183. <span v-if="scope.row.channel != 'balance'" class="red">
  184. +{{(scope.row.real_amount).toFixed(2)}}
  185. </span>
  186. <span v-else>
  187. +{{(scope.row.real_amount).toFixed(2)}}
  188. </span>
  189. </div>
  190. </template>
  191. <template v-else>
  192. <div v-if="scope.row.operator_uid != '41266'">
  193. <span
  194. v-if="parseInt((scope.row.real_amount).toFixed(2))>0"
  195. class="red"
  196. >+{{(scope.row.real_amount).toFixed(2)}}</span>
  197. <span v-else-if="parseInt((scope.row.real_amount).toFixed(2)) == 0">{{(scope.row.real_amount).toFixed(2)}}</span>
  198. <span v-else class="green">{{(scope.row.real_amount).toFixed(2)}}</span>
  199. </div>
  200. <div v-else>
  201. <span
  202. v-if="parseInt((scope.row.real_amount).toFixed(2))>0"
  203. >+{{(scope.row.real_amount).toFixed(2)}}</span>
  204. <span v-else-if="parseInt((scope.row.real_amount).toFixed(2)) == 0">{{(scope.row.real_amount).toFixed(2)}}</span>
  205. <span v-else>{{(scope.row.real_amount).toFixed(2)}}</span>
  206. </div>
  207. </template>
  208. </template>
  209. </el-table-column>
  210. <el-table-column prop label="当前余额">
  211. <template slot-scope="scope">{{scope.row.total_balance?scope.row.total_balance:'--'}}</template>
  212. </el-table-column>
  213. <el-table-column prop label="支付方式">
  214. <template slot-scope="scope">{{scope.row.channel_name}}</template>
  215. </el-table-column>
  216. <el-table-column prop label="订单状态">
  217. <template slot-scope="scope">{{scope.row.order_state_name}}</template>
  218. </el-table-column>
  219. <el-table-column prop label="创建时间">
  220. <template slot-scope="scope">{{scope.row.created_at_name}}</template>
  221. </el-table-column>
  222. <el-table-column prop label="订单编号">
  223. <template slot-scope="scope">
  224. <nuxt-link
  225. target="_blank"
  226. :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
  227. >{{scope.row.order_no}}</nuxt-link>
  228. </template>
  229. </el-table-column>
  230. <el-table-column prop label="人工">
  231. <template
  232. slot-scope="scope"
  233. >{{(scope.row.artificial_mark === 1 || scope.row.artificial_mark === "1")?'是':'否'}}</template>
  234. </el-table-column>
  235. <el-table-column prop label="备注说明">
  236. <template slot-scope="scope">{{scope.row.public_comment}}</template>
  237. </el-table-column>
  238. </el-table>
  239. </div>
  240. <div class="order-footer">
  241. <el-pagination
  242. background
  243. @current-change="getFinanceList"
  244. @size-change="changePageSize"
  245. :current-page.sync="currentPage"
  246. :page-sizes="[10, 20, 30, 40]"
  247. :page-size="20"
  248. layout="total, sizes, prev, pager, next, jumper"
  249. :total="totalCount"
  250. ></el-pagination>
  251. </div>
  252. </div>
  253. </template>
  254. <script>
  255. export default {
  256. data() {
  257. return {
  258. user: {},
  259. tradeList: [
  260. {
  261. id: 0,
  262. type: "全部"
  263. },
  264. {
  265. id: 1,
  266. type: "充值"
  267. },
  268. {
  269. id: 2,
  270. type: "提现"
  271. },
  272. {
  273. id: 3,
  274. type: "购买"
  275. },
  276. {
  277. id: 4,
  278. type: "购买"
  279. }
  280. ],
  281. finaceList: [],
  282. // 下发的总数据
  283. totalData: {},
  284. // 负责人
  285. checkUser: "",
  286. // 审核人列表
  287. periodStatusList: [],
  288. // 数据总条目
  289. totalCount: 1,
  290. currentPage: 1,
  291. currentPageSize: 20,
  292. // 列表数据
  293. tableData: [],
  294. balance:0,
  295. income:0,
  296. recharge:0
  297. };
  298. },
  299. computed: {
  300. isTest() {
  301. return this.localData.env === "test";
  302. }
  303. },
  304. mounted() {
  305. // this.getTableData();
  306. this.getFinanceList();
  307. },
  308. methods: {
  309. clickDev(uid) {
  310. this.$router.push({ path: "/main/orders_detail", params: { id: uid } });
  311. },
  312. changePageSize(val) {
  313. this.getFinanceList();
  314. },
  315. // 获取列表数据
  316. async getFinanceList() {
  317. let body = {
  318. page: this.currentPage,
  319. page_size: this.currentPageSize,
  320. user: this.$route.query.user
  321. };
  322. const res = await this.$post("/api/admin/order/get_user_orders", body);
  323. var data = res.data;
  324. this.finaceList = data.orders;
  325. this.totalCount = Number(data.count);
  326. this.successCount = Number(data.successCount);
  327. this.income_sum = Number(data.income_sum);
  328. this.income_success_sum = Number(data.income_success_sum);
  329. this.expense_sum = Number(data.expense_sum);
  330. this.expense_success_sum = Number(data.expense_success_sum);
  331. this.balance = data.total_balance.total_balance;
  332. this.income = data.total_balance.income_tax_balance ? data.total_balance.income_tax_balance / 100 : 0;
  333. this.recharge = data.total_balance.recharge_balance ? data.total_balance.recharge_balance / 100 : 0;
  334. this.user = data.user;
  335. //console.log(this.user.nickname);
  336. },
  337. async downFinanceList() {
  338. let body = {
  339. page: this.currentPage,
  340. page_size: this.currentPageSize,
  341. user: this.$route.query.user
  342. };
  343. // const res = await this.$get("/api/admin/order/get_orders", body);
  344. var url =
  345. this.$store.state.domainConfig.siteUrl +
  346. "/api/admin/order/export?" +
  347. "artificial_mark=1";
  348. console.log(url);
  349. window.location.href = url;
  350. }
  351. }
  352. };
  353. </script>
  354. <style lang="scss" scoped>
  355. .user-name {
  356. margin-bottom: 10px;
  357. }
  358. .user-info {
  359. margin-bottom: 10px;
  360. }
  361. .order-footer {
  362. margin-top: 20px;
  363. /*position: absolute;*/
  364. /*bottom: 10px;*/
  365. /*left: 10px;*/
  366. }
  367. .product_title {
  368. overflow: hidden;
  369. -webkit-line-clamp: 1;
  370. text-overflow: ellipsis;
  371. display: -webkit-box;
  372. -webkit-box-orient: vertical;
  373. }
  374. #mainBody {
  375. white-space: nowrap;
  376. overflow-x: scroll;
  377. height: calc(100% - 40px);
  378. }
  379. .orange {
  380. color: rgba(255, 152, 0, 1);
  381. }
  382. .red{
  383. color: rgb(255, 2, 30);
  384. }
  385. .green {
  386. color: rgba(37, 155, 36, 1);
  387. }
  388. </style>