change_list.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <div class="app-container">
  3. <div v-if="showPage == 1">
  4. <el-radio-group v-model="category" size="">
  5. <el-radio-button label="全部"></el-radio-button>
  6. <el-radio-button label="待审核"></el-radio-button>
  7. <el-radio-button label="审核通过"></el-radio-button>
  8. <el-radio-button label="审核驳回"></el-radio-button>
  9. <el-radio-button label="复核通过"></el-radio-button>
  10. <el-radio-button label="待复核"></el-radio-button>
  11. <el-radio-button label="复核驳回"></el-radio-button>
  12. </el-radio-group>
  13. <br /><br />
  14. <!-- 筛选条件 -->
  15. <div>
  16. <el-form
  17. ref="searchForm"
  18. :model="searchForm"
  19. label-width="100px"
  20. size="small"
  21. label-position="left"
  22. >
  23. <el-row :gutter="20">
  24. <el-col :xs="24" :sm="12" :lg="6">
  25. <el-form-item label="返利互转单号" prop="id">
  26. <el-input
  27. v-model="searchForm.id"
  28. placeholder="请输入"
  29. ></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :xs="24" :sm="12" :lg="6">
  33. <el-form-item label="返利类型" prop="walletName">
  34. <el-input
  35. v-model="searchForm.walletName"
  36. placeholder="请输入"
  37. ></el-input>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :xs="24" :sm="12" :lg="6">
  41. <el-form-item label="申请日期" prop="startTime">
  42. <el-date-picker
  43. class="dateStyle"
  44. v-model="searchForm.startTime"
  45. placeholder="选择日期"
  46. type="datetime"
  47. value-format="yyyy-MM-dd HH:mm:ss"
  48. >
  49. </el-date-picker>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :xs="24" :sm="12" :lg="6">
  53. <el-form-item label="" class="fr">
  54. <el-button size="small" @click="clearFn">清空</el-button>
  55. <el-button size="small" type="primary" @click="searchFn"
  56. >搜索</el-button
  57. >
  58. </el-form-item>
  59. </el-col>
  60. </el-row>
  61. </el-form>
  62. </div>
  63. <br />
  64. <strong>返利互转单列表</strong>
  65. <el-divider></el-divider>
  66. <!-- 列表 -->
  67. <div class="mymain-container">
  68. <div class="table">
  69. <el-table
  70. v-loading="listLoading"
  71. :data="dataList"
  72. element-loading-text="Loading"
  73. border
  74. fit
  75. highlight-current-row
  76. stripe
  77. >
  78. <el-table-column
  79. label="序号"
  80. align="center"
  81. width="100"
  82. type="index"
  83. show-overflow-tooltip
  84. ></el-table-column>
  85. <el-table-column
  86. align="center"
  87. label="返利转账单号"
  88. prop="id"
  89. min-width="160"
  90. show-overflow-tooltip
  91. ></el-table-column>
  92. <el-table-column
  93. align="center"
  94. label="申请日期"
  95. prop="applyTime"
  96. min-width="160"
  97. show-overflow-tooltip
  98. ></el-table-column>
  99. <el-table-column
  100. align="center"
  101. label="经销商编号"
  102. prop="customerNumber"
  103. min-width="160"
  104. show-overflow-tooltip
  105. ></el-table-column>
  106. <el-table-column
  107. align="center"
  108. label="经销商名称"
  109. prop="customerName"
  110. min-width="160"
  111. show-overflow-tooltip
  112. ></el-table-column>
  113. <el-table-column
  114. align="center"
  115. label="表体备注"
  116. prop="initiatorRemark"
  117. min-width="160"
  118. show-overflow-tooltip
  119. ></el-table-column>
  120. <el-table-column
  121. align="center"
  122. label="返利类型"
  123. prop=""
  124. min-width="160"
  125. show-overflow-tooltip
  126. ></el-table-column>
  127. <el-table-column
  128. align="center"
  129. label="返利金额"
  130. prop="amount"
  131. min-width="160"
  132. show-overflow-tooltip
  133. ></el-table-column>
  134. <el-table-column
  135. align="center"
  136. label="备注"
  137. prop="remark"
  138. min-width="160"
  139. show-overflow-tooltip
  140. ></el-table-column>
  141. <el-table-column
  142. align="center"
  143. label="制单人"
  144. prop="createBy"
  145. min-width="160"
  146. show-overflow-tooltip
  147. ></el-table-column>
  148. <el-table-column
  149. align="center"
  150. label="审核人"
  151. prop="examineBy"
  152. min-width="160"
  153. show-overflow-tooltip
  154. ></el-table-column>
  155. <el-table-column
  156. align="center"
  157. label="审核日期"
  158. prop="examineTime"
  159. min-width="160"
  160. show-overflow-tooltip
  161. ></el-table-column>
  162. <el-table-column
  163. align="center"
  164. label="复核人"
  165. prop="secondExamineBy"
  166. min-width="160"
  167. show-overflow-tooltip
  168. ></el-table-column>
  169. <el-table-column
  170. align="center"
  171. label="复核日期"
  172. prop="secondExamineTime"
  173. min-width="160"
  174. show-overflow-tooltip
  175. ></el-table-column>
  176. <el-table-column
  177. align="center"
  178. label="状态"
  179. prop="examineStatus"
  180. min-width="160"
  181. show-overflow-tooltip
  182. >
  183. <template slot-scope="scope">
  184. <el-tag v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
  185. <el-tag v-show="scope.row.examineStatus == 'WAIT'"
  186. >待审核</el-tag
  187. >
  188. <el-tag v-show="scope.row.examineStatus == 'OK_ONE'"
  189. >初审通过</el-tag
  190. >
  191. <el-tag v-show="scope.row.examineStatus == 'FAIL_ONE'"
  192. >初审不通过</el-tag
  193. >
  194. <el-tag v-show="scope.row.examineStatus == 'OK'"
  195. >复核通过</el-tag
  196. >
  197. <el-tag v-show="scope.row.examineStatus == 'FALL'"
  198. >不通过</el-tag
  199. >
  200. <el-tag v-show="scope.row.examineStatus == 'CLOSE'"
  201. >已关闭</el-tag
  202. >
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. align="center"
  207. label="操作"
  208. min-width="200"
  209. show-overflow-tooltip
  210. fixed="right"
  211. >
  212. <template slot-scope="scope">
  213. <el-button
  214. @click="submitFn(scope.row.id)"
  215. type="text"
  216. class="textColor"
  217. slot="reference"
  218. >提审</el-button
  219. >
  220. <el-button
  221. v-if="
  222. scope.row.examineStatus == 'WAIT' ||
  223. scope.row.examineStatus == 'OK_ONE'
  224. "
  225. @click="examineFn(scope.row.id)"
  226. type="text"
  227. class="textColor"
  228. slot="reference"
  229. >审核</el-button
  230. >
  231. <el-button
  232. v-if="
  233. scope.row.examineStatus == 'WAIT' ||
  234. scope.row.examineStatus == 'SAVE'
  235. "
  236. type="text"
  237. class="textColor"
  238. slot="reference"
  239. @click="editFn(scope.row.id)"
  240. >修改</el-button
  241. >
  242. <el-button
  243. @click="detailFn(scope.row.id)"
  244. type="text"
  245. class="textColor"
  246. slot="reference"
  247. >详情</el-button
  248. >
  249. </template>
  250. </el-table-column>
  251. </el-table>
  252. </div>
  253. <!-- 分页 -->
  254. <div class="fr">
  255. <el-pagination
  256. @size-change="handleSizeChange"
  257. @current-change="handleCurrentChange"
  258. :current-page="currentPage"
  259. :page-sizes="[10, 20, 30, 50]"
  260. :page-size="10"
  261. layout="total, sizes, prev, pager, next, jumper"
  262. :total="listTotal"
  263. >
  264. </el-pagination>
  265. </div>
  266. </div>
  267. </div>
  268. <ChangeListDetail :detailList="detailList" v-else-if="showPage == 2" />
  269. <ChangeListExamine
  270. @refresh="refreshFn"
  271. :detailList="detailList"
  272. v-else-if="showPage == 3"
  273. />
  274. <ChangeListReview
  275. @refresh="refreshFn"
  276. :detailList="detailList"
  277. v-else-if="showPage == 4"
  278. />
  279. </div>
  280. </template>
  281. <script>
  282. import {
  283. getChangeList,
  284. getChangeListDetail,
  285. getTransferSubmit,
  286. } from "@/api/finance/change_list";
  287. import ChangeListDetail from "./components/change_list-detail";
  288. import ChangeListExamine from "./components/change_list-examine";
  289. import ChangeListReview from "./components/change_list-review";
  290. export default {
  291. components: {
  292. ChangeListDetail,
  293. ChangeListExamine,
  294. ChangeListReview,
  295. },
  296. data() {
  297. return {
  298. currentPage: 1, // 当前页码
  299. pageSize: 10, // 每页数量
  300. listTotal: 0, // 列表总数
  301. dataList: [], // 列表数据
  302. searchForm: {
  303. startTime: "",
  304. walletName: "",
  305. id: "",
  306. }, //搜索表单
  307. listLoading: false, // 列表加载loading
  308. category: "全部",
  309. showPage: 1,
  310. detailList: {},
  311. };
  312. },
  313. created() {
  314. this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
  315. },
  316. methods: {
  317. //刷新
  318. refreshFn() {
  319. this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
  320. },
  321. //提审
  322. async submitFn(id) {
  323. await getTransferSubmit({ id });
  324. this.$message.success("提审成功");
  325. this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
  326. },
  327. //清空
  328. clearFn() {
  329. console.log(this.$refs.searchForm);
  330. this.$refs.searchForm.resetFields();
  331. },
  332. //搜索
  333. searchFn() {
  334. this.getDataList({
  335. ...this.searchForm,
  336. pageNum: this.currentPage,
  337. pageSize: this.pageSize,
  338. });
  339. },
  340. //获取列表数据
  341. async getDataList(data) {
  342. const res = await getChangeList(data);
  343. console.log(res);
  344. this.dataList = res.data.records;
  345. this.listTotal = res.data.total;
  346. },
  347. //详情
  348. async detailFn(id) {
  349. const res = await getChangeListDetail({ id });
  350. console.log(res);
  351. this.detailList = res.data;
  352. this.showPage = 2;
  353. },
  354. //修改
  355. async editFn(id) {
  356. const res = await getChangeListDetail({ id });
  357. this.detailList = res.data;
  358. this.showPage = 4;
  359. },
  360. //审核
  361. async examineFn(id) {
  362. const res = await getChangeListDetail({ id });
  363. this.detailList = res.data;
  364. this.showPage = 3;
  365. },
  366. // 更改每页数量
  367. handleSizeChange(val) {
  368. this.pageSize = val;
  369. this.currentPage = 1;
  370. this.getDataList({ pageNum: 1, pageSize: this.pageSize });
  371. },
  372. // 更改当前页
  373. handleCurrentChange(val) {
  374. this.currentPage = val;
  375. this.getDataList({ pageNum: val, pageSize: 10 });
  376. },
  377. },
  378. };
  379. </script>
  380. <style lang="scss" scoped>
  381. .dateStyle {
  382. width: 100%;
  383. }
  384. </style>