fundList.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854
  1. <template>
  2. <div class="app-container">
  3. <!-- <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div> -->
  6. <el-tabs v-model="activeName" @tab-click="handleClick">
  7. <el-tab-pane label="未认领的实收款" name="notClaim">
  8. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList"
  9. :pageSizes="pageSizes">
  10. <template slot="left">
  11. <PermissionButton menu-code="_views_finance_real_fund_create" class-name="filter-item" type="success"
  12. icon="el-icon-circle-plus-outline" :page-jump="false" round style="float: left"
  13. @click="createdRealFundDialog = true" />
  14. <el-input v-model="listQuery.keyword" placeholder="关键字搜索..." clearable
  15. style="margin-left: 20px;width: 300px;float: left;">
  16. </el-input>
  17. <el-date-picker style="margin-left: 20px;float: left;" v-model="payDate" type="daterange" align="center"
  18. unlink-panels range-separator="至" start-placeholder="到账时日(开始)" end-placeholder="到账时日(结束)"
  19. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  20. </el-date-picker>
  21. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList"
  22. v-loading.fullscreen.lock="loading" round>搜索
  23. </el-button>
  24. <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
  25. </el-button>
  26. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="info" @click="exportData()"
  27. round>导出
  28. </el-button>
  29. </template>
  30. <el-table ref="table" size="medium" slot="table" :data="pageData.records" show-summary border
  31. :summary-method="getSummaries" fit stripe highlight-current-row :header-row-style="{ color: '#333333' }"
  32. style="
  33. border-left: 1px solid #ebeced;
  34. border-right: 1px solid #ebeced;
  35. color: #333333;">
  36. <el-table-column label="付款方" align="center" width='250'>
  37. <template slot-scope="{row}">
  38. <span>{{ row.payer }}</span>
  39. </template>
  40. </el-table-column>
  41. <!-- <el-table-column label="付款银行" align="center" width='100' >
  42. <template slot-scope="{row}">
  43. <span>{{ row.payerBank?row.payerBank:'-' }}</span>
  44. </template>
  45. </el-table-column> -->
  46. <el-table-column label="付款金额(元)" align="center" prop="amount">
  47. <template slot-scope="{row}">
  48. <span>{{ row.amount }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="到账时日" align="center">
  52. <template slot-scope="{row}">
  53. <span>{{ row.payDatetime }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="已认领(元)" align="center" prop="claimAmount">
  57. <template slot-scope="{row}">
  58. <span style="color:green">{{ row.claimAmount }}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="未认领(元)" align="center" prop="notClaimAmount">
  62. <template slot-scope="{row}">
  63. <span style="color:red">{{ row.notClaimAmount }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="录入人" align="center">
  67. <template slot-scope="{row}">
  68. <span>{{ row.creator }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="录入时间" align="center" width='170'>
  72. <template slot-scope="{row}">
  73. <span>{{ row.created }}</span>
  74. </template>
  75. </el-table-column>
  76. <!-- <el-table-column label="全部认领" align="center" >
  77. <template slot-scope="{row}">
  78. <i v-if="row.notClaimAmount<=0" style="font-size:20px; color:green" class="el-icon-success"></i>
  79. <i v-else style="font-size:20px; color:RGB(255,106,106)" class="el-icon-warning"></i>
  80. </template>
  81. </el-table-column> -->
  82. <el-table-column label="备注" align="center" width='170'>
  83. <template slot-scope="{row}">
  84. <span>{{ row.remark }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="操作" align="center" width="150">
  88. <template slot-scope="{row}">
  89. <PermissionButton menu-code="_views_real_fund_edit" class-name="filter-item" type="text"
  90. :page-jump="false" @click="detail(row.id)" />
  91. <PermissionButton menu-code="_views_real_fund_remove" class-name="filter-item" type="text"
  92. :page-jump="false" @click="remove(row.id)" />
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. </y-page-list-layout>
  97. </el-tab-pane>
  98. <el-tab-pane label="已认领的实收款" name="realClaimed">
  99. <y-page-list-layout :page-list="pageData2" :page-para="listQuery2" :get-page-list="getList2"
  100. :pageSizes="pageSizes">
  101. <template slot="left">
  102. <el-input v-model="listQuery2.keyword" placeholder="付款方、认领人、到账金额、认领金额、备注" clearable
  103. style="margin-left: 20px;width: 300px;float: left;">
  104. </el-input>
  105. <el-date-picker style="margin-left: 20px;float: left;" v-model="payDate2" type="daterange" align="center"
  106. unlink-panels range-separator="至" start-placeholder="到账时日(开始)" end-placeholder="到账时日(结束)"
  107. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  108. </el-date-picker>
  109. <el-date-picker style="margin-left: 20px;float: left;" v-model="claimDate2" type="daterange" align="center"
  110. unlink-panels range-separator="至" start-placeholder="认领时日(开始)" end-placeholder="认领时日(结束)"
  111. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  112. </el-date-picker>
  113. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList2"
  114. v-loading.fullscreen.lock="loading" round>搜索
  115. </el-button>
  116. <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch2()">重置
  117. </el-button>
  118. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="info" @click="exportData2()"
  119. round>导出
  120. </el-button>
  121. </template>
  122. <el-table ref="table" size="medium" slot="table" :data="pageData2.records" show-summary border
  123. :summary-method="getSummaries" fit stripe highlight-current-row :header-row-style="{ color: '#333333' }"
  124. style="
  125. border-left: 1px solid #ebeced;
  126. border-right: 1px solid #ebeced;
  127. color: #333333;">
  128. <el-table-column label="付款方" align="center" width='250'>
  129. <template slot-scope="{row}">
  130. <span>{{ row.payer }}</span>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="到账时日" align="center">
  134. <template slot-scope="{row}">
  135. <span>{{ row.payDatetime }}</span>
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="付款金额(元)" align="center" prop="amount">
  139. <template slot-scope="{row}">
  140. <span>{{ row.amount }}</span>
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="已认领(元)" align="center" prop="claimAmount">
  144. <template slot-scope="{row}">
  145. <span style="color:green">{{ row.claimAmount }}</span>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="未认领(元)" align="center" prop="notClaimAmount">
  149. <template slot-scope="{row}">
  150. <span style="color:red">{{ row.amount-row.claimAmount }}</span>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="认领人" align="center" prop="claimUser">
  154. <template slot-scope="{row}">
  155. <span>{{ row.claimUser }}</span>
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="认领时间" align="center" width='170' prop="claimDate">
  159. <template slot-scope="{row}">
  160. <span>{{ row.claimDate }}</span>
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="录入人" align="center">
  164. <template slot-scope="{row}">
  165. <span>{{ row.creator }}</span>
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="到账时间" align="center" width='170'>
  169. <template slot-scope="{row}">
  170. <span>{{ row.payDatetime }}</span>
  171. </template>
  172. </el-table-column>
  173. <el-table-column label="备注" align="center" width='170'>
  174. <template slot-scope="{row}">
  175. <span>{{ row.remark }}</span>
  176. </template>
  177. </el-table-column>
  178. <el-table-column label="操作" align="center" width="150">
  179. <template slot-scope="{row}">
  180. <PermissionButton menu-code="_views_real_fund_edit" class-name="filter-item" type="text"
  181. :page-jump="false" @click="detail(row.id)" />
  182. <PermissionButton menu-code="_views_claim_list" class-name="filter-item" type="text"
  183. :page-jump="false" @click="clamiList(row.id,row.payer,row.amount)" />
  184. </template>
  185. </el-table-column>
  186. </el-table>
  187. </y-page-list-layout>
  188. </el-tab-pane>
  189. <el-tab-pane label="认领记录流水" name="claimed">
  190. <y-page-list-layout :page-list="pageData1" :page-para="listQuery1" :get-page-list="getList1"
  191. :pageSizes="pageSizes">
  192. <template slot="left">
  193. <el-input v-model="listQuery1.keyword" placeholder="关键字搜索..." clearable
  194. style="margin-left: 20px;width: 300px;float: left;">
  195. </el-input>
  196. <el-select style="margin-left: 20px;float: left;" v-model="listQuery1.businessType" placeholder="业务类型" clearable>
  197. <el-option value="ITEM_BUSINESS" label="土规业务">土规业务</el-option>
  198. <el-option value="MAJOR_BUSINESS" label="大中型业务">大中型业务</el-option>
  199. <el-option value="PERSONAL_BUSINESS" label="个贷业务">个贷业务</el-option>
  200. <el-option value="ASSET_BUSINESS" label="资产业务">资产业务</el-option>
  201. </el-select>
  202. <el-date-picker style="margin-left: 20px;float: left;" v-model="payDate1" type="daterange" align="center"
  203. unlink-panels range-separator="至" start-placeholder="到账时日(开始)" end-placeholder="到账时日(结束)"
  204. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  205. </el-date-picker>
  206. <el-date-picker style="margin-left: 20px;float: left;" v-model="claimDate" type="daterange" align="center"
  207. unlink-panels range-separator="至" start-placeholder="认领时日(开始)" end-placeholder="认领时日(结束)"
  208. :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  209. </el-date-picker>
  210. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList1"
  211. v-loading.fullscreen.lock="loading" round>搜索
  212. </el-button>
  213. <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch1()">重置
  214. </el-button>
  215. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="info" @click="exportData1()"
  216. round>导出
  217. </el-button>
  218. </template>
  219. <el-table ref="table" size="medium" slot="table" :data="pageData1.records" show-summary border
  220. :summary-method="getSummaries" fit stripe highlight-current-row :header-row-style="{ color: '#333333' }"
  221. style="
  222. border-left: 1px solid #ebeced;
  223. border-right: 1px solid #ebeced;
  224. color: #333333;">
  225. <el-table-column label="付款方" align="center" width='250'>
  226. <template slot-scope="{row}">
  227. <span>{{ row.payer }}</span>
  228. </template>
  229. </el-table-column>
  230. <el-table-column label="付款金额(元)" align="center" prop="amount" width='120'>
  231. <template slot-scope="{row}">
  232. <span>{{ row.amount }}</span>
  233. </template>
  234. </el-table-column>
  235. <el-table-column label="到账时日" align="center" width='120'>
  236. <template slot-scope="{row}">
  237. <span>{{ row.payDatetime }}</span>
  238. </template>
  239. </el-table-column>
  240. <el-table-column label="认领金额(元)" align="center" prop="claimAmount" width='120'>
  241. <template slot-scope="{row}">
  242. <span style="color:green">{{ row.claimAmount }}</span>
  243. </template>
  244. </el-table-column>
  245. <el-table-column label="认领人" align="center">
  246. <template slot-scope="{row}">
  247. <span>{{ row.claimUser }}</span>
  248. </template>
  249. </el-table-column>
  250. <el-table-column label="认领时间" align="center" width='170'>
  251. <template slot-scope="{row}">
  252. <span>{{ row.claimDatetime }}</span>
  253. </template>
  254. </el-table-column>
  255. <el-table-column label="业务类型" align="center" width='120'>
  256. <template slot-scope="{row}">
  257. <span>{{ row.businessType }}</span>
  258. </template>
  259. </el-table-column>
  260. <el-table-column label="项目编号" align="center" width='170'>
  261. <template slot-scope="{row}">
  262. <span>{{ row.orderId }}</span>
  263. </template>
  264. </el-table-column>
  265. <el-table-column label="录入人" align="center">
  266. <template slot-scope="{row}">
  267. <span>{{ row.creator }}</span>
  268. </template>
  269. </el-table-column>
  270. <!-- <el-table-column label="录入时间" align="center" width='170'>
  271. <template slot-scope="{row}">
  272. <span>{{ row.created }}</span>
  273. </template>
  274. </el-table-column> -->
  275. <el-table-column label="备注" align="center" width='170'>
  276. <template slot-scope="{row}">
  277. <span>{{ row.remark }}</span>
  278. </template>
  279. </el-table-column>
  280. <el-table-column label="操作" align="center" width="150">
  281. <template slot-scope="{row}">
  282. <el-button @click="removeClaim(scope.row.id)" type="text" size="small">删除</el-button>
  283. </template>
  284. </el-table-column>
  285. </el-table>
  286. </y-page-list-layout>
  287. </el-tab-pane>
  288. </el-tabs>
  289. <el-dialog :visible.sync="createdRealFundDialog" width="45%" center custom-class="doWarehouseClass"
  290. @closed="cleanFund">
  291. <el-form ref="realFund" :model="realFund">
  292. <el-divider content-position="left">实收款信息</el-divider>
  293. <el-row>
  294. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  295. <el-form-item label="付款方名称:" prop="payer" :rules="{ required: true, message: '付款方名称不能为空', trigger: 'blur' }"
  296. label-width="140px" class="postInfo-container-item">
  297. <el-input v-model.trim="realFund.payer" class="filter-item" />
  298. </el-form-item>
  299. </el-col>
  300. </el-row>
  301. <el-row>
  302. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  303. <el-form-item label="付款金额(元):" prop="amount"
  304. :rules="{ required: true, message: '付款金额不能为空', trigger: 'blur' }" label-width="140px"
  305. class="postInfo-container-item">
  306. <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="realFund.amount"
  307. type="number" style="width:100%" class="filter-item" />
  308. </el-form-item>
  309. </el-col>
  310. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  311. <el-form-item label="到账时间:" prop="payDatetime"
  312. :rules="{ required: true, message: '到账时间不能为空', trigger: 'blur' }" label-width="140px"
  313. class="postInfo-container-item">
  314. <el-date-picker v-model="realFund.payDatetime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"
  315. style="width:100%">
  316. </el-date-picker>
  317. </el-form-item>
  318. </el-col>
  319. </el-row>
  320. <el-row>
  321. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  322. <el-form-item label="付款银行:" prop="payerBank" label-width="140px" class="postInfo-container-item">
  323. <el-input v-model.trim="realFund.payerBank" class="filter-item" />
  324. </el-form-item>
  325. </el-col>
  326. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  327. <el-form-item label="付款银行账号:" prop="payerAccount" label-width="140px" class="postInfo-container-item">
  328. <el-input v-model.trim="realFund.payerAccount" class="filter-item" />
  329. </el-form-item>
  330. </el-col>
  331. </el-row>
  332. <el-row>
  333. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  334. <el-form-item label="备注:" prop="remark" label-width="140px" class="postInfo-container-item">
  335. <el-input v-model.trim="realFund.remark" class="filter-item" type="textarea" />
  336. </el-form-item>
  337. </el-col>
  338. </el-row>
  339. </el-form>
  340. <span slot="footer" class="dialog-footer">
  341. <el-button @click="createdRealFundDialog = false">取 消</el-button>
  342. <el-button type="primary" @click="saveRealFund()">确 定</el-button>
  343. </span>
  344. </el-dialog>
  345. <el-dialog :visible.sync="claimListDialog" width="90%" center custom-class="doWarehouseClass">
  346. <div style="margin-bottom:20px;font-size:20px;">
  347. <span>付款方:</span><span style="color:red;font-weight:bold">{{ payer }}</span><span
  348. style="margin-left:20px">付款金额:</span><span style="color:red;font-weight:bold">{{ amount }}¥</span><span
  349. style="margin-left:20px">的认领记录:</span>
  350. </div>
  351. <parentTable :data="claimListData" border stripe :isBoard=300 style="width: 100%">
  352. <el-table-column align="center" prop="businessType" label="业务类型" width="180">
  353. </el-table-column>
  354. <el-table-column show-overflow-tooltip align="center" prop="orderName" label="订单名称" width="300">
  355. </el-table-column>
  356. <el-table-column show-overflow-tooltip align="center" prop="orderId" label="订单号" width="250">
  357. </el-table-column>
  358. <el-table-column show-overflow-tooltip align="center" prop="productionNo" label="产品号" width="250">
  359. </el-table-column>
  360. <el-table-column align="center" prop="shouldAmount" label="应收金额(元)">
  361. <template slot-scope="{row}">
  362. <span>{{ row.productionShouldAmount ? row.productionShouldAmount : row.shouldAmount }}</span>
  363. </template>
  364. </el-table-column>
  365. <el-table-column align="center" prop="claimAmount" label="认领金额(元)">
  366. <template slot-scope="{row}">
  367. <span style="color: red;">{{ row.claimAmount }}</span>
  368. </template>
  369. </el-table-column>
  370. <el-table-column align="center" prop="claimName" label="认领人">
  371. </el-table-column>
  372. <el-table-column align="center" prop="created" width="180" label="认领时间">
  373. </el-table-column>
  374. <el-table-column align="center" label="操作">
  375. <template slot-scope="scope">
  376. <el-button @click="removeClaim(scope.row.id)" type="text" size="small">删除</el-button>
  377. </template>
  378. </el-table-column>
  379. </parentTable>
  380. </el-dialog>
  381. </div>
  382. </template>
  383. <script>
  384. import YPageListLayout from '@/components/YPageListLayout'
  385. import Breadcrumb from '@/components/Breadcrumb'
  386. import excelImport from "@/components/excelImport.vue";
  387. export default {
  388. name: 'financeRealFund',
  389. components: {
  390. Breadcrumb,
  391. YPageListLayout,
  392. excelImport
  393. },
  394. data() {
  395. return {
  396. activeName: 'notClaim',
  397. pageData: { records: [] },
  398. pageData1: { records: [] },
  399. pageData2: { records: [] },
  400. listQuery: {
  401. page: 1,
  402. size: 1000,
  403. descs: 'id',
  404. keyword: null,
  405. startDate: null,
  406. endDate: null,
  407. notFinished: true
  408. },
  409. listQuery2: {
  410. page: 1,
  411. size: 1000,
  412. descs: 'id',
  413. keyword: null,
  414. startDate: null,
  415. endDate: null,
  416. },
  417. listQuery1: {
  418. page: 1,
  419. size: 1000,
  420. descs: 'id',
  421. keyword: null,
  422. startDate: null,
  423. endDate: null,
  424. xStartDate: null,
  425. xEndDate: null,
  426. businessType:null
  427. },
  428. createdRealFundDialog: false,
  429. claimListDialog: false,
  430. payDate: '',
  431. payDate1: '',
  432. payDate2: '',
  433. claimListData: null,
  434. realFund: {
  435. id: null,
  436. payer: null,
  437. payerBank: null,
  438. payerAccount: null,
  439. amount: null,
  440. claimAmount: null,
  441. notClaimAmount: null,
  442. payDatetime: null,
  443. remark: null,
  444. created: null,
  445. creator: null
  446. },
  447. payer: null,
  448. amount: null,
  449. pickerOptions: {
  450. shortcuts: [{
  451. text: '最近一周',
  452. onClick(picker) {
  453. const end = new Date();
  454. const start = new Date();
  455. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  456. picker.$emit('pick', [start, end]);
  457. }
  458. }, {
  459. text: '最近一个月',
  460. onClick(picker) {
  461. const end = new Date();
  462. const start = new Date();
  463. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  464. picker.$emit('pick', [start, end]);
  465. }
  466. }, {
  467. text: '最近三个月',
  468. onClick(picker) {
  469. const end = new Date();
  470. const start = new Date();
  471. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  472. picker.$emit('pick', [start, end]);
  473. }
  474. }]
  475. },
  476. loading: false,
  477. pageSizes: [10, 20, 30, 50, 100, 200, 500, 1000],
  478. claimDate:[],
  479. claimDate2:[]
  480. }
  481. },
  482. created() {
  483. this.claimDate.push(this.getDefaultStartDate());
  484. this.claimDate.push(this.getDefaultEndDate());
  485. this.claimDate2.push(this.getDefaultStartDate());
  486. this.claimDate2.push(this.getDefaultEndDate());
  487. this.getList();
  488. },
  489. methods: {
  490. handleClick(tab, event) {
  491. if (tab.name ==='notClaim'){
  492. this.getList();
  493. }
  494. if (tab.name ==='claimed'){
  495. this.getList1();
  496. }
  497. if (tab.name ==='realClaimed'){
  498. this.getList2();
  499. }
  500. },
  501. getDefaultStartDate() {
  502. let currentDate = new Date();
  503. let currentYear = currentDate.getFullYear();
  504. var currentMonth = String(currentDate.getMonth()).padStart(2, "0");
  505. if (currentMonth=='00'){
  506. currentYear = currentYear-1;
  507. currentMonth = 12
  508. }
  509. return currentYear + '-' + currentMonth + '-' + '23'
  510. },
  511. getDefaultEndDate() {
  512. const currentDate = new Date();
  513. const currentYear = currentDate.getFullYear();
  514. var currentMonth = String(currentDate.getMonth() + 1).padStart(2, "0");
  515. return currentYear + '-' + currentMonth + '-' + '22'
  516. },
  517. resetSearch() {
  518. this.$router.push({ query: {} });
  519. this.payDate = '';
  520. this.listQuery = {
  521. current: 1,
  522. size: 1000,
  523. descs: 'id',
  524. notFinished: true
  525. }
  526. this.getList()
  527. },
  528. resetSearch2() {
  529. this.$router.push({ query: {} });
  530. this.claimDate2 = [this.getDefaultStartDate(), this.getDefaultEndDate()];
  531. this.payDate2 = '';
  532. this.listQuery2 = {
  533. current: 1,
  534. size: 1000,
  535. descs: 'id',
  536. }
  537. this.getList2()
  538. },
  539. searchList() {
  540. // 重置分页
  541. this.listQuery.page = 1
  542. this.listQuery.size = 1000
  543. if (this.payDate) {
  544. this.listQuery.startDate = this.payDate[0];
  545. this.listQuery.endDate = this.payDate[1];
  546. }
  547. this.getList()
  548. },
  549. searchList2() {
  550. // 重置分页
  551. this.listQuery2.page = 1
  552. this.listQuery2.size = 1000
  553. if (this.payDate2) {
  554. this.listQuery2.startDate = this.payDate2[0];
  555. this.listQuery2.endDate = this.payDate2[1];
  556. }
  557. if (this.claimDate2){
  558. this.listQuery2.xStartDate = this.claimDate2[0];
  559. this.listQuery2.xEndDate = this.claimDate2[1];
  560. }
  561. this.getList2()
  562. },
  563. getList() {
  564. let loadingInstance = this.$loading({ fullscreen: true });
  565. this.$api.financeRealFund.list(Object.assign({}, this.listQuery)).then(res => {
  566. if (res.code === 200) {
  567. loadingInstance.close();
  568. this.pageData = res.data;
  569. }
  570. })
  571. setTimeout(() => {
  572. this.loading = false;
  573. }, 500);
  574. },
  575. getList2() {
  576. let loadingInstance = this.$loading({ fullscreen: true });
  577. if (this.claimDate2) {
  578. this.listQuery2.xStartDate = this.claimDate2[0] + ' 00:00:00';
  579. this.listQuery2.xEndDate = this.claimDate2[1] + ' 23:59:59';
  580. }
  581. this.$api.financeRealFund.realClaimed(Object.assign({}, this.listQuery2)).then(res => {
  582. if (res.code === 200) {
  583. loadingInstance.close();
  584. this.pageData2 = res.data;
  585. }
  586. })
  587. setTimeout(() => {
  588. this.loading = false;
  589. }, 500);
  590. },
  591. saveRealFund() {
  592. this.$refs.realFund.validate(valid => {
  593. if (valid) {
  594. if (this.realFund.id) {
  595. console.log(this.realFund)
  596. this.$api.financeRealFund.edit(this.realFund).then(res => {
  597. if (res.code === 200 && res.data) {
  598. this.$notify({
  599. title: '成功',
  600. message: '修改实收款信息成功',
  601. type: 'success',
  602. duration: 2000
  603. });
  604. this.getList();
  605. this.createdRealFundDialog = false;
  606. } else {
  607. this.$notify({
  608. title: '失败',
  609. message: '修改实收款信息失败',
  610. type: 'error',
  611. duration: 2000
  612. });
  613. }
  614. })
  615. } else {
  616. this.$api.financeRealFund.add(this.realFund).then(res => {
  617. if (res.code === 200 && res.data) {
  618. this.$notify({
  619. title: '成功',
  620. message: '录入实收款信息成功',
  621. type: 'success',
  622. duration: 2000
  623. });
  624. this.getList();
  625. this.createdRealFundDialog = false;
  626. } else {
  627. this.$notify({
  628. title: '失败',
  629. message: '录入实收款信息失败',
  630. type: 'error',
  631. duration: 2000
  632. });
  633. }
  634. })
  635. }
  636. }
  637. })
  638. },
  639. clamiList(id, payer, amount) {
  640. this.claimListDialog = true;
  641. this.payer = payer;
  642. this.amount = amount;
  643. this.$api.financeClaim.getList(id).then(res => {
  644. if (res.code === 200) {
  645. this.claimListData = res.data;
  646. }
  647. })
  648. },
  649. detail(id) {
  650. this.createdRealFundDialog = true;
  651. this.$api.financeRealFund.detail(id).then(res => {
  652. if (res.code === 200) {
  653. this.realFund = res.data
  654. }
  655. })
  656. },
  657. remove(id) {
  658. this.$confirm('请确认是否删除此回款记录?', '提示', {
  659. confirmButtonText: '确定',
  660. cancelButtonText: '取消',
  661. type: 'warning',
  662. center: true
  663. }).then(() => {
  664. this.$api.financeRealFund.delete(id).then(res => {
  665. if (res.code === 200 && res.data) {
  666. this.$notify({
  667. title: '成功',
  668. message: '实收款信息已删除',
  669. type: 'success',
  670. duration: 2000
  671. });
  672. this.getList();
  673. } else {
  674. this.$notify({
  675. title: '失败',
  676. message: '实收款信息删除失败',
  677. type: 'error',
  678. duration: 2000
  679. });
  680. }
  681. })
  682. })
  683. },
  684. removeClaim(id) {
  685. this.$confirm('请确认是否删除此条认领记录?', '提示', {
  686. confirmButtonText: '确定',
  687. cancelButtonText: '取消',
  688. type: 'warning',
  689. center: true
  690. }).then(() => {
  691. if (id) {
  692. this.$api.financeClaim.delete(id).then(res => {
  693. if (res.code === 200 && res.data) {
  694. this.$notify({
  695. title: '成功',
  696. message: '删除认领记录成功',
  697. type: 'success',
  698. duration: 2000
  699. });
  700. this.$api.financeClaim.getList(id).then(res => {
  701. if (res.code === 200) {
  702. this.claimListData = res.data;
  703. }
  704. })
  705. this.getList();
  706. } else {
  707. this.$notify({
  708. title: '失败',
  709. message: '删除认领记录失败',
  710. type: 'error',
  711. duration: 2000
  712. });
  713. }
  714. })
  715. }
  716. })
  717. },
  718. cleanFund() {
  719. this.realFund.id = null;
  720. this.realFund.payer = null;
  721. this.realFund.payerBank = null;
  722. this.realFund.payerAccount = null;
  723. this.realFund.amount = null;
  724. this.realFund.claimAmount = null;
  725. this.realFund.payDatetime = null;
  726. this.realFund.remark = null;
  727. this.realFund.created = null;
  728. this.realFund.creator = null;
  729. },
  730. exportData() {
  731. this.$utils.exportUtil(
  732. "/financeRealFund/export", this.listQuery,
  733. "导出"
  734. );
  735. },
  736. getSummaries(param) {
  737. const { columns, data } = param;
  738. const sums = [];
  739. columns.forEach((column, index) => {
  740. if (index === 0) {
  741. sums[index] = '合计';
  742. return;
  743. }
  744. const values = data.map(item => Number(item[column.property]));
  745. if (!values.every(value => isNaN(value))) {
  746. sums[index] = values.reduce((prev, curr) => {
  747. const value = Number(curr);
  748. if (!isNaN(value)) {
  749. return prev + curr;
  750. } else {
  751. return prev;
  752. }
  753. }, 0).toFixed(2);
  754. sums[index] += ' 元';
  755. } else {
  756. sums[index] = '-';
  757. }
  758. });
  759. return sums;
  760. },
  761. getList1(){
  762. let loadingInstance = this.$loading({ fullscreen: true });
  763. if (this.claimDate) {
  764. this.listQuery1.xStartDate = this.claimDate[0] + ' 00:00:00';
  765. this.listQuery1.xEndDate = this.claimDate[1] + ' 23:59:59';
  766. }
  767. this.$api.financeClaim.claimPage(Object.assign({}, this.listQuery1)).then(res => {
  768. if (res.code === 200) {
  769. loadingInstance.close();
  770. this.pageData1 = res.data;
  771. }
  772. })
  773. },
  774. searchList1() {
  775. // 重置分页
  776. this.listQuery1.page = 1
  777. this.listQuery1.size = 1000
  778. if (this.payDate1) {
  779. this.listQuery1.startDate = this.payDate1[0];
  780. this.listQuery1.endDate = this.payDate1[1];
  781. }
  782. if (this.claimDate){
  783. this.listQuery1.xStartDate = this.claimDate[0];
  784. this.listQuery1.xEndDate = this.claimDate[1];
  785. }
  786. this.getList1()
  787. },
  788. resetSearch1() {
  789. this.$router.push({ query: {} });
  790. this.claimDate = [this.getDefaultStartDate(), this.getDefaultEndDate()];
  791. this.payDate1 = '';
  792. this.listQuery1 = {
  793. current: 1,
  794. size: 500,
  795. descs: 'id',
  796. }
  797. this.getList1()
  798. },
  799. exportData1() {
  800. this.$utils.exportUtil(
  801. "/financeClaim/export", this.listQuery1,
  802. "导出"
  803. );
  804. },
  805. exportData2() {
  806. this.$utils.exportUtil(
  807. "/financeRealFund/export", this.listQuery2,
  808. "导出"
  809. );
  810. },
  811. },
  812. }
  813. </script>
  814. <style lang="scss" scoped>
  815. /deep/.doWarehouseClass {
  816. border-radius: 10px;
  817. }
  818. .redPoint {
  819. color: red;
  820. position: absolute;
  821. top: 8px;
  822. left: 5px;
  823. }
  824. </style>