pull/3/head
dwj 7 months ago
parent f603c1038c
commit 685d3ec7f1

@ -1,9 +1,13 @@
<template> 
<template>
<!-- 应用容器 -->
<div class="app-container">
<!-- 筛选搜索区域 -->
<el-card class="filter-container" shadow="never">
<div>
<!-- 搜索图标和文本 -->
<i class="el-icon-search"></i>
<span>筛选搜索</span>
<!-- 查询搜索按钮 -->
<el-button
style="float:right"
type="primary"
@ -11,6 +15,7 @@
size="small">
查询搜索
</el-button>
<!-- 重置按钮 -->
<el-button
style="float:right;margin-right: 15px"
@click="handleResetSearch()"
@ -18,11 +23,14 @@
重置
</el-button>
</div>
<!-- 表单区域用于输入筛选条件 -->
<div style="margin-top: 15px">
<el-form :inline="true" :model="listQuery" size="small" label-width="140px">
<!-- 输入搜索项 -->
<el-form-item label="输入搜索:">
<el-input v-model="listQuery.id" class="input-width" placeholder="服务单号"></el-input>
</el-form-item>
<!-- 处理状态下拉选择 -->
<el-form-item label="处理状态:">
<el-select v-model="listQuery.status" placeholder="全部" clearable class="input-width">
<el-option v-for="item in statusOptions"
@ -32,6 +40,7 @@
</el-option>
</el-select>
</el-form-item>
<!-- 申请时间选择 -->
<el-form-item label="申请时间:">
<el-date-picker
class="input-width"
@ -41,9 +50,11 @@
placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<!-- 操作人员输入 -->
<el-form-item label="操作人员:">
<el-input v-model="listQuery.handleMan" class="input-width" placeholder="全部"></el-input>
</el-form-item>
<!-- 处理时间选择 -->
<el-form-item label="处理时间:">
<el-date-picker
class="input-width"
@ -56,35 +67,46 @@
</el-form>
</div>
</el-card>
<!-- 数据列表操作区域 -->
<el-card class="operate-container" shadow="never">
<i class="el-icon-tickets"></i>
<span>数据列表</span>
</el-card>
<!-- 表格容器 -->
<div class="table-container">
<!-- 表格展示数据列表 -->
<el-table ref="returnApplyTable"
:data="list"
style="width: 100%;"
@selection-change="handleSelectionChange"
v-loading="listLoading" border>
<!-- 选择列 -->
<el-table-column type="selection" width="60" align="center"></el-table-column>
<!-- 服务单号列 -->
<el-table-column label="服务单号" width="180" align="center">
<template slot-scope="scope">{{scope.row.id}}</template>
</el-table-column>
<!-- 申请时间列 -->
<el-table-column label="申请时间" width="180" align="center">
<template slot-scope="scope">{{scope.row.createTime | formatTime}}</template>
</el-table-column>
<!-- 用户账号列 -->
<el-table-column label="用户账号" align="center">
<template slot-scope="scope">{{scope.row.memberUsername}}</template>
</el-table-column>
<!-- 退款金额列 -->
<el-table-column label="退款金额" width="180" align="center">
<template slot-scope="scope">{{scope.row | formatReturnAmount}}</template>
</el-table-column>
<!-- 申请状态列 -->
<el-table-column label="申请状态" width="180" align="center">
<template slot-scope="scope">{{scope.row.status | formatStatus}}</template>
</el-table-column>
<!-- 处理时间列 -->
<el-table-column label="处理时间" width="180" align="center">
<template slot-scope="scope">{{scope.row.handleTime | formatTime}}</template>
</el-table-column>
<!-- 操作列 -->
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button
@ -94,7 +116,9 @@
</el-table-column>
</el-table>
</div>
<!-- 批量操作容器 -->
<div class="batch-operate-container">
<!-- 批量操作下拉选择 -->
<el-select
size="small"
v-model="operateType" placeholder="批量操作">
@ -105,6 +129,7 @@
:value="item.value">
</el-option>
</el-select>
<!-- 批量操作按钮 -->
<el-button
style="margin-left: 20px"
class="search-button"
@ -114,6 +139,7 @@
确定
</el-button>
</div>
<!-- 分页容器 -->
<div class="pagination-container">
<el-pagination
background
@ -128,9 +154,14 @@
</div>
</div>
</template>
<script>
//
import {formatDate} from '@/utils/date';
// API
import {fetchList,deleteApply} from '@/api/returnApply';
//
const defaultListQuery = {
pageNum: 1,
pageSize: 10,
@ -141,6 +172,7 @@
handleMan: null,
handleTime: null
};
//
const defaultStatusOptions=[
{
label: '待处理',
@ -159,6 +191,7 @@
value: 3
}
];
export default {
name:'returnApplyList',
data() {
@ -179,9 +212,11 @@
}
},
created(){
//
this.getList();
},
filters:{
//
formatTime(time) {
if(time==null||time===''){
return 'N/A';
@ -189,6 +224,7 @@
let date = new Date(time);
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
},
//
formatStatus(status){
for(let i=0;i<defaultStatusOptions.length;i++){
if(status===defaultStatusOptions[i].value){
@ -196,24 +232,30 @@
}
}
},
// 退
formatReturnAmount(row){
return row.productRealPrice*row.productCount;
}
},
methods:{
//
handleSelectionChange(val){
this.multipleSelection = val;
},
//
handleResetSearch() {
this.listQuery = Object.assign({}, defaultListQuery);
},
//
handleSearchList() {
this.listQuery.pageNum = 1;
this.getList();
},
//
handleViewDetail(index,row){
this.$router.push({path:'/oms/returnApplyDetail',query:{id:row.id}})
},
//
handleBatchOperate(){
if(this.multipleSelection==null||this.multipleSelection.length<1){
this.$message({
@ -224,7 +266,7 @@
return;
}
if(this.operateType===1){
//
//
this.$confirm('是否要进行删除操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

Loading…
Cancel
Save