You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
480 lines
17 KiB
480 lines
17 KiB
<template>
|
|
<div class="app-container">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
<el-form-item label="订单号" prop="otcOrderNo">
|
|
<el-input
|
|
v-model="queryParams.otcOrderNo"
|
|
placeholder="请输入订单号"
|
|
clearable
|
|
size="small"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="申诉状态" prop="appealStatus">
|
|
<el-select v-model="queryParams.appealStatus" placeholder="请选择申诉状态" clearable size="small">
|
|
<el-option
|
|
v-for="dict in appealStatusOptions"
|
|
:key="dict.dictValue"
|
|
:label="dict.dictLabel"
|
|
:value="dict.dictValue"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="申诉终端" prop="terminalSource">
|
|
<el-input
|
|
v-model="queryParams.terminalSource"
|
|
placeholder="请输入申诉终端"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
icon="el-icon-plus"
|
|
size="mini"
|
|
@click="handleAdd"
|
|
v-hasPermi="['otc:otcAppealOrder:add']"
|
|
>新增</el-button>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="success"
|
|
plain
|
|
icon="el-icon-edit"
|
|
size="mini"
|
|
:disabled="single"
|
|
@click="handleUpdate"
|
|
v-hasPermi="['otc:otcAppealOrder:edit']"
|
|
>修改</el-button>
|
|
</el-col>
|
|
<!-- <el-col :span="1.5">-->
|
|
<!-- <el-button-->
|
|
<!-- type="danger"-->
|
|
<!-- plain-->
|
|
<!-- icon="el-icon-delete"-->
|
|
<!-- size="mini"-->
|
|
<!-- :disabled="multiple"-->
|
|
<!-- @click="handleDelete"-->
|
|
<!-- v-hasPermi="['otc:otcAppealOrder:remove']"-->
|
|
<!-- >删除</el-button>-->
|
|
<!-- </el-col>-->
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="warning"
|
|
plain
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
@click="handleExport"
|
|
v-hasPermi="['otc:otcAppealOrder:export']"
|
|
>导出</el-button>
|
|
</el-col>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
|
|
<el-table v-loading="loading" :data="otcAppealOrderList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column label="主键" align="center" prop="id" />
|
|
<el-table-column label="订单编号" align="center" prop="otcOrderId" />
|
|
<el-table-column label="订单号" align="center" prop="otcOrderNo" />
|
|
<el-table-column label="本申诉订单号" align="center" prop="otcAppealNo" />
|
|
<el-table-column label="申诉备注" align="center" prop="appealRemark" />
|
|
<!-- <el-table-column label="申诉图片" align="center" prop="appealImgUrl" >-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <el-image v-if="scope.row.appealImgUrl!=null && scope.row.appealImgUrl!=''"-->
|
|
<!-- style="width: 120px; height: 120px"-->
|
|
<!-- :src="scope.row.appealImgUrl"-->
|
|
<!-- @click="previewImage(scope.row.appealImgUrl)"-->
|
|
<!-- :preview-src-list="srcList"-->
|
|
<!-- ></el-image>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<el-table-column label="申诉状态" align="center" prop="appealStatus" :formatter="appealStatusFormat" />
|
|
<el-table-column label="申诉终端" align="center" prop="terminalSource" :formatter="terminalSourceFormat" />
|
|
<el-table-column label="申诉方用户" align="center" prop="appealUserName" />
|
|
<el-table-column label="被申诉方用户" align="center" prop="beAppealUserName" />
|
|
<el-table-column label="审核描述" align="center" prop="appealDesc" />
|
|
<el-table-column label="添加时间" align="center" prop="crateTime" width="180">
|
|
<template slot-scope="scope">
|
|
<span>{{parseTime(scope.row.createTime) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button v-if="scope.row.appealImgUrl!=''"
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
v-hasPermi="['otc:otcAppealOrder:edit']"
|
|
>查询图片</el-button>
|
|
<el-button v-if="scope.row.appealStatus=='in_appeal'"
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleApple(scope.row)"
|
|
v-hasPermi="['otc:otcAppealOrder:edit']"
|
|
>审核处理</el-button>
|
|
<!-- <el-button-->
|
|
<!-- size="mini"-->
|
|
<!-- type="text"-->
|
|
<!-- icon="el-icon-delete"-->
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
<!-- v-hasPermi="['otc:otcAppealOrder:remove']"-->
|
|
<!-- >删除</el-button>-->
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<pagination
|
|
v-show="total>0"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
/>
|
|
|
|
<!-- 添加或修改OTC申诉订单对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
<!-- <el-form-item label="订单编号" prop="otcOrderId">-->
|
|
<!-- <el-input v-model="form.otcOrderId" placeholder="请输入订单编号" />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="订单号" prop="otcOrderNo">-->
|
|
<!-- <el-input v-model="form.otcOrderNo" placeholder="请输入订单号" />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="本申诉订单号" prop="otcAppealNo">-->
|
|
<!-- <el-input v-model="form.otcAppealNo" placeholder="请输入本申诉订单号" />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="申诉备注" prop="appealRemark">-->
|
|
<!-- <el-input v-model="form.appealRemark" type="textarea" placeholder="请输入内容" />-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="申诉图片" prop="appealImgUrl" >
|
|
<img v-image-preview v-for="dict in form.listUrl" v-if="form.appealImgUrl" :src="dict"
|
|
class="avatar" style="width: 150px" height="150px" @click="previewImage(dict)" >
|
|
<!-- <el-input v-model="form.appealImgUrl" type="textarea" placeholder="请输入内容" />-->
|
|
</el-form-item>
|
|
<!-- <el-form-item label="申诉状态">-->
|
|
<!-- <el-radio-group v-model="form.appealStatus">-->
|
|
<!-- <el-radio label="1">请选择字典生成</el-radio>-->
|
|
<!-- </el-radio-group>-->
|
|
<!-- <el-select v-model="form.appealStatus" placeholder="请选择申诉状态" clearable size="small">-->
|
|
<!-- <el-option-->
|
|
<!-- v-for="dict in appealStatusOptions"-->
|
|
<!-- :key="dict.dictValue"-->
|
|
<!-- :label="dict.dictLabel"-->
|
|
<!-- :value="dict.dictValue"-->
|
|
<!-- />-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="创建时间" prop="createTime">-->
|
|
<!-- <el-date-picker clearable size="small"-->
|
|
<!-- v-model="form.createTime"-->
|
|
<!-- type="date"-->
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
<!-- placeholder="选择创建时间">-->
|
|
<!-- </el-date-picker>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="申诉终端" prop="terminalSource">-->
|
|
<!-- <el-input v-model="form.terminalSource" placeholder="请输入申诉终端" />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="申诉方用户编号" prop="appealUserId">-->
|
|
<!-- <el-input v-model="form.appealUserId" placeholder="请输入申诉方用户编号" />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="被申诉方编号" prop="beAppealUserId">-->
|
|
<!-- <el-input v-model="form.beAppealUserId" placeholder="请输入被申诉方编号" />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="审核描述" prop="appealDesc">-->
|
|
<!-- <el-input v-model="form.appealDesc" type="textarea" placeholder="请输入内容" />-->
|
|
<!-- </el-form-item>-->
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
<!-- 申诉OTC申诉订单对话框 -->
|
|
<el-dialog :title="title" :visible.sync="openApple" width="500px" append-to-body>
|
|
<el-form ref="form" :model="formApple" :rules="rulesApple" label-width="80px">
|
|
<el-form-item label="订单编号" prop="otcOrderId" hidden="hidden">
|
|
<el-input v-model="formApple.otcOrderId" placeholder="请输入订单编号" />
|
|
</el-form-item>
|
|
<el-form-item label="申诉状态">
|
|
<el-radio-group v-model="formApple.appealStatus">
|
|
<el-radio label="success_appeal">申诉成功</el-radio>
|
|
<el-radio label="fail_appeal">申诉失败</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
<el-form-item label="审核描述" prop="appealDesc">
|
|
<el-input v-model="formApple.appealDesc" type="textarea" placeholder="请输入内容" />
|
|
</el-form-item>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="submitFormApple">确 定</el-button>
|
|
<el-button @click="cancelApple">取 消</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { listOtcAppealOrder, getOtcAppealOrder, delOtcAppealOrder, addOtcAppealOrder, updateOtcAppealOrder, exportOtcAppealOrder,appleOtcAppealOrder } from "@/api/otc/otcAppealOrder";
|
|
|
|
export default {
|
|
name: "OtcAppealOrder",
|
|
components: {
|
|
},
|
|
data() {
|
|
return {
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// OTC申诉订单表格数据
|
|
otcAppealOrderList: [],
|
|
appealStatusOptions: [],
|
|
terminalSourceOptions:[],
|
|
// 弹出层标题
|
|
title: "",
|
|
titleApple: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
openApple:false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
otcOrderId: null,
|
|
otcOrderNo: null,
|
|
otcAppealNo: null,
|
|
appealRemark: null,
|
|
appealImgUrl: null,
|
|
appealStatus: null,
|
|
terminalSource: null,
|
|
appealUserId: null,
|
|
beAppealUserId: null,
|
|
appealDesc: null
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
formApple:{},
|
|
rules: {
|
|
|
|
},
|
|
// 表单校验
|
|
rulesApple: {
|
|
appealStatus: [
|
|
{ required: true, message: "请选择审核状态", trigger: "blur" }
|
|
],
|
|
appealDesc: [
|
|
{ required: true, message: "审核描述不能为空", trigger: "blur" }
|
|
],
|
|
},
|
|
// 预览
|
|
srcList: ["http://118.25.187.239:9099/img/adImg/557097620301025280.jpg"],
|
|
};
|
|
},
|
|
created() {
|
|
this.getList();
|
|
this.getDicts("appeal_status").then(response => {
|
|
this.appealStatusOptions = response.data;
|
|
});
|
|
this.getDicts("terminal_source").then(response => {
|
|
this.terminalSourceOptions = response.data;
|
|
});
|
|
},
|
|
methods: {
|
|
// 预览图片
|
|
previewImage(abUrl) {
|
|
this.srcList[0] = abUrl;
|
|
},
|
|
/** 查询OTC申诉订单列表 */
|
|
getList() {
|
|
this.loading = true;
|
|
listOtcAppealOrder(this.queryParams).then(response => {
|
|
this.otcAppealOrderList = response.rows;
|
|
this.total = Number(response.total);
|
|
this.loading = false;
|
|
});
|
|
},
|
|
terminalSourceFormat(row, column) {
|
|
return this.selectDictLabel(this.terminalSourceOptions, row.terminalSource);
|
|
},
|
|
appealStatusFormat(row, column) {
|
|
return this.selectDictLabel(this.appealStatusOptions, row.appealStatus);
|
|
},
|
|
// 取消按钮
|
|
cancel() {
|
|
this.open = false;
|
|
this.reset();
|
|
},
|
|
// 取消按钮
|
|
cancelApple() {
|
|
this.openApple = false;
|
|
this.resetApple();
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.form = {
|
|
id: null,
|
|
otcOrderId: null,
|
|
otcOrderNo: null,
|
|
otcAppealNo: null,
|
|
appealRemark: null,
|
|
appealImgUrl: null,
|
|
appealStatus: "0",
|
|
createTime: null,
|
|
updateTime: null,
|
|
terminalSource: null,
|
|
appealUserId: null,
|
|
beAppealUserId: null,
|
|
appealDesc: null,
|
|
listUrl:[]
|
|
};
|
|
this.resetForm("form");
|
|
},
|
|
// 表单重置
|
|
resetApple() {
|
|
this.formApple = {
|
|
id: null,
|
|
otcOrderId: null,
|
|
otcOrderNo: null,
|
|
otcAppealNo: null,
|
|
appealRemark: null,
|
|
appealImgUrl: null,
|
|
appealStatus: "0",
|
|
createTime: null,
|
|
updateTime: null,
|
|
terminalSource: null,
|
|
appealUserId: null,
|
|
beAppealUserId: null,
|
|
appealDesc: null
|
|
};
|
|
this.resetForm("formApple");
|
|
},
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.getList();
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.id)
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
this.reset();
|
|
this.open = true;
|
|
this.title = "添加OTC申诉订单";
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
const id = row.id || this.ids
|
|
getOtcAppealOrder(id).then(response => {
|
|
this.form = response.data;
|
|
this.open = true;
|
|
this.title = "修改OTC申诉订单";
|
|
});
|
|
},
|
|
/** 申诉按钮操作 */
|
|
handleApple(row) {
|
|
this.resetApple();
|
|
const id = row.id || this.ids
|
|
getOtcAppealOrder(id).then(response => {
|
|
this.formApple = response.data;
|
|
this.openApple = true;
|
|
this.titleApple = "OTC申诉订单处理";
|
|
});
|
|
},
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
updateOtcAppealOrder(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.getList();
|
|
});
|
|
} else {
|
|
addOtcAppealOrder(this.form).then(response => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.getList();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
},
|
|
/** 审核提交 */
|
|
submitFormApple() {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
appleOtcAppealOrder(this.formApple).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.openApple = false;
|
|
this.getList();
|
|
});
|
|
}
|
|
});
|
|
},
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
this.$confirm('是否确认删除OTC申诉订单编号为"' + ids + '"的数据项?', "警告", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
}).then(function() {
|
|
return delOtcAppealOrder(ids);
|
|
}).then(() => {
|
|
this.getList();
|
|
this.msgSuccess("删除成功");
|
|
})
|
|
},
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
const queryParams = this.queryParams;
|
|
this.$confirm('是否确认导出所有OTC申诉订单数据项?', "警告", {
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
}).then(function() {
|
|
return exportOtcAppealOrder(queryParams);
|
|
}).then(response => {
|
|
this.download(response.msg);
|
|
})
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|