rebate_list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <template>
  2. <div class="app-container">
  3. <div v-if="showPage == 1">
  4. <el-radio-group @change="changeRadioFn" v-model="searchForm.examineStatus" size="mini">
  5. <el-radio-button label="">全部</el-radio-button>
  6. <el-radio-button label="SAVE">保存</el-radio-button>
  7. <el-radio-button label="WAIT">待审核</el-radio-button>
  8. <el-radio-button label="OK_ONE">初审通过</el-radio-button>
  9. <el-radio-button label="FAIL_ONE">初审不通过</el-radio-button>
  10. <el-radio-button label="OK">复核通过</el-radio-button>
  11. <el-radio-button label="FAIL">复核不通过</el-radio-button>
  12. <el-radio-button label="CLOSE">已关闭</el-radio-button>
  13. <el-radio-button label="OK_ONE_AND_CONFIRM">已确认未复核</el-radio-button>
  14. </el-radio-group>
  15. <br /><br />
  16. <!-- 筛选条件 -->
  17. <div>
  18. <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
  19. <el-row :gutter="20">
  20. <el-col :xs="24" :sm="12" :lg="6">
  21. <el-form-item label="经销商名称" prop="customerName">
  22. <el-input v-model="searchForm.customerName" placeholder="请输入经销商名称"></el-input>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :xs="24" :sm="12" :lg="6">
  26. <el-form-item label="返利类型" prop="walletName">
  27. <el-input v-model="searchForm.walletName" placeholder="请输入"></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :xs="24" :sm="12" :lg="6">
  31. <el-form-item label="经销商编码" prop="customerNumber">
  32. <el-input v-model="searchForm.customerNumber" placeholder="请输入"></el-input>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :xs="24" :sm="12" :lg="6">
  36. <el-form-item label="返利单号" prop="id">
  37. <el-input v-model="searchForm.id" placeholder="请输入"></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 class="selectStyle" v-model="searchForm.startTime" placeholder="选择日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
  43. </el-date-picker>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :xs="24" :sm="12" :lg="6">
  47. <el-form-item label="结束时间" prop="endTime">
  48. <el-date-picker class="selectStyle" v-model="searchForm.endTime" placeholder="选择日期" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
  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="商家已确认" prop="isConfirm">
  54. <el-radio-group v-model="searchForm.isConfirm">
  55. <el-radio-button label="">全部</el-radio-button>
  56. <el-radio-button label="true">是</el-radio-button>
  57. <el-radio-button label="false">否</el-radio-button>
  58. </el-radio-group>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :xs="24" :sm="12" :lg="6">
  62. <el-form-item label="" class="fr">
  63. <el-button size="mini" @click="cancelFn">清空</el-button>
  64. <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
  65. </el-form-item>
  66. </el-col>
  67. </el-row>
  68. </el-form>
  69. </div>
  70. <!-- 按钮 -->
  71. <div class="btn-group clearfix">
  72. <div class="fl">
  73. <el-popconfirm style="margin-right:15px" v-if="$checkBtnRole('del', $route.meta.roles)" class="delClass" @onConfirm="deleFn" title="确定删除吗?">
  74. <el-button :disabled="deleList.length < 1" slot="reference" type="danger" icon="el-icon-minus" size="mini">批量删除</el-button>
  75. </el-popconfirm>
  76. <el-popconfirm style="margin-right:15px" v-if="$checkBtnRole('apply', $route.meta.roles) && searchForm.examineStatus ==='SAVE'" class="delClass" @onConfirm="batchApplication" title="确定执行批量申请吗?">
  77. <el-button :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量申请</el-button>
  78. </el-popconfirm>
  79. <el-button @click="batchAudit('audit')" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='WAIT'" :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量审核</el-button>
  80. <el-button @click="batchReview('review')" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='OK_ONE_AND_CONFIRM'" :disabled="deleList.length < 1" slot="reference" type="warning" icon="el-icon-finished" size="mini">批量复核</el-button>
  81. <!-- <el-button @click="batchApplication" :disabled='deleList.length < 1' size="mini" type="warning" icon="el-icon-finished" v-if="$checkBtnRole('examine', $route.meta.roles) && searchForm.examineStatus ==='SAVE'">批量申请</el-button> -->
  82. </div>
  83. <div class="fr">
  84. <ExportButton :exUrl="'/rebate/order/export'" :exParams="exParams" />
  85. </div>
  86. </div>
  87. <!-- 列表 -->
  88. <div class="mymain-container">
  89. <div class="table">
  90. <el-table @selection-change="selectionChangeFn" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe show-summary :summary-method="$getSummaries">
  91. <el-table-column v-if="$checkBtnRole('del', $route.meta.roles)" :selectable='selectableFn' align="center" type="selection" width="51" show-overflow-tooltip></el-table-column>
  92. <el-table-column align="left" label="状态" prop="examineStatus" min-width="160" show-overflow-tooltip v-if="!isCustomer">
  93. <template slot-scope="scope">
  94. <el-tag size="mini" v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
  95. <el-tag size="mini" v-show="scope.row.examineStatus == 'WAIT'" type="warning">待审核</el-tag>
  96. <el-tag size="mini" v-show="scope.row.examineStatus == 'OK_ONE'" type="success">初审通过</el-tag>
  97. <el-tag size="mini" v-show="scope.row.examineStatus == 'FAIL_ONE'" type="danger">初审不通过</el-tag>
  98. <el-tag size="mini" v-show="scope.row.examineStatus == 'OK'" type="success">复核通过</el-tag>
  99. <el-tag size="mini" v-show="scope.row.examineStatus == 'FAIL'" type="danger">不通过</el-tag>
  100. <el-tag size="mini" v-show="scope.row.examineStatus == 'CLOSE'" type="info">已关闭</el-tag>
  101. </template>
  102. </el-table-column>
  103. <el-table-column v-if="isCustomer" align="left" label="是否确认" prop="customerIsConfirm" min-width="160" show-overflow-tooltip>
  104. <template slot-scope="scope">
  105. <el-tag size="mini" v-show="scope.row.customerIsConfirm == true">已确认</el-tag>
  106. <el-tag size="mini" v-show="scope.row.customerIsConfirm == false">未确认</el-tag>
  107. </template>
  108. </el-table-column>
  109. <el-table-column align="left" label="返利单号" prop="rebateOrderId" min-width="200" show-overflow-tooltip>
  110. <template slot-scope="scope">
  111. <CopyButton :copyText="scope.row.rebateOrderId" />
  112. <span>{{scope.row.rebateOrderId}}</span>
  113. </template>
  114. </el-table-column>
  115. <el-table-column align="left" label="返利日期" prop="theTime" min-width="180" show-overflow-tooltip></el-table-column>
  116. <el-table-column v-if="isCustomer" align="left" label="标题备注" prop="policyDocNo" min-width="160" show-overflow-tooltip></el-table-column>
  117. <el-table-column v-if="!isCustomer" align="left" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip>
  118. <template slot-scope="scope">
  119. <CopyButton :copyText="scope.row.customerNumber" />
  120. <span>{{scope.row.customerNumber}}</span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column v-if="!isCustomer" align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
  124. <template slot-scope="scope">
  125. <CopyButton :copyText="scope.row.customerName" />
  126. <span>{{scope.row.customerName}}</span>
  127. </template>
  128. </el-table-column>
  129. <el-table-column align="left" label="返利类型" prop="walletName" min-width="160" show-overflow-tooltip></el-table-column>
  130. <el-table-column align="right" label="总返利金额" prop="amount" min-width="160" show-overflow-tooltip>
  131. <template slot-scope="scope">
  132. {{ scope.row.amount | numToFixed }}
  133. </template>
  134. </el-table-column>
  135. <el-table-column align="right" label="返利金额" prop="rebateAmount" min-width="160" show-overflow-tooltip>
  136. <template slot-scope="scope">
  137. {{ scope.row.rebateAmount | numToFixed }}
  138. </template>
  139. </el-table-column>
  140. <el-table-column align="right" label="暂扣返利" prop="withholdAmount" min-width="160" show-overflow-tooltip>
  141. <template slot-scope="scope">
  142. {{ scope.row.withholdAmount | numToFixed }}
  143. </template>
  144. </el-table-column>
  145. <el-table-column align="right" label="折让金额" prop="allowanceAmount" min-width="160" show-overflow-tooltip>
  146. <template slot-scope="scope">
  147. {{ scope.row.allowanceAmount | numToFixed }}
  148. </template>
  149. </el-table-column>
  150. <el-table-column v-if="!isCustomer" align="left" label="折让编号" prop="allowanceCode" min-width="160" show-overflow-tooltip></el-table-column>
  151. <el-table-column v-if="!isCustomer" align="left" label="折让账号" prop="allowanceAccount" min-width="160" show-overflow-tooltip></el-table-column>
  152. <el-table-column v-if="!isCustomer" align="right" label="已办理折让金额" prop="handledAllowanceAmount" min-width="160" show-overflow-tooltip>
  153. <template slot-scope="scope">
  154. {{ scope.row.handledAllowanceAmount | numToFixed }}
  155. </template>
  156. </el-table-column>
  157. <el-table-column v-if="!isCustomer" align="left" label="折让对应收款单号" prop="allowanceOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
  158. <el-table-column v-if="!isCustomer" align="left" label="政策文件流水号" prop="policyFileNo" min-width="160" show-overflow-tooltip></el-table-column>
  159. <el-table-column v-if="!isCustomer" align="left" label="政策文号" prop="policyDocNo" min-width="160" show-overflow-tooltip></el-table-column>
  160. <el-table-column v-if="!isCustomer" align="left" label="政策年份" prop="policyYear" min-width="160" show-overflow-tooltip></el-table-column>
  161. <el-table-column v-if="!isCustomer" align="left" label="政策月份" prop="policyMonth" min-width="160" show-overflow-tooltip></el-table-column>
  162. <el-table-column v-if="!isCustomer" align="left" label="政策归属部门" prop="policyOrg" min-width="160" show-overflow-tooltip></el-table-column>
  163. <el-table-column align="left" v-if="!isCustomer" label="客户区域" prop="customerArea" min-width="160" show-overflow-tooltip></el-table-column>
  164. <el-table-column v-if="!isCustomer" align="left" label="客户属性" prop="customerAttr" min-width="160" show-overflow-tooltip></el-table-column>
  165. <el-table-column align="left" v-if="!isCustomer" label="奖励实际归属客户" prop="rewardActualCustomers" min-width="160" show-overflow-tooltip></el-table-column>
  166. <el-table-column v-if="!isCustomer" align="left" label="备注1" prop="remark1" min-width="160" show-overflow-tooltip></el-table-column>
  167. <el-table-column v-if="!isCustomer" align="left" label="备注2" prop="remark2" min-width="160" show-overflow-tooltip></el-table-column>
  168. <el-table-column v-if="!isCustomer" align="left" label="制单人" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
  169. <el-table-column v-if="!isCustomer" align="left" label="制单时间" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
  170. <el-table-column v-if="!isCustomer" align="left" label="审核人" prop="examineBy" min-width="160" show-overflow-tooltip></el-table-column>
  171. <el-table-column v-if="!isCustomer" align="left" label="审核时间" prop="examineTime" min-width="160" show-overflow-tooltip></el-table-column>
  172. <el-table-column v-if="!isCustomer" align="left" label="确认人" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
  173. <el-table-column v-if="!isCustomer" align="left" label="确认时间" prop="customerConfirmTime" min-width="160" show-overflow-tooltip></el-table-column>
  174. <el-table-column v-if="!isCustomer" align="left" label="复核人" prop="secondExamineBy" min-width="160" show-overflow-tooltip></el-table-column>
  175. <el-table-column v-if="!isCustomer" align="left" label="复核时间" prop="secondExamineTime" min-width="160" show-overflow-tooltip></el-table-column>
  176. <el-table-column v-if="isCustomer" align="left" label="确认时间" prop="customerConfirmTime" min-width="160" show-overflow-tooltip></el-table-column>
  177. <el-table-column align="center" label="操作" min-width="240" show-overflow-tooltip fixed="right">
  178. <template slot-scope="scope">
  179. <el-button type="text" class="textColor" v-if="
  180. !isCustomer &&
  181. $checkBtnRole('edit', $route.meta.roles) &&
  182. scope.row.examineStatus != 'FAIL_ONE'
  183. " @click="editFn(scope.row.rebateOrderId)">编辑</el-button>
  184. <el-button type="text" class="textColor" v-show="
  185. scope.row.examineStatus == 'SAVE' &&
  186. !isCustomer &&
  187. $checkBtnRole('apply', $route.meta.roles)
  188. " @click="applyFn(scope.row.rebateOrderId)">申请</el-button>
  189. <el-button type="text" class="textColor" v-show="
  190. scope.row.examineStatus == 'WAIT' &&
  191. !isCustomer &&
  192. $checkBtnRole('examine', $route.meta.roles)
  193. " @click="examineFn(scope.row.rebateOrderId)">审核</el-button>
  194. <el-button type="text" class="textColor" v-show="
  195. (scope.row.examineStatus == 'OK_ONE' ||
  196. scope.row.examineStatus == 'OK' ||
  197. scope.row.examineStatus == 'FAIL') &&
  198. !isCustomer &&
  199. $checkBtnRole('examine', $route.meta.roles)
  200. " @click="reviewFn(scope.row.rebateOrderId)">{{
  201. scope.row.examineStatus == "OK" ? "取消复核" : "复核"
  202. }}</el-button>
  203. <el-button type="text" class="textColor" v-show="
  204. (scope.row.examineStatus == 'WAIT' ||
  205. scope.row.examineStatus == 'SAVE') &&
  206. !isCustomer
  207. " @click="infoFn(scope.row.rebateOrderId)">详情</el-button>
  208. <el-button type="text" class="textColor" v-show="
  209. (scope.row.examineStatus == 'OK_ONE' ||
  210. scope.row.examineStatus == 'FAIL_ONE' ||
  211. scope.row.examineStatus == 'FAIL' ||
  212. scope.row.examineStatus == 'OK') &&
  213. !isCustomer
  214. " @click="detail2(scope.row.rebateOrderId)">详情</el-button>
  215. <el-button type="text" class="textColor" v-if="
  216. isCustomer &&
  217. scope.row.withholdAmount == 0 &&
  218. (scope.row.examineStatus == 'OK_ONE' ||
  219. scope.row.examineStatus == 'OK' ||
  220. scope.row.examineStatus == 'FAIL')
  221. " @click="
  222. confirmFn(
  223. scope.row.rebateOrderId,
  224. scope.row.customerIsConfirm,
  225. )
  226. ">{{
  227. scope.row.customerIsConfirm == true && scope.row.examineStatus == 'OK_ONE' ? "编辑" : scope.row.customerIsConfirm == false?'确定':'详情'
  228. }}</el-button>
  229. </template>
  230. </el-table-column>
  231. </el-table>
  232. </div>
  233. <!-- 分页 -->
  234. <div class="fr">
  235. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
  236. </el-pagination>
  237. </div>
  238. </div>
  239. </div>
  240. <RebateListApply :detailId="detailId" v-else-if="showPage == 2" />
  241. <RebateListExamine @updateList="updateList" :detailId="detailId" v-else-if="showPage == 3" />
  242. <RebateListReview @updateList="updateList" :detailId="detailId" v-else-if="showPage == 4" />
  243. <!-- 详情 -->
  244. <RebateListDetail :detailId="detailId" v-else-if="showPage == 5" />
  245. <!-- 确定 -->
  246. <RebateListConfirm @updateList="updateList" :detailId="detailId" :isShow="isShow" v-else-if="showPage == 6" />
  247. <!-- 编辑 -->
  248. <RebateListEdit @updateList="updateList" :detailId="detailId" v-else-if="showPage == 7" />
  249. <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
  250. </div>
  251. </template>
  252. <script>
  253. import {
  254. getRebateOrderList,
  255. getRebateOrderApply,
  256. getRebateOrderBatchDel,
  257. getRebateOrderApplyBatch,
  258. getRebateOrderExamineBatch,
  259. getRebateOrderExamine2Batch,
  260. } from "@/api/finance/rebate_list";
  261. import RebateListApply from "./components/rebate_list-apply.vue";
  262. import RebateListExamine from "./components/rebate_list-examine.vue";
  263. import RebateListReview from "./components/rebate_list-review.vue";
  264. import RebateListDetail from "./components/rebate_list-detail";
  265. import RebateListConfirm from "./components/rebate_list-confirm";
  266. import RebateListEdit from "./components/rebate_list-edit.vue";
  267. import ExamineDialog from "@/components/Common/examine-dialog";
  268. export default {
  269. name: "rebate_list",
  270. components: {
  271. RebateListDetail,
  272. RebateListApply,
  273. RebateListExamine,
  274. RebateListReview,
  275. RebateListConfirm,
  276. RebateListEdit,
  277. ExamineDialog,
  278. },
  279. data() {
  280. return {
  281. deleList: [],
  282. currentPage: 1, // 当前页码
  283. pageSize: 10, // 每页数量
  284. listTotal: 0, // 列表总数
  285. dataList: [], // 列表数据
  286. searchForm: {
  287. id: "",
  288. customerName: "",
  289. walletName: "",
  290. customerNumber: "",
  291. startTime: "",
  292. endTime: "",
  293. examineStatus: "",
  294. isConfirm: "",
  295. }, //搜索表单
  296. listLoading: false, // 列表加载loading
  297. showPage: 1,
  298. detailId: null,
  299. isCustomer: null,
  300. secondId: null,
  301. isShow: null,
  302. isShowExamineDialog: false,
  303. examineForm: {
  304. status: "",
  305. remark: "",
  306. },
  307. state: "",
  308. };
  309. },
  310. computed: {
  311. exParams() {
  312. return {
  313. ...this.searchForm,
  314. pageSize: this.pageSize,
  315. pageNum: this.currentPage,
  316. };
  317. },
  318. },
  319. created() {
  320. this.getDataList();
  321. const res = JSON.parse(localStorage.getItem("supply_user"));
  322. this.isCustomer = res.isCustomer;
  323. if (this.$route.query.id) {
  324. if (this.isCustomer) {
  325. this.confirmFn(this.$route.query.id, false);
  326. } else {
  327. this.examineFn(this.$route.query.id);
  328. }
  329. }
  330. },
  331. methods: {
  332. //批量复核
  333. batchReview(value) {
  334. this.state = value;
  335. this.isShowExamineDialog = true;
  336. },
  337. //批量审核
  338. batchAudit(value) {
  339. this.state = value;
  340. this.isShowExamineDialog = true;
  341. },
  342. //提交批量审核
  343. async submitExamineForm() {
  344. let res = this.deleList.toString();
  345. if (this.state === "audit") {
  346. await getRebateOrderExamineBatch({
  347. ids: res,
  348. examineStatus: this.examineForm.status,
  349. examineRemark: this.examineForm.remark,
  350. });
  351. this.$message.success("批量审核成功");
  352. } else {
  353. await getRebateOrderExamine2Batch({
  354. ids: res,
  355. examineStatus: this.examineForm.status,
  356. examineRemark: this.examineForm.remark,
  357. });
  358. this.$message.success("批量复核成功");
  359. }
  360. this.deleList = [];
  361. this.isShowExamineDialog = false;
  362. this.getDataList();
  363. },
  364. //批量申请
  365. async batchApplication() {
  366. let res = this.deleList.toString();
  367. await getRebateOrderApplyBatch({ ids: res });
  368. this.getDataList();
  369. this.$message.success("批量申请成功");
  370. this.deleList = [];
  371. },
  372. // 批量删除
  373. selectionChangeFn(value) {
  374. const res = value.map((v) => v.rebateOrderId);
  375. this.deleList = res;
  376. },
  377. //删除
  378. async deleFn() {
  379. let res = this.deleList.toString();
  380. // console.log(res);
  381. await getRebateOrderBatchDel({ ids: res });
  382. this.getDataList();
  383. this.$message.success("删除成功");
  384. this.deleList = [];
  385. },
  386. selectableFn(row, index) {
  387. // console.log(row, index, 444);
  388. // if (row.examineStatus !== "SAVE") {
  389. // return false;
  390. // } else {
  391. // return true;
  392. // }
  393. return true;
  394. },
  395. //切换radio获取数据
  396. changeRadioFn(v) {
  397. this.currentPage = 1;
  398. this.getDataList();
  399. },
  400. //清除
  401. cancelFn() {
  402. this.$refs.searchForm.resetFields();
  403. },
  404. //搜索
  405. searchFn() {
  406. this.currentPage = 1;
  407. this.getDataList();
  408. },
  409. // 更改每页数量
  410. handleSizeChange(val) {
  411. this.pageSize = val;
  412. this.getDataList();
  413. },
  414. // 更改当前页
  415. handleCurrentChange(val) {
  416. this.currentPage = val;
  417. this.getDataList();
  418. },
  419. //更新列表数据
  420. updateList() {
  421. this.getDataList();
  422. },
  423. //获取列表数据
  424. async getDataList() {
  425. let params = {
  426. pageSize: this.pageSize,
  427. pageNum: this.currentPage,
  428. customerName: this.searchForm.customerName,
  429. customerNumber: this.searchForm.customerNumber,
  430. endTime: this.searchForm.endTime,
  431. examineStatus: this.searchForm.examineStatus,
  432. id: this.searchForm.id,
  433. isConfirm: this.searchForm.isConfirm,
  434. isSecondExamine: "",
  435. startTime: this.searchForm.startTime,
  436. walletName: this.searchForm.walletName,
  437. };
  438. const res = await getRebateOrderList(params);
  439. this.listTotal = res.data.total;
  440. let arr = res.data.records;
  441. arr.forEach((value) => {
  442. value.sums1 = [];
  443. value.sums2 = [
  444. "amount",
  445. "rebateAmount",
  446. "withholdAmount",
  447. "allowanceAmount",
  448. "handledAllowanceAmount",
  449. ];
  450. });
  451. if (this.isCustomer) {
  452. let arr2 = arr.filter((v) => {
  453. if (
  454. (v.examineStatus == "OK_ONE" ||
  455. v.examineStatus == "OK" ||
  456. v.examineStatus == "FAIL") &&
  457. v.withholdAmount == 0
  458. ) {
  459. return v;
  460. }
  461. });
  462. this.dataList = arr2;
  463. this.listTotal = arr2.length;
  464. } else {
  465. this.dataList = arr;
  466. this.listTotal = res.data.total;
  467. }
  468. },
  469. //确认
  470. confirmFn(id, isShow) {
  471. this.isShow = isShow;
  472. this.detailId = id;
  473. this.showPage = 6;
  474. },
  475. //复核
  476. reviewFn(id) {
  477. this.detailId = id;
  478. this.showPage = 4;
  479. },
  480. //审核
  481. examineFn(id) {
  482. this.detailId = id;
  483. this.showPage = 3;
  484. },
  485. //申请
  486. async applyFn(id) {
  487. await getRebateOrderApply({ id });
  488. this.getDataList();
  489. this.$message.success("申请成功");
  490. },
  491. //详情2
  492. detail2(id) {
  493. this.detailId = id;
  494. this.showPage = 2;
  495. },
  496. //详情
  497. infoFn(id) {
  498. this.detailId = id;
  499. this.showPage = 5;
  500. },
  501. //编辑
  502. editFn(id) {
  503. this.detailId = id;
  504. this.showPage = 7;
  505. },
  506. },
  507. };
  508. </script>
  509. <style lang="scss" scoped>
  510. .selectStyle {
  511. width: 100%;
  512. }
  513. </style>