|
|
@@ -47,7 +47,12 @@
|
|
|
</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 @change="getCurrentCustom" v-model="currentCustomName" filterable remote reserve-keyword placeholder="搜索客户" clearable
|
|
|
+ :remote-method="searchCustom" :loading="loading" style="width:160px;margin-right:10px;" size="mini">
|
|
|
+ <el-option v-for="item in customList" :key="item.id" :label="`${item.name}`" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
<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>
|
|
|
@@ -70,6 +75,10 @@
|
|
|
|
|
|
</template>
|
|
|
|
|
|
+ <template #slot-total-amount>
|
|
|
+ <span style="font-size:15px;font-weight:bold;margin-left:15px;">售后总金额:{{ totalRefundPrice }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
</x-crud>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -150,8 +159,12 @@ export default {
|
|
|
refundEndTime:'',
|
|
|
refundSearchTime:'',
|
|
|
currentRefundDateList:[],
|
|
|
- customName:'',
|
|
|
- status:'-1'
|
|
|
+ status:'-1',
|
|
|
+ totalRefundPrice:0,
|
|
|
+ currentCustomName:'',
|
|
|
+ currentCustomId:0,
|
|
|
+ customList:[],
|
|
|
+ loading:false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -164,11 +177,24 @@ export default {
|
|
|
that.$service.shopAdmin.getAllStaff().then(res => {
|
|
|
that.staffList = res.list
|
|
|
})
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.customSearchRef.focus()
|
|
|
- })
|
|
|
},
|
|
|
methods: {
|
|
|
+ getCurrentCustom(e){
|
|
|
+ this.currentCustomId = e
|
|
|
+ this.refreshData()
|
|
|
+ },
|
|
|
+ searchCustom(query) {
|
|
|
+ let that = this
|
|
|
+ if (query !== '') {
|
|
|
+ this.loading = true;
|
|
|
+ this.$service.custom.list({name:query}).then(res=>{
|
|
|
+ that.loading = false
|
|
|
+ that.customList = res.list
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.customList = []
|
|
|
+ }
|
|
|
+ },
|
|
|
changeStatus(e){
|
|
|
this.status = e
|
|
|
this.refreshData()
|
|
|
@@ -212,11 +238,11 @@ export default {
|
|
|
},
|
|
|
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})
|
|
|
+ refundEndTime:this.refundEndTime,shopAdminId:this.currentStaffId,status:this.status,customId:this.currentCustomId})
|
|
|
},
|
|
|
exportData(){
|
|
|
this.$service.refund.getRefundList({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 => {
|
|
|
+ refundEndTime:this.refundEndTime,shopAdminId:this.currentStaffId,status:this.status,pageSize:9999999,export:1,customId:this.currentCustomId}).then(res => {
|
|
|
if(res.file){
|
|
|
window.location.href = res.file
|
|
|
}
|
|
|
@@ -227,6 +253,18 @@ export default {
|
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
+
|
|
|
+ if(this.$route.query.customId){
|
|
|
+ this.currentCustomId = this.$route.query.customId
|
|
|
+ this.currentCustomName = this.$route.query.customName?this.$route.query.customName:''
|
|
|
+ this.searchTime = this.$route.query.searchTime?this.$route.query.searchTime:''
|
|
|
+ this.startTime = this.$route.query.startTime?this.$route.query.startTime:''
|
|
|
+ this.endTime = this.$route.query.endTime?this.$route.query.endTime:''
|
|
|
+ if(this.startTime!='' && this.endTime !=''){
|
|
|
+ this.currentDateList =[this.startTime,this.endTime]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
ctx.service(this.$service.refund)
|
|
|
.set('table', {
|
|
|
columns: [
|
|
|
@@ -336,10 +374,11 @@ export default {
|
|
|
['slot-tabs'],
|
|
|
['slot-search-option','flex1','slot-export-order'],
|
|
|
['data-table'],
|
|
|
- ['flex1', 'pagination']
|
|
|
+ ['slot-total-amount','flex1', 'pagination']
|
|
|
])
|
|
|
.on('refresh', async (params, { next }) => {
|
|
|
let result = await next(params)
|
|
|
+ this.totalRefundPrice = result.totalRefundPrice ? parseFloat(result.totalRefundPrice) : 0
|
|
|
})
|
|
|
.done();
|
|
|
this.refreshData()
|