|
|
@@ -33,34 +33,16 @@
|
|
|
</el-form>
|
|
|
<el-table :data="list" height='55vh' style="width: 100%;margin-top:10px;" v-loading='loading'>
|
|
|
<el-table-column prop="user_name" label="选手名称"/>
|
|
|
- <el-table-column prop="user_phone" label="手机号"/>
|
|
|
- <el-table-column prop="match_name" label="报名赛事"/>
|
|
|
- <el-table-column prop="signup_type" label="报名类型">
|
|
|
+ <el-table-column prop="content" label="咨询内容"/>
|
|
|
+ <el-table-column prop="reply_content" label="回复内容">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.signup_type==2" style="color:red;">选手</span>
|
|
|
- <span v-else>游客</span>
|
|
|
+ <p v-for="item,index in scope.row.reply_list" :key="index">{{item.reply_content}}</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="total_fee" label="报名费用"/>
|
|
|
- <el-table-column prop="order_status" label="订单状态" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <!-- <span v-if="scope.row.order_status==1" style="color:#67c23a;">已支付</span> -->
|
|
|
- <el-button v-if="scope.row.order_status==1" type="success" size="mini">已支付</el-button>
|
|
|
- <span v-else>未支付</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="pay_status" label="支付状态" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <!-- <span v-if="scope.row.pay_status==1" class="color:green;">已支付</span> -->
|
|
|
- <el-button v-if="scope.row.order_status==1" type="success" size="mini">已支付</el-button>
|
|
|
- <span v-else>未支付</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="pay_time" label="支付时间" width="160" show-overflow-tooltip />
|
|
|
- <el-table-column prop="ctime" label="下单时间" width="160"/>
|
|
|
+ <el-table-column prop="ctime" label="咨询时间" width="160"/>
|
|
|
<el-table-column prop="date" label="操作" fixed="right" width="220">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button>
|
|
|
+ <el-button @click="edit(scope.row.id)" size="mini" type="primary">回复</el-button>
|
|
|
<el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -74,75 +56,13 @@
|
|
|
/>
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="赛事名称" prop="match_id">
|
|
|
- <el-select v-model="form.match_id" placeholder="请选择比赛">
|
|
|
- <el-option v-for="item in matchList" :key='item.id' :label="item.name" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="参赛选手" prop="player_id">
|
|
|
- <el-select filterable v-model="form.player_id" placeholder="请选择用户代码">
|
|
|
- <el-option v-for="item in playerList" :key='item.id' :label="item.label" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="持仓日期" prop="stock_date">
|
|
|
- <el-date-picker
|
|
|
- v-model="form.stock_date"
|
|
|
- type="date" style="width:100%"
|
|
|
- placeholder="选择日期"
|
|
|
- format="yyyy-MM-dd"
|
|
|
- value-format="yyyy-MM-dd">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="今日资产" prop="today_fund">
|
|
|
- <el-input clearable v-model="form.today_fund" placeholder="请输入今日资产" type="number">
|
|
|
- <template slot="append">万元</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item v-if="form.id" label="昨日资产" prop="yesterday_fund">
|
|
|
- <el-input clearable v-model="form.yesterday_fund" placeholder="请输入昨日资产" type="number">
|
|
|
- <template slot="append">万元</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item v-if="form.id" label="初始资产" prop="init_fund">
|
|
|
- <el-input clearable v-model="form.init_fund" placeholder="请输入初始资产" type="number">
|
|
|
- <template slot="append">万元</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开超市" prop="is_markt">
|
|
|
- <el-switch
|
|
|
- v-model="form.is_markt">
|
|
|
- </el-switch>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="股票名称" prop="today_stock">
|
|
|
- <div v-for="(item,index) in form.today_stock" :key='index' style="margin-bottom:5px;">
|
|
|
- <!-- <el-select filterable v-model="item.name" placeholder="请选择股票" style="width:48%;display:inline-block">
|
|
|
- <el-option v-for="item in stockList" :key='item.id' :label="item.label" :value="item.label"></el-option>
|
|
|
- </el-select> -->
|
|
|
- <el-input style="width:48%;display:inline-block" v-model="item.name" placeholder="请输入股票名称" :disabled="form.is_markt==true"></el-input>
|
|
|
- <el-input style="width:39%" clearable v-model="item.fund" placeholder="资金" :disabled="form.is_markt==true">
|
|
|
- <template slot="append">万元</template>
|
|
|
- </el-input>
|
|
|
- <i @click="form.today_stock.splice(index,1)" style="margin-top:5px;" class="el-icon-circle-close del"></i>
|
|
|
- </div>
|
|
|
- <el-button @click="addCode" type="primary" size="small" plain>新增股票</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="股票截图" prop="today_stock_img">
|
|
|
- <div class="imgs" v-for="(item,index) in form.today_stock_img" :key='index'>
|
|
|
- <img width="150" :src="item" alt="">
|
|
|
- <i @click="form.today_stock_img.splice(index,1)" class="el-icon-circle-close del"></i>
|
|
|
- </div>
|
|
|
- <el-upload
|
|
|
- class="upload-demo"
|
|
|
- :show-file-list ='false'
|
|
|
- :on-success="handleSuccess"
|
|
|
- action="/api/admin/uploadfile">
|
|
|
- <el-button size="small" type="primary" plain>上传股票截图</el-button>
|
|
|
- </el-upload>
|
|
|
+ <el-form-item label="回复内容" prop="reply_content">
|
|
|
+ <el-input v-model="form.reply_content" placeholder="" type="textarea" rows="10"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
- <el-button @click="open=false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm" size="mini">确 定</el-button>
|
|
|
+ <el-button @click="open=false" size="mini">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 点评 -->
|
|
|
@@ -263,7 +183,7 @@ export default {
|
|
|
this.$confirm("确定删除吗?", "提示", {
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
- this.$api.delRecord({ id: id }).then((res) => {
|
|
|
+ this.$api.delConsult({ id: id }).then((res) => {
|
|
|
this.$message({
|
|
|
message: "删除成功",
|
|
|
type: "success",
|
|
|
@@ -281,15 +201,15 @@ export default {
|
|
|
},
|
|
|
getData(){
|
|
|
this.loading = true;
|
|
|
- this.$api.getSignupList(this.queryParams).then(res=>{
|
|
|
+ this.$api.getWanzhuConsultList(this.queryParams).then(res=>{
|
|
|
this.list=res.data.data.list
|
|
|
this.total = res.data.data.total;
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
edit(id){
|
|
|
- this.title = "编辑数据"
|
|
|
- this.$api.getRecordInfo({id:id}).then(res=>{
|
|
|
+ this.title = "回复"
|
|
|
+ this.$api.getWanzhuConsultDetail({id:id}).then(res=>{
|
|
|
this.form = res.data.data
|
|
|
this.open = true
|
|
|
})
|
|
|
@@ -334,17 +254,8 @@ export default {
|
|
|
console.log(this.form)
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- // if(this.form.today_stock.length<=0){
|
|
|
- // this.msgError('请添加股票');
|
|
|
- // return
|
|
|
- // }else{
|
|
|
- // if((!this.form.today_stock[0].name || !this.form.today_stock[0].fund) && !this.form.is_markt){
|
|
|
- // this.msgError('请选择股票并输入资金额');
|
|
|
- // return
|
|
|
- // }
|
|
|
- // }
|
|
|
- if (this.form.id != null) {
|
|
|
- this.$api.editRecord(this.form).then(response => {
|
|
|
+ this.form.pid = this.form.id;
|
|
|
+ this.$api.replyConsult(this.form).then(response => {
|
|
|
if(response.data.code != 0){
|
|
|
this.msgError(response.data.message);
|
|
|
return
|
|
|
@@ -353,17 +264,6 @@ export default {
|
|
|
this.open = false;
|
|
|
this.getData();
|
|
|
});
|
|
|
- } else {
|
|
|
- this.$api.addRecord(this.form).then(response => {
|
|
|
- if(response.data.code != 0){
|
|
|
- this.msgError(response.data.message);
|
|
|
- return
|
|
|
- }
|
|
|
- this.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getData();
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
},
|