account_list-detail.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <div>
  3. <div class="sty">
  4. <el-page-header @back="goBack" content="对账历史记录"> </el-page-header>
  5. </div>
  6. <el-divider></el-divider>
  7. <!-- 筛选条件 -->
  8. <div>
  9. <el-form
  10. ref="searchForm"
  11. :model="searchForm"
  12. label-width="100px"
  13. size="small"
  14. label-position="left"
  15. >
  16. <el-row :gutter="20">
  17. <el-col :xs="24" :sm="12" :lg="6">
  18. <el-form-item label="经销商名称" prop="customerId">
  19. <el-select
  20. v-model="searchForm.customerId"
  21. class="selectStyle"
  22. placeholder="请选择"
  23. filterable
  24. @change="changeFn"
  25. >
  26. <el-option
  27. v-for="(v, i) in customerList"
  28. :key="i"
  29. :label="v.name"
  30. :value="v.id"
  31. >
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :xs="24" :sm="12" :lg="6">
  37. <el-form-item label="钱包" prop="customerWalletId">
  38. <el-select
  39. v-model="searchForm.customerWalletId"
  40. class="selectStyle"
  41. placeholder="请选择"
  42. >
  43. <el-option
  44. v-for="(v, i) in walletList"
  45. :key="i"
  46. :label="v.customerWalletName"
  47. :value="v.customerWalletId"
  48. >
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :xs="24" :sm="12" :lg="6">
  54. <el-form-item label="单据号" prop="billNo">
  55. <el-input
  56. v-model="searchForm.billNo"
  57. placeholder="请输入"
  58. ></el-input>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :xs="24" :sm="12" :lg="6">
  62. <el-form-item label="开始时间" prop="startTime">
  63. <el-date-picker
  64. class="selectStyle"
  65. v-model="searchForm.startTime"
  66. placeholder="选择日期"
  67. type="datetime"
  68. default-time="00:00:00"
  69. value-format="yyyy-MM-dd HH:mm:ss"
  70. >
  71. </el-date-picker>
  72. </el-form-item>
  73. </el-col>
  74. <el-col :xs="24" :sm="12" :lg="6">
  75. <el-form-item label="结束时间" prop="endTime">
  76. <el-date-picker
  77. class="selectStyle"
  78. v-model="searchForm.endTime"
  79. placeholder="选择日期"
  80. type="datetime"
  81. default-time="23:59:59"
  82. value-format="yyyy-MM-dd HH:mm:ss"
  83. >
  84. </el-date-picker>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :xs="24" :sm="24" :lg="18">
  88. <el-form-item label="" class="fr">
  89. <el-button size="small" @click="clearFn">清空</el-button>
  90. <el-button size="small" type="primary" @click="searchFn"
  91. >搜索</el-button
  92. >
  93. </el-form-item>
  94. </el-col>
  95. </el-row>
  96. </el-form>
  97. </div>
  98. <!-- 按钮 -->
  99. <div class="btn-group clearfix">
  100. <div class="fr">
  101. <el-button type="primary" size="small">导出</el-button>
  102. </div>
  103. </div>
  104. <!-- 列表 -->
  105. <div class="mymain-container">
  106. <div class="table">
  107. <el-table
  108. v-loading="listLoading"
  109. :data="dataList"
  110. element-loading-text="Loading"
  111. border
  112. fit
  113. highlight-current-row
  114. stripe
  115. >
  116. <el-table-column
  117. align="center"
  118. label="序号"
  119. type="index"
  120. width="100"
  121. show-overflow-tooltip
  122. ></el-table-column>
  123. <el-table-column
  124. align="center"
  125. label="月份"
  126. prop="month"
  127. min-width="160"
  128. show-overflow-tooltip
  129. ></el-table-column>
  130. <el-table-column
  131. align="center"
  132. label="对账状态"
  133. prop="isReconciliation"
  134. min-width="160"
  135. show-overflow-tooltip
  136. >
  137. <template slot-scope="scope">
  138. <el-tag type="success" v-if="scope.row.isReconciliation == true"
  139. >已对账</el-tag
  140. >
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. align="center"
  145. label="客户编码"
  146. prop="customerCode"
  147. min-width="160"
  148. show-overflow-tooltip
  149. ></el-table-column>
  150. <el-table-column
  151. align="center"
  152. label="客户名称"
  153. prop="customerName"
  154. min-width="160"
  155. show-overflow-tooltip
  156. ></el-table-column>
  157. <el-table-column
  158. align="center"
  159. label="部门"
  160. prop=""
  161. min-width="160"
  162. show-overflow-tooltip
  163. ></el-table-column>
  164. <el-table-column
  165. align="center"
  166. label="现金钱包类型"
  167. prop="walletName"
  168. min-width="160"
  169. show-overflow-tooltip
  170. ></el-table-column>
  171. <el-table-column
  172. align="center"
  173. label="单据类型"
  174. prop="billType"
  175. min-width="160"
  176. show-overflow-tooltip
  177. ></el-table-column>
  178. <el-table-column
  179. align="center"
  180. label="单据号"
  181. prop="billNo"
  182. min-width="160"
  183. show-overflow-tooltip
  184. ></el-table-column>
  185. <el-table-column
  186. align="center"
  187. label="单据日期"
  188. prop="theTime"
  189. min-width="160"
  190. show-overflow-tooltip
  191. ></el-table-column>
  192. <el-table-column
  193. align="center"
  194. label="收付款金额"
  195. prop="amount"
  196. min-width="160"
  197. show-overflow-tooltip
  198. ></el-table-column>
  199. <el-table-column
  200. align="center"
  201. label="发货金额"
  202. prop=""
  203. min-width="160"
  204. show-overflow-tooltip
  205. ></el-table-column>
  206. <el-table-column
  207. align="center"
  208. label="备注"
  209. prop="remark"
  210. min-width="160"
  211. show-overflow-tooltip
  212. ></el-table-column>
  213. </el-table>
  214. </div>
  215. <!-- 分页 -->
  216. <div class="fr">
  217. <el-pagination
  218. @size-change="handleSizeChange"
  219. @current-change="handleCurrentChange"
  220. :current-page="currentPage"
  221. :page-sizes="[10, 20, 30, 50]"
  222. :page-size="10"
  223. layout="total, sizes, prev, pager, next, jumper"
  224. :total="listTotal"
  225. >
  226. </el-pagination>
  227. </div>
  228. </div>
  229. </div>
  230. </template>
  231. <script>
  232. import {
  233. getFinanceStandingBookList,
  234. getCustomerList,
  235. getWalletCustomerList,
  236. } from "@/api/finance/account_list";
  237. export default {
  238. data() {
  239. return {
  240. currentPage: 1, // 当前页码
  241. pageSize: 10, // 每页数量
  242. listTotal: 0, // 列表总数
  243. dataList: [], // 列表数据
  244. searchForm: {
  245. customerId: "",
  246. customerWalletId: "",
  247. billNo: "",
  248. startTime: "",
  249. endTime: "",
  250. }, //搜索表单
  251. listLoading: false, // 列表加载loading
  252. customerList: [],
  253. walletList: [],
  254. };
  255. },
  256. created() {
  257. this.getDataList({
  258. pageSize: this.pageSize,
  259. pageNum: this.currentPage,
  260. isReconciliation: true,
  261. });
  262. this.getCustomerDataList({
  263. pageSize: -1,
  264. pageNum: 1,
  265. });
  266. },
  267. methods: {
  268. //清空
  269. clearFn() {
  270. this.$refs.searchForm.resetFields();
  271. },
  272. //搜索
  273. searchFn() {
  274. this.getDataList({
  275. ...this.searchForm,
  276. pageSize: this.pageSize,
  277. pageNum: this.currentPage,
  278. isReconciliation: false,
  279. });
  280. },
  281. //改变经销商
  282. async changeFn(v) {
  283. this.searchForm.customerWalletId = "";
  284. let res = await getWalletCustomerList({ customerId: v });
  285. this.walletList = res.data;
  286. },
  287. //获取经销商数据
  288. async getCustomerDataList(data) {
  289. const res = await getCustomerList(data);
  290. this.customerList = res.data.records;
  291. },
  292. // 更改每页数量
  293. handleSizeChange(val) {
  294. this.pageSize = val;
  295. this.currentPage = 1;
  296. this.getDataList({
  297. pageNum: this.currentPage,
  298. pageSize: this.pageSize,
  299. isReconciliation: true,
  300. });
  301. },
  302. // 更改当前页
  303. handleCurrentChange(val) {
  304. this.currentPage = val;
  305. this.getDataList({
  306. pageNum: this.currentPage,
  307. pageSize: this.pageSize,
  308. isReconciliation: true,
  309. });
  310. },
  311. //获取列表
  312. async getDataList(data) {
  313. let res = await getFinanceStandingBookList(data);
  314. this.dataList = res.data.records;
  315. this.listTotal = res.data.total;
  316. },
  317. goBack() {
  318. this.$parent.showReconciliation = true;
  319. },
  320. },
  321. };
  322. </script>
  323. <style lang="scss" scoped>
  324. .selectStyle {
  325. width: 100%;
  326. }
  327. </style>