123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724 |
- <template>
- <div class="app-container">
- <div v-if="showPage == 1">
- <!-- 筛选条件 -->
- <div>
- <el-form
- ref="searchForm"
- :model="searchForm"
- label-width="100px"
- size="small"
- 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="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="18">
- <el-form-item label="" class="fr">
- <el-button size="small" @click="cancelFn">清空</el-button>
- <el-button size="small" type="primary" @click="searchFn"
- >搜索</el-button
- >
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <!-- 按钮 -->
- <div class="btn-group clearfix">
- <div class="fr">
- <ExportButton :exUrl="'/rebate/order/export'" :exParams="exParams" />
- </div>
- </div>
- <!-- 列表 -->
- <div class="mymain-container">
- <div class="table">
- <el-table
- v-loading="listLoading"
- :data="dataList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- stripe
- >
- <el-table-column
- align="center"
- label="状态"
- prop="examineStatus"
- min-width="160"
- show-overflow-tooltip
- v-if="!isCustomer"
- >
- <template slot-scope="scope">
- <el-tag v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
- <el-tag v-show="scope.row.examineStatus == 'WAIT'"
- >待审核</el-tag
- >
- <el-tag v-show="scope.row.examineStatus == 'OK_ONE'"
- >初审通过</el-tag
- >
- <el-tag v-show="scope.row.examineStatus == 'FAIL_ONE'"
- >初审不通过</el-tag
- >
- <el-tag v-show="scope.row.examineStatus == 'OK'"
- >复核通过</el-tag
- >
- <el-tag v-show="scope.row.examineStatus == 'FAIL'"
- >不通过</el-tag
- >
- <el-tag v-show="scope.row.examineStatus == 'CLOSE'"
- >已关闭</el-tag
- >
- </template>
- </el-table-column>
- <el-table-column
- v-if="isCustomer"
- align="center"
- label="是否确认"
- prop="customerIsConfirm"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-tag v-show="scope.row.customerIsConfirm == true"
- >已确认</el-tag
- >
- <el-tag v-show="scope.row.customerIsConfirm == false"
- >未确认</el-tag
- >
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="返利单号"
- prop="rebateOrderId"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="返利日期"
- prop="theTime"
- min-width="180"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="isCustomer"
- align="center"
- label="标题备注"
- prop="policyDocNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="经销商编码"
- prop="customerNumber"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="经销商名称"
- prop="customerName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="返利类型"
- prop="walletName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="总返利金额"
- prop="amount"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="center"
- label="返利金额"
- prop=""
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.withholdAmount != 0 ? 0 : scope.row.rebateAmount }}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="暂扣返利"
- prop="withholdAmount"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- label="折让金额"
- prop="allowanceAmount"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="折让编号"
- prop="allowanceCode"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="折让账号"
- prop="allowanceAccount"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="已办理折让金额"
- prop="handledAllowanceAmount"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="折让对应收款单号"
- prop="allowanceOrderNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="政策文件流水号"
- prop="policyFileNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="政策文号"
- prop="policyDocNo"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="政策年份"
- prop="policyYear"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="政策月份"
- prop="policyMonth"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="政策归属部门"
- prop="policyOrg"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- v-if="!isCustomer"
- label="客户区域"
- prop="customerArea"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="客户属性"
- prop="customerAttr"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="center"
- v-if="!isCustomer"
- label="奖励实际归属客户"
- prop="rewardActualCustomers"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="备注1"
- prop="remark1"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="备注2"
- prop="remark2"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="制单人"
- prop="createBy"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="制单时间"
- prop="createTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="审核人"
- prop="examineBy"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="审核时间"
- prop="examineTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="确认人"
- prop="customerName"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="确认时间"
- prop="customerConfirmTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="复核人"
- prop="secondExamineBy"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="!isCustomer"
- align="center"
- label="复核时间"
- prop="secondExamineTime"
- min-width="160"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- v-if="isCustomer"
- align="center"
- 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 ? "详情" : "确认"
- }}</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="10"
- 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"
- />
- <!-- <EditDateTimeDialog
- :isShow.sync="isShowEditDateDialog"
- :dateForm.sync="dateForm"
- /> -->
- </div>
- </template>
- <script>
- import {
- getRebateOrderList,
- getRebateOrderApply,
- } 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";
- export default {
- name: "rebate_list",
- components: {
- RebateListDetail,
- RebateListApply,
- RebateListExamine,
- RebateListReview,
- RebateListConfirm,
- RebateListEdit,
- },
- data() {
- return {
- currentPage: 1, // 当前页码
- pageSize: 10, // 每页数量
- listTotal: 0, // 列表总数
- dataList: [], // 列表数据
- searchForm: {
- customerName: "",
- walletName: "",
- customerNumber: "",
- startTime: "",
- endTime: "",
- }, //搜索表单
- listLoading: false, // 列表加载loading
- showPage: 1,
- detailId: null,
- isCustomer: null,
- secondId: null,
- isShow: null,
- };
- },
- computed: {
- exParams() {
- return {
- ...this.searchForm,
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- };
- },
- },
- created() {
- this.getDataList({
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- });
- 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: {
- //清除
- cancelFn() {
- this.$refs.searchForm.resetFields();
- },
- //搜索
- searchFn() {
- this.getDataList({
- ...this.searchForm,
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- });
- },
- // 更改每页数量
- handleSizeChange(val) {
- this.pageSize = val;
- this.currentPage = 1;
- this.getDataList({ pageNum: 1, pageSize: this.pageSize });
- },
- // 更改当前页
- handleCurrentChange(val) {
- this.currentPage = val;
- this.getDataList({ pageNum: val, pageSize: this.pageSize });
- },
- //更新列表数据
- updateList() {
- this.getDataList({
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- });
- },
- //获取列表数据
- async getDataList(data) {
- const res = await getRebateOrderList(data);
- this.listTotal = res.data.total;
- let arr = res.data.records;
- 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({
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- });
- 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>
|