withdraw.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. <template>
  2. <div v-loading="loading">
  3. <div class="white-box">
  4. <el-tabs v-model="filterStatus" @tab-click="handleFilterStatusClick">
  5. <el-tab-pane label="All" name="-1" :lazy="true"></el-tab-pane> <!-- 全部 -->
  6. <el-tab-pane label="To be reviewed" name="0" :lazy="true"></el-tab-pane> <!-- 待审核 -->
  7. <!-- <el-tab-pane label="Reviewed" name="2" :lazy="true"></el-tab-pane> &lt;!&ndash; 已审核 &ndash;&gt;-->
  8. <el-tab-pane label="To be paid" name="3" :lazy="true"></el-tab-pane> <!-- 待付款 -->
  9. <el-tab-pane label="Paid" name="6" :lazy="true"></el-tab-pane> <!-- 已付款 -->
  10. <!-- <el-tab-pane label="Payment failed" name="4" :lazy="true"></el-tab-pane> &lt;!&ndash; 付款失败 &ndash;&gt;-->
  11. <el-tab-pane label="Returned" name="7" :lazy="true"></el-tab-pane> <!-- 已退回 -->
  12. </el-tabs>
  13. <div class="filter-box">
  14. <filter-user :filter-types.sync="filterTypes" @select-value="handleFilterUser"></filter-user>
  15. </div>
  16. <el-table :data="tableData" stripe style="width: 100%;" @selection-change="handleSelectionChange" :height="tool.getTableHeight()">
  17. <el-table-column type="selection" width="55" v-if="tableHeaders"></el-table-column>
  18. <el-table-column v-for="(tableHeader, key) in tableHeaders" :key="key" :label="tableHeader.header" :width="tableHeader.other.width ? tableHeader.other.width : ''">
  19. <template slot-scope="scope">
  20. <template v-if="scope.row[tableHeader.index].other.tag" >
  21. <el-tag :type="scope.row[tableHeader.index].other.tag.type ? scope.row[tableHeader.index].other.tag.type : null" :size="scope.row[tableHeader.index].other.tag.size ? scope.row[tableHeader.index].other.tag.size : null" :class="scope.row[tableHeader.index].other.tag.class ? scope.row[tableHeader.index].other.tag.class : null" >{{scope.row[tableHeader.index].value}}</el-tag>
  22. </template>
  23. <template v-else-if="scope.row[tableHeader.index].other.progress" >
  24. <el-progress type="circle" :percentage="Number.parseInt(percentList['MOVE_PERCENT'][scope.row.ID])"
  25. :width="50"
  26. :stroke-width="3"></el-progress>
  27. </template>
  28. <template v-else>
  29. <div v-html="scope.row[tableHeader.index].value"></div>
  30. </template>
  31. </template>
  32. </el-table-column>
  33. <el-table-column fixed="right" label="Action" width="180"> <!-- 操作 -->
  34. <template slot-scope="scope">
  35. <el-dropdown size="small" trigger="click"
  36. v-if="scope.row.AUDIT_STATUS!=='6' && scope.row.AUDIT_STATUS!=='7' && (permission.hasPermission(`finance/withdraw-status`))">
  37. <el-button type="primary" size="small" @click.stop="">
  38. Action<i class="el-icon-arrow-down el-icon--right"></i>
  39. </el-button>
  40. <el-dropdown-menu slot="dropdown">
  41. <!--<el-dropdown-item command="add"-->
  42. <!--@click.native="handleAddInvoiceShow(scope.row)"-->
  43. <!--v-show="(scope.row.AUDIT_STATUS==='0'||scope.row.AUDIT_STATUS==='1') && (permission.hasPermission(`finance/invoice-audit-add`)||permission.hasPermission(`finance/invoice-audit-edit`))">-->
  44. <!--补录发票信息-->
  45. <!--</el-dropdown-item>-->
  46. <!-- <el-dropdown-item command="status"-->
  47. <!-- @click.native="handleStatusShow(scope.row, 3, 'Are you sure to approve the current withdrawal?')"-->
  48. <!-- v-show="scope.row.AUDIT_STATUS==='0' && permission.hasPermission(`finance/withdraw-status`)"> &lt;!&ndash; 确定对当前提现进行审核通过操作? &ndash;&gt;-->
  49. <!-- Approve &lt;!&ndash; 审核通过 &ndash;&gt;-->
  50. <!-- </el-dropdown-item>-->
  51. <!-- <el-dropdown-item command="status"-->
  52. <!-- @click.native="handleStatusShow(scope.row, 3, 'Are you sure to set the current withdrawal as payment action?')"-->
  53. <!-- v-show="scope.row.AUDIT_STATUS === '0' && permission.hasPermission(`finance/withdraw-status`)"> &lt;!&ndash; 确定对当前提现进行设为待付款操作? &ndash;&gt;-->
  54. <!-- Approve&lt;!&ndash; 设为待付款 &ndash;&gt;-->
  55. <!-- </el-dropdown-item>-->
  56. <el-dropdown-item command="status"
  57. @click.native="handleStatusShow(scope.row, 6, 'Are you sure to set the current withdrawal as paid?')"
  58. v-show="scope.row.AUDIT_STATUS === '3' && permission.hasPermission(`finance/withdraw-status-pay`)"> <!-- 确定对当前提现进行设为已付款操作 -->
  59. Paid<!--付款-->
  60. </el-dropdown-item>
  61. <el-dropdown-item command="status"
  62. @click.native="handleStatusShow(scope.row, 3, 'Are you sure to set the current withdrawal as approved?')"
  63. v-show="scope.row.AUDIT_STATUS === '0' && permission.hasPermission(`finance/withdraw-status-audit`)"> <!-- 确定对当前提现进行设为已付款操作 -->
  64. Approve<!--审核通过-->
  65. </el-dropdown-item>
  66. <!-- <el-dropdown-item command="status"-->
  67. <!-- @click.native="handleStatusShow(scope.row, 4, 'Are you sure to set payment failure for the current withdrawal?', 'Note')"-->
  68. <!-- v-show="scope.row.AUDIT_STATUS === '6' && permission.hasPermission(`finance/withdraw-status`)"> &lt;!&ndash; 付款失败备注 &ndash;&gt; &lt;!&ndash; 确定对当前提现进行设为付款失败操作? &ndash;&gt;-->
  69. <!-- Failed&lt;!&ndash; 设为付款失败 &ndash;&gt;-->
  70. <!-- </el-dropdown-item>-->
  71. <el-dropdown-item command="status"
  72. @click.native="handleStatusShow(scope.row, 7, 'Determines that the current withdrawal is set to a withdrawal return operation?', 'Note on withdrawal return')"
  73. v-show="(scope.row.AUDIT_STATUS === '0') && permission.hasPermission(`finance/withdraw-status-return`)"><!-- 提现退回备注 -->
  74. Return <!-- 该会员已提供发票,请确认是否处理提现退回 --> <!-- 设为提现退回 -->
  75. </el-dropdown-item>
  76. <el-dropdown-item command="status"
  77. @click.native="handleStatusShow(scope.row, 7, 'The member has provided the invoice, please confirm whether to process the withdrawal return?', 'Note on withdrawal return')"
  78. v-show="(scope.row.AUDIT_STATUS === '1'||scope.row.AUDIT_STATUS === '2') && permission.hasPermission(`finance/withdraw-status-return`)"><!-- 提现退回备注 -->
  79. Return <!-- 该会员已提供发票,请确认是否处理提现退回 --> <!-- 设为提现退回 -->
  80. </el-dropdown-item>
  81. <el-dropdown-item command="status"
  82. @click.native="handleStatusShow(scope.row, 0, 'Are you sure to set the current withdrawal as canceled?', 'Note on withdrawal return')"
  83. v-show="scope.row.AUDIT_STATUS === '3' && permission.hasPermission(`finance/withdraw-status-cancel`)"> <!-- 确定对当前提现进行设为提现退回操作? --> <!-- 提现退回备注 -->
  84. Cancel <!-- 取消审核 -->
  85. </el-dropdown-item>
  86. </el-dropdown-menu>
  87. </el-dropdown>
  88. </template>
  89. </el-table-column>
  90. </el-table>
  91. <div class="white-box-footer">
  92. <el-dropdown size="small" trigger="click" @command="handleMuli"
  93. v-if="filterStatus!=='-1' && filterStatus!=='6' && filterStatus!=='7' && (permission.hasPermission(`finance/withdraw-status`))">
  94. <el-button type="primary" size="small">
  95. Selected data<!--所选数据--><i class="el-icon-arrow-down el-icon--right"></i>
  96. </el-button>
  97. <el-dropdown-menu v-if="filterStatus==='0'" slot="dropdown">
  98. <el-dropdown-item command="3" v-show="permission.hasPermission(`finance/withdraw-status-audit`)">Batch audit passed</el-dropdown-item> <!-- 批量审核通过-->
  99. <el-dropdown-item command="7" v-show="permission.hasPermission(`finance/withdraw-status-return`)">Batch return</el-dropdown-item> <!-- 批量退回 -->
  100. </el-dropdown-menu>
  101. <!-- <el-dropdown-menu v-else-if="filterStatus==='2'" slot="dropdown">-->
  102. <!-- <el-dropdown-item command="3">Batch set to be paid</el-dropdown-item>&lt;!&ndash; 批量设为待付款 &ndash;&gt;-->
  103. <!-- </el-dropdown-menu>-->
  104. <el-dropdown-menu v-else-if="filterStatus==='3'" slot="dropdown">
  105. <el-dropdown-item command="6" v-show="permission.hasPermission(`finance/withdraw-status-pay`)">Batch set paid</el-dropdown-item><!--批量设为已付款-->
  106. <el-dropdown-item command="0" v-show="permission.hasPermission(`finance/withdraw-status-cancel`)">Batch return</el-dropdown-item><!--批量退回-->
  107. </el-dropdown-menu>
  108. <!-- <el-dropdown-menu v-else-if="filterStatus==='6'" slot="dropdown">-->
  109. <!-- <el-dropdown-item command="4">Batch set payment failure</el-dropdown-item>&lt;!&ndash;批量设为付款失败&ndash;&gt;-->
  110. <!-- </el-dropdown-menu>-->
  111. <!-- <el-dropdown-menu v-else-if="filterStatus==='4'" slot="dropdown">-->
  112. <!-- <el-dropdown-item command="3">Batch set to be paid</el-dropdown-item>&lt;!&ndash; 批量设为待付款 &ndash;&gt;-->
  113. <!-- </el-dropdown-menu>-->
  114. </el-dropdown>
  115. <el-button type="success" size="small" @click="handleExport"
  116. v-show="permission.hasPermission(`finance/transfer-list-export`)">Export Excel
  117. </el-button>
  118. <pagination :total="totalCount" :page_size="pageSize" :page_sizes="pageSizes" @size-change="handleSizeChange"
  119. @current-change="handleCurrentChange"></pagination>
  120. <el-dialog title="modify the withdrawal information" :visible.sync="dialogEditFormVisible">
  121. <el-form :model="form" label-width="150px" style="width:500px;" v-loading="dialogEditLoading">
  122. <el-form-item label="会员编号">
  123. <el-input v-model="form.baseInfo.USER_NAME" :disabled="true"></el-input>
  124. </el-form-item>
  125. <el-form-item label="会员姓名">
  126. <el-input v-model="form.baseInfo.REAL_NAME" :disabled="true"></el-input>
  127. </el-form-item>
  128. <el-form-item label="身份证号">
  129. <el-input v-model="form.baseInfo.ID_CARD" :disabled="true"></el-input>
  130. </el-form-item>
  131. <el-form-item label="注册类型">
  132. <el-select v-model="form.baseInfo.REG_TYPE" placeholder="请选择注册类型" :disabled="true">
  133. <el-option v-for="(item, key) in regTypes" :label="item.TYPE_NAME" :value="item.ID"
  134. :key="item.ID"></el-option>
  135. </el-select>
  136. </el-form-item>
  137. <el-form-item label="提现金额">
  138. <el-input v-model="form.amount" :disabled="true"></el-input>
  139. </el-form-item>
  140. <el-form-item label="Estimated date of payment" label-width="180"> <!-- 预计付款日期 -->
  141. <el-date-picker
  142. v-model="form.planPaidAt"
  143. type="date"
  144. placeholder="Select date"
  145. value-format="yyyy-MM-dd"
  146. :picker-options="pickerOptions0"
  147. >
  148. </el-date-picker>
  149. </el-form-item>
  150. <el-form-item label="Remark"> <!-- 备注 -->
  151. <el-input v-model="form.createRemark"></el-input>
  152. </el-form-item>
  153. </el-form>
  154. <div slot="footer" class="dialog-footer">
  155. <el-button @click="dialogEditFormVisible = false">Cancel<!-- 取 消 --></el-button>
  156. <el-button type="primary" @click.native="handleEdit">Edit<!-- 修 改 --></el-button>
  157. </div>
  158. </el-dialog><!--修改提现信息-->
  159. <el-dialog title="Review withdrawal info" :visible.sync="dialogAuditFormVisible"> <!-- 审核提现信息 -->
  160. <el-alert
  161. :title="auditForm.auditTips"
  162. type="warning" :closable="false">
  163. </el-alert>
  164. <el-form :model="auditForm" label-width="180px" style="width:500px;" v-loading="dialogAuditLoading">
  165. <el-form-item label="Estimated date of payment" v-show="planPayDateVisible"> <!-- 预计付款日期 -->
  166. <el-date-picker
  167. v-model="auditForm.planPaidAt"
  168. type="date"
  169. placeholder="Select date"
  170. value-format="yyyy-MM-dd"
  171. :picker-options="pickerOptions0"
  172. >
  173. </el-date-picker>
  174. </el-form-item>
  175. <el-form-item label="Date of payment" v-show="filterStatus==='3'"><!-- 付款日期 -->
  176. <el-date-picker
  177. v-model="auditForm.paidAt"
  178. type="date"
  179. placeholder="Select date"
  180. value-format="yyyy-MM-dd"
  181. :picker-options="pickerOptions1"
  182. >
  183. </el-date-picker>
  184. </el-form-item>
  185. <el-form-item :label="auditRemark">
  186. <el-input v-model="auditForm.createRemark"></el-input>
  187. </el-form-item>
  188. </el-form>
  189. <div slot="footer" class="dialog-footer">
  190. <el-button @click="dialogAuditFormVisible = false">Cancel<!-- 取 消 --></el-button>
  191. <el-button type="primary" @click.native="handleStatus">Submit<!-- 提 交 --></el-button>
  192. </div>
  193. </el-dialog>
  194. </div>
  195. </div>
  196. </div>
  197. </template>
  198. <script>
  199. import permission from '@/utils/permission'
  200. import network from '@/utils/network'
  201. import tool from '@/utils/tool'
  202. import FilterUser from '@/components/FilterUser'
  203. import baseInfo from '@/utils/baseInfo'
  204. import Pagination from '@/components/Pagination'
  205. import filterHelper from '../../utils/filterHelper'
  206. export default {
  207. name: 'finance_withdraw',
  208. components: {FilterUser, Pagination},
  209. data () {
  210. return {
  211. activeName: 'all',
  212. tableHeaders: null,
  213. baseDecLevels: baseInfo.decLevels(),
  214. allData: null,
  215. tableData: null,
  216. loading: true,
  217. multipleSelection: [],
  218. currentPage: 1,
  219. totalPages: 1,
  220. totalCount: 1,
  221. pageSize: 20,
  222. pageSizes: [1, 2, 5, 10, 20, 50, 100],
  223. tool: tool,
  224. permission: permission,
  225. regTypes: baseInfo.regTypes(),
  226. dialogEditFormVisible: false,
  227. dialogEditLoading: false,
  228. dialogAuditFormVisible: false,
  229. dialogAuditLoading: false,
  230. dialogAddInvoiceVisible: false,
  231. dialogAddInvoiceLoading: false,
  232. planPayDateVisible: false,
  233. auditId: null,
  234. form: {
  235. id: null,
  236. baseInfo: {USER_NAME: null, REG_TYPE: null},
  237. amount: null,
  238. planPaidAt: null,
  239. paidAt: new Date(),
  240. createRemark: null
  241. },
  242. invoiceForm: {
  243. id: null,
  244. withdrawId: null,
  245. withdrawSn: null,
  246. invoiceCode: null,
  247. invoiceNum: null,
  248. invoiceDate: null,
  249. amount: null,
  250. taxRate: null,
  251. purchaserName: null,
  252. purchaserRegisterNum: null,
  253. purchaserAddress: null,
  254. purchaserBank: null,
  255. sellerName: null,
  256. sellerRegisterNum: null,
  257. sellerAddress: null,
  258. sellerBank: null,
  259. itemName: null,
  260. invoiceRemark: null,
  261. createRemark: null
  262. },
  263. pickerOptions0: {
  264. disabledDate (time) {
  265. return time.getTime() < Date.now()
  266. }
  267. },
  268. pickerOptions1: {
  269. disabledDate (time) {
  270. return time.getTime() < Date.now() - 8.64e7
  271. }
  272. },
  273. auditRemark: '',
  274. auditForm: {
  275. auditTips: '',
  276. auditStatus: null,
  277. selectedIds: [],
  278. planPaidAt: null,
  279. createRemark: null,
  280. withdrawAudit: ''
  281. },
  282. auditTips: '',
  283. filterTypes: {},
  284. filterModel: {},
  285. excelForm: {
  286. rowCount: ''
  287. },
  288. filterStatus: '0'
  289. }
  290. },
  291. mounted () {
  292. this.getData()
  293. // if (permission.hasPermission(`finance/withdraw-7`)) {
  294. // this.activeName = 'seven'
  295. // }
  296. // if (permission.hasPermission(`finance/withdraw-4`)) {
  297. // this.activeName = 'four'
  298. // }
  299. // if (permission.hasPermission(`finance/withdraw-6`)) {
  300. // this.activeName = 'six'
  301. // }
  302. // if (permission.hasPermission(`finance/withdraw-3`)) {
  303. // this.activeName = 'three'
  304. // }
  305. // if (permission.hasPermission(`finance/withdraw-2`)) {
  306. // this.activeName = 'two'
  307. // }
  308. // if (permission.hasPermission(`finance/withdraw-1`)) {
  309. // this.activeName = 'one'
  310. // }
  311. // if (permission.hasPermission(`finance/withdraw-0`)) {
  312. // this.activeName = 'zero'
  313. // }
  314. // if (permission.hasPermission(`finance/withdraw-0`) && permission.hasPermission(`finance/withdraw-1`) && permission.hasPermission(`finance/withdraw-2`) && permission.hasPermission(`finance/withdraw-3`) && permission.hasPermission(`finance/withdraw-6`) && permission.hasPermission(`finance/withdraw-4`) && permission.hasPermission(`finance/withdraw-7`)) {
  315. // this.activeName = 'all'
  316. // }
  317. },
  318. methods: {
  319. handleMuli (command) {
  320. if (this.multipleSelection.length < 1) {
  321. this.$message({
  322. message: 'Select the record to operate on', // 请选择要操作的记录
  323. type: 'warning'
  324. })
  325. return
  326. }
  327. this.handleAudit(null, command)
  328. },
  329. handleAudit (row = null, status) {
  330. let title = ''
  331. if (status === '2') {
  332. title = 'Be sure to pass the review?Note:'// 确定要通过审核?备注:
  333. } else if (status === '3') {
  334. title = 'Be sure to unpaid the review?Note:'// 确定要设为待付款?备注:
  335. } else if (status === '4') {
  336. title = 'Be sure to payment failure the review?Note:'// 确定要设为付款失败?备注:
  337. } else if (status === '6') {
  338. title = 'Be sure to paid the review?Note:'// 确定要设为已付款?备注:
  339. } else if (status === '7') {
  340. title = 'Be sure to return the review?Note:'// 确定要设为已退回?备注:
  341. }
  342. this.handleStatusShow(row, status, title)
  343. },
  344. handleExpand (row, event, column) {
  345. this.$refs.multipleTable.toggleRowExpansion(row)
  346. },
  347. handleExport () {
  348. let filterData = this.filterModel
  349. // 如果有选中,导出选中ID,否则导出全部
  350. if (this.multipleSelection.length > 0) {
  351. let selectedIds = []
  352. for (let val of this.multipleSelection) {
  353. selectedIds.push(val.ID)
  354. }
  355. filterData.selectedIds = selectedIds
  356. }
  357. this.$confirm('Are you sure you want to export the current data?', 'Hint', {
  358. confirmButtonText: 'Confirm', // 确定
  359. cancelButtonText: 'Cancel', // 取消
  360. type: 'warning'
  361. }).then(() => {
  362. return network.getData('finance/withdraw-export', filterData)
  363. }).then(response => {
  364. this.$message({
  365. message: response,
  366. type: 'success'
  367. })
  368. }).catch(response => {
  369. })
  370. },
  371. handleAdd () {
  372. this.$router.push({path: `/finance/withdraw-add`})
  373. },
  374. handleExcel () {
  375. },
  376. handleExcelPaidFalse () {
  377. window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
  378. },
  379. handleEditShow (row) {
  380. this.dialogEditLoading = true
  381. this.auditId = row.ID
  382. this.dialogEditFormVisible = true
  383. let vueObj = this
  384. network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
  385. vueObj.dialogEditLoading = false
  386. vueObj.form = response
  387. })
  388. },
  389. handleEdit () {
  390. this.dialogEditFormVisible = false
  391. this.$message({
  392. message: 'Modifying data', // 正在修改数据
  393. type: 'info'
  394. })
  395. this.loading = true
  396. let path = 'finance/withdraw-edit'
  397. network.postData(path, this.form).then(response => {
  398. this.$message({
  399. message: response,
  400. type: 'success'
  401. })
  402. this.getData(this.currentPage, this.pageSize)
  403. }).catch(response => {
  404. })
  405. },
  406. handleStatusShow (row, status, title, remark = 'Remark') { // 备注
  407. this.auditForm = {
  408. auditTips: '',
  409. auditStatus: null,
  410. selectedIds: [],
  411. planPaidAt: null,
  412. paidAt: new Date(),
  413. remark: null
  414. }
  415. if (row === null) {
  416. for (let val of this.multipleSelection) {
  417. this.auditForm.selectedIds.push(val.ID)
  418. }
  419. } else {
  420. this.auditForm.selectedIds.push(row.ID)
  421. }
  422. if (this.auditForm.selectedIds.length === 0) {
  423. this.$message({
  424. message: 'Select the record to operate on', // 请选择数据
  425. type: 'warning'
  426. })
  427. return
  428. }
  429. this.auditRemark = remark
  430. this.dialogAuditFormVisible = true
  431. this.auditForm.auditTips = title
  432. this.auditForm.auditStatus = status
  433. if (status == '3') {
  434. this.planPayDateVisible = true
  435. } else {
  436. this.planPayDateVisible = false
  437. }
  438. },
  439. handleStatus () {
  440. network.postData('finance/mult-point', {opType: 2}).then(response => {
  441. this.auditForm.withdrawAudit = response.withdrawAudit
  442. this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
  443. confirmButtonText: 'Confirm', // 确定
  444. cancelButtonText: 'Cancel', // 取消
  445. type: 'warning'
  446. }).then(() => {
  447. return network.postData('finance/withdraw-status', this.auditForm)
  448. }).then(response => {
  449. this.dialogAuditFormVisible = false
  450. this.$message({
  451. message: response,
  452. type: 'success'
  453. })
  454. this.getData(this.currentPage, this.pageSize)
  455. }).catch(response => {
  456. this.dialogAuditFormVisible = false
  457. })
  458. })
  459. },
  460. handleAddInvoiceShow (row) {
  461. this.dialogAddInvoiceVisible = true
  462. this.auditId = row.INVOICE_ID
  463. this.dialogAddInvoiceLoading = true
  464. let vueObj = this
  465. network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
  466. vueObj.dialogAddInvoiceLoading = false
  467. vueObj.invoiceForm = response
  468. this.invoiceForm.withdrawSn = row.SN
  469. this.invoiceForm.withdrawId = row.ID
  470. })
  471. },
  472. handleAddInvoice () {
  473. let path = 'finance/invoice-audit-add'
  474. if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
  475. network.postData(path, this.invoiceForm).then(response => {
  476. this.$message({
  477. message: response,
  478. type: 'success'
  479. })
  480. this.dialogAddInvoiceVisible = false
  481. this.getData(this.currentPage, this.pageSize)
  482. }).catch(response => {
  483. })
  484. },
  485. handleSelectionChange (val) {
  486. this.multipleSelection = val
  487. },
  488. handleCurrentChange (page) {
  489. this.getData(page, this.pageSize)
  490. },
  491. handleSizeChange (pageSize) {
  492. this.getData(this.currentPage, pageSize)
  493. },
  494. handleFilterStatusClick (tab, event) {
  495. filterHelper.clearFilterOption(this)
  496. this.getData()
  497. },
  498. handleFilterUser (filterData) {
  499. filterHelper.handleFilterUser(this, filterData)
  500. },
  501. handleFilter () {
  502. this.getData()
  503. },
  504. getData (page, pageSize) {
  505. let filterData = this.filterModel
  506. filterData.filterStatus = this.filterStatus != '-1' ? `=,${this.filterStatus}` : ''
  507. let vueObj = this
  508. network.getPageData(this, 'finance/withdraw', page, pageSize, filterData, function (response) {
  509. vueObj.allData = response
  510. vueObj.filterTypes = response.filterTypes
  511. })
  512. },
  513. onMessageCallback () {
  514. this.getData(this.currentPage, this.pageSize)
  515. }
  516. }
  517. }
  518. </script>
  519. <style scoped>
  520. </style>