单选
This commit is contained in:
parent
73f2a8f549
commit
7386e4f3ba
|
|
@ -4,17 +4,17 @@
|
|||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
method="get"
|
||||
: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"></i>
|
||||
<i class="el-icon-upload"/>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery"
|
||||
>查询</el-button
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery"
|
||||
>已发货仅退款查询</el-button
|
||||
>已发货仅退款查询</el-button
|
||||
>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
type="success"
|
||||
icon="el-icon-search"
|
||||
@click="toQuery"
|
||||
>退货退款查询</el-button
|
||||
>退货退款查询</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="quanxian"
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleImport"
|
||||
>售后订单导入</el-button
|
||||
>售后订单导入</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -136,10 +136,16 @@
|
|||
:data="data"
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@row-click="singleElection"
|
||||
highlight-current-row
|
||||
>
|
||||
<af-table-column prop="afterSalesNumber" label="售后单号">
|
||||
|
||||
<af-table-column align="center" width="55" label="选择">
|
||||
<template slot-scope="scope">
|
||||
<div @click="godetail">{{ scope.row.afterSalesNumber }}</div>
|
||||
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
|
||||
<el-radio class="radio" v-model="templateSelection" :label="scope.row.id"
|
||||
> </el-radio
|
||||
>
|
||||
</template>
|
||||
</af-table-column>
|
||||
<af-table-column prop="orderNumber" label="订单号" />
|
||||
|
|
@ -158,7 +164,7 @@
|
|||
|
||||
<af-table-column prop="returnLogisticsNumber" label="退货物流单号" />
|
||||
<af-table-column prop="deliveryLogisticsNumber" label="发货物流单号" />
|
||||
<af-table-column
|
||||
<!-- <af-table-column
|
||||
v-if="
|
||||
checkPermission([
|
||||
'admin',
|
||||
|
|
@ -209,7 +215,7 @@
|
|||
/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</af-table-column>
|
||||
</af-table-column> -->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<el-pagination
|
||||
|
|
@ -224,129 +230,144 @@
|
|||
</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 {getToken} from "@/utils/auth";
|
||||
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 { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
components: { eForm },
|
||||
mixins: [initData, initDict],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
// 当前选择的行的id
|
||||
templateSelection: "",
|
||||
// 当前选择的行的数据
|
||||
checkList: [],
|
||||
delLoading: false,
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: "/api/douyinAfterSales/importAfterSaleData"
|
||||
url: '/api/douyinAfterSales/importAfterSaleData'
|
||||
},
|
||||
quanxian:false,
|
||||
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() {
|
||||
let name = localStorage.getItem('name')
|
||||
if(name=='岳小强' || name=='李洁'|| name== '吴春节'|| name== 'test'){
|
||||
const name = localStorage.getItem('name')
|
||||
if (name == '岳小强' || name == '李洁' || name == '吴春节' || name == 'test') {
|
||||
this.quanxian = true
|
||||
}
|
||||
|
||||
|
||||
this.getDictMap("after_sale_type,shop_name")
|
||||
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}`)
|
||||
},
|
||||
|
||||
selectSingleRow(row, index, rows) {
|
||||
// 限制只能选中一行
|
||||
debugger
|
||||
return true
|
||||
},
|
||||
godetail() {
|
||||
this.$router.push({ path: '/douyin/detail' })
|
||||
},
|
||||
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = "售后订单导入";
|
||||
this.upload.open = true;
|
||||
this.upload.title = '售后订单导入'
|
||||
this.upload.open = true
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
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();
|
||||
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();
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
beforeInit() {
|
||||
this.url = "api/douyinAfterSales";
|
||||
const sort = "id,desc";
|
||||
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;
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
this.delLoading = true;
|
||||
this.delLoading = true
|
||||
del(id)
|
||||
.then(res => {
|
||||
this.delLoading = false;
|
||||
this.$refs[id].doClose();
|
||||
this.dleChangePage();
|
||||
this.init();
|
||||
this.delLoading = false
|
||||
this.$refs[id].doClose()
|
||||
this.dleChangePage()
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: "删除成功",
|
||||
type: "success",
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
this.delLoading = false;
|
||||
this.$refs[id].doClose();
|
||||
console.log(err.response.data.message);
|
||||
});
|
||||
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;
|
||||
this.isAdd = false
|
||||
const _this = this.$refs.form
|
||||
_this.form = {
|
||||
id: data.id,
|
||||
afterSalesNumber: data.afterSalesNumber,
|
||||
|
|
@ -394,24 +415,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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user