|
@@ -7,79 +7,183 @@
|
|
|
class="searchForm"
|
|
|
v-model="searchForm">
|
|
|
<el-form-item>
|
|
|
- <el-select v-model="searchForm.status"
|
|
|
- placeholder="工作类型">
|
|
|
- <el-option label="哈哈哈"
|
|
|
- value="1"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="orderDate"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ @change="searchOrderDate"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button @click="getList" type="danger">搜索</el-button>
|
|
|
+ <el-button @click="onReSet" type="primary">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 列表 -->
|
|
|
<div class="tableWrap">
|
|
|
- <el-table :data='tableList'>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table :data='tableList' :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
+ <el-table-column align='center' prop="createTime"
|
|
|
label="申请时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="orderNo"
|
|
|
label="原订单编号">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="studentPaymentOrder.expectAmount"
|
|
|
label="应付金额">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="studentPaymentOrder.actualAmount"
|
|
|
label="实付金额">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="user.username"
|
|
|
label="学员姓名">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="remark"
|
|
|
label="退费说明">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="expectAmount"
|
|
|
label="预退费金额">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
+ <el-table-column align='center' prop="actualAmount"
|
|
|
label="实退费金额">
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
label="退费状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.status | returnStatus }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
label="操作">
|
|
|
+ <template slot-scope="scope" v-if="scope.row.status == 'ING'">
|
|
|
+ <el-button @click="onBackMoney(scope.row)" type="text">退费</el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination :total="rules.total"
|
|
|
- :page.sync="rules.page"
|
|
|
- :limit.sync="rules.limit"
|
|
|
- :page-sizes="rules.page_size"
|
|
|
+ <pagination :total="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
@pagination="getList" />
|
|
|
</div>
|
|
|
+ <el-dialog title="退费确认" :visible.sync="backStatus" @close="onFormClose('ruleForm')" width="500px">
|
|
|
+ <el-form :model="form" :rules="rules" ref="ruleForm">
|
|
|
+ <el-form-item label="退费路径" prop="name" :label-width="formLabelWidth">
|
|
|
+ <el-input disabled value="余额" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="退费金额" prop="amount" :label-width="formLabelWidth">
|
|
|
+ <el-input v-model.number="form.amount" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="danger" @click="onTeachingSubmit('ruleForm', 'REJECT')">拒绝退费</el-button>
|
|
|
+ <el-button type="primary" @click="onTeachingSubmit('ruleForm', 'PASS')">确认退费</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from '@/components/Pagination/index'
|
|
|
+import { studentRefundsQueryPage, applyRefundAudit } from '@/api/orderManager'
|
|
|
+import store from '@/store'
|
|
|
+import { orderStatus, dealStatus } from '@/utils/searchArray'
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
name: 'income',
|
|
|
data () {
|
|
|
return {
|
|
|
+ orderDate: null,
|
|
|
searchForm: {
|
|
|
- status: ''
|
|
|
+ startTime: null,
|
|
|
+ endTime: null
|
|
|
},
|
|
|
- searchLsit: [],
|
|
|
tableList: [],
|
|
|
- rules: {
|
|
|
+ pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
},
|
|
|
+ backStatus: false,
|
|
|
+ formLabelWidth: '100px',
|
|
|
+ form: {
|
|
|
+ id: null,
|
|
|
+ amount: null,
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ amount: [{ required: true, type: 'number', message: '请输入金额', trigger: 'blur' }],
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- getList () { }
|
|
|
+ onTeachingSubmit(formName, status) { // 添加数据
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.form.status = status
|
|
|
+ applyRefundAudit(this.form).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.backStatus = false
|
|
|
+ this.getList()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getList () {
|
|
|
+ let params = this.searchForm
|
|
|
+ params.rows = this.pageInfo.limit
|
|
|
+ params.page = this.pageInfo.page
|
|
|
+ studentRefundsQueryPage(params).then(res => {
|
|
|
+ let result = res.data
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.tableList = result.rows
|
|
|
+ this.pageInfo.total = result.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ searchOrderDate(value) {
|
|
|
+ if(value) {
|
|
|
+ this.searchForm.startTime = value[0]
|
|
|
+ this.searchForm.endTime = value[1]
|
|
|
+ } else {
|
|
|
+ this.searchForm.startTime = null
|
|
|
+ this.searchForm.endTime = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onReSet() {
|
|
|
+ this.orderDate = null
|
|
|
+ this.searchForm = {
|
|
|
+ startTime: null,
|
|
|
+ endTime: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onFormClose(formName) { // 关闭弹窗重置验证
|
|
|
+ this.$refs[formName].clearValidate()
|
|
|
+ },
|
|
|
+ onBackMoney(row) { // 退费
|
|
|
+ this.backStatus = true
|
|
|
+ this.form = {
|
|
|
+ id: row.id,
|
|
|
+ amount: row.expectAmount
|
|
|
+ }
|
|
|
+ // applyRefundAudit()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|