withdraw.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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="$t('financial.all')" name="-1" :lazy="true"></el-tab-pane> <!-- 全部 -->
  6. <el-tab-pane :label="$t('financial.toBeReviewed')" name="0" :lazy="true"></el-tab-pane> <!-- 待审核 -->
  7. <!-- <el-tab-pane :label="$t('financial.reviewed')" name="2" :lazy="true"></el-tab-pane> &lt;!&ndash; 已审核 &ndash;&gt;-->
  8. <el-tab-pane :label="$t('financial.toBePaid')" name="3" :lazy="true"></el-tab-pane> <!-- 待付款 -->
  9. <el-tab-pane :label="$t('financial.paid')" name="6" :lazy="true"></el-tab-pane> <!-- 已付款 -->
  10. <!-- <el-tab-pane :label="$t('financial.paymentFailed')" name="4" :lazy="true"></el-tab-pane> &lt;!&ndash; 付款失败 &ndash;&gt;-->
  11. <el-tab-pane :label="$t('financial.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="fixedColumn" :label="$t('financial.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. {{ $t('financial.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, $t('financial.setWithdrawalPaidNotice'))"
  58. v-show="scope.row.AUDIT_STATUS === '3' && permission.hasPermission(`finance/withdraw-status-pay`)"> <!-- 确定对当前提现进行设为已付款操作 -->
  59. {{ $t('financial.paid') }}<!--付款-->
  60. </el-dropdown-item>
  61. <el-dropdown-item command="status"
  62. @click.native="handleStatusShow(scope.row, 3, $t('financial.setApprovedNotice'))"
  63. v-show="scope.row.AUDIT_STATUS === '0' && permission.hasPermission(`finance/withdraw-status-audit`)"> <!-- 确定对当前提现进行设为已付款操作 -->
  64. {{ $t('financial.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, $t('financial.setWithdrawalReturnNotice'), $t('financial.noteWithdrawalReturn'))"
  73. v-show="(scope.row.AUDIT_STATUS === '0') && permission.hasPermission(`finance/withdraw-status-return`)"><!-- 提现退回备注 -->
  74. {{ $t('financial.withdrawSetReturn') }} <!-- 该会员已提供发票,请确认是否处理提现退回 --> <!-- 设为提现退回 -->
  75. </el-dropdown-item>
  76. <el-dropdown-item command="status"
  77. @click.native="handleStatusShow(scope.row, 7, $t('financial.memberInvoiceWithdrawalReturnNotice'), $t('financial.noteWithdrawalReturn'))"
  78. v-show="(scope.row.AUDIT_STATUS === '1'||scope.row.AUDIT_STATUS === '2') && permission.hasPermission(`finance/withdraw-status-return`)"><!-- 提现退回备注 -->
  79. {{ $t('financial.withdrawSetReturn') }} <!-- 该会员已提供发票,请确认是否处理提现退回 --> <!-- 设为提现退回 -->
  80. </el-dropdown-item>
  81. <el-dropdown-item command="status"
  82. @click.native="handleStatusShow(scope.row, 0, $t('financial.setCanceledNotice'), $t('financial.noteWithdrawalReturn'))"
  83. v-show="scope.row.AUDIT_STATUS === '3' && permission.hasPermission(`finance/withdraw-status-cancel`)"> <!-- 确定对当前提现进行设为提现退回操作? --> <!-- 提现退回备注 -->
  84. {{ $t('financial.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. {{ $t('financial.selectedData') }}<!--所选数据--><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`)">{{ $t('financial.batchAuditPassed') }}</el-dropdown-item> <!-- 批量审核通过-->
  99. <el-dropdown-item command="7" v-show="permission.hasPermission(`finance/withdraw-status-return`)">{{ $t('financial.batchReturn') }}</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`)">{{ $t('financial.batchSetPaid') }}</el-dropdown-item><!--批量设为已付款-->
  106. <el-dropdown-item command="0" v-show="permission.hasPermission(`finance/withdraw-status-cancel`)">{{ $t('financial.batchReturn') }}</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`)">{{ $t('common.exportExcel') }}
  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="$t('financial.memberCode')">
  123. <el-input v-model="form.baseInfo.USER_NAME" :disabled="true"></el-input>
  124. </el-form-item>
  125. <el-form-item :label="$t('financial.memberName')">
  126. <el-input v-model="form.baseInfo.REAL_NAME" :disabled="true"></el-input>
  127. </el-form-item>
  128. <el-form-item :label="$t('financial.idCardNumber')">
  129. <el-input v-model="form.baseInfo.ID_CARD" :disabled="true"></el-input>
  130. </el-form-item>
  131. <el-form-item :label="$t('financial.registerType')">
  132. <el-select v-model="form.baseInfo.REG_TYPE" :placeholder="$t('financial.pleaseSelectRegisterType')" :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="$t('financial.withdrawAmount')">
  138. <el-input v-model="form.amount" :disabled="true"></el-input>
  139. </el-form-item>
  140. <el-form-item :label="$t('financial.estimatedDatePayment')" label-width="180"> <!-- 预计付款日期 -->
  141. <el-date-picker
  142. v-model="form.planPaidAt"
  143. type="date"
  144. :placeholder="$t('financial.selectDate')"
  145. value-format="yyyy-MM-dd"
  146. :picker-options="pickerOptions0"
  147. >
  148. </el-date-picker>
  149. </el-form-item>
  150. <el-form-item :label="$t('table.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">{{ $t('common.cancel') }}<!-- 取 消 --></el-button>
  156. <el-button type="primary" @click.native="handleEdit">{{ $t('common.edit') }}<!-- 修 改 --></el-button>
  157. </div>
  158. </el-dialog><!--修改提现信息-->
  159. <el-dialog :title="$t('financial.reviewWithdrawalInfoNotice')" :visible.sync="dialogAuditFormVisible"> <!-- 审核提现信息 -->
  160. <el-alert
  161. :title="auditForm.auditTips"
  162. type="warning" :closable="false">
  163. </el-alert>
  164. <el-form :model="auditForm" v-loading="dialogAuditLoading">
  165. <el-form-item :label="$t('financial.estimatedDatePayment')" v-show="planPayDateVisible"> <!-- 预计付款日期 -->
  166. <el-date-picker
  167. v-model="auditForm.planPaidAt"
  168. type="date"
  169. :placeholder="$t('financial.selectDate')"
  170. value-format="yyyy-MM-dd"
  171. :picker-options="pickerOptions0"
  172. >
  173. </el-date-picker>
  174. </el-form-item>
  175. <el-form-item :label="$t('financial.datePayment')" v-show="filterStatus==='3'"><!-- 付款日期 -->
  176. <el-date-picker
  177. v-model="auditForm.paidAt"
  178. type="date"
  179. :placeholder="$t('financial.selectDate')"
  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">{{ $t('common.cancel') }}<!-- 取 消 --></el-button>
  191. <el-button type="primary" @click.native="handleStatus">{{ $t('common.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 { withdrawList, withdrawExport, multPoint, postWithdrawStatus } from '@/api/finance'
  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. import {getOperatingSystem} from "@/utils"
  207. export default {
  208. name: 'finance_withdraw',
  209. components: {FilterUser, Pagination},
  210. data () {
  211. return {
  212. fixedColumn:false, // 固定,当手机端不固定,pc固定
  213. activeName: 'all',
  214. tableHeaders: null,
  215. baseDecLevels: baseInfo.decLevels(),
  216. allData: null,
  217. tableData: null,
  218. loading: true,
  219. multipleSelection: [],
  220. currentPage: 1,
  221. totalPages: 1,
  222. totalCount: 1,
  223. pageSize: 20,
  224. pageSizes: [1, 2, 5, 10, 20, 50, 100],
  225. tool: tool,
  226. permission: permission,
  227. regTypes: baseInfo.regTypes(),
  228. dialogEditFormVisible: false,
  229. dialogEditLoading: false,
  230. dialogAuditFormVisible: false,
  231. dialogAuditLoading: false,
  232. dialogAddInvoiceVisible: false,
  233. dialogAddInvoiceLoading: false,
  234. planPayDateVisible: false,
  235. auditId: null,
  236. form: {
  237. id: null,
  238. baseInfo: {USER_NAME: null, REG_TYPE: null},
  239. amount: null,
  240. planPaidAt: null,
  241. paidAt: new Date(),
  242. createRemark: null
  243. },
  244. invoiceForm: {
  245. id: null,
  246. withdrawId: null,
  247. withdrawSn: null,
  248. invoiceCode: null,
  249. invoiceNum: null,
  250. invoiceDate: null,
  251. amount: null,
  252. taxRate: null,
  253. purchaserName: null,
  254. purchaserRegisterNum: null,
  255. purchaserAddress: null,
  256. purchaserBank: null,
  257. sellerName: null,
  258. sellerRegisterNum: null,
  259. sellerAddress: null,
  260. sellerBank: null,
  261. itemName: null,
  262. invoiceRemark: null,
  263. createRemark: null
  264. },
  265. pickerOptions0: {
  266. disabledDate (time) {
  267. return time.getTime() < Date.now()
  268. }
  269. },
  270. pickerOptions1: {
  271. disabledDate (time) {
  272. return time.getTime() < Date.now() - 8.64e7
  273. }
  274. },
  275. auditRemark: '',
  276. auditForm: {
  277. auditTips: '',
  278. auditStatus: null,
  279. selectedIds: [],
  280. planPaidAt: null,
  281. createRemark: null,
  282. withdrawAudit: ''
  283. },
  284. auditTips: '',
  285. filterTypes: {},
  286. filterModel: {},
  287. excelForm: {
  288. rowCount: ''
  289. },
  290. filterStatus: '0'
  291. }
  292. },
  293. mounted () {
  294. this.getData()
  295. let system = getOperatingSystem()
  296. if (system == "Android" || system == 'ios') {
  297. this.fixedColumn = false
  298. } else {
  299. this.fixedColumn = 'right'
  300. }
  301. // if (permission.hasPermission(`finance/withdraw-7`)) {
  302. // this.activeName = 'seven'
  303. // }
  304. // if (permission.hasPermission(`finance/withdraw-4`)) {
  305. // this.activeName = 'four'
  306. // }
  307. // if (permission.hasPermission(`finance/withdraw-6`)) {
  308. // this.activeName = 'six'
  309. // }
  310. // if (permission.hasPermission(`finance/withdraw-3`)) {
  311. // this.activeName = 'three'
  312. // }
  313. // if (permission.hasPermission(`finance/withdraw-2`)) {
  314. // this.activeName = 'two'
  315. // }
  316. // if (permission.hasPermission(`finance/withdraw-1`)) {
  317. // this.activeName = 'one'
  318. // }
  319. // if (permission.hasPermission(`finance/withdraw-0`)) {
  320. // this.activeName = 'zero'
  321. // }
  322. // 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`)) {
  323. // this.activeName = 'all'
  324. // }
  325. },
  326. methods: {
  327. handleMuli (command) {
  328. if (this.multipleSelection.length < 1) {
  329. this.$message({
  330. message: this.$t('financial.selectRecordOperateNotice'), // 请选择要操作的记录
  331. type: 'warning'
  332. })
  333. return
  334. }
  335. this.handleAudit(null, command)
  336. },
  337. handleAudit (row = null, status) {
  338. let title = ''
  339. if (status === '2') {
  340. title = this.$t('financial.surePassReviewNoteNotice') // 确定要通过审核?备注:
  341. } else if (status === '3') {
  342. title = this.$t('financial.sureUnpaidReviewNotice') // 确定要设为待付款?备注:
  343. } else if (status === '4') {
  344. title = this.$t('financial.surePaymentFailureReview') // 确定要设为付款失败?备注:
  345. } else if (status === '6') {
  346. title = this.$t('financial.surePaidReviewNotice') // 确定要设为已付款?备注:
  347. } else if (status === '7') {
  348. title = this.$t('financial.sureReturnReviewNotice') // 确定要设为已退回?备注:
  349. }
  350. this.handleStatusShow(row, status, title)
  351. },
  352. handleExpand (row, event, column) {
  353. this.$refs.multipleTable.toggleRowExpansion(row)
  354. },
  355. handleExport () {
  356. let filterData = this.filterModel
  357. // 如果有选中,导出选中ID,否则导出全部
  358. if (this.multipleSelection.length > 0) {
  359. let selectedIds = []
  360. for (let val of this.multipleSelection) {
  361. selectedIds.push(val.ID)
  362. }
  363. filterData.selectedIds = selectedIds
  364. }
  365. this.$confirm(this.$t('financial.exportNotice'), this.$t('common.hint'), {
  366. confirmButtonText: this.$t('common.confirm'), // 确定
  367. cancelButtonText: this.$t('common.cancel'), // 取消
  368. type: 'warning'
  369. }).then(() => {
  370. withdrawExport(filterData).then(response => {
  371. this.$message({
  372. message: response.data,
  373. type: 'success'
  374. })
  375. }).catch(err => {
  376. this.$message({
  377. message: err,
  378. type: 'error'
  379. })
  380. })
  381. })
  382. },
  383. handleAdd () {
  384. this.$router.push({path: `/finance/withdraw-add`})
  385. },
  386. handleExcel () {
  387. },
  388. handleExcelPaidFalse () {
  389. window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
  390. },
  391. handleEditShow (row) {
  392. this.dialogEditLoading = true
  393. this.auditId = row.ID
  394. this.dialogEditFormVisible = true
  395. let vueObj = this
  396. network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
  397. vueObj.dialogEditLoading = false
  398. vueObj.form = response
  399. })
  400. },
  401. handleEdit () {
  402. this.dialogEditFormVisible = false
  403. this.$message({
  404. message: this.$t('financial.modifyData'), // 正在修改数据
  405. type: 'info'
  406. })
  407. this.loading = true
  408. let path = 'finance/withdraw-edit'
  409. network.postData(path, this.form).then(response => {
  410. this.$message({
  411. message: response,
  412. type: 'success'
  413. })
  414. this.getData(this.currentPage, this.pageSize)
  415. }).catch(response => {
  416. })
  417. },
  418. handleStatusShow (row, status, title, remark = this.$t('table.remark')) { // 备注
  419. this.auditForm = {
  420. auditTips: '',
  421. auditStatus: null,
  422. selectedIds: [],
  423. planPaidAt: null,
  424. paidAt: new Date(),
  425. remark: null
  426. }
  427. if (row === null) {
  428. for (let val of this.multipleSelection) {
  429. this.auditForm.selectedIds.push(val.ID)
  430. }
  431. } else {
  432. this.auditForm.selectedIds.push(row.ID)
  433. }
  434. if (this.auditForm.selectedIds.length === 0) {
  435. this.$message({
  436. message: this.$t('financial.selectRecordOperateNotice'), // 请选择数据
  437. type: 'warning'
  438. })
  439. return
  440. }
  441. this.auditRemark = remark
  442. this.dialogAuditFormVisible = true
  443. this.auditForm.auditTips = title
  444. this.auditForm.auditStatus = status
  445. if (status == '3') {
  446. this.planPayDateVisible = true
  447. } else {
  448. this.planPayDateVisible = false
  449. }
  450. },
  451. handleStatus () {
  452. multPoint({opType: 2}).then(response => {
  453. this.auditForm.withdrawAudit = response.data.withdrawAudit
  454. this.$confirm(this.$t('financial.changeStateSelectedDataNotice'), this.$t('common.hint'), {
  455. confirmButtonText: this.$t('common.confirm'),
  456. cancelButtonText: this.$t('common.cancel'),
  457. type: 'warning'
  458. }).then(() => {
  459. postWithdrawStatus(this.auditForm).then(response => {
  460. this.dialogAuditFormVisible = false
  461. this.$message({
  462. message: response.data,
  463. type: 'success'
  464. })
  465. this.getData(this.currentPage, this.pageSize)
  466. }).catch(err => {
  467. this.dialogAuditFormVisible = false
  468. this.$message({
  469. message: err,
  470. type: 'error'
  471. })
  472. })
  473. })
  474. })
  475. },
  476. handleAddInvoiceShow (row) {
  477. this.dialogAddInvoiceVisible = true
  478. this.auditId = row.INVOICE_ID
  479. this.dialogAddInvoiceLoading = true
  480. let vueObj = this
  481. network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
  482. vueObj.dialogAddInvoiceLoading = false
  483. vueObj.invoiceForm = response
  484. this.invoiceForm.withdrawSn = row.SN
  485. this.invoiceForm.withdrawId = row.ID
  486. })
  487. },
  488. handleAddInvoice () {
  489. let path = 'finance/invoice-audit-add'
  490. if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
  491. network.postData(path, this.invoiceForm).then(response => {
  492. this.$message({
  493. message: response,
  494. type: 'success'
  495. })
  496. this.dialogAddInvoiceVisible = false
  497. this.getData(this.currentPage, this.pageSize)
  498. }).catch(response => {
  499. })
  500. },
  501. handleSelectionChange (val) {
  502. this.multipleSelection = val
  503. },
  504. handleCurrentChange (page) {
  505. this.getData(page, this.pageSize)
  506. },
  507. handleSizeChange (pageSize) {
  508. this.getData(this.currentPage, pageSize)
  509. },
  510. handleFilterStatusClick (tab, event) {
  511. filterHelper.clearFilterOption(this)
  512. this.getData()
  513. },
  514. handleFilterUser (filterData) {
  515. filterHelper.handleFilterUser(this, filterData)
  516. },
  517. handleFilter () {
  518. this.getData()
  519. },
  520. getData (page, pageSize) {
  521. let filterData = this.filterModel
  522. filterData.filterStatus = this.filterStatus != '-1' ? `=,${this.filterStatus}` : ''
  523. let vueObj = this
  524. const paramsData = Object.assign({
  525. page: (page === null || page == undefined) ? 1 : page,
  526. pageSize: (pageSize === null || pageSize == undefined) ? vueObj.pageSize : pageSize
  527. }, filterData)
  528. withdrawList(paramsData).then(response => {
  529. vueObj.tableHeaders = response.data.columnsShow ? response.data.columnsShow : []
  530. vueObj.tableData = response.data.list
  531. vueObj.filterTypes = response.data.filterTypes
  532. vueObj.currentPage = page
  533. vueObj.totalPages = parseInt(response.data.totalPages)
  534. vueObj.totalCount = parseInt(response.data.totalCount)
  535. vueObj.pageSize = pageSize
  536. this.loading = false
  537. }).catch(err => {
  538. console.log('err=============' + err)
  539. this.loading = false
  540. })
  541. },
  542. onMessageCallback () {
  543. this.getData(this.currentPage, this.pageSize)
  544. }
  545. }
  546. }
  547. </script>
  548. <style scoped>
  549. /deep/ .el-date-editor.el-input {
  550. width:100% !important;
  551. }
  552. </style>