|
|
@@ -0,0 +1,328 @@
|
|
|
+<template>
|
|
|
+ <div class="app-list-content">
|
|
|
+ <x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
+
|
|
|
+ <template #slot-tabs>
|
|
|
+ <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="handleClick">
|
|
|
+ <el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="`${item.text}`" :name="item.key"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-refundType="{scope}">
|
|
|
+ {{ scope.row.refundType==1?'退货并退款':'仅退款' }}
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-status="{scope}">
|
|
|
+ {{ scope.row.status==0?'待审核': scope.row.status==1 ? '已通过' : scope.row.status==2 ? '已驳回' : scope.row.status==3?'已取消':'其他' }}
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #slot-export-order>
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:60px;" @click="exportData()">导出记录</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-addTime="{scope}">
|
|
|
+ <span>
|
|
|
+ {{ scope.row.addTime?scope.row.addTime.substr(5,11):'' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-passTime="{scope}">
|
|
|
+ <span>
|
|
|
+ {{ scope.row.passTime?scope.row.passTime.substr(5,11):'' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-orderTime="{scope}">
|
|
|
+ <span>
|
|
|
+ {{ scope.row.orderTime?scope.row.orderTime.substr(5,11):'' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #slot-search-option="{scope}">
|
|
|
+ <el-input v-model="customName" placeholder="客户名称" size="mini" style="width:110px;" :clearable="true" ref="customSearchRef" @input="changeSearch()" @focus="name=''"></el-input>
|
|
|
+ <el-select size="mini" v-model="currentStaffName" placeholder="操作人" style="width:110px;margin-left:8px;" @change="getKdStaff" :clearable="true">
|
|
|
+ <el-option v-for="item in staffList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span style="margin-left:9px;font-size:18px;">订单日期:</span>
|
|
|
+ <el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
|
|
|
+ class="custom-date-picker" end-placeholder="结束日期" :picker-options="pickerOptions" size="mini" style="margin-right:8px;">
|
|
|
+ </el-date-picker>
|
|
|
+ <span style="margin-left:9px;font-size:18px;">售后申请日期:</span>
|
|
|
+ <el-date-picker v-model="currentRefundDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchRefundDate" value-format="yyyy-MM-dd"
|
|
|
+ class="custom-date-picker" end-placeholder="结束日期" :picker-options="pickerOptions" size="mini" style="margin-right:8px;">
|
|
|
+ </el-date-picker>
|
|
|
+
|
|
|
+ <el-radio-group v-model="status" @change="changeStatus" style="margin-right:20px;padding-top:6px;margin-left:4px;">
|
|
|
+ <el-radio label="-1">全部</el-radio>
|
|
|
+ <el-radio label="0">待审</el-radio>
|
|
|
+ <el-radio label="1">通过</el-radio>
|
|
|
+ <el-radio label="2">驳回</el-radio>
|
|
|
+ <el-radio label="3">取消</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </x-crud>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapGetters, mapActions } from 'vuex';
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ app: null,
|
|
|
+ tabIndex: '-1',
|
|
|
+ tabsData: [
|
|
|
+ {
|
|
|
+ text: '全部',
|
|
|
+ key: '-1',
|
|
|
+ val: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '已通过',
|
|
|
+ key: '1',
|
|
|
+ val: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '已驳回',
|
|
|
+ key: '2',
|
|
|
+ val: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '已取消',
|
|
|
+ key: '3',
|
|
|
+ val: 0
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ modalData: {},
|
|
|
+ drapShow: false,
|
|
|
+ name1:'',
|
|
|
+ mobile1:'',
|
|
|
+ confirmMobile1:'',
|
|
|
+ fileUrl:'',
|
|
|
+ currentStaffName:'',
|
|
|
+ currentStaffId:0,
|
|
|
+ staffList:[],
|
|
|
+ pickerOptions: {
|
|
|
+ shortcuts: [{
|
|
|
+ text: '最近一周',
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '最近一个月',
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '最近三个月',
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ startTime:'',
|
|
|
+ endTime:'',
|
|
|
+ searchTime:'',
|
|
|
+ currentDateList:[],
|
|
|
+ refundStartTime:'',
|
|
|
+ refundEndTime:'',
|
|
|
+ refundSearchTime:'',
|
|
|
+ currentRefundDateList:[],
|
|
|
+ customName:'',
|
|
|
+ status:'-1'
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['token'])
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ let that = this
|
|
|
+ that.$service.shopAdmin.getAllStaff().then(res => {
|
|
|
+ that.staffList = res.list
|
|
|
+ })
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.customSearchRef.focus()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeStatus(e){
|
|
|
+ this.status = e
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
+ changeSearch(){
|
|
|
+ let that = this
|
|
|
+ if(this.T != null){
|
|
|
+ clearTimeout(this.T)
|
|
|
+ }
|
|
|
+ this.T = setTimeout(function(){
|
|
|
+ that.refreshData()
|
|
|
+ },650)
|
|
|
+ },
|
|
|
+ getKdStaff(e){
|
|
|
+ this.currentStaffId = e
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
+ getSearchDate(){
|
|
|
+ if (this.$util.isEmpty(this.currentDateList)) {
|
|
|
+ this.searchTime = ''
|
|
|
+ this.startTime = ''
|
|
|
+ this.endTime = ''
|
|
|
+ }else{
|
|
|
+ this.searchTime = 'custom'
|
|
|
+ this.startTime = this.currentDateList[0]
|
|
|
+ this.endTime = this.currentDateList[1]
|
|
|
+ }
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
+ getSearchRefundDate(){
|
|
|
+ if (this.$util.isEmpty(this.currentRefundDateList)) {
|
|
|
+ this.refundSearchTime = ''
|
|
|
+ this.refundStartTime = ''
|
|
|
+ this.refundEndTime = ''
|
|
|
+ }else{
|
|
|
+ this.refundSearchTime = 'custom'
|
|
|
+ this.refundStartTime = this.currentRefundDateList[0]
|
|
|
+ this.refundEndTime = this.currentRefundDateList[1]
|
|
|
+ }
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
+ refreshData(){
|
|
|
+ this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,refundSearchTime:this.refundSearchTime,refundStartTime:this.refundStartTime,
|
|
|
+ refundEndTime:this.refundEndTime,customName:this.customName,shopAdminId:this.currentStaffId,status:this.status})
|
|
|
+ },
|
|
|
+ exportData(){
|
|
|
+ this.$service.cgRefund.getList({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,refundSearchTime:this.refundSearchTime,refundStartTime:this.refundStartTime,
|
|
|
+ refundEndTime:this.refundEndTime,customName:this.customName,shopAdminId:this.currentStaffId,status:this.status,pageSize:9999999,export:1}).then(res => {
|
|
|
+ if(res.file){
|
|
|
+ window.location.href = res.file
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleClick() {
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
+ onLoad({ ctx, app }) {
|
|
|
+ this.app = app;
|
|
|
+ ctx.service(this.$service.cgRefund)
|
|
|
+ .set('table', {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: 'id',
|
|
|
+ label: 'ID',
|
|
|
+ align: 'center',
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'refundSn',
|
|
|
+ label: '退款单号',
|
|
|
+ align: 'center',
|
|
|
+ width: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderTime',
|
|
|
+ label: '采购日期',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'relateOrderSn',
|
|
|
+ label: '采购单号',
|
|
|
+ align: 'center',
|
|
|
+ width: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ghsName',
|
|
|
+ label: '供货商',
|
|
|
+ align: 'center',
|
|
|
+ width: 160
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'refundPrice',
|
|
|
+ label: '金额',
|
|
|
+ align: 'center',
|
|
|
+ width: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'refundType',
|
|
|
+ label: '售后类型',
|
|
|
+ align: 'center',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'shopAdminName',
|
|
|
+ label: '操作人',
|
|
|
+ align: 'center',
|
|
|
+ width: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'addTime',
|
|
|
+ label: '申请日期',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'passTime',
|
|
|
+ label: '通过日期',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'remark',
|
|
|
+ label: '备注',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ op: {
|
|
|
+ visible: true,
|
|
|
+ props: {
|
|
|
+ width: 90,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'right',
|
|
|
+ label: '操作'
|
|
|
+ },
|
|
|
+ layout: []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .set('layout', [
|
|
|
+ ['slot-tabs'],
|
|
|
+ ['slot-search-option','flex1','slot-export-order'],
|
|
|
+ ['data-table'],
|
|
|
+ ['flex1', 'pagination']
|
|
|
+ ])
|
|
|
+ .on('refresh', async (params, { next }) => {
|
|
|
+ let result = await next(params)
|
|
|
+ })
|
|
|
+ .done();
|
|
|
+ this.refreshData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.custom-date-picker{
|
|
|
+ width:230px;
|
|
|
+}
|
|
|
+</style>
|