|
|
@@ -0,0 +1,309 @@
|
|
|
+<template>
|
|
|
+ <el-tabs v-model="activeTabName">
|
|
|
+ <el-tab-pane label="青团宝结算订单" name="first">
|
|
|
+ <div id="cloud-job">
|
|
|
+ <div class="title">
|
|
|
+ 已结算总金额(税后):{{titleInfo.totalSuccessPay}}元
|
|
|
+ <br />
|
|
|
+ 已提现总金额(税后):{{titleInfo.totalDraw}}元
|
|
|
+ <br />
|
|
|
+ 待提现总额(税后):{{titleInfo.totalWaitDraw}}元
|
|
|
+ </div>
|
|
|
+ <div class="table">
|
|
|
+ <el-table
|
|
|
+ v-if="tableData.length"
|
|
|
+ height="100%"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ :data="tableData"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(prop, index) of tableProps"
|
|
|
+ :key="index"
|
|
|
+ :prop="prop"
|
|
|
+ :label="tableHeaders[index]"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a
|
|
|
+ v-if="prop === 'projectName'"
|
|
|
+ :href="scope.row | projectLink"
|
|
|
+ target="_blank"
|
|
|
+ >{{scope.row[prop]}}</a>
|
|
|
+ <a
|
|
|
+ v-else-if="prop === 'nickname'"
|
|
|
+ :href="`/rooter/user/${scope.row['uid']}`"
|
|
|
+ target="_blank"
|
|
|
+ >{{scope.row[prop]}}</a>
|
|
|
+ <span v-else-if="prop === 'create_time'">{{scope.row[prop] | toDate}}</span>
|
|
|
+ <template v-else-if="prop === 'state'">
|
|
|
+ <span v-if="scope.row[prop] === '8'">已成功</span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <span v-else>{{scope.row[prop]}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <el-pagination
|
|
|
+ @current-change="changePagination"
|
|
|
+ :current-page.sync="currentPage"
|
|
|
+ :page-size="10"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :total="totalCount"
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="青团宝提现订单" name="second">
|
|
|
+ <div id="cloud-job">
|
|
|
+ <div class="title">
|
|
|
+ 企业账户可用余额{{drawData.accountBalance.money}}元
|
|
|
+ <br />
|
|
|
+ 待确认金额(税前){{drawData.totalWaitConfirmTax/100}}元
|
|
|
+ <br />
|
|
|
+ 待确认金额(税后){{drawData.totalWaitConfirm/100}}元
|
|
|
+ <br />
|
|
|
+ 支付中金额(税前){{drawData.totalPayingTax/100}}元
|
|
|
+ <br />
|
|
|
+ 支付中金额(税后){{drawData.totalPaying/100}}元
|
|
|
+ <br />
|
|
|
+ 成功支付金额(税后){{drawData.totalSuccess/100}}元
|
|
|
+ </div>
|
|
|
+ <div class="table">
|
|
|
+ <el-table
|
|
|
+ v-if="drawData.list.length"
|
|
|
+ height="100%"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ :data="drawData.list"
|
|
|
+ >
|
|
|
+ <el-table-column prop="order_no" label="订单号"></el-table-column>
|
|
|
+ <el-table-column label="用户ID">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span @click="clickDev(scope.row.uid)">{{ scope.row.uid }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="real_amount" label="提现金额(税后)"></el-table-column>
|
|
|
+ <el-table-column prop="origin_amount" label="提现金额(税前)"></el-table-column>
|
|
|
+ <el-table-column prop="tax" label="平台扣税"></el-table-column>
|
|
|
+ <el-table-column prop="tax_qingtuanbao" label="青团宝扣税"></el-table-column>
|
|
|
+ <el-table-column prop="true_amount" label="实际到账"></el-table-column>
|
|
|
+ <el-table-column label="提现时间" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <i class="el-icon-time"></i>
|
|
|
+ <span style="margin-left: 10px">{{ scope.row.taken_at }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="到账时间" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <i class="el-icon-time"></i>
|
|
|
+ <span style="margin-left: 10px">{{ scope.row.paid_at }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="before_amount" label="提现前薪资余额"></el-table-column>
|
|
|
+ <el-table-column prop="after_amount" label="提现后薪资余额"></el-table-column>
|
|
|
+ <el-table-column prop="extra" label="系统备注"></el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.status==1" @click="confirmPay">确认付款</span>
|
|
|
+ <span v-else-if="scope.row.status==2">已确认</span>
|
|
|
+ <span v-else-if="scope.row.status==4">支付中</span>
|
|
|
+ <span v-else-if="scope.row.status==8">支付成功</span>
|
|
|
+ <span v-else-if="scope.row.status==16" @click="confirmPay">失败重试</span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <el-pagination
|
|
|
+ @current-change="changePaginationDraw"
|
|
|
+ :current-page.sync="currentDrawPage"
|
|
|
+ :page-size="10"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :total="totalDrawCount"
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+const tableHeaders = [
|
|
|
+ "项目名称",
|
|
|
+ "付款类型",
|
|
|
+ "用户昵称",
|
|
|
+ "税前应付",
|
|
|
+ "平台服务费",
|
|
|
+ "所得税费",
|
|
|
+ "开发者净收入",
|
|
|
+ "本次应付",
|
|
|
+ "实际到账",
|
|
|
+ "结算时间",
|
|
|
+ "订单号",
|
|
|
+ "付款时间",
|
|
|
+ "操作"
|
|
|
+];
|
|
|
+const tableProps = [
|
|
|
+ "projectName",
|
|
|
+ "payTypeShow",
|
|
|
+ "nickname",
|
|
|
+ "prePay",
|
|
|
+ "servicePay",
|
|
|
+ "getPay",
|
|
|
+ "realGet",
|
|
|
+ "current_gongmall",
|
|
|
+ "amount",
|
|
|
+ "create_time",
|
|
|
+ "order_no",
|
|
|
+ "pay_timeShow",
|
|
|
+ "state"
|
|
|
+];
|
|
|
+
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ activeTabName: "first",
|
|
|
+ // 头部信息
|
|
|
+ titleInfo: {},
|
|
|
+ // 数据总条目
|
|
|
+ totalCount: 0,
|
|
|
+ totalDrawCount: 0,
|
|
|
+ // 当前页面
|
|
|
+ currentPage: 1,
|
|
|
+ currentDrawPage: 1,
|
|
|
+ totalDrawPage: 1,
|
|
|
+ totalPage: 1,
|
|
|
+ // 列表头显示内容
|
|
|
+ tableHeaders,
|
|
|
+ // 列表头字段
|
|
|
+ tableProps,
|
|
|
+ // 列表数据
|
|
|
+ tableData: [],
|
|
|
+ drawData: {
|
|
|
+ accountBalance: {}
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getTableData();
|
|
|
+ this.getDrawData();
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ toDate(val) {
|
|
|
+ return new Date(val * 1000).toLocaleDateString();
|
|
|
+ },
|
|
|
+ projectLink(i) {
|
|
|
+ const type = i.entity_type;
|
|
|
+ let link = "javascript:void(0);";
|
|
|
+ if (type === "1") link = `/rooter/outsourceitem/${i.entity_id}>`;
|
|
|
+ else if (type === "3") link = `/rooter/wagedetails?job_id=${i.entity_id}`;
|
|
|
+ return link;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 重新支付
|
|
|
+ async rePay(i) {
|
|
|
+ const res = await this.$post("/api/admin/payment/redoSalaryDraw", {
|
|
|
+ id: i.id
|
|
|
+ });
|
|
|
+ if (res) {
|
|
|
+ this.getDrawData();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 确认支付
|
|
|
+ confirmPay(i) {
|
|
|
+ this.rePay(i);
|
|
|
+ },
|
|
|
+ // 页码变动
|
|
|
+ changePagination() {
|
|
|
+ this.getTableData();
|
|
|
+ },
|
|
|
+ // 页码变动
|
|
|
+ changePaginationDraw() {
|
|
|
+ this.getDrawData();
|
|
|
+ },
|
|
|
+ // 格式化列表数据
|
|
|
+ formatTableData(data, rData) {
|
|
|
+ console.log("formatTableData++++++++++++++++");
|
|
|
+ console.log(data);
|
|
|
+ console.log(rData);
|
|
|
+ this.titleInfo = {
|
|
|
+ totalDraw: rData.totalDraw ? rData.totalDraw / 100 : "--",
|
|
|
+ totalWaitDraw: rData.totalWaitDraw ? rData.totalWaitDraw / 100 : "--",
|
|
|
+ totalSuccessPay: rData.totalSuccessPay
|
|
|
+ ? rData.totalSuccessPay / 100
|
|
|
+ : "--"
|
|
|
+ };
|
|
|
+
|
|
|
+ return data.map(i => {
|
|
|
+ let projectName = "--";
|
|
|
+ let prePay = "";
|
|
|
+ let servicePay = "";
|
|
|
+ let getPay = "";
|
|
|
+ let realGet = "";
|
|
|
+ let d = new Date();
|
|
|
+ let payTimeShow = "--";
|
|
|
+ if (i.pay_time > 0) {
|
|
|
+ d.setTime(i.pay_time + "000");
|
|
|
+ payTimeShow = d.toLocaleDateString();
|
|
|
+ }
|
|
|
+ // 3 比较特殊,所以这样写
|
|
|
+ projectName = i.pro_name;
|
|
|
+ prePay = i.origin_price;
|
|
|
+ servicePay = i.person_platform_fee;
|
|
|
+ getPay = i.total_person_tax_fee;
|
|
|
+ realGet = i.developer_fee;
|
|
|
+ return {
|
|
|
+ ...i,
|
|
|
+ projectName,
|
|
|
+ payTypeShow: i.pay_type === "1" ? "首付款" : "解冻款",
|
|
|
+ prePay,
|
|
|
+ servicePay,
|
|
|
+ getPay,
|
|
|
+ realGet,
|
|
|
+ pay_timeShow: payTimeShow
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 点击开发者
|
|
|
+ clickDev(uid) {
|
|
|
+ window.open(
|
|
|
+ this.$store.state.domainConfig.siteUrl + `/rooter/user/${uid}`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 获取列表数据
|
|
|
+ async getTableData() {
|
|
|
+ this.tableData = [];
|
|
|
+ const p = this.currentPage;
|
|
|
+ const res = await this.$post("/api/admin/payment/qingtuanbaoOrders", {
|
|
|
+ p
|
|
|
+ });
|
|
|
+ // console.log(res)
|
|
|
+ const data = res.data;
|
|
|
+ const list = data.list;
|
|
|
+ this.tableData = this.formatTableData(list, data);
|
|
|
+ this.totalCount = Number(data.total);
|
|
|
+ this.totalPage = data.totalPage;
|
|
|
+ },
|
|
|
+ // 获取列表数据
|
|
|
+ async getDrawData() {
|
|
|
+ const p = this.currentDrawPage;
|
|
|
+ const res = await this.$post("/api/admin/payment/listSalaryDraw", {
|
|
|
+ p
|
|
|
+ });
|
|
|
+ console.log("getDrawData+++++++");
|
|
|
+ const data = res.data;
|
|
|
+ this.drawData = data;
|
|
|
+ console.log(this.drawData);
|
|
|
+ this.totalDrawCount = Number(data.total);
|
|
|
+ this.totalDrawPage = data.totalPage;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.table {
|
|
|
+ height: 100%;
|
|
|
+ height: calc(100% - 80px);
|
|
|
+}
|
|
|
+</style>
|