fundList.vue 20 KB

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