|
|
@@ -0,0 +1,528 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ <el-radio-group v-model="tab" size="small" @change="getList">
|
|
|
+ <el-radio-button label="service">开发宝服务配置</el-radio-button>
|
|
|
+ <el-radio-button label="salary">开发宝接薪订单</el-radio-button>
|
|
|
+ <el-radio-button label="withdrawal">开发宝提现订单</el-radio-button>
|
|
|
+ <el-radio-button label="verify">发票审核</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="t-content">
|
|
|
+ <template v-if="tab ==='service'">
|
|
|
+ <div class="t-title">
|
|
|
+ <span>基本服务配置</span>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="basicConfigData"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="config_key"
|
|
|
+ label="键"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="description"
|
|
|
+ label="描述"
|
|
|
+ width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-html="scope.row.description?scope.row.description.substring(0,9):''"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="value"
|
|
|
+ label="值">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-html="scope.row.value?scope.row.value.substring(0,20):''"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link icon="el-icon-edit" @click="onBasicEdit(scope.row)">编辑</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <div class="t-title">
|
|
|
+ <span>扣费方式配置 <el-button size="medium" @click="onAddService">添加扣税方式</el-button></span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="serviceData"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="config_key"
|
|
|
+ label="扣税方式"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="status"
|
|
|
+ label="状态"
|
|
|
+ width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.status =='1'">
|
|
|
+ 支持
|
|
|
+ </div>
|
|
|
+ <div v-else>不支持</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="value"
|
|
|
+ label="服务协议">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-html="scope.row.value?scope.row.value.substring(0,20):''"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="original_rate"
|
|
|
+ label="服务商原始费率">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="kaifabao_rate"
|
|
|
+ label="开发宝费率">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link icon="el-icon-edit" @click="onServiceEdit(scope.row)">编辑</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-if="tab ==='salary'">
|
|
|
+ <div class="t-title">
|
|
|
+ <span>选择子账户</span>
|
|
|
+ </div>
|
|
|
+ <div class="account-type">
|
|
|
+ <el-radio-group v-model="accountType" size="small">
|
|
|
+ <el-radio-button label="1">程序员客栈</el-radio-button>
|
|
|
+<!-- <el-radio-button label="2" disabled>阿里妈妈</el-radio-button>-->
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ <div class="t-title">
|
|
|
+ <span>项目结算记录</span>
|
|
|
+ </div>
|
|
|
+ <div class="title">
|
|
|
+ <el-form label-width="180px" label-position="left">
|
|
|
+ <el-form-item label="已结算总金额(税前):">{{serviceCountData.totalSuccessPay}}元</el-form-item>
|
|
|
+ <el-form-item label="已提现总金额(税前):">{{serviceCountData.totalDraw}}元</el-form-item>
|
|
|
+ <el-form-item label="待提现总额(税前):">{{serviceCountData.totalWaitDraw}}元</el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="salaryData"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="pro_name"
|
|
|
+ label="项目名称"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="lblue point" @click="projectLink(scope.row)">{{scope.row.pro_name}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pay_type"
|
|
|
+ label="付款类型"
|
|
|
+ width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.pay_type == '1'">首付款</span>
|
|
|
+ <span v-else>解冻款</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="nickname"
|
|
|
+ label="用户昵称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="lblue point" @click="goRooterUser(scope.row)">{{scope.row.nickname}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="amount"
|
|
|
+ label="结算金额">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pay_time"
|
|
|
+ label="结算时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{formatDate(scope.row.pay_time,'Y-m-d H:i')}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="order_no"
|
|
|
+ label="订单号">
|
|
|
+ <span class="lblue point" slot-scope="scope">
|
|
|
+ <nuxt-link
|
|
|
+ :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
|
|
|
+ >{{scope.row.order_no}}
|
|
|
+ </nuxt-link>
|
|
|
+ </span>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <template v-if="tab ==='withdrawal'">
|
|
|
+ <div class="t-title">
|
|
|
+ <span>选择子账户</span>
|
|
|
+ </div>
|
|
|
+ <div class="account-type">
|
|
|
+ <el-radio-group v-model="accountType" size="small">
|
|
|
+ <el-radio-button label="1">程序员客栈</el-radio-button>
|
|
|
+ <!-- <el-radio-button label="2" disabled>天猫兼职</el-radio-button>-->
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ <div class="t-title">
|
|
|
+ <span>项目结算记录</span>
|
|
|
+ </div>
|
|
|
+ <div class="title">
|
|
|
+ <el-form label-width="250px" label-position="left">
|
|
|
+ <el-form-item label="开发宝账户可用余额:">0元</el-form-item>
|
|
|
+ <el-form-item label="待管理员确认付款金额(税前):">0元</el-form-item>
|
|
|
+ <el-form-item label="开发宝正在支付中金额(税前):">0元</el-form-item>
|
|
|
+ <el-form-item label="用户成功提现金额(税前):">0元</el-form-item>
|
|
|
+ <el-form-item label="用户成功提现金额(税后):">0元</el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="salaryData"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="pro_name"
|
|
|
+ label="项目名称"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="lblue point" @click="projectLink(scope.row)">{{scope.row.pro_name}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pay_type"
|
|
|
+ label="付款类型"
|
|
|
+ width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.pay_type == '1'">首付款</span>
|
|
|
+ <span v-else>解冻款</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="nickname"
|
|
|
+ label="用户昵称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="lblue point" @click="goRooterUser(scope.row)">{{scope.row.nickname}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="amount"
|
|
|
+ label="结算金额">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pay_time"
|
|
|
+ label="结算时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{formatDate(scope.row.pay_time,'Y-m-d H:i')}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="order_no"
|
|
|
+ label="订单号">
|
|
|
+ <span class="lblue point" slot-scope="scope">
|
|
|
+ <nuxt-link
|
|
|
+ :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
|
|
|
+ >{{scope.row.order_no}}
|
|
|
+ </nuxt-link>
|
|
|
+ </span>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <template v-if="tab ==='verify'">
|
|
|
+ verify
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="page" v-if="tab === 'salary' || tab === 'withdrawal'">
|
|
|
+ <el-pagination
|
|
|
+ class="order-footer"
|
|
|
+ background
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :page-size="20"
|
|
|
+ :total="pageInfo.total"
|
|
|
+ @current-change="onPage"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog title="编辑配置" :visible.sync="basicFormVisible" :closeOnClickModal="false" :closeOnPressEscape="false">
|
|
|
+ <div>
|
|
|
+ <quill-editor ref="myTextEditor"
|
|
|
+ v-model="basicForm.content"
|
|
|
+ :config="editorOption"
|
|
|
+ >
|
|
|
+ </quill-editor>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="basicFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="onBasicSave">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="扣税方式" :visible.sync="serviceFormVisible" width="60%" :closeOnClickModal="false"
|
|
|
+ :closeOnPressEscape="false">
|
|
|
+ <el-form :model="serviceForm" :rules="serviceRules" ref="serviceForm" label-width="120px" class="demo-ruleForm">
|
|
|
+ <el-form-item label="扣税方式" prop="config_key">
|
|
|
+ <el-input v-model="serviceForm.config_key"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="服务商原始费率" prop="original_rate">
|
|
|
+ <el-input min="1" max="100" minlength="1" maxlength="100" type="number"
|
|
|
+ v-model="serviceForm.original_rate"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开发宝费率" prop="kaifabao_rate">
|
|
|
+ <el-input type="number" min="1" max="100" minlength="1" maxlength="100"
|
|
|
+ v-model="serviceForm.kaifabao_rate"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="服务协议" prop="content">
|
|
|
+ <quill-editor ref="myTextEditor"
|
|
|
+ v-model="serviceForm.content"
|
|
|
+ :config="editorOption"
|
|
|
+ >
|
|
|
+ </quill-editor>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-radio-group v-model="serviceForm.status">
|
|
|
+ <el-radio :label="1">支持</el-radio>
|
|
|
+ <el-radio :label="0">不支持</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="serviceFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="onServiceSave">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {quillEditor} from 'vue-quill-editor'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "kaifabao",
|
|
|
+ components: {
|
|
|
+ quillEditor
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tab: "service",
|
|
|
+ accountType: '1',
|
|
|
+ editorOption: {
|
|
|
+ theme: 'snow',
|
|
|
+ placeholder: '请输入正文'
|
|
|
+ },
|
|
|
+ pageInfo: {
|
|
|
+ page: 1,
|
|
|
+ size: 20,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ serviceRules: [],
|
|
|
+ basicFormVisible: false,
|
|
|
+ serviceFormVisible: false,
|
|
|
+ basicForm: {id: 0, content: ''},
|
|
|
+ serviceForm: {id: 0, status: 1},
|
|
|
+ basicConfigData: [],
|
|
|
+ serviceData: [], //服务配置
|
|
|
+ salaryData: [], //接薪订单
|
|
|
+ serviceCountData:{}
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getList() {
|
|
|
+ const page = this.pageInfo.page;
|
|
|
+ const size = this.pageInfo.size;
|
|
|
+ const data = {
|
|
|
+ page,
|
|
|
+ size
|
|
|
+ };
|
|
|
+ let res;
|
|
|
+ switch (this.tab) {
|
|
|
+ case "service":
|
|
|
+ res = await this.$post("/api/admin/kaifabao/getConfigList");
|
|
|
+ this.serviceData = res.data.buckleList || [];
|
|
|
+ this.basicConfigData = res.data.basicList || [];
|
|
|
+ break;
|
|
|
+ case "salary":
|
|
|
+ res = await this.$post("/api/admin/kaifabao/getKaifabaoOrderList", data);
|
|
|
+ this.salaryData = res.data.list || [];
|
|
|
+ this.serviceCountData.totalDraw = res.data.totalDraw || 0;
|
|
|
+ this.serviceCountData.totalWaitDraw = res.data.totalWaitDraw || 0;
|
|
|
+ this.serviceCountData.totalSuccessPay = res.data.totalSuccessPay || 0;
|
|
|
+ this.pageInfo.page = res.data.page * 1;
|
|
|
+ this.pageInfo.total = res.data.total * 1;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onAddService() {
|
|
|
+ this.serviceFormVisible = true;
|
|
|
+ },
|
|
|
+ onServiceEdit(row) {
|
|
|
+ this.serviceForm = row;
|
|
|
+ this.serviceForm.content = row.value;
|
|
|
+ this.serviceForm.status = row.status * 1;
|
|
|
+ this.serviceFormVisible = true;
|
|
|
+ },
|
|
|
+ async onServiceSave() {
|
|
|
+ let data = this.serviceForm;
|
|
|
+ let res = await this.$post("/api/admin/kaifabao/saveBuckleConfig", data);
|
|
|
+ if (res && res.status === 1) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.clear();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onBasicEdit(row) {
|
|
|
+ this.basicForm.id = row.id;
|
|
|
+ this.basicForm.content = row.value;
|
|
|
+ this.basicFormVisible = true;
|
|
|
+ },
|
|
|
+ async onBasicSave() {
|
|
|
+ let data = this.basicForm;
|
|
|
+ let res = await this.$post("/api/admin/kaifabao/editBasicConfig", data);
|
|
|
+ if (res && res.status === 1) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.clear();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onPage(val) {
|
|
|
+ this.pageInfo.page = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ clear() {
|
|
|
+ this.basicFormVisible = false;
|
|
|
+ this.serviceFormVisible = false;
|
|
|
+ this.serviceForm = {id: 0, status: 1};
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ goTopic(topic) {
|
|
|
+ console.log(topic);
|
|
|
+ window.open(
|
|
|
+ this.$store.state.domainConfig.jishuinUrl + "/p/" + topic.id + ".html"
|
|
|
+ );
|
|
|
+ },
|
|
|
+ goRooterUser(row) {
|
|
|
+ window.open(
|
|
|
+ this.$store.state.domainConfig.siteUrl + "/rooter/user/" + row.uid
|
|
|
+ );
|
|
|
+ },
|
|
|
+ projectLink(row) {
|
|
|
+ const type = row.entity_type;
|
|
|
+ if (type === "1") {
|
|
|
+ window.open(
|
|
|
+ this.$store.state.domainConfig.siteUrl +
|
|
|
+ `/rooter/outsourceitem/${row.entity_id}>`
|
|
|
+ );
|
|
|
+ } else if (type === "3") {
|
|
|
+ window.open(
|
|
|
+ this.$store.state.domainConfig.siteUrl +
|
|
|
+ `/rooter/wagedetails?job_id=${row.entity_id}`
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ formatDate(time, format = '') {
|
|
|
+ if (time === "0") {
|
|
|
+ return "--";
|
|
|
+ }
|
|
|
+ let now = new Date(time * 1000);
|
|
|
+ let year = now.getFullYear();
|
|
|
+ let month = now.getMonth() + 1;
|
|
|
+ let date = now.getDate();
|
|
|
+ let hour = now.getHours();
|
|
|
+ let minute = now.getMinutes();
|
|
|
+ let second = now.getSeconds();
|
|
|
+ if (hour < 10) {
|
|
|
+ hour = "0" + hour;
|
|
|
+ }
|
|
|
+ if (minute < 10) {
|
|
|
+ minute = "0" + minute;
|
|
|
+ }
|
|
|
+ if (second < 10) {
|
|
|
+ second = "0" + second;
|
|
|
+ }
|
|
|
+ return (format == '' ?
|
|
|
+ year +
|
|
|
+ "-" +
|
|
|
+ month +
|
|
|
+ "-" +
|
|
|
+ date +
|
|
|
+ " " +
|
|
|
+ hour +
|
|
|
+ ":" +
|
|
|
+ minute +
|
|
|
+ ":" +
|
|
|
+ second
|
|
|
+ :
|
|
|
+ year +
|
|
|
+ "-" +
|
|
|
+ month +
|
|
|
+ "-" +
|
|
|
+ date +
|
|
|
+ " " +
|
|
|
+ hour +
|
|
|
+ ":" +
|
|
|
+ minute
|
|
|
+ );
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+ .t-content {
|
|
|
+ width: 98%;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .t-title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 500;
|
|
|
+ margin: 10px 0 5px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .account-type {
|
|
|
+ margin: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .page {
|
|
|
+ margin: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form-item{
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .edit_container {
|
|
|
+ font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
|
|
+ -webkit-font-smoothing: antialiased;
|
|
|
+ -moz-osx-font-smoothing: grayscale;
|
|
|
+ text-align: center;
|
|
|
+ color: #2c3e50;
|
|
|
+ margin-top: 60px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ql-editor {
|
|
|
+ height: 200px;
|
|
|
+ }
|
|
|
+</style>
|