提交 407dfeb1 authored 作者: huaxinzhu's avatar huaxinzhu

云仓2.2-品牌授权下载地址

上级 ff8fbe04
......@@ -9,15 +9,6 @@ export function getMyAssetListData(data) {
})
}
// 获取 提现等权限 getPurviewData
export function getPurviewData(query) {
return request({
url: '/local/getOrganization',
method: 'get',
params: query
})
}
// 获取 主体信息
export function getOrganizationData(query) {
return request({
......
......@@ -62,3 +62,12 @@ export function cancelOnsale(data) {
data: data
})
}
// 批量取消申请上架
export function cancelOnsaleAllData(data) {
return request({
url: '/system/goodsNew/cancelOnsaleAll',
method: 'post',
data: data
})
}
......@@ -143,14 +143,3 @@ export function exportUnSendOrderGoodsData(query) {
params: query
})
}
//
// // 单商品订单 补单发货
// export function toReissueOrderData(data) {
// return request({
// url: '/system/order/orderListAgainSend',
// method: 'post',
// data: data
// })
// }
......@@ -73,7 +73,7 @@ export function getSearchParams(query) {
// })
// }
// 列表
// 售后列表
export function getRetreatList(query) {
return request({
url: '/system/retreat/list',
......@@ -117,3 +117,12 @@ export function getASAdressData(query) {
params: query
})
}
// 获取 售后 tab 数量
export function getTabCountData(data) {
return request({
url: '/system/retreat/refundListTopNum',
method: 'post',
data: data
})
}
......@@ -126,7 +126,7 @@
</template>
<script>
import { getPurviewData,getMyAssetListData,getOrganizationData, getBankDetailsData,getBankcardListData, addBankcardData,editBankcardData ,delBankcardData } from '@/api/module/bankcard'
import { getMyAssetListData,getOrganizationData, getBankDetailsData,getBankcardListData, addBankcardData,editBankcardData ,delBankcardData } from '@/api/module/bankcard'
export default {
name: "Index",
data() {
......@@ -163,18 +163,8 @@
this.getBankcardList()
/** 获取主体信息 */
this.getOrganization();
/** 获取 提现等操作权限 */
this.getPurview();
},
methods: {
/** 获取 提现等操作权限 */
getPurview() {
getPurviewData().then(res=> {
if (res.code == 1) {
//this.isAllowWithdraw = res.data.is_allow_withdraw;
}
});
},
/** 我的资产 所有数据 */
getMyAssetList() {
getMyAssetListData( {seller_id:this.seller_id} ).then(res=> {
......@@ -184,14 +174,14 @@
this.withdrawalBalance = Number(res.data.account_info.new_balance) / 100;
this.withdrawalProgress = Number(res.data.account_info.new_frozen_money) / 100;
this.currentBalance = this.add(this.withdrawalBalance,this.withdrawalProgress);
this.isAllowWithdraw = res.data.account_info.is_allow_withdraw ? true : false;
}
// 账户管理
if(res.data.bank_list) {
this.bankcardList = res.data.bank_list;
}
}else {
let msg = res.message ? res.message : '获取用户列表失败'
this.$message({type:'error',message: msg});
this.$message({type:'error',message: res.message ? res.message : '获取用户列表失败'});
}
});
},
......
......@@ -143,7 +143,7 @@
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" :formatter="formatTime" prop="add_time"/>
<el-table-column label="审核说明" align="center" prop="shsm" width="240px"/>
<el-table-column label="审核说明" align="center" prop="last_perate_content" width="240px"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<div v-if='radiomodel==3&&scope.row.up_onsale===1'>
......@@ -232,7 +232,7 @@
<script>
import goodDetail from './components/goodsdetail'
import editGood from '@/views/system/goods/add/index'
import {getlistGoods, shelvesStatus, delgoodsStatus,cancelOnsale} from '@/api/module/goodsgement'
import { getlistGoods, shelvesStatus, delgoodsStatus,cancelOnsale,cancelOnsaleAllData } from '@/api/module/goodsgement'
import {dateFormat} from '@/utils'
export default {
......@@ -506,18 +506,37 @@
/** 批量取消申请上架 */
handleCancelUpale() {
// id组成的数组 this.ids
if( this.ids.length <= 0 ) {
this.$message({type:'warning',message:'请先选择需要操作的数据'});
return
}
// let isContinue = true;
// for (let i = 0; i < this.ids.length; i++) {
//
// }
//
// if (!isContinue) {
// this.$message({type:'warning',message:'请先选择需要操作的数据'});
// return
// }
//return;
let ids = {goods_id:this.ids.join(',')};
this.$confirm('是否批量取消所选中的商品的上架申请', '批量取消申请上架', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
center: true
}).then(async() => {
let res = ''//await fn(re)
let res = await cancelOnsaleAllData(ids)
if (res.code == 1) {
this.$message({type:'success',message:'批量取消成功'});
} else {
this.$message({type:'success',message: res.message ? res.message : 0});
this.$message({type:'success',message: res.message ? res.message : '批量取消失败'});
}
this.getList()
}).catch(() => {});
},
// 取消上架申请
......
......@@ -7,6 +7,12 @@
<el-step title="订单完成"></el-step>
</el-steps>
</el-card>
<p class="order-status-con" v-if="isShowOrderStatusInfo(orderDetail.status,orderDetail.settlement_status)">
<span>订单状态:</span>
<span>已完成,已结算</span>
</p>
<el-card style="margin-top: 20px;">
<div class="orderList">
<div class="orderItem">
......@@ -319,12 +325,21 @@ export default {
onlyEidtPlaceholder: false,
goShippingNum: 0, // 发货类型
goods_ids: null, // 发货的商品订单 id
// isShowOrderStatus: false,
//orderStatusInfo: ''
}
},
watch: {},
created() {},
mounted() {},
methods: {
/** 订单最终状态 */
isShowOrderStatusInfo(status,settlementStatus) {
let isShow = (status == 3 && settlementStatus == 1) ? true : false;
// console.log("订单最终状态:",status,settlementStatus);
// this.orderStatusInfo = ''
return isShow;
},
/** 商品 发货状态 */
goodsStatusFormatter(status) {
let res = '—';
......@@ -853,9 +868,18 @@ export default {
.orderDetail {
height: 660px;
padding: 0 20px;
overflow-y: auto;
}
.order-status-con {
padding: 20px;
border: 1px solid #eee;
border-radius: 4px;
font-size: 16px;
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.1);
}
.text-r {
justify-content: center;
background: #F7F8FA;
......
......@@ -57,8 +57,8 @@
</el-select>
</el-form-item>
<el-form-item label="是否售后:" prop="shzt" v-show="activeName == 'fourth' ">
<el-select v-model="form.shzt" placeholder="请选择售后状态" style="width:150px;">
<el-form-item label="是否售后:" prop="is_after_sale" v-show="activeName == 'fourth' ">
<el-select v-model="form.is_after_sale" placeholder="请选择售后状态" style="width:150px;">
<el-option label="全部" value="-1"></el-option>
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
......@@ -189,11 +189,7 @@
{{ item.order.mobile }}
</template>
</el-table-column>
<el-table-column prop="shzt" label="售后状态" width="180" align="center">
<template slot-scope="scope">
{{ 售后状态 }}
</template>
</el-table-column>
<el-table-column prop="refund_status" label="售后状态" width="180" align="center" :formatter="refundStatusFormatter"></el-table-column>
<el-table-column prop="物流信息" label="物流信息" width="120" align="center">
<template slot-scope="scope">
<el-button type="text" @click="handleExpressInfo(scope.row)">查看物流</el-button>
......@@ -223,6 +219,7 @@
</el-pagination>
</div>
</el-card>
<!-- 订单详情 对话框 -->
<el-dialog title="订单详情" width="85%" :close-on-click-modal="false" :destroy-on-close="true"
:visible.sync="detailDialog" center :before-close="handleClose">
<div style="height:100%;">
......@@ -230,7 +227,7 @@
</div>
</el-dialog>
<!-- 批量发货 -->
<el-dialog title="批量发货流程" :visible.sync="isDeliveryOpen" width="60%" center :before-close="cancelExport">
<el-dialog title="批量发货流程" :visible.sync="isDeliveryOpen" width="60%" center :before-close="cancelExport" :close-on-click-modal="false" :destroy-on-close="true">
<el-steps :active="3" align-center style="width:95%;margin: 0 auto;">
<el-step title="导出发货Excel表单" description="">
<template slot="icon">
......@@ -303,16 +300,20 @@
</div>
</el-dialog>
<!-- 批量发货 展示失败数据-->
<el-dialog title="批量发货提醒" width="60%" class="" :visible.sync="dialogDeliveryInfor" >
<div class="">
<p>部分订单发货失败,失败订单信息如下表所示</p>
<el-table :data="failDeliveryList">
<el-dialog title="批量发货提醒" center width="60%" class="delivery-fail-data-dialog" :visible.sync="dialogDeliveryInfor"
:close-on-click-modal="false" append-to-body :before-close="closeDeliverFailDialog">
<div class="delivery-fail-table-con">
<p class="delivery-table-tip">部分订单发货失败,失败订单信息如下表所示</p>
<el-table border :data="failDeliveryList">
<el-table-column prop="goods_order_sn" label="商品订单号" align="center"></el-table-column>
<el-table-column prop="order_sn" label="总订单号" align="center"></el-table-column>
<el-table-column prop="goods_status" label="状态" align="center"></el-table-column>
<el-table-column prop="reason" label="原因" align="center"></el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelDeliveryInfor">取 消</el-button>
<el-button type="primary" @click="subDelivery">确 定</el-button>
<el-button size="small" @click="cancelDeliveryInfor">取 消</el-button>
<el-button size="small" type="primary" @click="exportFailDeliveryExcel">导出失败订单</el-button>
</span>
</el-dialog>
......@@ -321,7 +322,8 @@
<script>
import { indexInfo } from '@/api/webSite'
import {listOrder, exportOrder, orderInfo, expressInfoNew, deliveryOrder, expressList, getOrderTabData , exportUnSendOrderGoodsData,deliveryOrderExport} from '@/api/module/order'
import { listOrder, exportOrder, orderInfo, expressInfoNew, deliveryOrder, expressList, getOrderTabData ,
exportUnSendOrderGoodsData,deliveryOrderExport } from '@/api/module/order'
import {dateFormat} from '@/utils'
import OrderDetail from './components/orderDetail.vue'
import XLSX from "xlsx"
......@@ -352,7 +354,7 @@
dateTime: [],
finishTime: [],
sendTime: [],
shzt: ''
is_after_sale: ''
},
goodsStatus: 1,
tableDataList: [], // 后台返回所有数据
......@@ -496,6 +498,32 @@
}
return res
},
/** 售后状态 */
refundStatusFormatter(row, column, cellValue, index) {
let statusText = '--'
if (cellValue == 1) {
statusText = '申请仅退款'
}else if (cellValue == 2) {
statusText = '同意仅退款,退款完成'
}else if (cellValue == 3) {
statusText = '卖家拒绝退款,售后关闭'
}else if (cellValue == 4) {
statusText = '申请退货退款'
}else if (cellValue == 5) {
statusText = '同意退货退款,等待买家退货'
}else if (cellValue == 6) {
statusText = '拒绝退货退款,售后关闭'
}else if (cellValue == 7) {
statusText = '买家退货,等待卖家收货'
}else if (cellValue == 8) {
statusText = '同意退货退款,退款完成'
}else if (cellValue == 9) {
statusText = '拒绝收货,售后关闭'
}else if (cellValue == 10) {
statusText = '买家取消售后,售后关闭'
}
return statusText
},
// 重置
resetBtn(iscall) {
this.form = {
......@@ -507,7 +535,7 @@
finishTime: [],
sendTime: [],
settlement_status: '',
shzt: ''
is_after_sale: ''
}
this.currentPage = 1
this.pageSize = 20
......@@ -589,8 +617,8 @@
if(this.form.Tel != '') {
params['mobile'] = this.form.Tel
}
if(this.form.shzt == '0' || this.form.shzt == '1') {
params['shzt'] = this.form.shzt
if(this.form.is_after_sale == '0' || this.form.is_after_sale == '1') {
params['is_after_sale'] = this.form.is_after_sale
}
if (this.form.settlement_status == '0' || this.form.settlement_status == '1') {
......@@ -754,6 +782,10 @@
},
/** 提交导入数据 */
subDelivery() {
this.failDeliveryList = [
{"goods_order_sn":1},
];
if (this.excelList.length === 0) {
this.$message({type: 'warning', message: '请先上传填写好的表格数据'});
return
......@@ -761,29 +793,72 @@
if (this.excelList.length > 0 && this.excelList[0].goods_order_sn && this.excelList[0].express_name && this.excelList[0].express_sn) {
deliveryOrderExport(this.excelList).then(res => {
if (res.code === 1) {
if (res.code == 1) {
if (res.data && res.data.fail_list && res.data.fail_list.length > 0) {
this.failDeliveryList = res.data.fail_list;
this.dialogDeliveryInfor = true;
this.$message({type: 'warning', message: '部分订单发货成功,失败订单可以导出'});
} else {
this.isDeliveryOpen = false;
this.excelList = [];
this.$refs.upload.clearFiles();
this.$message({type: 'success', message: '批量发货成功'});
this.getListOrder();
}
} else {
let msg = res.message || '批量发货失败'
this.$message({type: 'error', message: msg});
this.$message({type: 'error', message: res.message ? res.message : '批量发货失败'});
}
this.getListOrder();
});
} else {
this.$message({type: 'error', message: '部分订单未填写物流公司或物流单号,请完善后再上传'});
}
},
/** 导出 table数据 */
exportFailDeliveryExcel(){
let list = [];
list = this.failDeliveryList;
let exportList = [];
this.failDeliveryList.forEach(item=> {
let obj = {};
obj['goods_order_sn'] = item.goods_order_sn
obj['order_sn'] = item.order_sn
obj['goods_status'] = item.goods_status
obj['reason'] = item.reason
exportList.push(obj);
});
// 列标题,逗号隔开,每一个逗号就是隔开一个单元格
let title = `商品订单号,总订单号,发货状态,失败原因\n`;
//增加\t为了不让表格显示科学计数法或者其他格式
for(let i = 0 ; i < exportList.length ; i++ ){
for(let item in exportList[i]){
title += `${exportList[i][item] + '\t'},`;
}
title += '\n';
}
//encodeURIComponent解决中文乱码
let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(title);
//通过创建a标签实现
var link = document.createElement("a");
link.href = uri;
//对下载的文件命名
link.download = "发货失败订单汇总表.csv";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
} ,
/** 关闭 发货失败 数据展示 */
cancelDeliveryInfor() {
this.isDeliveryOpen = false;
this.dialogDeliveryInfor = false;
},
/** 关闭 发货失败窗口 前 */
closeDeliverFailDialog() {
this.cancelDeliveryInfor();
this.failDeliveryList = [];
},
/** 导出 发货失败的数据 */
exportFailDeliverList() {
this.failDeliveryList = [];
},
/** 查看物流信息 */
......@@ -901,13 +976,12 @@
}
.form-box {
/*margin-bottom: 20px;*/
/*padding-top: 10px;*/
}
.form-params {
background-color: #F7F8FA;
/*background-color: #F7F8FA;*/
}
/deep/.form-params .el-form-item {
......@@ -988,4 +1062,26 @@
font-size: 12px;
color: red!important;
}
/* 批量发货 对话框 */
.delivery-fail-data-dialog {
height: 100%;
overflow: hidden;
}
.delivery-fail-data-dialog /deep/ .el-dialog {
height: 80%;
overflow: hidden;
}
.delivery-fail-data-dialog /deep/ .el-dialog .el-dialog__body {
height: calc(100% - 120px);
overflow: auto;
padding: 15px 20px;
}
.delivery-table-tip {
padding: 0;
margin: 0 0 15px;
text-align: center;
}
</style>
<template>
<div class="app-container after-sale-detail">
<div class="after-sale-detail">
<el-card>
<!-- 仅退款 -->
<div v-if="asOrderType == 1" class="as-step-info">
......@@ -21,6 +21,15 @@
</div>
</el-card>
<el-card style="margin: 10px 0;" v-if="isShowRefundStatusText">
<p>
<span>售后状态:</span>
<span>{{ refundStatusText }}</span>
<span>退款金额:</span>
<span>{{ asOrderDetail.apply_price / 100 }}</span>
</p>
</el-card>
<el-card class="as-order-details">
<!-- 倒计时 提示 -->
<p class="count-down-con" v-if="!(asOrderDetail.status == 5 || asOrderDetail.status == -1)"><i class="spec-icon-w el-icon-warning"></i>剩余处理时间: <span class="cd-time-span">{{ cdHour }} 小时 {{ cdMinute }}</span> 请在期限内处理,逾期不处理,系统将自动退款到买家账户</p>
......@@ -206,7 +215,11 @@
:title="dialogASTypeTitle"
:visible.sync="isASTypeDialog"
width="50%"
center>
center
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
>
<div v-if="onlyIsAgree == 1" class="only-refund-agree">
<p>同意退款,该订单将关闭,请您仔细核实商品发货状态以及退款金额,若因此导致的损失将由您自己承担!</p>
<p>确定同意同款吗?</p>
......@@ -261,12 +274,19 @@
import { dateFormat } from '@/utils' //getASOrderDetail
export default {
name: "Edit",
props: {
// 当前 售后订单的 id
asGoodId: {
type: String,
required: true
}
},
data() {
return {
// Refund only 仅退款
// Return refund 退货退款
timer: null,
asGoodId: 0, // 当前 售后订单的 id
//asGoodId: 0, // 当前 售后订单的 id
asOrderType: 1, // 售后类型 1-仅退款; 2-退货退款
// 仅退款 流程,每个步骤文字提示
step: 1, // 激活 当前步骤
......@@ -328,20 +348,23 @@
order_refund_address:'',
isFinishedButtonDisabled: false,
returnRefundDisabled: false, // 仅 退货退款 订单,需要此参数,控制,拒收包裹-同意退款按钮是否可以点击
isShowRefundStatusText: false,
refundStatusText: '',
} // return end
},
watch: {
$route(to,from) {
if(this.$route.query.refund_sn) {
this.asGoodId = this.$route.query.refund_sn;
this.getDetail();
}
}
// $route(to,from) {
// if(this.$route.query.refund_sn) {
// this.asGoodId = this.$route.query.refund_sn;
// this.getDetail();
// }
// }
},
created() {
this.sellerId = this.$store.state.user.sellerid;
/** 获取 当前售后 订单的id */
this.asGoodId = this.$route.query.refund_sn;
//this.asGoodId = this.$route.query.refund_sn;
/** 查询 售后订单详情 */
this.getDetail();
/** 获取 退货退款的发送 地址 */
......@@ -351,6 +374,27 @@
},
methods: {
/** 售后状态 */
refundTypeStatus(refundType,goodsStatus,status ) {
this.refundStatusText = '';
this.isShowRefundStatusText = false;
if (status == 5) {
if(refundType == 1 && goodsStatus == 0) {
this.isShowRefundStatusText = true;
this.refundStatusText = '未发货仅退款成功'
}
if(refundType == 1 && goodsStatus == 1) {
this.isShowRefundStatusText = true;
this.refundStatusText = '已发货仅退款成功'
}
if(refundType == 2 && goodsStatus == 2) {
this.isShowRefundStatusText = true;
this.refundStatusText = '已完成退货退款成功'
}
}
},
returnInofImgList(imgsStr) {
let imgList = [];
if(imgsStr) {
......@@ -547,6 +591,8 @@
}else {
this.asApplyList = [];
}
console.log(111,this.asOrderType,this.goodsOrderDetail.goods_status,this.asOrderDetail.status)
this.refundTypeStatus(this.asOrderType,this.goodsOrderDetail.goods_status,this.asOrderDetail.status)
}
});
},
......@@ -807,7 +853,7 @@
<style scoped>
.after-sale-detail {
overflow: auto;
/*overflow: auto;*/
}
.as-detail-title {
text-align: center;
......
<template>
<div class="app-container">
<el-card class="box-card">
<el-card class="box-card card-spe-con">
<!-- 状态页签 -->
<el-tabs v-model="activeName" @tab-click="handleClick" class="after-sale-tabs">
<el-tab-pane label="未处理" name="first"></el-tab-pane>
<el-tab-pane label="处理中" name="second"></el-tab-pane>
<el-tab-pane label="已完成" name="third"></el-tab-pane>
<el-tab-pane name="first">
<div slot="label">未处理{{ numFormatter(untreatedNum) }}</div>
</el-tab-pane>
<el-tab-pane name="second">
<div slot="label">处理中{{ numFormatter(inProcessNum) }}</div>
</el-tab-pane>
<el-tab-pane name="third">
<div slot="label">已完成{{ numFormatter(completedNum) }}</div>
</el-tab-pane>
</el-tabs>
<div class="table-all-con">
<!-- 搜索条件 -->
<el-form class="form-params" :model="queryParams" label-width="auto" :inline="true" size="small">
<el-form-item label="申请时间" prop="applyTime">
......@@ -22,21 +29,14 @@
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="商品ID" prop="goods_id">-->
<!-- <el-input-->
<!-- v-model="queryParams.goods_id"-->
<!-- placeholder="请输入商品id"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- /></el-form-item>-->
<el-form-item label="商品名称" prop="goods_title">
<el-input
v-model="queryParams.goods_title"
placeholder="请输入商品名称"
clearable
@keyup.enter.native="handleQuery"
/></el-form-item>
/>
</el-form-item>
<el-form-item label="退换货类型" prop="refund_type">
<el-select v-model="queryParams.refund_type" placeholder="全部类型" clearable width="120px">
......@@ -45,17 +45,38 @@
</el-select>
</el-form-item>
<el-form-item label="订单号" prop="goods_order_sn">
<el-form-item label="总订单号" prop="order_sn">
<el-input
style="width:250px;"
v-model="queryParams.order_sn"
placeholder="请输入商品订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="商品订单号" prop="goods_order_sn">
<el-input
style="width:250px;"
v-model="queryParams.goods_order_sn"
placeholder="请输入订单号"
placeholder="请输入商品订单号"
clearable
@keyup.enter.native="handleQuery"
/></el-form-item>
/>
</el-form-item>
<el-form-item label="买家手机号" prop="mobile">
<el-input
style="width:250px;"
v-model="queryParams.mobile"
placeholder="请输入买家手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="退换货原因" prop="reason">
<el-select v-model="queryParams.reason" placeholder="全部类型" size="small" clearable >
<el-select v-model="queryParams.reason" placeholder="全部类型" size="small" clearable>
<el-option v-for="item in needMsgOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
......@@ -66,18 +87,47 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 表头 -->
<div class="table-header-spe">
<el-table class="title_table hxz-el-table" align="center">
<el-table-column label="商品图/商品名称" align="center"></el-table-column>
<el-table-column label="退换货类型" align="center" width="120"></el-table-column>
<el-table-column label="退换货原因" align="center" width="120"></el-table-column>
<el-table-column label="申请时间" align="center" width="120"></el-table-column>
<el-table-column label="到期时间" align="center" width="120"></el-table-column>
<el-table-column label="买家手机号" align="center" width="120"></el-table-column>
<el-table-column label="当前处理进度" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="120"></el-table-column>
</el-table>
</div>
<!-- 列表 -->
<el-table class="after-sale-table" :data="afterSaleList" :height="afterSaleHeight">
<!-- <el-table-column label="商品ID" align="center" width="150" prop="goodsId"></el-table-column>-->
<el-table-column label="商品名称" align="center" width="280" prop="title"></el-table-column>
<el-table-column label="订单号" align="center" width="240" prop="goods_order_sn"></el-table-column>
<el-table-column label="退换货类型" align="center" width="180">
<div class="table-all-body-con">
<el-card v-for="(item, index) in afterSaleList" :key="index" class="card1">
<div slot="header" class="el-card-header-spe">
<div style="float:left;">
<span>总订单号:</span>
<span>{{ item.order_sn }}</span>
<span style="margin: 0 0 0 30px;">商品订单号:</span>
<span>{{ item.goods_order_sn }}</span>
</div>
<div style="float:right;">
<span>订单状态:</span>
<span>{{ orderDeliveryFormatter(item.goods_status) }}</span>
</div>
</div>
<div class="item-table">
<el-table
border
:show-header="false"
:data="[item]">
<el-table-column prop="title" label="商品图/商品名称" align="center"></el-table-column>
<el-table-column label="退换货类型" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.refund_type == 1">仅退款</span>
<span v-if="scope.row.refund_type == 2">退货退款</span>
</template>
</el-table-column>
<el-table-column label="退换货原因" align="center" prop="reason">
<el-table-column label="退换货原因" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.reason==1">协商一致退款</span>
<span v-if="scope.row.reason==2">质量问题</span>
......@@ -89,24 +139,29 @@
<span v-if="scope.row.reason==8">其他</span>
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="created_time">
<el-table-column label="申请时间" align="center" width="120">
<template slot-scope="scope">
{{formatter(scope.row.created_time)}}
</template>
</el-table-column>
<el-table-column label="到期时间" align="center" prop="deadline">
<el-table-column label="到期时间" align="center" width="120">
<template slot-scope="scope">
{{formatter(scope.row.deadline)}}
{{formatter(scope.row.created_time)}}
</template>
</el-table-column>
<el-table-column label="操作" width="140" align="center">
<el-table-column prop="mobile" label="买家手机号" align="center" width="120"></el-table-column>
<el-table-column label="当前处理进度" align="center" :formatter="refundStatusText"></el-table-column>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button size="small" type="text" @click="handleInfo(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
</div>
<!-- 分页 -->
<div class="pagination-con">
<div class="pagination-con" v-if="total > 0">
<el-pagination
:page-size="pageSize"
:current-page="currentPage"
......@@ -118,27 +173,44 @@
>
</el-pagination>
</div>
</div>
</el-card>
<!-- 售后详情 弹窗 -->
<el-dialog title="售后详情" width="75%" class="after-sale-dialog" :visible.sync="dialogAfterSale"
:destroy-on-close="true" :close-on-click-modal="false" center>
<Edit v-if="dialogAfterSale" :as-good-id="asGoodId"></Edit>
</el-dialog>
</div>
</template>
<script>
import { getRetreatList } from '@/api/module/retreat'
import { dateFormat } from '@/utils'
import {getRetreatList, getTabCountData} from '@/api/module/retreat'
import {dateFormat} from '@/utils'
import Edit from './../edit'
export default {
name: "Index",
components: {
Edit
},
data() {
return {
goodsStatus: 1,
activeName: 'first',
untreatedNum: '', // 未处理
inProcessNum: '', // 处理中
completedNum: '', // 已完成
queryParams: {
status: 0,
applyTime: [],
// goods_id: '',
order_sn: '',
goods_title: '',
refund_type: '',
goods_order_sn: '',
reason: '',
mobile:''
},
pickerOptions: {
shortcuts: [{
......@@ -175,42 +247,91 @@
],
// 退换货原因
needMsgOptions: [
{value: -1,label: '全部原因'},
{value: 1,label: '协商一致退款'},
{value: 2,label: '质量问题'},
{value: 3,label: '物流问题'},
{value: 4,label: '假冒品牌'},
{value: 5,label: '少件/漏发/破损/污渍'},
{value: 6,label: '7天无理由'},
{value: 7,label: '拍错/多拍/不想要'},
{value: 8,label: '其他'},
{value: -1, label: '全部原因'},
{value: 1, label: '协商一致退款'},
{value: 2, label: '质量问题'},
{value: 3, label: '物流问题'},
{value: 4, label: '假冒品牌'},
{value: 5, label: '少件/漏发/破损/污渍'},
{value: 6, label: '7天无理由'},
{value: 7, label: '拍错/多拍/不想要'},
{value: 8, label: '其他'},
],
fullHeight: 0,
afterSaleHeight: 200,
// fullHeight: 0,
// afterSaleHeight: 200,
currentPage: 1,
pageSize: 20,
total: 0,
// 售后列表
afterSaleList: [],
// 售后详情
dialogAfterSale: false,
}
}, // data end
watch: {
fullHeight(val) {
let formHeight = document.getElementsByClassName('form-params')[0].clientHeight;
let tabsHeight = document.getElementsByClassName('after-sale-tabs')[0].clientHeight;
this.afterSaleHeight = val - formHeight -tabsHeight - 40 - 40
}
// fullHeight(val) {
// let formHeight = document.getElementsByClassName('form-params')[0].clientHeight;
// let tabsHeight = document.getElementsByClassName('after-sale-tabs')[0].clientHeight;
// this.afterSaleHeight = val - formHeight -tabsHeight - 40 - 40
// }
},
created() {
this.$nextTick(() => {
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
})
// this.$nextTick(() => {
// this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
// })
},
mounted() {
this.searchList();
this.getTabCount();
// let fuck = 'undefined'
// let a = Number(fuck)
// console.log(250,a);
},
methods: {
/** 发货状态 */
orderDeliveryFormatter(status) {
let text = '-'
if (status == 0) {
text = '未发货'
}else if (status == 1) {
text = '已发货'
}else if (status == 2) {
text = '已收货'
}else if (status == 3) {
text = '配货中'
}else if (status == 4) {
text = '拒收'
}
return text
},
/** 获取 售后 tab 数量 */
getTabCount() {
getTabCountData().then(res => {
if (res.code == 1) {
this.untreatedNum = res.data.untreated_num
this.inProcessNum = res.data.in_process_num
this.completedNum = res.data.completed_num
}
});
},
/** tab 数量 转化 */
numFormatter(num) {
let numStr = ''
let number = Number(num);
if (number) {
numStr = number <= 99 ? '(' + num + ')' : '(99+)'
} else {
numStr = ""
}
// if (num == '' || num == 0) {
// numStr = ''
// } else if (0 < num <= 99) {
// numStr = '(' + num + ')'
// } else if (num > 99) {
// numStr = '99+'
// }
return numStr
},
/** 顶部 状态页签切换
* 1-未处理;2-处理中;3-已完成
* */
......@@ -240,6 +361,37 @@
// this.queryParams.applyTime = [];
// }
// },
/** 售后进度 文案 */
refundStatusText(row) {
let text = '--'
if(row.close_reason == 6) {
text = '买家取消,售后关闭'
}else {
if (row.refund_type == 1) {
if(row.status == 1) {
text = '等待卖家同意仅退款'
} else if (row.status == 5) {
text = '卖家同意退款,售后完成'
} else if (row.status == -1) {
text = '卖家拒绝仅退款,售后关闭'
}
} else if (row.refund_type == 2) {
if(row.status == 1) {
text = '等待卖家同意退货退款'
} else if (row.status == 2) {
text = '等待买家退货'
} else if (row.status == 3) {
text = '等待卖家同意退款或拒收包裹'
} else if (row.status == 5) {
text = '卖家收货、同意退款,退款完成'
} else if (row.status == -1) {
text = '卖家拒绝退货退款'
}
}
}
return text
},
searchList() {
this.currentPage = 1;
this.getList();
......@@ -252,7 +404,7 @@
status: this.goodsStatus,
}
if( this.queryParams.applyTime && this.queryParams.applyTime.length === 2) {
if (this.queryParams.applyTime && this.queryParams.applyTime.length === 2) {
params['apply_start_time'] = new Date(this.queryParams.applyTime[0]).getTime() / 1000
params['apply_end_time'] = new Date(this.queryParams.applyTime[1]).getTime() / 1000
}
......@@ -269,17 +421,25 @@
params['goods_order_sn'] = this.queryParams.goods_order_sn;
}
if (this.queryParams.order_sn != '') {
params['order_sn'] = this.queryParams.order_sn;
}
if (this.queryParams.mobile != '') {
params['mobile'] = this.queryParams.mobile;
}
if (this.queryParams.reason != -1 && this.queryParams.reason != '') {
params['reason'] = this.queryParams.reason;
}
getRetreatList(params).then(res=> {
if(res.code === 1) {
getRetreatList(params).then(res => {
if (res.code === 1) {
this.afterSaleList = res.data.data;
this.total = res.data.count;
}
});
this.getTabCount();
},
/** 重置 操作 */
resetQuery() {
......@@ -288,11 +448,13 @@
},
/** 售后 订单 详情 */
handleInfo(row) {
let id = row.refund_sn ? row.refund_sn : 0;
this.$router.push({
path: '/system/repeat/edit',
query: { refund_sn: id }
});
// let id = row.refund_sn ? row.refund_sn : '';
this.asGoodId = row.refund_sn ? row.refund_sn : ''
// this.$router.push({
// path: '/system/repeat/edit',
// query: { refund_sn: id }
// });
this.dialogAfterSale = true;
},
/** 调整 列表当前页面 最大展示条数 */
handleSizeChange(val) {
......@@ -311,11 +473,12 @@
this.queryParams = {
status: 0,
applyTime: [],
//goods_id: '',
order_sn: '',
goods_title: '',
refund_type: '',
goods_order_sn: '',
reason: '',
mobile: ''
}
},
/** 搜索条件 键盘enter */
......@@ -331,18 +494,79 @@
</script>
<style scoped>
/deep/ .el-dialog__body{
.card-spe-con {
height: 100%;
overflow:hidden;
/*overflow: auto;*/
}
.card-spe-con /deep/ .el-card__body {
height: calc(100% - 40px);
overflow: hidden;
}
/deep/.after-sale-tabs .el-tabs__item {
/*/deep/ .el-dialog__body {*/
/* height: 100%;*/
/* overflow: hidden;*/
/*}*/
/deep/ .after-sale-tabs .el-tabs__item {
line-height: 30px;
}
/deep/.el-form--inline .el-form-item {
/deep/ .el-form--inline .el-form-item {
margin-right: 15px;
}
.table-all-con {
height: calc(100% - 40px);
overflow: auto;
}
.table-all-body-con {
/*height: calc(100% - 102px);*/
/*overflow: auto;*/
}
/* 列表table 样式 */
.card1 {
margin-bottom: 20px;
}
.table-header-spe {
background-color: #F7F8FA;
padding: 0 34px 0 22px;
margin: 5px 0;
}
/deep/ .title_table .el-table__body-wrapper {
display: none !important;
height: 0 !important;
}
/deep/ .title_table tr th {
border-bottom: 0 !important;
}
/deep/ .title_table::before {
height: 0;
}
.pagination-con {
text-align: center;
margin-top: 15px;
}
.after-sale-dialog {
height: 90%;
overflow: hidden;
}
.after-sale-dialog /deep/ .el-dialog {
overflow: hidden;
height: 100%;
}
.after-sale-dialog /deep/ .el-dialog__body {
overflow: auto;
height: calc(100% - 120px);
padding: 10px 20px;
}
</style>
......@@ -418,8 +418,10 @@
brand_business_auth: [{ required: true, message: '品牌经营授权至少上传一张图片', validator: authBusValidator }],
},
downTemplatehttp: '',
shopTemplatehttp : 'http://img3.jxhh.com/shop/brand.doc',
factoryTemplatehttp : 'http://img3.jxhh.com/shop/factory.doc',
// shopTemplatehttp : 'http://excel.jxhh.com/brand_new.doc',
// factoryTemplatehttp : 'http://excel.jxhh.com/brand_new.doc',
shopTemplatehttp : 'http://excel.jxhh.com/brand_new.doc',
factoryTemplatehttp : 'http://excel.jxhh.com/brand_new.doc',
}
},
created() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论