Merge branch 'main' of http://139.224.57.82:9007/SHXY_INNER/xyadmin-web
This commit is contained in:
commit
fc7b8a42b9
|
|
@ -5,9 +5,9 @@ const testEnv = require('./test.env')
|
|||
|
||||
module.exports = merge(prodEnv, testEnv, {
|
||||
NODE_ENV: '"development"',
|
||||
|
||||
//BASE_API: '"http://localhost:8000"',
|
||||
NAME: '"开发"',
|
||||
//BASE_API: '"http://139.224.54.200:8012"'
|
||||
// BASE_API: '"http://139.224.54.200:8888"'
|
||||
// BASE_API: '"https://api.auauz.net"'
|
||||
BASE_API: '"http://139.224.57.82:8015"'
|
||||
})
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ export function edit(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
export function processAfterSaleData(id) {
|
||||
return request({
|
||||
url: 'api/douyinAfterSales/processAfterSaleData?id=' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function downloadDouyinAfterSales(params) {
|
||||
return request({
|
||||
|
|
|
|||
33
src/api/quickInterceptService.js
Normal file
33
src/api/quickInterceptService.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/quickInterceptService',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(id) {
|
||||
return request({
|
||||
url: 'api/quickInterceptService/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/quickInterceptService',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function downloadQuickInterceptService(params) {
|
||||
return request({
|
||||
url: 'api/quickInterceptService/download',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
10
src/main.js
10
src/main.js
|
|
@ -13,7 +13,15 @@ import router from './router/routers'
|
|||
import permission from './components/Permission'
|
||||
import dict from './components/Dict'
|
||||
import store from './store'
|
||||
|
||||
import {
|
||||
parseTime,
|
||||
resetForm,
|
||||
addDateRange,
|
||||
selectDictLabel,
|
||||
selectDictLabels,
|
||||
handleTree,
|
||||
} from "@/utils/ruoyi";
|
||||
Vue.prototype.parseTime = parseTime;
|
||||
import '@/icons' // icon
|
||||
import './router/index' // permission control
|
||||
import Router from 'vue-router'
|
||||
|
|
|
|||
|
|
@ -38,6 +38,35 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
async init2(val) {
|
||||
|
||||
|
||||
if (val==1){
|
||||
this.params.xfProjectnum=""
|
||||
this.params.xfStartDate=""
|
||||
}
|
||||
let params = {}
|
||||
if(this.url == "api/xySalary"){
|
||||
params = {...this.params,sort:'salaryMonth,desc'}
|
||||
}else{
|
||||
params = {...this.params}
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
|
||||
initData(this.url, params).then(res => {
|
||||
this.total = res.totalElements
|
||||
this.data = res.content
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
}, this.time)
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeInit() {
|
||||
return true
|
||||
},
|
||||
|
|
|
|||
110
src/mixins/initData2.js
Normal file
110
src/mixins/initData2.js
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
import { initData } from '@/api/data'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true, data: [], page: 0, size: 10, total: 0, url: '', params: {}, query: {}, time: 50, isAdd: false, downloadLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init(val) {
|
||||
|
||||
if (!await this.beforeInit()) {
|
||||
return
|
||||
}
|
||||
if (val==1){
|
||||
this.params.xfProjectnum=""
|
||||
this.params.xfStartDate=""
|
||||
}
|
||||
let params = {}
|
||||
if(this.url == "api/xySalary"){
|
||||
params = {...this.params,sort:'salaryMonth,desc'}
|
||||
}else{
|
||||
params = {...this.params}
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
|
||||
initData(this.url, params).then(res => {
|
||||
this.total = res.totalElements
|
||||
this.data = res.content
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
}, this.time)
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
async init2(val) {
|
||||
|
||||
this.params.page = this.page
|
||||
if (val==1){
|
||||
this.params.xfProjectnum=""
|
||||
this.params.xfStartDate=""
|
||||
}
|
||||
let params = {}
|
||||
if(this.url == "api/xySalary"){
|
||||
params = {...this.params,sort:'salaryMonth,desc'}
|
||||
}else{
|
||||
params = {...this.params}
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
|
||||
initData(this.url, params).then(res => {
|
||||
this.total = res.totalElements
|
||||
this.data = res.content
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
}, this.time)
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeInit() {
|
||||
return true
|
||||
},
|
||||
pageChange(e) {
|
||||
|
||||
this.page = e - 1
|
||||
|
||||
if(this.url=='api/douyinAfterSales'){
|
||||
this.init()
|
||||
}
|
||||
else{
|
||||
this.init2()
|
||||
}
|
||||
|
||||
},
|
||||
sizeChange(e) {
|
||||
this.page = 0
|
||||
this.size = e
|
||||
if(this.url=='api/douyinAfterSales'){
|
||||
this.init(1)
|
||||
}
|
||||
else{
|
||||
this.init2(1)
|
||||
}
|
||||
},
|
||||
// 预防删除第二页最后一条数据时,或者多选删除第二页的数据时,页码错误导致请求无数据
|
||||
dleChangePage(size) {
|
||||
if (size === undefined) {
|
||||
size = 1
|
||||
}
|
||||
if (this.data.length === size && this.page !== 0) {
|
||||
this.page = this.page - 1
|
||||
}
|
||||
},
|
||||
toQuery(val) {
|
||||
|
||||
this.page = 0
|
||||
this.init(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
233
src/utils/ruoyi.js
Normal file
233
src/utils/ruoyi.js
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
|
||||
|
||||
/**
|
||||
* 通用js方法封装处理
|
||||
* Copyright (c) 2019 ruoyi
|
||||
*/
|
||||
|
||||
// 日期格式化
|
||||
export function parseTime(time, pattern) {
|
||||
if (arguments.length === 0 || !time) {
|
||||
return null
|
||||
}
|
||||
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||
let date
|
||||
if (typeof time === 'object') {
|
||||
date = time
|
||||
} else {
|
||||
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||
time = parseInt(time)
|
||||
} else if (typeof time === 'string') {
|
||||
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
|
||||
}
|
||||
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||
time = time * 1000
|
||||
}
|
||||
date = new Date(time)
|
||||
}
|
||||
const formatObj = {
|
||||
y: date.getFullYear(),
|
||||
m: date.getMonth() + 1,
|
||||
d: date.getDate(),
|
||||
h: date.getHours(),
|
||||
i: date.getMinutes(),
|
||||
s: date.getSeconds(),
|
||||
a: date.getDay()
|
||||
}
|
||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||
let value = formatObj[key]
|
||||
// Note: getDay() returns 0 on Sunday
|
||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
||||
if (result.length > 0 && value < 10) {
|
||||
value = '0' + value
|
||||
}
|
||||
return value || 0
|
||||
})
|
||||
return time_str
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
export function resetForm(refName) {
|
||||
if (this.$refs[refName]) {
|
||||
this.$refs[refName].resetFields();
|
||||
}
|
||||
}
|
||||
|
||||
// 添加日期范围
|
||||
export function addDateRange(params, dateRange, propName) {
|
||||
let search = params;
|
||||
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
|
||||
dateRange = Array.isArray(dateRange) ? dateRange : [];
|
||||
if (typeof (propName) === 'undefined') {
|
||||
search.params['beginTime'] = dateRange[0];
|
||||
search.params['endTime'] = dateRange[1];
|
||||
} else {
|
||||
search.params['begin' + propName] = dateRange[0];
|
||||
search.params['end' + propName] = dateRange[1];
|
||||
}
|
||||
return search;
|
||||
}
|
||||
|
||||
// 回显数据字典
|
||||
export function selectDictLabel(datas, value) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
var actions = [];
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value == ('' + value)) {
|
||||
actions.push(datas[key].label);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
if (actions.length === 0) {
|
||||
actions.push(value);
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
|
||||
// 回显数据字典(字符串、数组)
|
||||
export function selectDictLabels(datas, value, separator) {
|
||||
if (value === undefined || value.length ===0) {
|
||||
return "";
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
value = value.join(",");
|
||||
}
|
||||
var actions = [];
|
||||
var currentSeparator = undefined === separator ? "," : separator;
|
||||
var temp = value.split(currentSeparator);
|
||||
Object.keys(value.split(currentSeparator)).some((val) => {
|
||||
var match = false;
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value == ('' + temp[val])) {
|
||||
actions.push(datas[key].label + currentSeparator);
|
||||
match = true;
|
||||
}
|
||||
})
|
||||
if (!match) {
|
||||
actions.push(temp[val] + currentSeparator);
|
||||
}
|
||||
})
|
||||
return actions.join('').substring(0, actions.join('').length - 1);
|
||||
}
|
||||
|
||||
// 字符串格式化(%s )
|
||||
export function sprintf(str) {
|
||||
var args = arguments, flag = true, i = 1;
|
||||
str = str.replace(/%s/g, function () {
|
||||
var arg = args[i++];
|
||||
if (typeof arg === 'undefined') {
|
||||
flag = false;
|
||||
return '';
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
return flag ? str : '';
|
||||
}
|
||||
|
||||
// 转换字符串,undefined,null等转化为""
|
||||
export function parseStrEmpty(str) {
|
||||
if (!str || str == "undefined" || str == "null") {
|
||||
return "";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// 数据合并
|
||||
export function mergeRecursive(source, target) {
|
||||
for (var p in target) {
|
||||
try {
|
||||
if (target[p].constructor == Object) {
|
||||
source[p] = mergeRecursive(source[p], target[p]);
|
||||
} else {
|
||||
source[p] = target[p];
|
||||
}
|
||||
} catch (e) {
|
||||
source[p] = target[p];
|
||||
}
|
||||
}
|
||||
return source;
|
||||
};
|
||||
|
||||
/**
|
||||
* 构造树型结构数据
|
||||
* @param {*} data 数据源
|
||||
* @param {*} id id字段 默认 'id'
|
||||
* @param {*} parentId 父节点字段 默认 'parentId'
|
||||
* @param {*} children 孩子节点字段 默认 'children'
|
||||
*/
|
||||
export function handleTree(data, id, parentId, children) {
|
||||
let config = {
|
||||
id: id || 'id',
|
||||
parentId: parentId || 'parentId',
|
||||
childrenList: children || 'children'
|
||||
};
|
||||
|
||||
var childrenListMap = {};
|
||||
var nodeIds = {};
|
||||
var tree = [];
|
||||
|
||||
for (let d of data) {
|
||||
let parentId = d[config.parentId];
|
||||
if (childrenListMap[parentId] == null) {
|
||||
childrenListMap[parentId] = [];
|
||||
}
|
||||
nodeIds[d[config.id]] = d;
|
||||
childrenListMap[parentId].push(d);
|
||||
}
|
||||
|
||||
for (let d of data) {
|
||||
let parentId = d[config.parentId];
|
||||
if (nodeIds[parentId] == null) {
|
||||
tree.push(d);
|
||||
}
|
||||
}
|
||||
|
||||
for (let t of tree) {
|
||||
adaptToChildrenList(t);
|
||||
}
|
||||
|
||||
function adaptToChildrenList(o) {
|
||||
if (childrenListMap[o[config.id]] !== null) {
|
||||
o[config.childrenList] = childrenListMap[o[config.id]];
|
||||
}
|
||||
if (o[config.childrenList]) {
|
||||
for (let c of o[config.childrenList]) {
|
||||
adaptToChildrenList(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数处理
|
||||
* @param {*} params 参数
|
||||
*/
|
||||
export function tansParams(params) {
|
||||
let result = ''
|
||||
for (const propName of Object.keys(params)) {
|
||||
const value = params[propName];
|
||||
var part = encodeURIComponent(propName) + "=";
|
||||
if (value !== null && value !== "" && typeof (value) !== "undefined") {
|
||||
if (typeof value === 'object') {
|
||||
for (const key of Object.keys(value)) {
|
||||
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
|
||||
let params = propName + '[' + key + ']';
|
||||
var subPart = encodeURIComponent(params) + "=";
|
||||
result += subPart + encodeURIComponent(value[key]) + "&";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result += part + encodeURIComponent(value) + "&";
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// 验证是否为blob格式
|
||||
export function blobValidate(data) {
|
||||
return data.type !== 'application/json'
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-descriptions :column="3" :size="size" class="margin-top" border>
|
||||
<el-descriptions :column="3" class="margin-top" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
售后单号
|
||||
|
|
@ -95,7 +95,8 @@
|
|||
<template slot="label"
|
||||
>售后申请时间
|
||||
</template>
|
||||
{{ form.applicationTime }}
|
||||
{{ parseTime(form.applicationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
|
|
@ -131,7 +132,8 @@
|
|||
<template slot="label"
|
||||
>退货发货时间
|
||||
</template>
|
||||
{{ form.returnShippingTime }}
|
||||
{{ parseTime(form.returnShippingTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
|
|
@ -143,31 +145,36 @@
|
|||
<template slot="label"
|
||||
>自动处理截止时间
|
||||
</template>
|
||||
{{ form.autoProcessDeadline }}
|
||||
{{ parseTime(form.autoProcessDeadline, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
>同意售后申请时间
|
||||
</template>
|
||||
{{ form.approvalTime }}
|
||||
{{ parseTime(form.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
>商家退款时间
|
||||
</template>
|
||||
{{ form.merchantRefundTime }}
|
||||
{{ parseTime(form.merchantRefundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
>用户到账时间
|
||||
</template>
|
||||
{{ form.customerReceiptTime }}
|
||||
{{ parseTime(form.customerReceiptTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
>售后关闭时间
|
||||
</template>
|
||||
{{ form.closureTime }}
|
||||
{{ parseTime(form.closureTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
|
|
@ -233,7 +240,8 @@
|
|||
<template slot="label"
|
||||
>售后完结时间
|
||||
</template>
|
||||
{{ form.finalizationTime }}
|
||||
{{ parseTime(form.finalizationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
|
|
@ -262,14 +270,20 @@
|
|||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
>处理结果
|
||||
{{ form.resolution }}
|
||||
</template></el-descriptions-item
|
||||
|
||||
</template>
|
||||
<span v-if=" form.resolution== '0'">未处理</span>
|
||||
<span v-if=" form.resolution== '1'">已处理</span>
|
||||
|
||||
</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"
|
||||
>处理结果时间
|
||||
{{ form.resolutionTime }}
|
||||
</template></el-descriptions-item
|
||||
|
||||
</template>
|
||||
{{ parseTime(form.resolutionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||
</el-descriptions-item
|
||||
></el-descriptions
|
||||
>
|
||||
</div>
|
||||
|
|
@ -280,12 +294,7 @@ import { add, edit } from "@/api/douyinAfterSales";
|
|||
import initDict from "@/mixins/initDict";
|
||||
export default {
|
||||
mixins: [initDict],
|
||||
props: {
|
||||
isAdd: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
|
|
@ -341,16 +350,14 @@ export default {
|
|||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form = JSON.parse(localStorage.getItem('editData'));
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.resetForm();
|
||||
},
|
||||
doSubmit() {
|
||||
this.loading = true;
|
||||
if (this.isAdd) {
|
||||
this.doAdd();
|
||||
} else this.doEdit();
|
||||
},
|
||||
|
||||
doAdd() {
|
||||
add(this.form)
|
||||
.then(res => {
|
||||
|
|
@ -441,4 +448,6 @@ export default {
|
|||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
/deep/ .el-descriptions-item__content{ width:300px}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,27 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
accept=".xlsx, .xls"
|
||||
method="get"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"/>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :loading="upload.isUploading" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
|
|
@ -76,48 +98,70 @@
|
|||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery"
|
||||
>查询</el-button
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button :disabled="processLoading" v-permission="['admin', 'douyinAfterSales:processAfterSaleData']"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
|
||||
@click="processAfterSaleData"
|
||||
>完结</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery0"
|
||||
>已发货仅退款查询</el-button
|
||||
>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery"
|
||||
>已发货仅退款查询</el-button
|
||||
@click="toQuery1"
|
||||
>退货退款查询</el-button
|
||||
>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery"
|
||||
>退货退款查询</el-button
|
||||
>
|
||||
<el-button
|
||||
v-permission="['admin', 'douyinAfterSales:add']"
|
||||
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="add"
|
||||
>新增</el-button
|
||||
@click="handleImport"
|
||||
v-permission="['admin','xyPersoninfo:add']"
|
||||
>售后订单导入</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!--表单组件-->
|
||||
<eForm ref="form" :is-add="isAdd" />
|
||||
<!-- <eForm ref="form" :is-add="isAdd" /> -->
|
||||
<!--表格渲染-->
|
||||
<!-- :data="data" -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="[{ afterSalesNumber: '1' }]"
|
||||
|
||||
:data="data"
|
||||
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@row-click="singleElection"
|
||||
highlight-current-row
|
||||
>
|
||||
|
||||
<af-table-column align="center" width="55" label="选择">
|
||||
<template slot-scope="scope">
|
||||
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
|
||||
<el-radio :disabled="scope.row.resolution == '1' || scope.row.resolution == 1" class="radio" v-model="templateSelection" :label="scope.row.id"
|
||||
> </el-radio
|
||||
>
|
||||
</template>
|
||||
</af-table-column>
|
||||
<af-table-column prop="afterSalesNumber" label="售后单号">
|
||||
<template slot-scope="scope">
|
||||
<div @click="godetail">{{ scope.row.afterSalesNumber }}</div>
|
||||
<div style="cursor: pointer;color:blue" @click="godetail(scope.row)">{{ scope.row.afterSalesNumber }}</div>
|
||||
</template>
|
||||
</af-table-column>
|
||||
<af-table-column prop="orderNumber" label="订单号" />
|
||||
|
|
@ -128,15 +172,25 @@
|
|||
<af-table-column prop="afterSalesType" label="售后类型" />
|
||||
|
||||
<af-table-column prop="returnLogisticsStatus" label="退货物流状态" />
|
||||
<af-table-column prop="applicationTime" label="售后申请时间" />
|
||||
<af-table-column prop="resolution" label="处理结果" />
|
||||
<af-table-column prop="applicationTime" label="售后申请时间" >
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.applicationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</af-table-column>
|
||||
<af-table-column prop="resolution" label="处理结果" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.resolution == '0'">未处理</span>
|
||||
<span v-if="scope.row.resolution == '1'">已处理</span>
|
||||
</template>
|
||||
</af-table-column>
|
||||
<af-table-column prop="amountDueCny" label="应付金额(元)" />
|
||||
<af-table-column prop="refundProductAmountCny" label="退商品金额(元)" />
|
||||
<af-table-column prop="refundShippingFeeCny" label="退运费金额(元)" />
|
||||
|
||||
<af-table-column prop="returnLogisticsNumber" label="退货物流单号" />
|
||||
<af-table-column prop="deliveryLogisticsNumber" label="发货物流单号" />
|
||||
<af-table-column
|
||||
<!-- <af-table-column
|
||||
v-if="
|
||||
checkPermission([
|
||||
'admin',
|
||||
|
|
@ -144,12 +198,13 @@
|
|||
'douyinAfterSales:del'
|
||||
])
|
||||
"
|
||||
fixed="right"
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
v-permission="['admin', 'douyinAfterSales:edit']"
|
||||
size="mini"
|
||||
type="primary"
|
||||
|
|
@ -184,9 +239,9 @@
|
|||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
/>
|
||||
</el-popover> -->
|
||||
</el-popover>
|
||||
</template>
|
||||
</af-table-column>
|
||||
</af-table-column> -->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<el-pagination
|
||||
|
|
@ -201,92 +256,198 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import checkPermission from "@/utils/permission";
|
||||
import initData from "@/mixins/initData";
|
||||
import { del, downloadDouyinAfterSales } from "@/api/douyinAfterSales";
|
||||
import eForm from "./form";
|
||||
import initDict from "@/mixins/initDict";
|
||||
import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/initData2'
|
||||
import { del, downloadDouyinAfterSales ,processAfterSaleData} from '@/api/douyinAfterSales'
|
||||
import eForm from './form'
|
||||
import initDict from '@/mixins/initDict'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
components: { eForm },
|
||||
mixins: [initData, initDict],
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
processLoading:false,
|
||||
// 当前选择的行的id
|
||||
templateSelection: "",
|
||||
// 当前选择的行的数据
|
||||
checkList: [],
|
||||
delLoading: false,
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: '/api/douyinAfterSales/importAfterSaleData'
|
||||
},
|
||||
quanxian: false,
|
||||
afterSalesTypeArr: [],
|
||||
shopNameArr: [],
|
||||
queryTypeOptions: [
|
||||
{ key: "afterSalesNumber", display_name: "售后单号" },
|
||||
{ key: "orderNumber", display_name: "订单号" },
|
||||
{ key: "productNumber", display_name: "商品单号" },
|
||||
{ key: "productName", display_name: "商品名称" },
|
||||
{ key: "shopName", display_name: "店铺名字" },
|
||||
{ key: "afterSalesStatus", display_name: "售后状态" },
|
||||
{ key: "returnLogisticsNumber", display_name: "退货物流单号" },
|
||||
{ key: "deliveryLogisticsNumber", display_name: "发货物流单号" }
|
||||
{ key: 'afterSalesNumber', display_name: '售后单号' },
|
||||
{ key: 'orderNumber', display_name: '订单号' },
|
||||
{ key: 'productNumber', display_name: '商品单号' },
|
||||
{ key: 'productName', display_name: '商品名称' },
|
||||
{ key: 'shopName', display_name: '店铺名字' },
|
||||
{ key: 'afterSalesStatus', display_name: '售后状态' },
|
||||
{ key: 'returnLogisticsNumber', display_name: '退货物流单号' },
|
||||
{ key: 'deliveryLogisticsNumber', display_name: '发货物流单号' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDictMap("after_sale_type,shop_name")
|
||||
const name = localStorage.getItem('name')
|
||||
if (name == '岳小强' || name == '李洁' || name == '吴春节' || name == 'test') {
|
||||
this.quanxian = true
|
||||
}
|
||||
|
||||
this.getDictMap('after_sale_type,shop_name')
|
||||
.then(res => {
|
||||
this.afterSalesTypeArr = res["after_sale_type"];
|
||||
this.shopNameArr = res["shop_name"];
|
||||
this.afterSalesTypeArr = res['after_sale_type']
|
||||
this.shopNameArr = res['shop_name']
|
||||
})
|
||||
.catch(err => {});
|
||||
.catch(err => {})
|
||||
this.getJobList()
|
||||
.then(res => {
|
||||
this.xxPositionOptions = res;
|
||||
this.xxPositionOptions = res
|
||||
})
|
||||
.catch(err => {});
|
||||
.catch(err => {})
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.init();
|
||||
});
|
||||
this.init()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
godetail() {
|
||||
this.$router.push({ path: "/douyin/detail" });
|
||||
|
||||
|
||||
singleElection(row) {
|
||||
this.templateSelection = row.id
|
||||
this.checkList = this.data.filter((item) => item.id === row.id)
|
||||
console.log(`该行的编号为${row.id}`)
|
||||
|
||||
},
|
||||
beforeInit() {
|
||||
this.url = "api/douyinAfterSales";
|
||||
const sort = "id,desc";
|
||||
this.params = { page: this.page, size: this.size, sort: sort };
|
||||
const query = this.query;
|
||||
const type = query.type;
|
||||
const value = query.value;
|
||||
if (type && value) {
|
||||
this.params[type] = value;
|
||||
processAfterSaleData(){
|
||||
if(this.templateSelection==''){
|
||||
this.$message.error('请选择一条要处理的售后单')
|
||||
return
|
||||
}
|
||||
return true;
|
||||
},
|
||||
subDelete(id) {
|
||||
this.delLoading = true;
|
||||
del(id)
|
||||
|
||||
this.$confirm('确认执行此操作?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
this.processLoading = true
|
||||
processAfterSaleData(this.templateSelection)
|
||||
.then(res => {
|
||||
this.delLoading = false;
|
||||
this.$refs[id].doClose();
|
||||
this.dleChangePage();
|
||||
this.init();
|
||||
this.processLoading = false
|
||||
|
||||
this.$notify({
|
||||
title: "删除成功",
|
||||
type: "success",
|
||||
title: '操作成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
});
|
||||
})
|
||||
this.templateSelection = ''
|
||||
this.init()
|
||||
})
|
||||
.catch(err => {
|
||||
this.delLoading = false;
|
||||
this.$refs[id].doClose();
|
||||
console.log(err.response.data.message);
|
||||
});
|
||||
this.processLoading = false
|
||||
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
godetail(row) {
|
||||
localStorage.setItem('editData',JSON.stringify(row) );
|
||||
this.$router.push({ path: '/douyin/after_sale_detail', query: {
|
||||
id:row.id
|
||||
} })
|
||||
},
|
||||
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '售后订单导入'
|
||||
this.upload.open = true
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true })
|
||||
this.init()
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
toQuery0(){
|
||||
this.page = 0
|
||||
this.url = '/api/douyinAfterSales/specQuery'
|
||||
const sort = 'id,desc'
|
||||
this.query.type = 0
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
Object.assign(this.params, this.query)
|
||||
this.init2()
|
||||
},
|
||||
toQuery1(){
|
||||
this.page = 0
|
||||
this.url = '/api/douyinAfterSales/specQuery'
|
||||
const sort = 'id,desc'
|
||||
this.query.type = 1
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
Object.assign(this.params, this.query)
|
||||
this.init2()
|
||||
},
|
||||
beforeInit() {
|
||||
this.url = 'api/douyinAfterSales'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
Object.assign(this.params, this.query)
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
this.delLoading = true
|
||||
del(id)
|
||||
.then(res => {
|
||||
this.delLoading = false
|
||||
this.$refs[id].doClose()
|
||||
this.dleChangePage()
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
this.delLoading = false
|
||||
this.$refs[id].doClose()
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.$router.push({ path: "/douyin/after_sale_add" });
|
||||
this.$router.push({ path: '/douyin/after_sale_add' })
|
||||
},
|
||||
edit(data) {
|
||||
this.isAdd = false;
|
||||
const _this = this.$refs.form;
|
||||
|
||||
const _this = this.$refs.form
|
||||
_this.form = {
|
||||
id: data.id,
|
||||
afterSalesNumber: data.afterSalesNumber,
|
||||
|
|
@ -334,24 +495,24 @@ export default {
|
|||
negotiationRecords: data.negotiationRecords,
|
||||
resolution: data.resolution,
|
||||
resolutionTime: data.resolutionTime
|
||||
};
|
||||
_this.dialog = true;
|
||||
}
|
||||
_this.dialog = true
|
||||
},
|
||||
// 导出
|
||||
download() {
|
||||
this.beforeInit();
|
||||
this.downloadLoading = true;
|
||||
this.beforeInit()
|
||||
this.downloadLoading = true
|
||||
downloadDouyinAfterSales(this.params)
|
||||
.then(result => {
|
||||
downloadFile(result, "DouyinAfterSales列表", "xlsx");
|
||||
this.downloadLoading = false;
|
||||
downloadFile(result, 'DouyinAfterSales列表', 'xlsx')
|
||||
this.downloadLoading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.downloadLoading = false;
|
||||
});
|
||||
this.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
174
src/views/douyin/quick_intercept_service/form.vue
Normal file
174
src/views/douyin/quick_intercept_service/form.vue
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||
<el-form-item label="服务单号" >
|
||||
<el-input v-model="form.serviceId" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺名称" >
|
||||
<el-input v-model="form.shopName" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="运单号" >
|
||||
<el-input v-model="form.waybillNumber" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="快递公司" >
|
||||
<el-input v-model="form.expressCompany" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="售后单号" >
|
||||
<el-input v-model="form.afterSalesNumber" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人" >
|
||||
<el-input v-model="form.initiator" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起拦截时间" >
|
||||
<el-input v-model="form.interceptTime" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="拦截状态" >
|
||||
<el-input v-model="form.interceptStatus" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="拦截费用(元)" >
|
||||
<el-input v-model="form.interceptCost" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="拦截网点" >
|
||||
<el-input v-model="form.interceptLocation" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="拦截节点" >
|
||||
<el-input v-model="form.interceptNode" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="不可拦截原因" >
|
||||
<el-input v-model="form.uninterceptReason" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退回失败原因" >
|
||||
<el-input v-model="form.returnFailureReason" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" >
|
||||
<el-input v-model="form.createBy" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" >
|
||||
<el-input v-model="form.createTime" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理结果" >
|
||||
<el-input v-model="form.resolution" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理结果时间" >
|
||||
<el-input v-model="form.resolutionTime" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理人" >
|
||||
<el-input v-model="form.resolutionUser" style="width: 370px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="cancel">取消</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { add, edit } from '@/api/quickInterceptService'
|
||||
export default {
|
||||
props: {
|
||||
isAdd: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false, dialog: false,
|
||||
form: {
|
||||
id: '',
|
||||
serviceId: '',
|
||||
shopName: '',
|
||||
waybillNumber: '',
|
||||
expressCompany: '',
|
||||
afterSalesNumber: '',
|
||||
initiator: '',
|
||||
interceptTime: '',
|
||||
interceptStatus: '',
|
||||
interceptCost: '',
|
||||
interceptLocation: '',
|
||||
interceptNode: '',
|
||||
uninterceptReason: '',
|
||||
returnFailureReason: '',
|
||||
createBy: '',
|
||||
createTime: '',
|
||||
resolution: '',
|
||||
resolutionTime: '',
|
||||
resolutionUser: ''
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.resetForm()
|
||||
},
|
||||
doSubmit() {
|
||||
this.loading = true
|
||||
if (this.isAdd) {
|
||||
this.doAdd()
|
||||
} else this.doEdit()
|
||||
},
|
||||
doAdd() {
|
||||
add(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
title: '添加成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
edit(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
title: '修改成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.dialog = false
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: '',
|
||||
serviceId: '',
|
||||
shopName: '',
|
||||
waybillNumber: '',
|
||||
expressCompany: '',
|
||||
afterSalesNumber: '',
|
||||
initiator: '',
|
||||
interceptTime: '',
|
||||
interceptStatus: '',
|
||||
interceptCost: '',
|
||||
interceptLocation: '',
|
||||
interceptNode: '',
|
||||
uninterceptReason: '',
|
||||
returnFailureReason: '',
|
||||
createBy: '',
|
||||
createTime: '',
|
||||
resolution: '',
|
||||
resolutionTime: '',
|
||||
resolutionUser: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
188
src/views/douyin/quick_intercept_service/index.vue
Normal file
188
src/views/douyin/quick_intercept_service/index.vue
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.value" clearable placeholder="输入搜索内容" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
|
||||
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
||||
</el-select>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<!-- 新增 -->
|
||||
<div style="display: inline-block;margin: 0px 2px;">
|
||||
<el-button
|
||||
v-permission="['admin','quickInterceptService:add']"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="add">新增</el-button>
|
||||
</div>
|
||||
<!-- 导出 -->
|
||||
<div style="display: inline-block;">
|
||||
<el-button
|
||||
:loading="downloadLoading"
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
@click="download">导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!--表单组件-->
|
||||
<eForm ref="form" :is-add="isAdd"/>
|
||||
<!--表格渲染-->
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="id" label="服务单号"/>
|
||||
<el-table-column prop="serviceId" label="服务单号"/>
|
||||
<el-table-column prop="shopName" label="店铺名称"/>
|
||||
<el-table-column prop="waybillNumber" label="运单号"/>
|
||||
<el-table-column prop="expressCompany" label="快递公司"/>
|
||||
<el-table-column prop="afterSalesNumber" label="售后单号"/>
|
||||
<el-table-column prop="initiator" label="发起人"/>
|
||||
<el-table-column prop="interceptTime" label="发起拦截时间"/>
|
||||
<el-table-column prop="interceptStatus" label="拦截状态"/>
|
||||
<el-table-column prop="interceptCost" label="拦截费用(元)"/>
|
||||
<el-table-column prop="interceptLocation" label="拦截网点"/>
|
||||
<el-table-column prop="interceptNode" label="拦截节点"/>
|
||||
<el-table-column prop="uninterceptReason" label="不可拦截原因"/>
|
||||
<el-table-column prop="returnFailureReason" label="退回失败原因"/>
|
||||
<el-table-column prop="createBy" label="创建人"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="resolution" label="处理结果"/>
|
||||
<el-table-column prop="resolutionTime" label="处理结果时间"/>
|
||||
<el-table-column prop="resolutionUser" label="处理人"/>
|
||||
<el-table-column v-if="checkPermission(['admin','quickInterceptService:edit','quickInterceptService:del'])" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-permission="['admin','quickInterceptService:edit']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
|
||||
<el-popover
|
||||
v-permission="['admin','quickInterceptService:del']"
|
||||
:ref="scope.row.id"
|
||||
placement="top"
|
||||
width="180">
|
||||
<p>确定删除本条数据吗?</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="danger" icon="el-icon-delete" size="mini"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<el-pagination
|
||||
:total="total"
|
||||
:current-page="page + 1"
|
||||
style="margin-top: 8px;"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@size-change="sizeChange"
|
||||
@current-change="pageChange"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission'
|
||||
import initData from '@/mixins/initData'
|
||||
import { del, downloadQuickInterceptService } from '@/api/quickInterceptService'
|
||||
import eForm from './form'
|
||||
export default {
|
||||
components: { eForm },
|
||||
mixins: [initData],
|
||||
data() {
|
||||
return {
|
||||
delLoading: false,
|
||||
queryTypeOptions: [
|
||||
{ key: 'shopName', display_name: '店铺名称' },
|
||||
{ key: 'waybillNumber', display_name: '运单号' },
|
||||
{ key: 'expressCompany', display_name: '快递公司' },
|
||||
{ key: 'afterSalesNumber', display_name: '售后单号' },
|
||||
{ key: 'interceptTime', display_name: '发起拦截时间' },
|
||||
{ key: 'interceptStatus', display_name: '拦截状态' },
|
||||
{ key: 'resolution', display_name: '处理结果' }
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
this.init()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
beforeInit() {
|
||||
this.url = 'api/quickInterceptService'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
const query = this.query
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
if (type && value) { this.params[type] = value }
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
this.delLoading = true
|
||||
del(id).then(res => {
|
||||
this.delLoading = false
|
||||
this.$refs[id].doClose()
|
||||
this.dleChangePage()
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
}).catch(err => {
|
||||
this.delLoading = false
|
||||
this.$refs[id].doClose()
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.isAdd = true
|
||||
this.$refs.form.dialog = true
|
||||
},
|
||||
edit(data) {
|
||||
this.isAdd = false
|
||||
const _this = this.$refs.form
|
||||
_this.form = {
|
||||
id: data.id,
|
||||
serviceId: data.serviceId,
|
||||
shopName: data.shopName,
|
||||
waybillNumber: data.waybillNumber,
|
||||
expressCompany: data.expressCompany,
|
||||
afterSalesNumber: data.afterSalesNumber,
|
||||
initiator: data.initiator,
|
||||
interceptTime: data.interceptTime,
|
||||
interceptStatus: data.interceptStatus,
|
||||
interceptCost: data.interceptCost,
|
||||
interceptLocation: data.interceptLocation,
|
||||
interceptNode: data.interceptNode,
|
||||
uninterceptReason: data.uninterceptReason,
|
||||
returnFailureReason: data.returnFailureReason,
|
||||
createBy: data.createBy,
|
||||
createTime: data.createTime,
|
||||
resolution: data.resolution,
|
||||
resolutionTime: data.resolutionTime,
|
||||
resolutionUser: data.resolutionUser
|
||||
}
|
||||
_this.dialog = true
|
||||
},
|
||||
// 导出
|
||||
download() {
|
||||
this.beforeInit()
|
||||
this.downloadLoading = true
|
||||
downloadQuickInterceptService(this.params).then(result => {
|
||||
downloadFile(result, 'QuickInterceptService列表', 'xlsx')
|
||||
this.downloadLoading = false
|
||||
}).catch(() => {
|
||||
this.downloadLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -95,8 +95,8 @@ export default {
|
|||
codeUrl: "",
|
||||
cookiePass: "",
|
||||
loginForm: {
|
||||
username: "",
|
||||
password: "",
|
||||
username: "test",
|
||||
password: "Aa123456.",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user