WithdrawTable.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. <template>
  2. <div class="leo-withdrawTable" v-loading="loading">
  3. <div class="filter-box">
  4. <filter-user :filter-types="filterTypes" @select-value="handleFilterUser"></filter-user>
  5. </div>
  6. <el-table ref="multipleTable" :data="tableData" stripe style="width: 100%;"
  7. @selection-change="handleSelectionChange" :height="tool.getTableHeight(true)">
  8. <el-table-column type="selection" width="55"></el-table-column>
  9. <el-table-column label="提现流水号" width="220">
  10. <template slot-scope="scope">
  11. <el-tag type="" size="small" class="no-border">
  12. {{scope.row.SN}}
  13. </el-tag>
  14. </template>
  15. </el-table-column>
  16. <el-table-column label="提现期数" width="120">
  17. <template slot-scope="scope">
  18. {{scope.row.WITHDRAW_PERIOD_NUM}}
  19. </template>
  20. </el-table-column>
  21. <el-table-column label="提现时间" width="170">
  22. <template slot-scope="scope">
  23. {{tool.formatDate(scope.row.CREATED_AT)}}
  24. </template>
  25. </el-table-column>
  26. <el-table-column label="Estimated date of payment" width="120"> <!-- 预计付款日期 -->
  27. <template slot-scope="scope">
  28. {{tool.formatDate(scope.row.PLAN_PAID_AT,false)}}
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="付款日期" width="120">
  32. <template slot-scope="scope">
  33. {{tool.formatDate(scope.row.PAID_AT,false)}}
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="付款状态" width="120">
  37. <template slot-scope="scope">
  38. {{scope.row.AUDIT_STATUS_NAME}}
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="付款失败时间" width="170">
  42. <template slot-scope="scope">
  43. {{tool.formatDate(scope.row.PAID_FAIL_AT)}}
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="银行信息更新时间" width="170">
  47. <template slot-scope="scope">
  48. {{tool.formatDate(scope.row.BANK_INFO.BANK_UPDATED_AT)}}
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="付款失败原因" width="170">
  52. <template slot-scope="scope">
  53. {{scope.row.PAID_FAIL_REMARK}}
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="会员编号" width="150">
  57. <template slot-scope="scope">
  58. {{scope.row.BASE_INFO.USER_NAME}}
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="会员姓名" width="110">
  62. <template slot-scope="scope">
  63. {{scope.row.BASE_INFO.REAL_NAME}}
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="会员状态" width="110">
  67. <template slot-scope="scope">
  68. {{(scope.row.BASE_INFO.STATUS_NAME)}}
  69. </template>
  70. </el-table-column>
  71. <!-- <el-table-column label="身份证号" width="170">-->
  72. <!-- <template slot-scope="scope">-->
  73. <!-- {{scope.row.BASE_INFO.ID_CARD}}-->
  74. <!-- </template>-->
  75. <!-- </el-table-column>-->
  76. <el-table-column label="提现方式">
  77. <template slot-scope="scope">
  78. {{scope.row.IS_AUTO_WITHDRAW==='1'?'auto withdrawal':'manual withdrawal'}}
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="提现金额" width="110">
  82. <template slot-scope="scope">
  83. {{tool.formatPrice(scope.row.AMOUNT)}}
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="手续费" width="110">
  87. <template slot-scope="scope">
  88. {{tool.formatPrice(scope.row.FEES)}}
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="实际到账金额" width="110">
  92. <template slot-scope="scope">
  93. {{tool.formatPrice(scope.row.REAL_AMOUNT)}}
  94. </template>
  95. </el-table-column>
  96. <!--<el-table-column label="付款类型">-->
  97. <!--<template slot-scope="scope">-->
  98. <!--{{scope.row.PAY_TYPE==='1'?'见票付款':'无票付款'}}-->
  99. <!--</template>-->
  100. <!--</el-table-column>-->
  101. <!--<el-table-column label="发票金额" width="110">-->
  102. <!--<template slot-scope="scope">-->
  103. <!--{{scope.row.INVOICE_AMOUNT}}-->
  104. <!--</template>-->
  105. <!--</el-table-column>-->
  106. <!--<el-table-column label="发票号" width="110">-->
  107. <!--<template slot-scope="scope">-->
  108. <!--{{scope.row.INVOICE_NUM}}-->
  109. <!--</template>-->
  110. <!--</el-table-column>-->
  111. <!--<el-table-column label="应注册类型" width="100">-->
  112. <!--<template slot-scope="scope">-->
  113. <!--{{scope.row.BASE_INFO.SHOULD_REG_TYPE?regTypes[scope.row.BASE_INFO.SHOULD_REG_TYPE].TYPE_NAME:''}}-->
  114. <!--</template>-->
  115. <!--</el-table-column>-->
  116. <!--<el-table-column label="实时注册类型" width="110">-->
  117. <!--<template slot-scope="scope">-->
  118. <!--{{regTypes[scope.row.BASE_INFO.REG_TYPE].TYPE_NAME}}-->
  119. <!--</template>-->
  120. <!--</el-table-column>-->
  121. <!--<el-table-column label="注册名称" width="160">-->
  122. <!--<template slot-scope="scope">-->
  123. <!--{{scope.row.BASE_INFO.REG_NAME}}-->
  124. <!--</template>-->
  125. <!--</el-table-column>-->
  126. <el-table-column label="开户名" width="150">
  127. <template slot-scope="scope">
  128. {{scope.row.BANK_INFO.REAL_NAME}}
  129. </template>
  130. </el-table-column>
  131. <el-table-column label="开户行" width="150">
  132. <template slot-scope="scope">
  133. {{scope.row.BANK_INFO.OPEN_BANK_NAME}}
  134. </template>
  135. </el-table-column>
  136. <el-table-column label="开户省份" width="110">
  137. <template slot-scope="scope">
  138. {{scope.row.BANK_INFO.BANK_PROVINCE_NAME}}
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="开户城市" width="110">
  142. <template slot-scope="scope">
  143. {{scope.row.BANK_INFO.BANK_CITY_NAME}}
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="开户区县" width="110">
  147. <template slot-scope="scope">
  148. {{scope.row.BANK_INFO.BANK_COUNTY_NAME}}
  149. </template>
  150. </el-table-column>
  151. <el-table-column label="开户支行" width="180">
  152. <template slot-scope="scope">
  153. {{scope.row.BANK_INFO.BANK_ADDRESS}}
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="银行账户" width="180">
  157. <template slot-scope="scope">
  158. {{scope.row.BANK_INFO.BANK_NO}}
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="操作时间" width="170">
  162. <template slot-scope="scope">
  163. {{tool.formatDate(scope.row.UPDATED_AT)}}
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="操作管理员" width="150">
  167. <template slot-scope="scope">
  168. {{scope.row.UPDATE_ADMIN_NAME}}
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="审核时间" width="170">
  172. <template slot-scope="scope">
  173. {{tool.formatDate(scope.row.AUDITED_AT)}}
  174. </template>
  175. </el-table-column>
  176. <el-table-column label="审核人" width="150">
  177. <template slot-scope="scope">
  178. {{scope.row.AUDIT_ADMIN_NAME}}
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="Remark" width="150"> <!-- 备注 -->
  182. <template slot-scope="scope">
  183. {{scope.row.REMARK}}
  184. </template>
  185. </el-table-column>
  186. <!--<el-table-column label="体系名称" width="150">-->
  187. <!--<template slot-scope="scope">-->
  188. <!--{{scope.row.BASE_INFO.SYSTEM_NAME}}-->
  189. <!--</template>-->
  190. <!--</el-table-column>-->
  191. <!--<el-table-column label="所属报单主体编号" width="150">-->
  192. <!--<template slot-scope="scope">-->
  193. <!--{{scope.row.BASE_INFO.DEC_USER_NAME}}-->
  194. <!--</template>-->
  195. <!--</el-table-column>-->
  196. <!--<el-table-column label="所属报单主体姓名" width="150">-->
  197. <!--<template slot-scope="scope">-->
  198. <!--{{scope.row.BASE_INFO.DEC_REAL_NAME}}-->
  199. <!--</template>-->
  200. <!--</el-table-column>-->
  201. <el-table-column label="手机号码" width="110">
  202. <template slot-scope="scope">
  203. {{scope.row.BASE_INFO.MOBILE}}
  204. </template>
  205. </el-table-column>
  206. <el-table-column label="备用手机号码" width="120">
  207. <template slot-scope="scope">
  208. {{scope.row.BASE_INFO.TEL}}
  209. </template>
  210. </el-table-column>
  211. <el-table-column fixed="right" label="操作" width="180">
  212. <template slot-scope="scope">
  213. <el-dropdown size="small" trigger="click"
  214. v-if="withdrawStatus!==-1 && scope.row.AUDIT_STATUS!=='7' && (permission.hasPermission(`finance/withdraw-status`)||permission.hasPermission(`finance/invoice-audit-add`)||permission.hasPermission(`finance/invoice-audit-edit`))">
  215. <el-button type="primary" size="small" @click.stop="">
  216. Action<i class="el-icon-arrow-down el-icon--right"></i>
  217. </el-button>
  218. <el-dropdown-menu slot="dropdown">
  219. <!--<el-dropdown-item command="add"-->
  220. <!--@click.native="handleAddInvoiceShow(scope.row)"-->
  221. <!--v-show="(scope.row.AUDIT_STATUS==='0'||scope.row.AUDIT_STATUS==='1') && (permission.hasPermission(`finance/invoice-audit-add`)||permission.hasPermission(`finance/invoice-audit-edit`))">-->
  222. <!--补录发票信息-->
  223. <!--</el-dropdown-item>-->
  224. <el-dropdown-item command="status"
  225. @click.native="handleStatusShow(scope.row, 2, 'Are you sure to approve the current withdrawal?')"
  226. v-show="scope.row.AUDIT_STATUS==='0' && permission.hasPermission(`finance/withdraw-status`)"> <!-- 确定对当前提现进行审核通过操作? -->
  227. Approve <!-- 审核通过 -->
  228. </el-dropdown-item>
  229. <el-dropdown-item command="status"
  230. @click.native="handleStatusShow(scope.row, 3, 'Are you sure to set the current withdrawal as payment action?')"
  231. v-show="scope.row.AUDIT_STATUS === '2' && permission.hasPermission(`finance/withdraw-status`)"> <!-- 确定对当前提现进行设为待付款操作? -->
  232. 设为待付款
  233. </el-dropdown-item>
  234. <el-dropdown-item command="status"
  235. @click.native="handleStatusShow(scope.row, 6, 'Are you sure to set the current withdrawal as paid?')"
  236. v-show="scope.row.AUDIT_STATUS === '3' && permission.hasPermission(`finance/withdraw-status`)"> <!-- 确定对当前提现进行设为已付款操作 -->
  237. 设为已付款
  238. </el-dropdown-item>
  239. <el-dropdown-item command="status"
  240. @click.native="handleStatusShow(scope.row, 3, 'Are you sure to set the current withdrawal as payment action?')"
  241. v-show="scope.row.AUDIT_STATUS === '4' && permission.hasPermission(`finance/withdraw-status`)"> <!-- 确定对当前提现进行设为待付款操作? -->
  242. 设为待付款
  243. </el-dropdown-item>
  244. <el-dropdown-item command="status"
  245. @click.native="handleStatusShow(scope.row, 4, 'Are you sure to set payment failure for the current withdrawal?', '付款失败备注')"
  246. v-show="scope.row.AUDIT_STATUS === '6' && permission.hasPermission(`finance/withdraw-status`)"> <!-- 确定对当前提现进行设为付款失败操作? -->
  247. 设为付款失败
  248. </el-dropdown-item>
  249. <el-dropdown-item command="status"
  250. @click.native="handleStatusShow(scope.row, 7, 'Determines that the current withdrawal is set to a withdrawal return operation?', 'Note on withdrawal return')"
  251. v-show="scope.row.AUDIT_STATUS === '0' && permission.hasPermission(`finance/withdraw-status`)"> <!-- 确定对当前提现进行设为提现退回操作? --> <!-- 提现退回备注 -->
  252. Return <!-- 设为提现退回 -->
  253. </el-dropdown-item>
  254. <el-dropdown-item command="status"
  255. @click.native="handleStatusShow(scope.row, 7, '该会员已提供发票,请确认是否处理提现退回?', 'Note on withdrawal return')"
  256. v-show="(scope.row.AUDIT_STATUS === '1'||scope.row.AUDIT_STATUS === '2'||scope.row.AUDIT_STATUS === '3') && permission.hasPermission(`finance/withdraw-status`)"> <!-- 提现退回备注 -->
  257. Return <!-- 设为提现退回 -->
  258. </el-dropdown-item>
  259. </el-dropdown-menu>
  260. </el-dropdown>
  261. </template>
  262. </el-table-column>
  263. </el-table>
  264. <div class="white-box-footer">
  265. <el-button type="primary" size="small"
  266. @click="handleStatusShow(null,3,'确定对所选提现进行设为待付款操作?')"
  267. v-if="withdrawStatus===2&&permission.hasPermission(`finance/withdraw-status`)">标记为待付款
  268. </el-button>
  269. <el-button type="primary" size="small"
  270. @click="handleStatusShow(null,6,'确定对所选提现进行设为已付款操作?')"
  271. v-if="withdrawStatus===3&&permission.hasPermission(`finance/withdraw-status`)">标记为已付款
  272. </el-button>
  273. <el-button type="primary" size="small"
  274. @click="handleStatusShow(null,4,'确定对所选提现进行设为付款失败操作?','付款失败备注')"
  275. v-if="withdrawStatus===6&&permission.hasPermission(`finance/withdraw-status`)">标记为付款失败
  276. </el-button>
  277. <el-button type="primary" size="small"
  278. @click="handleStatusShow(null,3,'确定对所选提现进行设为待付款操作?')"
  279. v-if="withdrawStatus===4&&permission.hasPermission(`finance/withdraw-status`)">标记为待付款
  280. </el-button>
  281. <!--<el-input size="small" placeholder="Excel文件总行数" type="number" v-model="excelForm.rowCount" min="1"-->
  282. <!--v-if="withdrawStatus===6 && permission.hasPermission(`finance/import-withdraws-to-excel-table`) && permission.hasPermission(`finance/import-withdraws-paid-false`)"-->
  283. <!--style="width: 300px;overflow: hidden;">-->
  284. <!--<leo-excel-uploader slot="append"-->
  285. <!--:request-upload-route="`file/upload-excel`"-->
  286. <!--:request-import-to-excel-table-route="`finance/import-withdraws-to-excel-table`"-->
  287. <!--:request-import-excel-table-to-data-route="`finance/import-withdraws-paid-false`"-->
  288. <!--:import-row-count="excelForm.rowCount"-->
  289. <!--excel-option="withdrawPaidFalse"-->
  290. <!--upload-btn-title="Excel导入"-->
  291. <!--&gt;</leo-excel-uploader>-->
  292. <!--</el-input>-->
  293. <!--<el-button type="primary" size="small" @click="handleExcelPaidFalse"-->
  294. <!--v-if="withdrawStatus===6 && (permission.hasPermission(`finance/import-withdraws-to-excel-table`) && permission.hasPermission(`finance/import-withdraws-paid-false`))">-->
  295. <!--下载Excel模板-->
  296. <!--</el-button>-->
  297. <el-button type="success" size="small" @click="handleExport"
  298. v-show="permission.hasPermission(`finance/withdraw-export`)">Export Excel
  299. </el-button>
  300. <el-button type="primary" size="small" @click="handleAdd" v-if="false">新增提现</el-button>
  301. <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
  302. </div>
  303. <el-dialog title="修改提现信息" :visible.sync="dialogEditFormVisible">
  304. <el-form :model="form" label-width="150px" style="width:500px;" v-loading="dialogEditLoading">
  305. <el-form-item label="会员编号">
  306. <el-input v-model="form.baseInfo.USER_NAME" :disabled="true"></el-input>
  307. </el-form-item>
  308. <el-form-item label="会员姓名">
  309. <el-input v-model="form.baseInfo.REAL_NAME" :disabled="true"></el-input>
  310. </el-form-item>
  311. <el-form-item label="身份证号">
  312. <el-input v-model="form.baseInfo.ID_CARD" :disabled="true"></el-input>
  313. </el-form-item>
  314. <el-form-item label="注册类型">
  315. <el-select v-model="form.baseInfo.REG_TYPE" placeholder="请选择注册类型" :disabled="true">
  316. <el-option v-for="(item,key) in regTypes" :label="item.TYPE_NAME" :value="item.ID"
  317. :key="item.ID"></el-option>
  318. </el-select>
  319. </el-form-item>
  320. <el-form-item label="提现金额">
  321. <el-input v-model="form.amount" :disabled="true"></el-input>
  322. </el-form-item>
  323. <el-form-item label="Estimated date of payment"> <!-- 预计付款日期 -->
  324. <el-date-picker
  325. v-model="form.planPaidAt"
  326. type="date"
  327. placeholder="Select date"
  328. value-format="yyyy-MM-dd"
  329. :picker-options="pickerOptions0"
  330. > <!-- 选择日期 -->
  331. </el-date-picker>
  332. </el-form-item>
  333. <el-form-item label="Remark"> <!-- 备注 -->
  334. <el-input v-model="form.createRemark"></el-input>
  335. </el-form-item>
  336. </el-form>
  337. <div slot="footer" class="dialog-footer">
  338. <el-button @click="dialogEditFormVisible = false">Cancel<!-- 取 消 --></el-button>
  339. <el-button type="primary" @click.native="handleEdit">Edit<!-- 修 改 --></el-button>
  340. </div>
  341. </el-dialog>
  342. <el-dialog title="Review withdrawal info" :visible.sync="dialogAuditFormVisible"> <!-- 审核提现信息 -->
  343. <el-alert
  344. :title="auditForm.auditTips"
  345. type="warning" :closable="false">
  346. </el-alert>
  347. <el-form :model="auditForm" label-width="150px" style="width:500px;" v-loading="dialogAuditLoading">
  348. <el-form-item label="Estimated date of payment" v-show="withdrawStatus===2||withdrawStatus===4"> <!-- 预计付款日期 -->
  349. <el-date-picker
  350. v-model="auditForm.planPaidAt"
  351. type="date"
  352. placeholder="Select date"
  353. value-format="yyyy-MM-dd"
  354. :picker-options="pickerOptions0"
  355. >
  356. </el-date-picker>
  357. </el-form-item>
  358. <el-form-item label="付款日期" v-show="withdrawStatus===3">
  359. <el-date-picker
  360. v-model="auditForm.paidAt"
  361. type="date"
  362. placeholder="Select date"
  363. value-format="yyyy-MM-dd"
  364. :picker-options="pickerOptions1"
  365. >
  366. </el-date-picker>
  367. </el-form-item>
  368. <el-form-item :label="auditRemark">
  369. <el-input v-model="auditForm.createRemark"></el-input>
  370. </el-form-item>
  371. </el-form>
  372. <div slot="footer" class="dialog-footer">
  373. <el-button @click="dialogAuditFormVisible = false">Cancel<!-- 取 消 --></el-button>
  374. <el-button type="primary" @click.native="handleStatus">Submit<!-- 提 交 --></el-button>
  375. </div>
  376. </el-dialog>
  377. <el-dialog title="补录发票信息" :visible.sync="dialogAddInvoiceVisible">
  378. <el-form :model="invoiceForm" label-width="200px" style="width:600px;" v-loading="dialogAddInvoiceLoading">
  379. <el-form-item label="提现流水号">
  380. <el-input v-model="invoiceForm.withdrawSn" :disabled="true"></el-input>
  381. </el-form-item>
  382. <el-form-item label="发票代码">
  383. <el-input v-model="invoiceForm.invoiceCode"></el-input>
  384. </el-form-item>
  385. <el-form-item label="发票号码">
  386. <el-input v-model="invoiceForm.invoiceNum"></el-input>
  387. </el-form-item>
  388. <el-form-item label="开票日期">
  389. <el-date-picker
  390. v-model="invoiceForm.invoiceDate"
  391. type="date"
  392. placeholder="Select date"
  393. value-format="yyyy-MM-dd"
  394. >
  395. </el-date-picker>
  396. </el-form-item>
  397. <el-form-item label="提现金额">
  398. <el-input v-model="invoiceForm.amount"></el-input>
  399. </el-form-item>
  400. <el-form-item label="税率">
  401. <el-input v-model="invoiceForm.taxRate"></el-input>
  402. </el-form-item>
  403. <el-form-item label="购买方名称">
  404. <el-input v-model="invoiceForm.purchaserName"></el-input>
  405. </el-form-item>
  406. <el-form-item label="购买方纳税人识别号">
  407. <el-input v-model="invoiceForm.purchaserRegisterNum"></el-input>
  408. </el-form-item>
  409. <el-form-item label="购买方地址电话">
  410. <el-input v-model="invoiceForm.purchaserAddress"></el-input>
  411. </el-form-item>
  412. <el-form-item label="购买方开户行及账号">
  413. <el-input v-model="invoiceForm.purchaserBank"></el-input>
  414. </el-form-item>
  415. <el-form-item label="销售方名称">
  416. <el-input v-model="invoiceForm.sellerName"></el-input>
  417. </el-form-item>
  418. <el-form-item label="销售方纳税人识别号">
  419. <el-input v-model="invoiceForm.sellerRegisterNum"></el-input>
  420. </el-form-item>
  421. <el-form-item label="销售方地址电话">
  422. <el-input v-model="invoiceForm.sellerAddress"></el-input>
  423. </el-form-item>
  424. <el-form-item label="销售方开户行及账号">
  425. <el-input v-model="invoiceForm.sellerBank"></el-input>
  426. </el-form-item>
  427. <el-form-item label="货物或应税劳务服务名称">
  428. <el-input v-model="invoiceForm.itemName"></el-input>
  429. </el-form-item>
  430. <el-form-item label="发票备注">
  431. <el-input v-model="invoiceForm.invoiceRemark" type="textarea"
  432. :rows="2"></el-input>
  433. </el-form-item>
  434. <el-form-item label="Remark"> <!-- 备注 -->
  435. <el-input v-model="invoiceForm.createRemark"></el-input>
  436. </el-form-item>
  437. </el-form>
  438. <div slot="footer" class="dialog-footer">
  439. <el-button @click="dialogAddInvoiceVisible = false">Cancel<!-- 取 消 --></el-button>
  440. <el-button type="primary" @click.native="handleAddInvoice">Submit<!-- 提 交 --></el-button>
  441. </div>
  442. </el-dialog>
  443. </div>
  444. </template>
  445. <script>
  446. import network from '@/utils/network'
  447. import tool from '@/utils/tool'
  448. import FilterUser from '@/components/FilterUser'
  449. import baseInfo from '@/utils/baseInfo'
  450. import permission from '@/utils/permission'
  451. import LeoExcelUploader from '@/components/ExcelUploader'
  452. import {CDN_BASE_URL} from '@/utils/config'
  453. import Pagination from '@/components/Pagination'
  454. import filterHelper from '../utils/filterHelper'
  455. export default {
  456. name: 'leo-withdraw-table',
  457. components: {FilterUser, LeoExcelUploader,Pagination},
  458. props: {
  459. withdrawStatus: {
  460. type: Number,
  461. default: -1
  462. },
  463. },
  464. mounted() {
  465. this.getData()
  466. },
  467. data() {
  468. return {
  469. allData: null,
  470. tableData: null,
  471. loading: true,
  472. multipleSelection: [],
  473. currentPage: 1,
  474. totalPages: 1,
  475. totalCount: 1,
  476. pageSize: 20,
  477. tool: tool,
  478. permission: permission,
  479. regTypes: baseInfo.regTypes(),
  480. dialogEditFormVisible: false,
  481. dialogEditLoading: false,
  482. dialogAuditFormVisible: false,
  483. dialogAuditLoading: false,
  484. dialogAddInvoiceVisible: false,
  485. dialogAddInvoiceLoading: false,
  486. auditId: null,
  487. form: {
  488. id: null,
  489. baseInfo: {USER_NAME: null, REG_TYPE: null},
  490. amount: null,
  491. planPaidAt: null,
  492. paidAt: new Date(),
  493. createRemark: null,
  494. },
  495. invoiceForm: {
  496. id: null,
  497. withdrawId: null,
  498. withdrawSn: null,
  499. invoiceCode: null,
  500. invoiceNum: null,
  501. invoiceDate: null,
  502. amount: null,
  503. taxRate: null,
  504. purchaserName: null,
  505. purchaserRegisterNum: null,
  506. purchaserAddress: null,
  507. purchaserBank: null,
  508. sellerName: null,
  509. sellerRegisterNum: null,
  510. sellerAddress: null,
  511. sellerBank: null,
  512. itemName: null,
  513. invoiceRemark: null,
  514. createRemark: null,
  515. },
  516. pickerOptions0: {
  517. disabledDate(time) {
  518. return time.getTime() < Date.now();
  519. }
  520. },
  521. pickerOptions1: {
  522. disabledDate(time) {
  523. return time.getTime() < Date.now() - 8.64e7;
  524. }
  525. },
  526. auditRemark: '',
  527. auditForm: {
  528. auditTips: '',
  529. auditStatus: null,
  530. selectedIds: [],
  531. planPaidAt: null,
  532. createRemark: null,
  533. },
  534. auditTips: '',
  535. filterTypes: {
  536. 'USER_NAME': {isUserTable: true, name: '会员编号'},
  537. 'REAL_NAME': {isUserTable: true, name: '会员姓名'},
  538. 'ID_CARD': {isUserTable: true, name: '身份证'},
  539. 'MOBILE': {isUserTable: true, name: '手机号'},
  540. 'sn': {isUserTable: false, name: '提现流水号'},
  541. 'periodNum': {isUserTable: false, name: '提现期数'},
  542. 'amount': {isUserTable: false, name: '提现金额'},
  543. // 'IS_AUTO_WITHDRAW': {
  544. // isUserTable: false,
  545. // name: '提现方式',
  546. // other: 'select',
  547. // selectData: [{id: 1, name: '自动提现'}, {id: 0, name: '手动提现'}],
  548. // },
  549. // 'PAY_TYPE': {
  550. // isUserTable: false,
  551. // name: '付款类型',
  552. // other: 'select',
  553. // selectData: [{id: 1, name: '见票付款'}, {id: 0, name: '无票付款'}],
  554. // },
  555. // 'invoiceNum': {isUserTable: false, name: '发票号'},
  556. 'paidAt': {isUserTable: false, name: '付款日期', other: 'date'},
  557. },
  558. filterModel: {},
  559. excelForm: {
  560. rowCount: '',
  561. },
  562. }
  563. },
  564. methods: {
  565. handleExpand(row, event, column) {
  566. this.$refs.multipleTable.toggleRowExpansion(row)
  567. },
  568. handleExport() {
  569. this.$confirm('Are you sure you want to export the current data?', 'Hint', {
  570. confirmButtonText: 'confirm', // 确定
  571. cancelButtonText: 'cancel', // 取消
  572. type: 'warning'
  573. }).then(() => {
  574. return network.getData('finance/withdraw-export', {status: this.withdrawStatus})
  575. }).then(response => {
  576. this.$message({
  577. message: response,
  578. type: 'success'
  579. })
  580. }).catch(response => {
  581. })
  582. },
  583. handleAdd() {
  584. this.$router.push({path: `/finance/withdraw-add`})
  585. },
  586. handleExcel() {
  587. },
  588. handleExcelPaidFalse() {
  589. window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
  590. },
  591. handleEditShow(row) {
  592. this.dialogEditLoading = true
  593. this.auditId = row.ID
  594. this.dialogEditFormVisible = true
  595. let vueObj = this
  596. network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
  597. vueObj.dialogEditLoading = false
  598. vueObj.form = response
  599. })
  600. },
  601. handleEdit() {
  602. this.dialogEditFormVisible = false
  603. this.$message({
  604. message: '正在修改数据',
  605. type: 'info'
  606. })
  607. this.loading = true
  608. let path = 'finance/withdraw-edit'
  609. network.postData(path, this.form).then(response => {
  610. this.$message({
  611. message: response,
  612. type: 'success'
  613. })
  614. this.getData(this.currentPage, this.pageSize)
  615. }).catch(response => {
  616. })
  617. },
  618. handleStatusShow(row, status, title, remark = '备注') {
  619. this.auditForm = {
  620. auditTips: '',
  621. auditStatus: null,
  622. selectedIds: [],
  623. planPaidAt: null,
  624. paidAt: new Date(),
  625. remark: null,
  626. }
  627. if (row === null) {
  628. for (let val of this.multipleSelection) {
  629. this.auditForm.selectedIds.push(val.ID)
  630. }
  631. } else {
  632. this.auditForm.selectedIds.push(row.ID)
  633. }
  634. if (this.auditForm.selectedIds.length === 0) {
  635. this.$message({
  636. message: '请选择数据',
  637. type: 'warning'
  638. })
  639. return
  640. }
  641. this.auditRemark = remark
  642. this.dialogAuditFormVisible = true
  643. this.auditForm.auditTips = title
  644. this.auditForm.auditStatus = status
  645. },
  646. handleStatus() {
  647. this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
  648. confirmButtonText: 'confirm', // 确定
  649. cancelButtonText: 'cancel', // 取消
  650. type: 'warning'
  651. }).then(() => {
  652. return network.postData('finance/withdraw-status', this.auditForm)
  653. }).then(response => {
  654. this.dialogAuditFormVisible = false
  655. this.$message({
  656. message: response,
  657. type: 'success'
  658. })
  659. this.getData(this.currentPage, this.pageSize)
  660. }).catch(response => {
  661. this.dialogAuditFormVisible = false
  662. })
  663. },
  664. handleAddInvoiceShow(row) {
  665. this.dialogAddInvoiceVisible = true
  666. this.auditId = row.INVOICE_ID
  667. this.dialogAddInvoiceLoading = true
  668. let vueObj = this
  669. network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
  670. vueObj.dialogAddInvoiceLoading = false
  671. vueObj.invoiceForm = response
  672. this.invoiceForm.withdrawSn = row.SN
  673. this.invoiceForm.withdrawId = row.ID
  674. })
  675. },
  676. handleAddInvoice() {
  677. let path = 'finance/invoice-audit-add'
  678. if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
  679. network.postData(path, this.invoiceForm).then(response => {
  680. this.$message({
  681. message: response,
  682. type: 'success'
  683. })
  684. this.dialogAddInvoiceVisible = false
  685. this.getData(this.currentPage, this.pageSize)
  686. }).catch(response => {
  687. })
  688. },
  689. handleSelectionChange(val) {
  690. this.multipleSelection = val
  691. },
  692. handleCurrentChange(page) {
  693. this.getData(page, this.pageSize)
  694. },
  695. handleSizeChange(pageSize) {
  696. this.getData(this.currentPage, pageSize)
  697. },
  698. handleFilterUser(filterData) {
  699. filterHelper.handleFilterUser(this, filterData)
  700. },
  701. handleFilter() {
  702. this.getData()
  703. },
  704. getData(page, pageSize) {
  705. let filterData = this.filterModel
  706. filterData.filterStatus = this.withdrawStatus != '-1' ? `=,${this.withdrawStatus}` : ''
  707. let vueObj = this
  708. network.getPageData(this, 'finance/withdraw', page, pageSize, filterData, function (response) {
  709. vueObj.allData = response
  710. })
  711. },
  712. onMessageCallback() {
  713. this.getData(this.currentPage, this.pageSize)
  714. },
  715. }
  716. }
  717. </script>
  718. <style scoped>
  719. .el-alert {
  720. margin-bottom: 20px;
  721. }
  722. </style>