123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <template>
- <div id="registeredUser">
- <!-- <search-box-new
- ref="searchBox"
- :formData="formData"
- :formList="formList"
- @search="search"
- @init="init"
- /> -->
- <div class="withd-box">
- <div>
- 总佣金:{{
- (userInfo.cash + userInfo.usedCash + userInfo.freezeCash).toFixed(2)
- }}元
- </div>
- <div>可提现:{{ userInfo.cash }}元</div>
- <div>已提现:{{ userInfo.usedCash }}元</div>
- </div>
- <table-list
- :tableSets="tableSet"
- :tableData="tableData"
- :navText="navText"
- :loading="loading"
- >
- <template slot="customize">
- <el-button size="medium" @click="dialogVisible = true" type="primary"
- >申请提现</el-button
- >
- <el-button size="medium" @click="toRecord" type="primary"
- >提现记录</el-button
- >
- </template>
- <template slot="btn" slot-scope="props">
- <el-button type="text">详情</el-button>
- </template>
- </table-list>
- <pagination
- :total="total"
- :pageSize="formData.pageSize"
- :currentPage="formData.pageNum"
- @handleSizeChange="handleSizeChange"
- @handleCurrentChange="handleCurrentChange"
- />
- <withd-dialog
- :dialogVisible.sync="dialogVisible"
- @getSellerInfo="getSellerInfo"
- :cash="userInfo.cash || 0"
- ></withd-dialog>
- </div>
- </template>
- <script>
- import searchBoxNew from "@/components/searchBoxNew";
- import tableList from "@/components/tableList";
- import pagination from "@/components/pagination";
- import withdDialog from "./withdDialog.vue";
- import { getCashList } from "@/api/salesman/commission";
- import { getSellerInfo } from "@/api/salesman/user";
- export default {
- name: "RegisteredUser",
- components: { searchBoxNew, tableList, pagination, withdDialog },
- data() {
- return {
- loading: false, //当前表单加载是否加载动画
- navText: {
- title: "活动列表",
- index: 0,
- ch: "条",
- num: false,
- choice: false,
- addHide: true,
- backFatherBtn: {
- status: false,
- title: "未定义",
- },
- },
- //搜索
- formList: [
- {
- prop: "nickname",
- placeholder: "请输入活动名称",
- },
- ],
- formData: {
- status: "0,1",
- pageSize: 10,
- pageNum: 1,
- },
- // 表单
- tableSet: [
- {
- label: "佣金ID",
- prop: "studentCode",
- hidden: true,
- },
- {
- label: "所属订单",
- prop: "relatedSn",
- hidden: true,
- },
- {
- label: "所属活动",
- prop: "sex",
- hidden: true,
- scope: "sex",
- },
- {
- label: "下单人",
- prop: "nickname",
- hidden: true,
- },
- {
- label: "订单时间",
- prop: "payWay",
- hidden: true,
- },
- {
- label: "订单金额",
- prop: "payWay",
- hidden: true,
- },
- {
- label: "佣金分成方式",
- prop: "profitType",
- hidden: true,
- },
- {
- label: "佣金等级",
- prop: "payWay",
- hidden: true,
- },
- {
- label: "佣金金额",
- prop: "payWay",
- hidden: true,
- },
- {
- label: "佣金结算时间",
- prop: "freezingPeriod",
- hidden: true,
- },
- ],
- tableData: [], //表单数据
- total: 0, //一共多少条
- pageSize: 10, //每页多少条数据
- currentPage: 1, //当前页码
- dialogVisible: false,
- userInfo: {},
- };
- },
- mounted() {
- this.search();
- this.getSellerInfo();
- },
- methods: {
- search(int) {
- this.loading = true;
- if (int === 1) {
- this.formData.pageNum = 1;
- }
- if (int === 2) {
- this.formData = {
- pageSize: 10,
- pageNum: 1,
- };
- }
- getCashList(this.formData)
- .then((res) => {
- this.tableData = res.rows;
- this.total = res.total;
- this.navText.index = res.total;
- })
- .finally(() => {
- this.loading = false;
- });
- },
- init() {
- this.search(2);
- },
- handleSizeChange(v) {
- this.formData.pageSize = v;
- this.formData.pageNum = 1;
- this.search();
- },
- handleCurrentChange(v) {
- this.formData.pageNum = v;
- this.search();
- },
- toRecord() {
- this.$router.push({
- path: "record",
- });
- },
- getSellerInfo() {
- getSellerInfo().then((res) => {
- this.userInfo = res.data;
- });
- },
- },
- };
- </script>
- <style lang="less" scoped>
- /deep/.el-button {
- border-radius: 8px;
- }
- /deep/.el-dialog {
- border-radius: 8px;
- .el-dialog__header {
- padding: 0;
- .hearders {
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0px 18px 0px 20px;
- border-bottom: 1px solid #e2e2e2;
- .leftTitle {
- font-size: 14px;
- font-weight: bold;
- color: #2f4378;
- }
- .rightBoxs {
- display: flex;
- align-items: center;
- img {
- width: 14px;
- height: 14px;
- margin-left: 13px;
- cursor: pointer;
- }
- }
- }
- }
- .el-dialog__footer {
- padding: 0;
- .dialog-footer {
- padding: 0px 40px;
- height: 70px;
- border-top: 1px solid #e2e2e2;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- }
- }
- }
- .imgBox {
- width: 100%;
- // height: 210px;
- border: 1px solid #e2e2e2;
- border-radius: 8px;
- padding: 8px 8px 3px;
- display: flex;
- flex-direction: column;
- align-items: center;
- .imgLabel {
- flex: 1;
- width: 100%;
- border: 1px dotted #e2e2e2;
- color: #999;
- font-size: 14px;
- cursor: pointer;
- border-radius: 8px;
- .msPhoto {
- display: flex;
- justify-content: center;
- align-items: center;
- max-width: 100%;
- max-height: 270px;
- img {
- max-width: 100%;
- max-height: 270px;
- }
- }
- .imgbbx {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- i {
- font-weight: bold;
- margin: 14px 0;
- font-size: 24px;
- }
- }
- }
- p {
- margin: 5px 0px;
- }
- }
- .withd-box{
- display: flex;
- position: absolute;
- top: 122px;
- left: 200px;
- z-index: 10;
- div{
- margin-right: 20px;
- }
- }
- </style>
|