123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836 |
- <template>
- <div class="app-container">
- <div v-if="showPage == 1">
- <!-- 筛选条件 -->
- <div>
- <Collapse :screen-form="searchForm">
- <template #right_btn>
- <el-button size="mini" @click="cancelFn">清空</el-button>
- <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
- </template>
- <template #left_btn>
- <el-radio-group @change="changeRadioFn" v-model="searchForm.examineStatus" size="mini">
- <el-radio-button label="">全部</el-radio-button>
- <el-radio-button label="SAVE">保存</el-radio-button>
- <el-radio-button label="WAIT">待审核</el-radio-button>
- <el-radio-button label="OK_ONE">初审通过</el-radio-button>
- <el-radio-button label="FAIL_ONE">初审不通过</el-radio-button>
- <el-radio-button label="OK">复核通过</el-radio-button>
- <el-radio-button label="FAIL">复核不通过</el-radio-button>
- <el-radio-button label="CLOSE">已关闭</el-radio-button>
- <el-radio-button label="OK_ONE_AND_CONFIRM">已确认未复核</el-radio-button>
- </el-radio-group>
- </template>
- <template #search>
- <el-form ref="searchForm" :model="searchForm" label-width="100px" size="mini" label-position="left">
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="经销商名称" prop="customerName">
- <el-input v-model="searchForm.customerName" placeholder="请输入经销商名称"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="返利类型" prop="walletName">
- <el-input v-model="searchForm.walletName" placeholder="请输入"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="经销商编码" prop="customerNumber">
- <el-input v-model="searchForm.customerNumber" placeholder="请输入"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="返利单号" prop="id">
- <el-input v-model="searchForm.id" placeholder="请输入"></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="开始时间" prop="startTime">
- <el-date-picker
- class="selectStyle"
- v-model="searchForm.startTime"
- placeholder="选择日期"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="结束时间" prop="endTime">
- <el-date-picker
- class="selectStyle"
- v-model="searchForm.endTime"
- placeholder="选择日期"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="商家已确认" prop="isConfirm">
- <el-radio-group v-model="searchForm.isConfirm">
- <el-radio-button label="">全部</el-radio-button>
- <el-radio-button label="true">是</el-radio-button>
- <el-radio-button label="false">否</el-radio-button>
- </el-radio-group>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </template>
- </Collapse>
- </div>
- <!-- 按钮 -->
- <div class="btn-group clearfix">
- <div class="fl">
- <el-popconfirm
- style="margin-right: 15px"
- v-if="$checkBtnRole('del', $route.meta.roles)"
- class="delClass"
- @onConfirm="deleFn"
- title="确定删除吗?"
- >
- <el-button :disabled="deleList.length < 1" slot="reference" type="danger" icon="el-icon-minus" size="mini"
- >批量删除</el-button
- >
- </el-popconfirm>
- <el-popconfirm
- style="margin-right: 15px"
- v-if="$checkBtnRole('apply', $route.meta.roles) && searchForm.examineStatus === 'SAVE'"
- class="delClass"
- @onConfirm="batchApplication"
- title="确定执行批量申请吗?"
- >
- <el-button
- :disabled="deleList.length < 1"
- slot="reference"
- type="warning"
- icon="el-icon-finished"
- size="mini"
- >批量申请</el-button
- >
- </el-popconfirm>
- <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
- >
- <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
- >
- <!-- <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> -->
- </div>
- <div class="fr">
- <ExportButton :exUrl="'rebate/order/export'" :exParams="exParams" />
- </div>
- </div>
- <!-- 列表 -->
- <div class="mymain-container">
- <div class="table">
- <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"
- >
- <el-table-column
- v-if="$checkBtnRole('del', $route.meta.roles)"
- :selectable="selectableFn"
- align="center"
- type="selection"
- width="51"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="状态"
- prop="examineStatus"
- min-width="160"
- show-overflow-tooltip
- v-if="!isCustomer"
- >
- <template slot-scope="scope">
- <el-tag size="mini" v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
- <el-tag size="mini" v-show="scope.row.examineStatus == 'WAIT'" type="warning">待审核</el-tag>
- <el-tag size="mini" v-show="scope.row.examineStatus == 'OK_ONE'" type="success">初审通过</el-tag>
- <el-tag size="mini" v-show="scope.row.examineStatus == 'FAIL_ONE'" type="danger">初审不通过</el-tag>
- <el-tag size="mini" v-show="scope.row.examineStatus == 'OK'" type="success">复核通过</el-tag>
- <el-tag size="mini" v-show="scope.row.examineStatus == 'FAIL'" type="danger">不通过</el-tag>
- <el-tag size="mini" v-show="scope.row.examineStatus == 'CLOSE'" type="info">已关闭</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- v-if="isCustomer"
- align="left"
- label="是否确认"
- prop="customerIsConfirm"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-tag size="mini" v-show="scope.row.customerIsConfirm == true">已确认</el-tag>
- <el-tag size="mini" v-show="scope.row.customerIsConfirm == false">未确认</el-tag>
- </template>
- </el-table-column>
- <el-table-column align="left" label="返利单号" prop="rebateOrderId" min-width="200" show-overflow-tooltip>
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.rebateOrderId" />
- <span>{{ scope.row.rebateOrderId }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="返利日期"
- prop="theTime"
- min-width="180"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="isCustomer"
- align="left"
- label="标题备注"
- prop="policyDocNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="经销商编码"
- prop="customerNumber"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.customerNumber" />
- <span>{{ scope.row.customerNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="经销商名称"
- prop="customerName"
- min-width="260"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.customerName" />
- <span>{{ scope.row.customerName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="返利类型"
- prop="walletName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column align="right" label="总返利金额" prop="amount" min-width="160" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.amount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column align="right" label="返利金额" prop="rebateAmount" min-width="160" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.rebateAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column align="right" label="暂扣返利" prop="withholdAmount" min-width="160" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.withholdAmount | numToFixed }}
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- align="right"-->
- <!-- label="折让金额"-->
- <!-- prop="allowanceAmount"-->
- <!-- min-width="160"-->
- <!-- show-overflow-tooltip-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- {{ scope.row.allowanceAmount | numToFixed }}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="折让编号"
- prop="allowanceCode"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="折让账号"
- prop="allowanceAccount"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="right"
- label="已办理折让金额"
- prop="handledAllowanceAmount"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.handledAllowanceAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="折让对应收款单号"
- prop="allowanceOrderNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="政策文件流水号"
- prop="policyFileNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="政策文号"
- prop="policyDocNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="政策年份"
- prop="policyYear"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="政策月份"
- prop="policyMonth"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="政策归属部门"
- prop="policyOrg"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- v-if="!isCustomer"
- label="客户区域"
- prop="customerArea"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="客户属性"
- prop="customerAttr"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- v-if="!isCustomer"
- label="奖励实际归属客户"
- prop="rewardActualCustomers"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="备注1"
- prop="remark1"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="备注2"
- prop="remark2"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="制单人"
- prop="createBy"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="制单时间"
- prop="createTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="审核人"
- prop="examineBy"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="审核时间"
- prop="examineTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="确认人"
- prop="customerName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="确认时间"
- prop="customerConfirmTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="复核人"
- prop="secondExamineBy"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="left"
- label="复核时间"
- prop="secondExamineTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="isCustomer"
- align="left"
- label="确认时间"
- prop="customerConfirmTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column align="center" label="操作" min-width="240" show-overflow-tooltip fixed="right">
- <template slot-scope="scope">
- <el-button
- type="text"
- class="textColor"
- v-if="
- !isCustomer && $checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus != 'FAIL_ONE'
- "
- @click="editFn(scope.row.rebateOrderId)"
- >编辑</el-button
- >
- <el-button
- type="text"
- class="textColor"
- v-show="scope.row.examineStatus == 'SAVE' && !isCustomer && $checkBtnRole('apply', $route.meta.roles)"
- @click="applyFn(scope.row.rebateOrderId)"
- >申请</el-button
- >
- <el-button
- type="text"
- class="textColor"
- v-show="
- scope.row.examineStatus == 'WAIT' && !isCustomer && $checkBtnRole('examine', $route.meta.roles)
- "
- @click="examineFn(scope.row.rebateOrderId)"
- >审核</el-button
- >
- <el-button
- type="text"
- class="textColor"
- v-show="
- (scope.row.examineStatus == 'OK_ONE' ||
- scope.row.examineStatus == 'OK' ||
- scope.row.examineStatus == 'FAIL') &&
- !isCustomer &&
- $checkBtnRole('examine', $route.meta.roles)
- "
- @click="reviewFn(scope.row.rebateOrderId)"
- >{{ scope.row.examineStatus == 'OK' ? '取消复核' : '复核' }}</el-button
- >
- <el-button
- type="text"
- class="textColor"
- v-show="(scope.row.examineStatus == 'WAIT' || scope.row.examineStatus == 'SAVE') && !isCustomer"
- @click="infoFn(scope.row.rebateOrderId)"
- >详情</el-button
- >
- <el-button
- type="text"
- class="textColor"
- v-show="
- (scope.row.examineStatus == 'OK_ONE' ||
- scope.row.examineStatus == 'FAIL_ONE' ||
- scope.row.examineStatus == 'FAIL' ||
- scope.row.examineStatus == 'OK') &&
- !isCustomer
- "
- @click="detail2(scope.row.rebateOrderId)"
- >详情</el-button
- >
- <el-button
- type="text"
- class="textColor"
- v-if="
- isCustomer &&
- scope.row.withholdAmount == 0 &&
- (scope.row.examineStatus == 'OK_ONE' ||
- scope.row.examineStatus == 'OK' ||
- scope.row.examineStatus == 'FAIL')
- "
- @click="confirmFn(scope.row.rebateOrderId, scope.row.customerIsConfirm)"
- >{{
- scope.row.customerIsConfirm == true && scope.row.examineStatus == 'OK_ONE'
- ? '编辑'
- : scope.row.customerIsConfirm == false
- ? '确定'
- : '详情'
- }}</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 分页 -->
- <div class="fr">
- <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"
- >
- </el-pagination>
- </div>
- </div>
- </div>
- <RebateListApply :detailId="detailId" v-else-if="showPage == 2" />
- <RebateListExamine @updateList="updateList" :detailId="detailId" v-else-if="showPage == 3" />
- <RebateListReview @updateList="updateList" :detailId="detailId" v-else-if="showPage == 4" />
- <!-- 详情 -->
- <RebateListDetail :detailId="detailId" v-else-if="showPage == 5" />
- <!-- 确定 -->
- <RebateListConfirm @updateList="updateList" :detailId="detailId" :isShow="isShow" v-else-if="showPage == 6" />
- <!-- 编辑 -->
- <RebateListEdit @updateList="updateList" :detailId="detailId" v-else-if="showPage == 7" />
- <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
- </div>
- </template>
- <script>
- import {
- getRebateOrderList,
- getRebateOrderApply,
- getRebateOrderBatchDel,
- getRebateOrderApplyBatch,
- getRebateOrderExamineBatch,
- getRebateOrderExamine2Batch
- } from '@/api/finance/rebate_list'
- import RebateListApply from './components/rebate_list-apply.vue'
- import RebateListExamine from './components/rebate_list-examine.vue'
- import RebateListReview from './components/rebate_list-review.vue'
- import RebateListDetail from './components/rebate_list-detail'
- import RebateListConfirm from './components/rebate_list-confirm'
- import RebateListEdit from './components/rebate_list-edit.vue'
- import ExamineDialog from '@/components/Common/examine-dialog'
- export default {
- name: 'rebate_list',
- components: {
- RebateListDetail,
- RebateListApply,
- RebateListExamine,
- RebateListReview,
- RebateListConfirm,
- RebateListEdit,
- ExamineDialog
- },
- data() {
- return {
- deleList: [],
- currentPage: 1, // 当前页码
- pageSize: 10, // 每页数量
- listTotal: 0, // 列表总数
- dataList: [], // 列表数据
- searchForm: {
- id: '',
- customerName: '',
- walletName: '',
- customerNumber: '',
- startTime: '',
- endTime: '',
- examineStatus: '',
- isConfirm: ''
- }, //搜索表单
- listLoading: false, // 列表加载loading
- showPage: 1,
- detailId: null,
- isCustomer: null,
- secondId: null,
- isShow: null,
- isCollapse: true,
- isShowExamineDialog: false,
- examineForm: {
- status: '',
- remark: ''
- },
- state: ''
- }
- },
- computed: {
- exParams() {
- return {
- ...this.searchForm,
- pageSize: this.pageSize,
- pageNum: this.currentPage
- }
- }
- },
- created() {
- this.getDataList()
- const res = JSON.parse(localStorage.getItem('supply_user'))
- this.isCustomer = res.isCustomer
- if (this.$route.query.id) {
- if (this.isCustomer) {
- this.confirmFn(this.$route.query.id, false)
- } else {
- this.examineFn(this.$route.query.id)
- }
- }
- },
- methods: {
- //批量复核
- batchReview(value) {
- this.state = value
- this.isShowExamineDialog = true
- },
- //批量审核
- batchAudit(value) {
- this.state = value
- this.isShowExamineDialog = true
- },
- //提交批量审核
- async submitExamineForm() {
- let res = this.deleList.toString()
- if (this.state === 'audit') {
- await getRebateOrderExamineBatch({
- ids: res,
- examineStatus: this.examineForm.status,
- examineRemark: this.examineForm.remark
- })
- this.$message.success('批量审核成功')
- } else {
- await getRebateOrderExamine2Batch({
- ids: res,
- examineStatus: this.examineForm.status,
- examineRemark: this.examineForm.remark
- })
- this.$message.success('批量复核成功')
- }
- this.deleList = []
- this.isShowExamineDialog = false
- this.getDataList()
- },
- //批量申请
- async batchApplication() {
- let res = this.deleList.toString()
- await getRebateOrderApplyBatch({ ids: res })
- this.getDataList()
- this.$message.success('批量申请成功')
- this.deleList = []
- },
- // 批量删除
- selectionChangeFn(value) {
- const res = value.map(v => v.rebateOrderId)
- this.deleList = res
- },
- //删除
- async deleFn() {
- let res = this.deleList.toString()
- // console.log(res);
- await getRebateOrderBatchDel({ ids: res })
- this.getDataList()
- this.$message.success('删除成功')
- this.deleList = []
- },
- selectableFn(row, index) {
- // console.log(row, index, 444);
- // if (row.examineStatus !== "SAVE") {
- // return false;
- // } else {
- // return true;
- // }
- return true
- },
- //切换radio获取数据
- changeRadioFn(v) {
- this.currentPage = 1
- this.getDataList()
- },
- //清除
- cancelFn() {
- this.$refs.searchForm.resetFields()
- },
- //搜索
- searchFn() {
- this.currentPage = 1
- this.getDataList()
- },
- // 更改每页数量
- handleSizeChange(val) {
- this.pageSize = val
- this.getDataList()
- },
- // 更改当前页
- handleCurrentChange(val) {
- this.currentPage = val
- this.getDataList()
- },
- //更新列表数据
- updateList() {
- this.getDataList()
- },
- //获取列表数据
- async getDataList() {
- let params = {
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- customerName: this.searchForm.customerName,
- customerNumber: this.searchForm.customerNumber,
- endTime: this.searchForm.endTime,
- examineStatus: this.searchForm.examineStatus,
- id: this.searchForm.id,
- isConfirm: this.searchForm.isConfirm,
- isSecondExamine: '',
- startTime: this.searchForm.startTime,
- walletName: this.searchForm.walletName
- }
- const res = await getRebateOrderList(params)
- this.listTotal = res.data.total
- let arr = res.data.records
- arr.forEach(value => {
- value.sums1 = []
- value.sums2 = ['amount', 'rebateAmount', 'withholdAmount', 'allowanceAmount', 'handledAllowanceAmount']
- })
- if (this.isCustomer) {
- let arr2 = arr.filter(v => {
- if (
- (v.examineStatus == 'OK_ONE' || v.examineStatus == 'OK' || v.examineStatus == 'FAIL') &&
- v.withholdAmount == 0
- ) {
- return v
- }
- })
- this.dataList = arr2
- this.listTotal = arr2.length
- } else {
- this.dataList = arr
- this.listTotal = res.data.total
- }
- },
- //确认
- confirmFn(id, isShow) {
- this.isShow = isShow
- this.detailId = id
- this.showPage = 6
- },
- //复核
- reviewFn(id) {
- this.detailId = id
- this.showPage = 4
- },
- //审核
- examineFn(id) {
- this.detailId = id
- this.showPage = 3
- },
- //申请
- async applyFn(id) {
- await getRebateOrderApply({ id })
- this.getDataList()
- this.$message.success('申请成功')
- },
- //详情2
- detail2(id) {
- this.detailId = id
- this.showPage = 2
- },
- //详情
- infoFn(id) {
- this.detailId = id
- this.showPage = 5
- },
- //编辑
- editFn(id) {
- this.detailId = id
- this.showPage = 7
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .selectStyle {
- width: 100%;
- }
- </style>
|