申请列表完善
This commit is contained in:
parent
eec6a946bd
commit
f8707d0bcf
@ -6,3 +6,11 @@ export function fetchList(params) {
|
|||||||
params:params
|
params:params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function deleteApply(params) {
|
||||||
|
return request({
|
||||||
|
url:'/returnApply/delete',
|
||||||
|
method:'post',
|
||||||
|
params:params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
|
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="listQuery.id" style="width: 203px" placeholder="服务单号"></el-input>
|
<el-input v-model="listQuery.id" class="input-width" placeholder="服务单号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理状态:">
|
<el-form-item label="处理状态:">
|
||||||
<el-select v-model="listQuery.status" placeholder="全部" clearable>
|
<el-select v-model="listQuery.status" placeholder="全部" clearable class="input-width">
|
||||||
<el-option v-for="item in statusOptions"
|
<el-option v-for="item in statusOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
@ -34,6 +34,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="申请时间:">
|
<el-form-item label="申请时间:">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
class="input-width"
|
||||||
v-model="listQuery.createTime"
|
v-model="listQuery.createTime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
@ -41,10 +42,11 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作人员:">
|
<el-form-item label="操作人员:">
|
||||||
<el-input v-model="listQuery.handleMan" style="width: 203px" placeholder="全部"></el-input>
|
<el-input v-model="listQuery.handleMan" class="input-width" placeholder="全部"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理时间:">
|
<el-form-item label="处理时间:">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
class="input-width"
|
||||||
v-model="listQuery.handleTime"
|
v-model="listQuery.handleTime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
@ -75,7 +77,7 @@
|
|||||||
<template slot-scope="scope">{{scope.row.memberUsername}}</template>
|
<template slot-scope="scope">{{scope.row.memberUsername}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退款金额" width="180" align="center">
|
<el-table-column label="退款金额" width="180" align="center">
|
||||||
<template slot-scope="scope">¥{{scope.row.productRealPrice*scope.row.productCount}}</template>
|
<template slot-scope="scope">¥{{scope.row | formatReturnAmount}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请状态" width="180" align="center">
|
<el-table-column label="申请状态" width="180" align="center">
|
||||||
<template slot-scope="scope">{{scope.row.status | formatStatus}}</template>
|
<template slot-scope="scope">{{scope.row.status | formatStatus}}</template>
|
||||||
@ -87,16 +89,48 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleViewOrder(scope.$index, scope.row)">查看详情</el-button>
|
@click="handleViewDetail(scope.$index, scope.row)">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="batch-operate-container">
|
||||||
|
<el-select
|
||||||
|
size="small"
|
||||||
|
v-model="operateType" placeholder="批量操作">
|
||||||
|
<el-option
|
||||||
|
v-for="item in operateOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 20px"
|
||||||
|
class="search-button"
|
||||||
|
@click="handleBatchOperate()"
|
||||||
|
type="primary"
|
||||||
|
size="small">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination
|
||||||
|
background
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
layout="total, sizes,prev, pager, next,jumper"
|
||||||
|
:current-page.sync="listQuery.pageNum"
|
||||||
|
:page-size="listQuery.pageSize"
|
||||||
|
:page-sizes="[5,10,15]"
|
||||||
|
:total="total">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {formatDate} from '@/utils/date';
|
import {formatDate} from '@/utils/date';
|
||||||
import {fetchList} from '@/api/returnApply';
|
import {fetchList,deleteApply} from '@/api/returnApply';
|
||||||
const defaultListQuery = {
|
const defaultListQuery = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -134,7 +168,14 @@
|
|||||||
list:null,
|
list:null,
|
||||||
total:null,
|
total:null,
|
||||||
listLoading:false,
|
listLoading:false,
|
||||||
multipleSelection:[]
|
multipleSelection:[],
|
||||||
|
operateType:1,
|
||||||
|
operateOptions: [
|
||||||
|
{
|
||||||
|
label: "批量删除",
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@ -154,12 +195,64 @@
|
|||||||
return defaultStatusOptions[i].label;
|
return defaultStatusOptions[i].label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
formatReturnAmount(row){
|
||||||
|
return row.productRealPrice*row.productCount;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
handleSelectionChange(val){
|
handleSelectionChange(val){
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val;
|
||||||
},
|
},
|
||||||
|
handleResetSearch() {
|
||||||
|
this.listQuery = Object.assign({}, defaultListQuery);
|
||||||
|
},
|
||||||
|
handleSearchList() {
|
||||||
|
this.listQuery.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleViewDetail(){},
|
||||||
|
handleBatchOperate(){
|
||||||
|
if(this.multipleSelection==null||this.multipleSelection.length<1){
|
||||||
|
this.$message({
|
||||||
|
message: '请选择要操作的申请',
|
||||||
|
type: 'warning',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(this.operateType===1){
|
||||||
|
//批量删除
|
||||||
|
this.$confirm('是否要进行删除操作?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
let params = new URLSearchParams();
|
||||||
|
let ids=[];
|
||||||
|
for(let i=0;i<this.multipleSelection.length;i++){
|
||||||
|
ids.push(this.multipleSelection[i].id);
|
||||||
|
}
|
||||||
|
params.append("ids",ids);
|
||||||
|
deleteApply(params).then(response=>{
|
||||||
|
this.getList();
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功!'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange(val){
|
||||||
|
this.listQuery.pageNum = 1;
|
||||||
|
this.listQuery.pageSize = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val){
|
||||||
|
this.listQuery.pageNum = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
getList(){
|
getList(){
|
||||||
this.listLoading=true;
|
this.listLoading=true;
|
||||||
fetchList(this.listQuery).then(response => {
|
fetchList(this.listQuery).then(response => {
|
||||||
@ -171,6 +264,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style scoped>
|
||||||
|
.input-width {
|
||||||
|
width: 203px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,21 +21,22 @@
|
|||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
|
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="listQuery.orderSn" style="width: 203px" placeholder="订单编号"></el-input>
|
<el-input v-model="listQuery.orderSn" class="input-width" placeholder="订单编号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="收货人:">
|
<el-form-item label="收货人:">
|
||||||
<el-input v-model="listQuery.receiverKeyword" style="width: 203px" placeholder="收货人姓名/手机号码"></el-input>
|
<el-input v-model="listQuery.receiverKeyword" class="input-width" placeholder="收货人姓名/手机号码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交时间:">
|
<el-form-item label="提交时间:">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
class="input-width"
|
||||||
v-model="listQuery.createTime"
|
v-model="listQuery.createTime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择开始时间">
|
placeholder="请选择时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单状态:">
|
<el-form-item label="订单状态:">
|
||||||
<el-select v-model="listQuery.status" placeholder="全部" clearable>
|
<el-select v-model="listQuery.status" class="input-width" placeholder="全部" clearable>
|
||||||
<el-option v-for="item in statusOptions"
|
<el-option v-for="item in statusOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
@ -44,7 +45,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单分类:">
|
<el-form-item label="订单分类:">
|
||||||
<el-select v-model="listQuery.orderType" placeholder="全部" clearable>
|
<el-select v-model="listQuery.orderType" class="input-width" placeholder="全部" clearable>
|
||||||
<el-option v-for="item in orderTypeOptions"
|
<el-option v-for="item in orderTypeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
@ -53,7 +54,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单来源:">
|
<el-form-item label="订单来源:">
|
||||||
<el-select v-model="listQuery.sourceType" placeholder="全部" clearable>
|
<el-select v-model="listQuery.sourceType" class="input-width" placeholder="全部" clearable>
|
||||||
<el-option v-for="item in sourceTypeOptions"
|
<el-option v-for="item in sourceTypeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
@ -446,6 +447,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style scroped>
|
||||||
|
.input-width {
|
||||||
|
width: 203px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user