|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
- <div id="cloud-balance">
|
|
|
+ <div id="cloud-balance" v-if="tableData">
|
|
|
<section class="top">
|
|
|
<!-- <h3>交易订单中心</h3> -->
|
|
|
<section>
|
|
|
<div class="type-boxs">
|
|
|
<div>
|
|
|
- <span class="marginr30">待解冻金额:880.00</span>
|
|
|
- <span class="marginr30">冻结订单数:888</span>
|
|
|
- <span class="marginr30">待解冻订单数:10</span>
|
|
|
+ <span class="marginr30">待解冻金额:{{totalCoins}}</span>
|
|
|
+ <span class="marginr30">冻结订单数:{{totalCount}}</span>
|
|
|
+ <span class="marginr30">待解冻订单数:{{count}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="type-boxs">
|
|
|
@@ -79,7 +79,7 @@
|
|
|
</section>-->
|
|
|
<div class>
|
|
|
<!-- height="250" -->
|
|
|
- <el-table :data="tableData3" border style="width: 100%">
|
|
|
+ <el-table :data="tableData" border style="width: 100%">
|
|
|
<el-table-column label="项目名称">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- @click="clickDev(scope.row.uid)" -->
|
|
|
@@ -88,18 +88,67 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="用户"></el-table-column>
|
|
|
+ <el-table-column prop="name" label="用户">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ <nuxt-link :to="{path:'/main/orders_detail?id='+111}">{{scope.row.nickname}}({{scope.row.uid}})</nuxt-link>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column label="实际金额">
|
|
|
<template slot-scope="scope">
|
|
|
<span :class="parseInt(scope.row.money)>0?'green':'orange'">{{scope.row.money}}</span>
|
|
|
</template>
|
|
|
</el-table-column>-->
|
|
|
- <el-table-column prop="name" label="关联订单ID"></el-table-column>
|
|
|
- <el-table-column prop="name" label="类型"></el-table-column>
|
|
|
- <el-table-column prop="name" label="冻结金额"></el-table-column>
|
|
|
- <el-table-column prop="name" label="冻结方式"></el-table-column>
|
|
|
- <el-table-column prop="name" label="创建日期"></el-table-column>
|
|
|
- <el-table-column prop="name" label="解冻日期"></el-table-column>
|
|
|
+ <el-table-column prop="name" label="关联订单ID">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ <nuxt-link :to="{path:'/main/orders_detail?id='+111}">{{scope.row.order_no}}</nuxt-link>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ {{scope.row.target_type_name}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="冻结金额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ {{scope.row.coins}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="冻结方式">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ {{scope.row.target_type_name}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="创建日期">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ {{scope.row.create_time}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="解冻日期">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ {{scope.row.end_time}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column prop="name" width="100" label="订单类型">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.state==1" class="state-success state-border">成功</span>
|
|
|
@@ -108,7 +157,14 @@
|
|
|
<span v-if="scope.row.state==4" class="state-faile state-border">失败</span>
|
|
|
</template>
|
|
|
</el-table-column>-->
|
|
|
- <el-table-column prop="name" label="当前状态"></el-table-column>
|
|
|
+ <el-table-column prop="name" label="当前状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- @click="clickDev(scope.row.uid)" -->
|
|
|
+ <span class="lblue point">
|
|
|
+ {{scope.row.status_name}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="order-footer">
|
|
|
@@ -127,69 +183,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-const tableHeaders = [
|
|
|
- "项目ID",
|
|
|
- "核定价格",
|
|
|
- "托管费用",
|
|
|
- "押金",
|
|
|
- "次月托管",
|
|
|
- "结算周期",
|
|
|
- "结算金额",
|
|
|
- "退回金额",
|
|
|
- "预计发薪",
|
|
|
- "发薪日期",
|
|
|
- "状态",
|
|
|
- "负责人",
|
|
|
- "操作",
|
|
|
- "备注",
|
|
|
- "项目状态",
|
|
|
- "账单ID",
|
|
|
- "企业方",
|
|
|
- "开发者",
|
|
|
- "试用天数"
|
|
|
-];
|
|
|
-const tableProps = [
|
|
|
- "job_id",
|
|
|
- "salary",
|
|
|
- "company_pay",
|
|
|
- "p_company_deposit",
|
|
|
- "next_period_pay",
|
|
|
- "payAround",
|
|
|
- "pay_to_dev",
|
|
|
- "return_money",
|
|
|
- "pre_send_salary_timeShow", //
|
|
|
- "send_salary_time",
|
|
|
- "p_status_name",
|
|
|
- "chk_user",
|
|
|
- "operate",
|
|
|
- "settle_msg",
|
|
|
- "j_status_name",
|
|
|
- "id",
|
|
|
- "company",
|
|
|
- "dev_realname",
|
|
|
- "probation_days"
|
|
|
-];
|
|
|
-const tableWidths = [
|
|
|
- "80",
|
|
|
- "80",
|
|
|
- "100",
|
|
|
- "80",
|
|
|
- "100",
|
|
|
- "120",
|
|
|
- "80",
|
|
|
- "80",
|
|
|
- "90",
|
|
|
- "80",
|
|
|
- "80",
|
|
|
- "100",
|
|
|
- "80",
|
|
|
- "180",
|
|
|
- "80",
|
|
|
- "80",
|
|
|
- "100",
|
|
|
- "100",
|
|
|
- "80"
|
|
|
-];
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -271,129 +264,10 @@ export default {
|
|
|
type: "购买"
|
|
|
}
|
|
|
],
|
|
|
- pickerOptions2: {
|
|
|
- shortcuts: [
|
|
|
- {
|
|
|
- text: "全部",
|
|
|
- onClick(picker) {
|
|
|
- picker.$emit("pick", []);
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: "最近7天",
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: "最近30天",
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: "本周",
|
|
|
- onClick(picker) {
|
|
|
- var week = new Date().getDay() - 1;
|
|
|
- console.log(week);
|
|
|
- if (week == -1) {
|
|
|
- week = 6;
|
|
|
- }
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * week);
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: "本月",
|
|
|
- onClick(picker) {
|
|
|
- var month = new Date().getMonth + 1;
|
|
|
- var year = new Date().getFullYear();
|
|
|
- // console.log(month, year);
|
|
|
- var day = new Date().getDate() - 1;
|
|
|
- console.log(day);
|
|
|
-
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * day);
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: "本年",
|
|
|
- onClick(picker) {
|
|
|
- var month = new Date().getMonth + 1;
|
|
|
- var year = new Date().getFullYear();
|
|
|
- // console.log(month, year);
|
|
|
- var day = new Date().getDate() - 1;
|
|
|
- var firstDay = new Date(year, 0, 1);
|
|
|
- var dateDiff = new Date() - firstDay;
|
|
|
- var msPerDay = 1000 * 60 * 60 * 24;
|
|
|
- //计算天数
|
|
|
- var diffDays = Math.ceil(dateDiff / msPerDay) - 1;
|
|
|
- console.log(diffDays);
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * diffDays);
|
|
|
- picker.$emit("pick", [start, end]);
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
timeRange: "",
|
|
|
arriveTime: "",
|
|
|
searchId: "",
|
|
|
- tableData3: [
|
|
|
- {
|
|
|
- date: "2016-05-03",
|
|
|
- name: "王小虎",
|
|
|
- money: "200",
|
|
|
- state: 1
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-02",
|
|
|
- name: "王小虎",
|
|
|
- money: "-100",
|
|
|
- state: 2
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-04",
|
|
|
- name: "王小虎",
|
|
|
- money: "-100",
|
|
|
- state: 3
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-01",
|
|
|
- name: "王小虎",
|
|
|
- money: "-100",
|
|
|
- state: 4
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-08",
|
|
|
- name: "王小虎",
|
|
|
- money: "2100",
|
|
|
- state: 1
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-06",
|
|
|
- name: "王小虎",
|
|
|
- money: "-1200",
|
|
|
- state: 4
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-07",
|
|
|
- name: "王小虎",
|
|
|
- money: "-100",
|
|
|
- state: 1
|
|
|
- }
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
|
|
|
// 下发的总数据
|
|
|
totalData: {},
|
|
|
@@ -412,14 +286,7 @@ export default {
|
|
|
totalCount: 0,
|
|
|
currentPage: 1,
|
|
|
currentPageSize: 20,
|
|
|
- // 列表宽度
|
|
|
- tableWidths,
|
|
|
- // 列表头显示内容
|
|
|
- tableHeaders,
|
|
|
- // 列表头字段
|
|
|
- tableProps,
|
|
|
// 列表数据
|
|
|
- tableData: [],
|
|
|
localData: {
|
|
|
env: "test"
|
|
|
}
|
|
|
@@ -441,95 +308,15 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getTableData();
|
|
|
- this.getEnum();
|
|
|
},
|
|
|
methods: {
|
|
|
// 改变订单类型
|
|
|
- changeOrder() {
|
|
|
- var haveAll = false;
|
|
|
- for (var i = 0; i < this.orderType.length; i++) {
|
|
|
- if (this.orderType[i] == 0) {
|
|
|
- haveAll = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 选择其他的时候,去掉全部,全部在第一位
|
|
|
- if (
|
|
|
- this.orderType[0] == 0 &&
|
|
|
- 1 < this.orderType.length < this.TypeList.length
|
|
|
- ) {
|
|
|
- var arr = [];
|
|
|
- for (var i = 0; i < this.orderType.length; i++) {
|
|
|
- if (this.orderType[i] != 0) {
|
|
|
- arr.push(this.orderType[i]);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- this.orderType = arr;
|
|
|
- }
|
|
|
- // 选择全部的时候去掉其他,全部在最后一位
|
|
|
- if (this.orderType[this.orderType.length - 1] == 0) {
|
|
|
- this.orderType = [0];
|
|
|
- }
|
|
|
- if (!haveAll && this.orderType.length == this.TypeList.length - 1) {
|
|
|
- this.orderType = [0];
|
|
|
- }
|
|
|
- if (this.orderType.length == 0) {
|
|
|
- console.log("sss:", this.orderType);
|
|
|
- this.orderType = [0];
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 改变支付方式
|
|
|
- changePay() {
|
|
|
- var haveAll = false;
|
|
|
- for (var i = 0; i < this.payType.length; i++) {
|
|
|
- if (this.payType[i] == 0) {
|
|
|
- haveAll = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 选择其他的时候,去掉全部,全部在第一位
|
|
|
- if (
|
|
|
- this.payType[0] == 0 &&
|
|
|
- 1 < this.payType.length < this.payList.length
|
|
|
- ) {
|
|
|
- var arr = [];
|
|
|
- for (var i = 0; i < this.payType.length; i++) {
|
|
|
- if (this.payType[i] != 0) {
|
|
|
- arr.push(this.payType[i]);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- this.payType = arr;
|
|
|
- }
|
|
|
- // 选择全部的时候去掉其他,全部在最后一位
|
|
|
- if (this.payType[this.payType.length - 1] == 0) {
|
|
|
- this.payType = [0];
|
|
|
- }
|
|
|
- if (!haveAll && this.payType.length == this.payList.length - 1) {
|
|
|
- this.payType = [0];
|
|
|
- }
|
|
|
- if (this.payType.length == 0) {
|
|
|
- console.log("sss:", this.orderType);
|
|
|
- this.payType = [0];
|
|
|
- }
|
|
|
- },
|
|
|
clickExport() {
|
|
|
window.open("/api/admin/job/get_all_periods?action=export");
|
|
|
},
|
|
|
/**
|
|
|
* 获取筛选值
|
|
|
*/
|
|
|
- async getEnum() {
|
|
|
- let { data } = await this.$get("/api/admin/job/getEnum");
|
|
|
- console.log(data);
|
|
|
- if (data) {
|
|
|
- let { jobStatusList, periodStatusList } = data;
|
|
|
- this.jobStatusList = jobStatusList;
|
|
|
- this.periodStatusList = periodStatusList;
|
|
|
- }
|
|
|
- },
|
|
|
// 点击操作
|
|
|
clickOperate({ job_id, id }) {
|
|
|
if (this.isTest)
|
|
|
@@ -552,49 +339,7 @@ export default {
|
|
|
`https://rooter.proginn.com/main/wage_details?job_id=${i.job_id}&period_id=${i.id}`
|
|
|
);
|
|
|
},
|
|
|
- // 点击开发者
|
|
|
- clickDev(uid) {
|
|
|
- if (this.isTest)
|
|
|
- window.open(`https://dev.test.proginn.com/rooter/user/${uid}`);
|
|
|
- else window.open(`https://www.proginn.com/rooter/user/${uid}`);
|
|
|
- },
|
|
|
- // 点击企业
|
|
|
- clickCompany(uid) {
|
|
|
- if (this.isTest)
|
|
|
- window.open(`https://dev.test.proginn.com/rooter/user/${uid}`);
|
|
|
- else window.open(`https://www.proginn.com/rooter/user/${uid}`);
|
|
|
- },
|
|
|
- // 点击账单id
|
|
|
- clickJobID(jobID) {
|
|
|
- if (this.isTest)
|
|
|
- window.open(
|
|
|
- `https://dev.test.proginn.com/rooter/cloudjobitem/${jobID}`
|
|
|
- );
|
|
|
- else window.open(`https://www.proginn.com/rooter/cloudjobitem/${jobID}`);
|
|
|
- },
|
|
|
- // 点击重试
|
|
|
- async clickRetry(id) {
|
|
|
- const res = await this.$post("/api/admin/payment/redoDraw", { id });
|
|
|
- // console.log(res)
|
|
|
- },
|
|
|
- // 根据状态显示图表样式
|
|
|
- tableRowClassName({ row, rowIndex }) {
|
|
|
- // console.log({row, rowIndex})
|
|
|
- let className = "";
|
|
|
- if (row.j_status_name === "结束合作") className = "end-row";
|
|
|
- // console.log(className)
|
|
|
- return className;
|
|
|
- },
|
|
|
- // 格式化列表数据
|
|
|
- formatTableData(data) {
|
|
|
- return data.map(i => ({
|
|
|
- ...i,
|
|
|
- payAround: `${i.start_time}<br>${i.end_time}`,
|
|
|
- pre_send_salary_timeShow: new Date(
|
|
|
- i.pre_send_salary_time * 1000
|
|
|
- ).toLocaleDateString()
|
|
|
- }));
|
|
|
- },
|
|
|
+
|
|
|
/**
|
|
|
* 点击筛选确认
|
|
|
*/
|
|
|
@@ -609,31 +354,18 @@ export default {
|
|
|
// 获取列表数据
|
|
|
async getTableData() {
|
|
|
this.tableData = [];
|
|
|
- let url = "/api/admin/job/get_all_periods";
|
|
|
- let body = { page: this.currentPage, page_size: this.currentPageSize };
|
|
|
+ let url = "/api/admin/order/get_frozen_coins";
|
|
|
+ let body = { page: this.currentPage, size: this.currentPageSize };
|
|
|
if (this.status) body.j_status = this.status;
|
|
|
if (this.period) body.p_status = this.period;
|
|
|
if (this.checkUser) body.chk_user = this.checkUser;
|
|
|
if (this.jobID) body.job_id = this.jobID;
|
|
|
const res = await this.$post(url, body);
|
|
|
- const data = res.data;
|
|
|
- this.tableData = this.formatTableData(data.list);
|
|
|
- this.totalData = data;
|
|
|
- // // console.log(this.tableData)
|
|
|
- this.totalCount = Number(data.total);
|
|
|
- this.totalPage = data.totalPage;
|
|
|
- this.localData.env = data.current_env;
|
|
|
+ this.tableData = res.data.list;
|
|
|
+ this.totalCoins=res.data.total_coins;
|
|
|
+ this.totalCount=res.data.total_count;
|
|
|
+ this.count=res.data.count;
|
|
|
},
|
|
|
- async getFinanceList() {
|
|
|
- let body = {
|
|
|
- page: this.currentPage,
|
|
|
- page_size: this.currentPageSize,
|
|
|
- artificial_mark: 1
|
|
|
- };
|
|
|
- const res = await this.$post("/api/admin/order/get_orders", body);
|
|
|
- var data = res.data;
|
|
|
- env = data.current_env;
|
|
|
- }
|
|
|
},
|
|
|
created() {
|
|
|
// console.log(process.env.NODE_ENV);
|