fundList.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
  7. <template slot="left">
  8. <PermissionButton menu-code="_views_finance_real_fund_create" class-name="filter-item" type="success" icon="el-icon-circle-plus-outline"
  9. :page-jump="false" round style="float: left" @click="createdRealFundDialog = true" />
  10. <el-input v-model="listQuery.keyword" placeholder="关键字搜索..." clearable
  11. style="margin-left: 20px;width: 500px;float: left;">
  12. </el-input>
  13. <el-date-picker
  14. style="margin-left: 20px;float: left;"
  15. v-model="payDate"
  16. type="daterange"
  17. align="center"
  18. unlink-panels
  19. range-separator="至"
  20. start-placeholder="到账时日(开始)"
  21. end-placeholder="到账时日(结束)"
  22. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  23. </el-date-picker>
  24. <el-date-picker
  25. style="margin-left: 20px;float: left;"
  26. v-model="orderDate"
  27. type="daterange"
  28. align="center"
  29. unlink-panels
  30. range-separator="至"
  31. start-placeholder="录入时间(开始)"
  32. end-placeholder="录入时间(结束)"
  33. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  34. </el-date-picker>
  35. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList" round>搜索
  36. </el-button>
  37. <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
  38. </el-button>
  39. </template>
  40. <parentTable :data="pageData.records" slot="table" style="width: 100%;">
  41. <el-table-column label="付款方" align="center" width='250' >
  42. <template slot-scope="{row}">
  43. <span>{{ row.payer }}</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="付款银行" align="center" width='100' >
  47. <template slot-scope="{row}">
  48. <span>{{ row.payerBank?row.payerBank:'-' }}</span>
  49. </template>
  50. </el-table-column>
  51. <!-- <el-table-column label="付款账号" align="center" width='100'>
  52. <template slot-scope="{row}">
  53. <span>{{ row.payerAccount?row.payerAccount:'-' }}</span>
  54. </template>
  55. </el-table-column> -->
  56. <el-table-column label="付款金额(元)" align="center" >
  57. <template slot-scope="{row}">
  58. <span>{{ row.amount }}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="到账时日" align="center">
  62. <template slot-scope="{row}">
  63. <span>{{ row.payDatetime }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="已认领(元)" align="center">
  67. <template slot-scope="{row}">
  68. <span style="color:green">{{ row.claimAmount }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="未认领(元)" align="center">
  72. <template slot-scope="{row}">
  73. <span style="color:red">{{ row.notClaimAmount }}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="录入人" align="center">
  77. <template slot-scope="{row}">
  78. <span>{{ row.creator}}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="录入时间" align="center" width='170'>
  82. <template slot-scope="{row}">
  83. <span>{{ row.created}}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="备注" align="center" width='170'>
  87. <template slot-scope="{row}">
  88. <span>{{ row.remark}}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="全部认领" align="center" >
  92. <template slot-scope="{row}">
  93. <i v-if="row.notClaimAmount<=0" style="font-size:20px; color:green" class="el-icon-success"></i>
  94. <i v-else style="font-size:20px; color:RGB(255,106,106)" class="el-icon-warning"></i>
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="操作" align="center" width="250" fixed="right">
  98. <template slot-scope="{row}">
  99. <PermissionButton menu-code="_views_claim_list" class-name="filter-item" type="primary"
  100. :page-jump="false" round size="mini" @click="clamiList(row.id,row.notClaimAmount,row.payer,row.amount)" />
  101. <PermissionButton menu-code="_views_real_fund_edit" class-name="filter-item" type="warning"
  102. :page-jump="false" round size="mini" @click="detail(row.id)" />
  103. <PermissionButton menu-code="_views_real_fund_remove" class-name="filter-item" type="danger"
  104. :page-jump="false" round size="mini" @click="remove(row.id)" />
  105. </template>
  106. </el-table-column>
  107. </parentTable>
  108. </y-page-list-layout>
  109. <el-dialog :visible.sync="createdRealFundDialog" width="45%" center custom-class="doWarehouseClass" @closed="cleanFund">
  110. <el-form ref="realFund" :model="realFund" >
  111. <el-divider content-position="left">实收款信息</el-divider>
  112. <el-row>
  113. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  114. <el-form-item
  115. label="付款方名称:"
  116. prop="payer"
  117. :rules="{required: true, message: '付款方名称不能为空', trigger: 'blur'}"
  118. label-width="140px"
  119. class="postInfo-container-item"
  120. >
  121. <el-input v-model.trim="realFund.payer" class="filter-item" />
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. <el-row>
  126. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  127. <el-form-item
  128. label="付款金额(元):"
  129. prop="amount"
  130. :rules="{required: true, message: '付款金额不能为空', trigger: 'blur'}"
  131. label-width="140px"
  132. class="postInfo-container-item"
  133. >
  134. <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="realFund.amount" type="number"
  135. style="width:100%" class="filter-item" :disabled="realFund.id !== null" :readonly="realFund.id !== null"/>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  139. <el-form-item
  140. label="到账时间:"
  141. prop="payDatetime"
  142. :rules="{required: true, message: '到账时间不能为空', trigger: 'blur'}"
  143. label-width="140px"
  144. class="postInfo-container-item"
  145. >
  146. <el-date-picker
  147. v-model="realFund.payDatetime" type="date" placeholder="选择日期" style="width:100%">
  148. </el-date-picker>
  149. </el-form-item>
  150. </el-col>
  151. </el-row>
  152. <el-row>
  153. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  154. <el-form-item
  155. label="付款银行:"
  156. prop="payerBank"
  157. label-width="140px"
  158. class="postInfo-container-item"
  159. >
  160. <el-input v-model.trim="realFund.payerBank" class="filter-item" />
  161. </el-form-item>
  162. </el-col>
  163. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  164. <el-form-item
  165. label="付款银行账号:"
  166. prop="payerAccount"
  167. label-width="140px"
  168. class="postInfo-container-item"
  169. >
  170. <el-input v-model.trim="realFund.payerAccount" class="filter-item" />
  171. </el-form-item>
  172. </el-col>
  173. </el-row>
  174. <el-row>
  175. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  176. <el-form-item
  177. label="备注:"
  178. prop="remark"
  179. label-width="140px"
  180. class="postInfo-container-item"
  181. >
  182. <el-input v-model.trim="realFund.remark" class="filter-item" type="textarea" />
  183. </el-form-item>
  184. </el-col>
  185. </el-row>
  186. </el-form>
  187. <span slot="footer" class="dialog-footer">
  188. <el-button @click="createdRealFundDialog = false">取 消</el-button>
  189. <el-button type="primary" @click="saveRealFund()">确 定</el-button>
  190. </span>
  191. </el-dialog>
  192. <el-dialog :visible.sync="claimListDialog" width="80%" center custom-class="doWarehouseClass">
  193. <div style="margin-bottom:20px;font-size:20px;">
  194. <span>付款方:</span><span style="color:red;font-weight:bold">{{payer}}</span><span style="margin-left:20px">付款金额:</span><span style="color:red;font-weight:bold">{{amount}}¥</span><span style="margin-left:20px">的认领记录:</span>
  195. </div>
  196. <parentTable
  197. :data="claimListData" border stripe height="500"
  198. style="width: 100%">
  199. <el-table-column
  200. align = "center"
  201. prop="businessType"
  202. label="业务类型"
  203. width="180">
  204. </el-table-column>
  205. <el-table-column show-overflow-tooltip
  206. align = "center"
  207. prop="orderName"
  208. label="订单名称"
  209. width="300">
  210. </el-table-column>
  211. <el-table-column show-overflow-tooltip
  212. align = "center"
  213. prop="orderId"
  214. label="订单号"
  215. width="250">
  216. </el-table-column>
  217. <el-table-column
  218. align = "center"
  219. prop="shouldAmount"
  220. label="应收金额(元)">
  221. </el-table-column>
  222. <el-table-column
  223. align = "center"
  224. prop="claimAmount"
  225. label="认领金额(元)">
  226. </el-table-column>
  227. <el-table-column
  228. align = "center"
  229. prop="claimName"
  230. label="认领人">
  231. </el-table-column>
  232. <el-table-column
  233. align = "center"
  234. prop="created" width="180"
  235. label="认领时间">
  236. </el-table-column>
  237. <!-- <el-table-column
  238. align = "center"
  239. label="操作">
  240. <template slot-scope="scope">
  241. <el-button @click="updateClaim(scope.row)" type="text" size="small">修改</el-button>
  242. <el-button @click="removeClaim(scope.row.id)" type="text" size="small">删除</el-button>
  243. </template>
  244. </el-table-column> -->
  245. </parentTable>
  246. </el-dialog>
  247. </div>
  248. </template>
  249. <script>
  250. import YPageListLayout from '@/components/YPageListLayout'
  251. import Breadcrumb from '@/components/Breadcrumb'
  252. import excelImport from "@/components/excelImport.vue";
  253. export default {
  254. name: 'financeRealFund',
  255. components: {
  256. Breadcrumb,
  257. YPageListLayout,
  258. excelImport
  259. },
  260. watch:{
  261. },
  262. computed:{
  263. },
  264. data() {
  265. return {
  266. pageData: { records: [] },
  267. listQuery: {
  268. page: 1,
  269. size: 20,
  270. descs: 'id',
  271. keyword:null,
  272. startDate:null,
  273. endDate:null
  274. },
  275. createdRealFundDialog: false,
  276. claimListDialog:false,
  277. payDate:'',
  278. claimListData:null,
  279. realFund:{
  280. id:null,
  281. payer:null,
  282. payerBank:null,
  283. payerAccount:null,
  284. amount:null,
  285. claimAmount:null,
  286. notClaimAmount:null,
  287. payDatetime:null,
  288. remark:null,
  289. created:null,
  290. creator:null
  291. },
  292. payer:null,
  293. amount:null,
  294. orderDate:'',
  295. pickerOptions: {
  296. shortcuts: [{
  297. text: '最近一周',
  298. onClick(picker) {
  299. const end = new Date();
  300. const start = new Date();
  301. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  302. picker.$emit('pick', [start, end]);
  303. }
  304. }, {
  305. text: '最近一个月',
  306. onClick(picker) {
  307. const end = new Date();
  308. const start = new Date();
  309. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  310. picker.$emit('pick', [start, end]);
  311. }
  312. }, {
  313. text: '最近三个月',
  314. onClick(picker) {
  315. const end = new Date();
  316. const start = new Date();
  317. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  318. picker.$emit('pick', [start, end]);
  319. }
  320. }]
  321. },
  322. }
  323. },
  324. created() {
  325. this.getList();
  326. },
  327. methods: {
  328. resetSearch() {
  329. this.$router.push({ query: {} });
  330. this.orderDate = '';
  331. this.payDate = '';
  332. this.listQuery = {
  333. current: 1,
  334. size: 20,
  335. descs: 'id',
  336. }
  337. this.getList()
  338. },
  339. searchList() {
  340. // 重置分页
  341. this.listQuery.page = 1
  342. this.listQuery.size = 20
  343. if (this.payDate){
  344. this.listQuery.startDate = this.payDate[0];
  345. this.listQuery.endDate = this.payDate[1];
  346. }
  347. if (this.orderDate){
  348. this.listQuery.xStartDate = this.orderDate[0]+' 00:00:00';
  349. this.listQuery.xEndDate = this.orderDate[1]+ ' 23:59:59';
  350. }
  351. this.getList()
  352. },
  353. getList() {
  354. this.$api.financeRealFund.list(Object.assign({}, this.listQuery)).then(res=>{
  355. if (res.code ===200){
  356. this.pageData = res.data;
  357. }
  358. })
  359. },
  360. saveRealFund(){
  361. this.$refs.realFund.validate(valid=>{
  362. if (valid){
  363. if (this.realFund.id){
  364. this.$api.financeRealFund.edit(this.realFund).then(res=>{
  365. if (res.code ===200 && res.data){
  366. this.$notify({
  367. title: '成功',
  368. message: '修改实收款信息成功',
  369. type: 'success',
  370. duration: 2000
  371. });
  372. this.getList();
  373. this.createdRealFundDialog = false;
  374. }else {
  375. this.$notify({
  376. title: '失败',
  377. message: '修改实收款信息失败',
  378. type: 'error',
  379. duration: 2000
  380. });
  381. }
  382. })
  383. }else{
  384. this.$api.financeRealFund.add(this.realFund).then(res=>{
  385. if (res.code ===200 && res.data){
  386. this.$notify({
  387. title: '成功',
  388. message: '录入实收款信息成功',
  389. type: 'success',
  390. duration: 2000
  391. });
  392. this.getList();
  393. this.createdRealFundDialog = false;
  394. }else {
  395. this.$notify({
  396. title: '失败',
  397. message: '录入实收款信息失败',
  398. type: 'error',
  399. duration: 2000
  400. });
  401. }
  402. })
  403. }
  404. }
  405. })
  406. },
  407. clamiList(id,notClaimAmount,payer,amount){
  408. this.claimListDialog = true;
  409. this.notClaimAmount = notClaimAmount;
  410. this.payer=payer;
  411. this.amount = amount;
  412. this.$api.financeClaim.getList(id).then(res=>{
  413. if (res.code ===200){
  414. this.claimListData = res.data;
  415. }
  416. })
  417. },
  418. detail(id){
  419. this.createdRealFundDialog = true;
  420. this.$api.financeRealFund.detail(id).then(res=>{
  421. if (res.code === 200 ){
  422. this.realFund = res.data
  423. }
  424. })
  425. },
  426. remove(id){
  427. this.$confirm('请确认是否删除此回款记录?','提示',{
  428. confirmButtonText: '确定',
  429. cancelButtonText: '取消',
  430. type: 'warning',
  431. center: true
  432. }).then(()=>{
  433. this.$api.financeRealFund.delete(id).then(res=>{
  434. if (res.code === 200 && res.data){
  435. this.$notify({
  436. title: '成功',
  437. message: '实收款信息已删除',
  438. type: 'success',
  439. duration: 2000
  440. });
  441. this.getList();
  442. }else {
  443. this.$notify({
  444. title: '失败',
  445. message: '实收款信息删除失败',
  446. type: 'error',
  447. duration: 2000
  448. });
  449. }
  450. })
  451. })
  452. },
  453. updateClaim(row){
  454. this.doClaimDialog = true;
  455. this.claimDTO = row;
  456. this.notInfo = this.notInfo + this.notClaimAmount + '¥'
  457. },
  458. // doUpdateClaim(){
  459. // if (this.claimDTO.id){
  460. // this.$api.financeClaim.edit(this.claimDTO).then(res=>{
  461. // if (res.code === 200 && res.data){
  462. // this.$notify({
  463. // title: '成功',
  464. // message: '修改认领金额成功',
  465. // type: 'success',
  466. // duration: 2000
  467. // });
  468. // this.clamiList(this.claimDTO.realFundId);
  469. // this.getList();
  470. // this.allotAmountDialog = false;
  471. // }else {
  472. // this.$notify({
  473. // title: '失败',
  474. // message: '修改认领金额失败',
  475. // type: 'error',
  476. // duration: 2000
  477. // });
  478. // }
  479. // })
  480. // }
  481. // },
  482. // removeClaim(id){
  483. // this.$confirm('请确认是否删除此条认领记录?','提示',{
  484. // confirmButtonText: '确定',
  485. // cancelButtonText: '取消',
  486. // type: 'warning',
  487. // center: true
  488. // }).then(()=>{
  489. // if (id){
  490. // this.$api.financeClaim.delete(id).then(res=>{
  491. // if (res.code ===200 && res.data){
  492. // this.$notify({
  493. // title: '成功',
  494. // message: '删除认领记录成功',
  495. // type: 'success',
  496. // duration: 2000
  497. // });
  498. // this.clamiList(this.claimDTO.realFundId);
  499. // this.getList();
  500. // }else {
  501. // this.$notify({
  502. // title: '失败',
  503. // message: '删除认领记录失败',
  504. // type: 'error',
  505. // duration: 2000
  506. // });
  507. // }
  508. // })
  509. // }
  510. // })
  511. // },
  512. cleanFund(){
  513. this.realFund.id=null;
  514. this.realFund.payer=null;
  515. this.realFund.payerBank=null;
  516. this.realFund.payerAccount=null;
  517. this.realFund.amount=null;
  518. this.realFund.claimAmount=null;
  519. this.realFund.payDatetime=null;
  520. this.realFund.remark=null;
  521. this.realFund.created=null;
  522. this.realFund.creator=null;
  523. },
  524. downloadTemp(){
  525. window.location.href = "/api/financeClaim/personal/claim/template"
  526. },
  527. doClaimPersonal(){
  528. this.$api.businessProduction.personalAllotRealAmount(this.claimOrders).then(res=>{
  529. if (res.code === 200 && res.data){
  530. this.$notify({
  531. title: '成功',
  532. message: '实收款认领成功',
  533. type: 'success',
  534. duration: 2000
  535. });
  536. this.getMyPersonalOrder();
  537. this.allotAmountDialog = false;
  538. }else {
  539. this.$notify({
  540. title: '失败',
  541. message: '实收款认领失败',
  542. type: 'error',
  543. duration: 2000
  544. });
  545. }
  546. })
  547. },
  548. },
  549. }
  550. </script>
  551. <style lang="scss" scoped>
  552. /deep/.doWarehouseClass {
  553. border-radius: 10px;
  554. }
  555. .redPoint{
  556. color:red;
  557. position: absolute;
  558. top:8px;
  559. left:5px;
  560. }
  561. </style>