|
@@ -28,6 +28,39 @@
|
|
|
<el-button type="primary" size="mini" style="margin-left:60px;" @click="exportOrder()">导出记录</el-button>
|
|
<el-button type="primary" size="mini" style="margin-left:60px;" @click="exportOrder()">导出记录</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+ <template #table-column-addTime="{scope}">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ {{ scope.row.addTime?scope.row.addTime.substr(5,11):'' }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template #table-column-updateTime="{scope}">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ {{ scope.row.updateTime?scope.row.updateTime.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:130px;" :clearable="true" ref="orderSearchRef" @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>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
</x-crud>
|
|
</x-crud>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -41,11 +74,11 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
app: null,
|
|
app: null,
|
|
|
- tabIndex: '0',
|
|
|
|
|
|
|
+ tabIndex: '-1',
|
|
|
tabsData: [
|
|
tabsData: [
|
|
|
{
|
|
{
|
|
|
text: '全部',
|
|
text: '全部',
|
|
|
- key: '0',
|
|
|
|
|
|
|
+ key: '-1',
|
|
|
val: 0
|
|
val: 0
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -70,6 +103,45 @@ export default {
|
|
|
mobile1:'',
|
|
mobile1:'',
|
|
|
confirmMobile1:'',
|
|
confirmMobile1:'',
|
|
|
fileUrl:'',
|
|
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:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -78,24 +150,65 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ that.$service.shopAdmin.getAllStaff().then(res => {
|
|
|
|
|
+ that.staffList = res.list
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ 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})
|
|
|
|
|
+ },
|
|
|
exportOrder(){
|
|
exportOrder(){
|
|
|
- this.$service.custom.shopListAll({ type: this.tabIndex,export:1}).then(res => {
|
|
|
|
|
|
|
+ this.$service.custom.shopListAll().then(res => {
|
|
|
if(res.file){
|
|
if(res.file){
|
|
|
window.location.href = res.file
|
|
window.location.href = res.file
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleClick(tab, e) {
|
|
|
|
|
- this.app.refresh({ type: this.tabIndex });
|
|
|
|
|
|
|
+ handleClick() {
|
|
|
|
|
+ this.refreshData()
|
|
|
},
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
this.app = app;
|
|
|
- //传入参数 shish 2020.5.9
|
|
|
|
|
- if (this.$route.query.type) {
|
|
|
|
|
- this.tabIndex = this.$route.query.type;
|
|
|
|
|
- }
|
|
|
|
|
ctx.service(this.$service.refund)
|
|
ctx.service(this.$service.refund)
|
|
|
.set('table', {
|
|
.set('table', {
|
|
|
columns: [
|
|
columns: [
|
|
@@ -103,17 +216,23 @@ export default {
|
|
|
prop: 'id',
|
|
prop: 'id',
|
|
|
label: 'ID',
|
|
label: 'ID',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 90
|
|
|
|
|
|
|
+ width: 80
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'orderSn',
|
|
|
|
|
- label: '退款单号',
|
|
|
|
|
|
|
+ prop: 'relateOrderSn',
|
|
|
|
|
+ label: '订单号',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
width: 140
|
|
width: 140
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'relateOrderSn',
|
|
|
|
|
- label: '订单号',
|
|
|
|
|
|
|
+ prop: 'orderTime',
|
|
|
|
|
+ label: '订单日期',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ width: 100
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'orderSn',
|
|
|
|
|
+ label: '退款单号',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
width: 140
|
|
width: 140
|
|
|
},
|
|
},
|
|
@@ -145,7 +264,7 @@ export default {
|
|
|
prop: 'shopAdminName',
|
|
prop: 'shopAdminName',
|
|
|
label: '操作人',
|
|
label: '操作人',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 120
|
|
|
|
|
|
|
+ width: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'cause',
|
|
prop: 'cause',
|
|
@@ -157,7 +276,7 @@ export default {
|
|
|
prop: 'rejectReason',
|
|
prop: 'rejectReason',
|
|
|
label: '驳回原因',
|
|
label: '驳回原因',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 100
|
|
|
|
|
|
|
+ width: 90
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'remark',
|
|
prop: 'remark',
|
|
@@ -175,37 +294,29 @@ export default {
|
|
|
prop: 'addTime',
|
|
prop: 'addTime',
|
|
|
label: '申请日期',
|
|
label: '申请日期',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 150
|
|
|
|
|
|
|
+ width: 100
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'updateTime',
|
|
prop: 'updateTime',
|
|
|
label: '最近后变更',
|
|
label: '最近后变更',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width: 150
|
|
|
|
|
|
|
+ width: 100
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
op: {
|
|
op: {
|
|
|
visible: true,
|
|
visible: true,
|
|
|
props: {
|
|
props: {
|
|
|
- width: 150,
|
|
|
|
|
|
|
+ width: 90,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
label: '操作'
|
|
label: '操作'
|
|
|
},
|
|
},
|
|
|
- layout: ['slot-column-option']
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .set('dict', {
|
|
|
|
|
- search: {
|
|
|
|
|
- keyWord: 'name'
|
|
|
|
|
|
|
+ layout: []
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .set('search', {
|
|
|
|
|
- key: { placeholder: '这里搜索' }
|
|
|
|
|
- })
|
|
|
|
|
.set('layout', [
|
|
.set('layout', [
|
|
|
['slot-tabs'],
|
|
['slot-tabs'],
|
|
|
- ['search-key','flex1','slot-export-order'],
|
|
|
|
|
|
|
+ ['slot-search-option','flex1','slot-export-order'],
|
|
|
['data-table'],
|
|
['data-table'],
|
|
|
['flex1', 'pagination']
|
|
['flex1', 'pagination']
|
|
|
])
|
|
])
|
|
@@ -213,11 +324,13 @@ export default {
|
|
|
let result = await next(params)
|
|
let result = await next(params)
|
|
|
})
|
|
})
|
|
|
.done();
|
|
.done();
|
|
|
- app.refresh({ type: this.tabIndex })
|
|
|
|
|
|
|
+ this.refreshData()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
|
|
|
|
+.custom-date-picker{
|
|
|
|
|
+ width:230px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|