|
|
@@ -5,19 +5,24 @@
|
|
|
-->
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
- <!-- 客户搜索下拉,对齐订单列表 -->
|
|
|
- <view class="search-dropdown-wrap" v-if="showSearch">
|
|
|
- <view class="search-dropdown">
|
|
|
+ <!-- 客户联想下拉:与 home/order.vue 一致,本页筛选不跳转选客页 -->
|
|
|
+ <view class="search-float-wrap">
|
|
|
+ <view class="search-float-panel" v-if="showSearch">
|
|
|
<block v-if="!$util.isEmpty(searchList)">
|
|
|
<view
|
|
|
class="search-item"
|
|
|
v-for="(item, index) in searchList"
|
|
|
:key="index"
|
|
|
- @click="getCustom(item)"
|
|
|
+ @click.stop="getCustom(item)"
|
|
|
>
|
|
|
<view class="search-name">{{ item.name }}</view>
|
|
|
<view class="search-sub">
|
|
|
{{ item.visitTime ? item.visitTime.substr(5, 11) : '' }}
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" class="search-tip">没有下过</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" class="search-tip">1周未下</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" class="search-tip">1个月未下</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" class="search-tip">半年未下</text>
|
|
|
+ <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" class="search-tip">1年未下</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
@@ -35,7 +40,7 @@
|
|
|
/>
|
|
|
</view>
|
|
|
<view class="search-container">
|
|
|
- <AppSearchModule ref="appSearch" placeholder="搜索客户" @input="searchFn" />
|
|
|
+ <AppSearchModule ref="appSearch" placeholder="这里搜索" @input="searchFn" />
|
|
|
<view v-if="customId != 0" class="search-clear-overlay" @click.stop="clearSearch">清空</view>
|
|
|
</view>
|
|
|
<view class="filter-btn-wrap">
|
|
|
@@ -54,42 +59,73 @@
|
|
|
:key="index"
|
|
|
@click="goDetail(item)"
|
|
|
>
|
|
|
- <view class="row-top">
|
|
|
- <text class="custom-name">{{ item.customName || '客户' }}</text>
|
|
|
+ <!-- 顶栏:客户 + 状态 + 金额 -->
|
|
|
+ <view class="card-head">
|
|
|
+ <view class="card-head__left">
|
|
|
+ <text class="custom-name">{{ item.customName || '客户' }}</text>
|
|
|
+ <text
|
|
|
+ class="status-chip"
|
|
|
+ :class="{
|
|
|
+ pending: item.status == 0,
|
|
|
+ pass: item.status == 1,
|
|
|
+ reject: item.status == 2,
|
|
|
+ cancel: item.status == 3
|
|
|
+ }"
|
|
|
+ >{{ statusText(item.status) }}</text>
|
|
|
+ </view>
|
|
|
<text class="amount">¥{{ formatMoney(item.refundPrice) }}</text>
|
|
|
</view>
|
|
|
- <view class="row">
|
|
|
+
|
|
|
+ <!-- 标签:当天/隔天、无原单、退货类型 -->
|
|
|
+ <view class="tag-row">
|
|
|
+ <text class="tag" :class="{ next: item.sameDay == 0 }">
|
|
|
+ {{ item.sameDay == 0 ? '隔天售后' : '当天售后' }}
|
|
|
+ </text>
|
|
|
<text v-if="!item.relateOrderSn" class="tag free">无原单</text>
|
|
|
+ <text class="tag type">{{ item.refundType == 1 ? '退货退款' : '仅退款' }}</text>
|
|
|
</view>
|
|
|
- <view class="row">单号:{{ item.orderSn || '-' }}</view>
|
|
|
- <view class="row" v-if="item.relateOrderSn">原单:{{ item.relateOrderSn }}</view>
|
|
|
- <view class="row">
|
|
|
- 类型:{{ item.refundType == 1 ? '退货退款' : '仅退款' }}
|
|
|
- <text class="split">·</text>
|
|
|
- {{ fundText(item) }}
|
|
|
+
|
|
|
+ <!-- 明细:两列信息,避免竖排过长 -->
|
|
|
+ <view class="meta-grid">
|
|
|
+ <view class="meta-item meta-item--full">
|
|
|
+ <text class="meta-label">单号</text>
|
|
|
+ <text class="meta-value">{{ item.orderSn || '-' }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="meta-item meta-item--full" v-if="item.relateOrderSn">
|
|
|
+ <text class="meta-label">原单</text>
|
|
|
+ <text class="meta-value">{{ item.relateOrderSn }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="meta-item">
|
|
|
+ <text class="meta-label">资金</text>
|
|
|
+ <text class="meta-value">{{ fundText(item) }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="meta-item">
|
|
|
+ <text class="meta-label">操作</text>
|
|
|
+ <text class="meta-value">{{ item.shopAdminName || '-' }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="meta-item meta-item--full">
|
|
|
+ <text class="meta-label">时间</text>
|
|
|
+ <text class="meta-value">{{ item.addTime ? item.addTime.substr(5, 11) : '-' }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="row">操作:{{ item.shopAdminName || '-' }}</view>
|
|
|
- <view class="row">日期:{{ item.addTime ? item.addTime.substr(5, 11) : '' }}</view>
|
|
|
- <view class="row">时间:{{ item.sameDay == 0 ? '隔天售后' : '当天售后' }}</view>
|
|
|
- <view class="row remark" v-if="!$util.isEmpty(item.remark)">备注:{{ item.remark }}</view>
|
|
|
- <view
|
|
|
- class="status"
|
|
|
- :class="{
|
|
|
- pending: item.status == 0,
|
|
|
- pass: item.status == 1,
|
|
|
- reject: item.status == 2,
|
|
|
- cancel: item.status == 3
|
|
|
- }"
|
|
|
- >{{ statusText(item.status) }}</view>
|
|
|
- <!-- 已通过且返充余额:列表直接看凭证,避免再进详情 -->
|
|
|
- <view
|
|
|
- v-if="Number(item.status) === 1 && Number(item.fundType) === 2"
|
|
|
- class="poster-btn-wrap"
|
|
|
- @click.stop="goPoster(item)"
|
|
|
- >
|
|
|
- <button class="admin-button-com middle blue poster-btn">查看凭证</button>
|
|
|
+
|
|
|
+ <view class="remark-box" v-if="!$util.isEmpty(item.remark)">
|
|
|
+ <text class="remark-label">备注</text>
|
|
|
+ <text class="remark-text">{{ item.remark }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 底栏:凭证 + 进入箭头 -->
|
|
|
+ <view class="card-foot">
|
|
|
+ <view
|
|
|
+ v-if="Number(item.status) === 1 && Number(item.fundType) === 2"
|
|
|
+ class="poster-btn-wrap"
|
|
|
+ @click.stop="goPoster(item)"
|
|
|
+ >
|
|
|
+ <button class="admin-button-com middle blue poster-btn">查看凭证</button>
|
|
|
+ </view>
|
|
|
+ <view v-else class="card-foot__spacer"></view>
|
|
|
+ <text class="foot-arrow iconfont iconxiangyou"></text>
|
|
|
</view>
|
|
|
- <view class="arrow iconfont iconxiangyou"></view>
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
@@ -210,7 +246,7 @@ export default {
|
|
|
}
|
|
|
const t = Number(item.fundType)
|
|
|
if (t === 2) return '返充余额'
|
|
|
- if (t === 3) return '仅记账'
|
|
|
+ if (t === 3) return '线下转账'
|
|
|
if (t === 1) return '原路退回'
|
|
|
return '隔天售后'
|
|
|
},
|
|
|
@@ -225,7 +261,9 @@ export default {
|
|
|
this.resetList()
|
|
|
this._list()
|
|
|
},
|
|
|
- /** 搜索客户:弹出联想列表 */
|
|
|
+ /**
|
|
|
+ * 搜索客户:本页下拉联想(对齐 order.vue),不跳转 selectCustom
|
|
|
+ */
|
|
|
searchFn(e) {
|
|
|
const that = this
|
|
|
if (that.$util.isEmpty(e)) {
|
|
|
@@ -243,12 +281,18 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /** 选中客户:写入搜索框文案并按 customId 刷新列表 */
|
|
|
getCustom(item) {
|
|
|
this.showSearch = false
|
|
|
+ this.searchList = []
|
|
|
this.customId = item.id
|
|
|
+ if (this.$refs.appSearch) {
|
|
|
+ this.$refs.appSearch.search = item.name || ''
|
|
|
+ }
|
|
|
this.resetList()
|
|
|
this._list()
|
|
|
},
|
|
|
+ /** 清空客户筛选,恢复全部记录 */
|
|
|
clearSearch() {
|
|
|
if (this.$refs.appSearch && typeof this.$refs.appSearch.inputEmptyFn === 'function') {
|
|
|
this.$refs.appSearch.inputEmptyFn()
|
|
|
@@ -371,21 +415,26 @@ export default {
|
|
|
.app-content {
|
|
|
padding-top: 100upx;
|
|
|
}
|
|
|
-.search-dropdown-wrap {
|
|
|
+/* 与 order.vue 一致的顶部客户联想层 */
|
|
|
+.search-float-wrap {
|
|
|
position: fixed;
|
|
|
top: 100upx;
|
|
|
left: 0;
|
|
|
- right: 0;
|
|
|
+ width: 100%;
|
|
|
z-index: 999999;
|
|
|
- background-color: white;
|
|
|
+ background-color: #fff;
|
|
|
+ height: auto;
|
|
|
+ font-size: 33upx;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
-.search-dropdown {
|
|
|
+.search-float-panel {
|
|
|
width: 80%;
|
|
|
border: 1upx solid #cccccc;
|
|
|
margin: 0 auto;
|
|
|
padding: 10upx 0 0 20upx;
|
|
|
max-height: 60vh;
|
|
|
overflow: scroll;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
.search-item {
|
|
|
margin-bottom: 30upx;
|
|
|
@@ -393,11 +442,16 @@ export default {
|
|
|
.search-name {
|
|
|
font-size: 37upx;
|
|
|
margin-bottom: 10upx;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
.search-sub {
|
|
|
font-size: 29upx;
|
|
|
color: #666;
|
|
|
}
|
|
|
+.search-tip {
|
|
|
+ margin-left: 20upx;
|
|
|
+ color: green;
|
|
|
+}
|
|
|
.input-wrap_box {
|
|
|
background-color: #fff;
|
|
|
position: fixed;
|
|
|
@@ -464,92 +518,175 @@ export default {
|
|
|
font-weight: bold;
|
|
|
background: #fff;
|
|
|
margin-bottom: 16upx;
|
|
|
+ border-bottom: 1upx solid #f0f2f5;
|
|
|
}
|
|
|
.list-wrap {
|
|
|
- padding-bottom: 30upx;
|
|
|
+ padding: 0 20upx 30upx;
|
|
|
+ background: #f5f7fa;
|
|
|
}
|
|
|
.refund-card {
|
|
|
- position: relative;
|
|
|
background: #fff;
|
|
|
- margin-bottom: 16upx;
|
|
|
- padding: 24upx 30upx;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ padding: 28upx 28upx 20upx;
|
|
|
+ border-radius: 16upx;
|
|
|
+ box-shadow: 0 2upx 12upx rgba(0, 0, 0, 0.04);
|
|
|
}
|
|
|
-.row-top {
|
|
|
+.card-head {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- margin-bottom: 10upx;
|
|
|
+}
|
|
|
+.card-head__left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ margin-right: 16upx;
|
|
|
}
|
|
|
.custom-name {
|
|
|
- font-size: 30upx;
|
|
|
+ max-width: 320upx;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ font-size: 32upx;
|
|
|
font-weight: bold;
|
|
|
- color: #333;
|
|
|
+ color: #222;
|
|
|
+}
|
|
|
+.status-chip {
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-left: 12upx;
|
|
|
+ padding: 0 12upx;
|
|
|
+ height: 36upx;
|
|
|
+ line-height: 36upx;
|
|
|
+ border-radius: 8upx;
|
|
|
+ font-size: 22upx;
|
|
|
+ background: #f0f2f5;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+.status-chip.pass {
|
|
|
+ color: #19be6b;
|
|
|
+ background: rgba(25, 190, 107, 0.12);
|
|
|
+}
|
|
|
+.status-chip.pending {
|
|
|
+ color: #3385ff;
|
|
|
+ background: rgba(51, 133, 255, 0.12);
|
|
|
+}
|
|
|
+.status-chip.reject,
|
|
|
+.status-chip.cancel {
|
|
|
+ color: #999;
|
|
|
+ background: #f0f2f5;
|
|
|
}
|
|
|
.amount {
|
|
|
- font-size: 32upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ font-size: 34upx;
|
|
|
font-weight: bold;
|
|
|
color: #ff2842;
|
|
|
- margin-right: 36upx;
|
|
|
}
|
|
|
-.row {
|
|
|
- font-size: 26upx;
|
|
|
- color: #666;
|
|
|
- line-height: 42upx;
|
|
|
+.tag-row {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 16upx;
|
|
|
}
|
|
|
.tag {
|
|
|
display: inline-block;
|
|
|
font-size: 22upx;
|
|
|
color: #3385ff;
|
|
|
- border: 1upx solid #3385ff;
|
|
|
- border-radius: 6upx;
|
|
|
- padding: 0 10upx;
|
|
|
- margin-right: 10upx;
|
|
|
- line-height: 36upx;
|
|
|
+ background: rgba(51, 133, 255, 0.08);
|
|
|
+ border-radius: 8upx;
|
|
|
+ padding: 0 12upx;
|
|
|
+ margin-right: 12upx;
|
|
|
+ margin-bottom: 8upx;
|
|
|
+ line-height: 40upx;
|
|
|
}
|
|
|
.tag.next {
|
|
|
- color: #ff9900;
|
|
|
- border-color: #ff9900;
|
|
|
+ color: #e67e22;
|
|
|
+ background: rgba(230, 126, 34, 0.1);
|
|
|
}
|
|
|
.tag.free {
|
|
|
color: #19be6b;
|
|
|
- border-color: #19be6b;
|
|
|
+ background: rgba(25, 190, 107, 0.1);
|
|
|
}
|
|
|
-.split {
|
|
|
- margin: 0 8upx;
|
|
|
+.tag.type {
|
|
|
+ color: #666;
|
|
|
+ background: #f5f7fa;
|
|
|
}
|
|
|
-.remark {
|
|
|
- color: #e54d42;
|
|
|
+.meta-grid {
|
|
|
+ margin-top: 8upx;
|
|
|
+ padding-top: 16upx;
|
|
|
+ border-top: 1upx solid #f0f2f5;
|
|
|
}
|
|
|
-.status {
|
|
|
- position: absolute;
|
|
|
- right: 50upx;
|
|
|
- top: 70upx;
|
|
|
+.meta-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ margin-top: 12upx;
|
|
|
+ &:first-child {
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+.meta-item--full {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.meta-label {
|
|
|
+ width: 72upx;
|
|
|
+ flex-shrink: 0;
|
|
|
font-size: 24upx;
|
|
|
+ color: #999;
|
|
|
+ line-height: 40upx;
|
|
|
}
|
|
|
-.status.pass {
|
|
|
- color: #19be6b;
|
|
|
+.meta-value {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 26upx;
|
|
|
+ color: #333;
|
|
|
+ line-height: 40upx;
|
|
|
+ word-break: break-all;
|
|
|
}
|
|
|
-.status.pending {
|
|
|
- color: #3385ff;
|
|
|
+.remark-box {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 16upx;
|
|
|
+ padding: 14upx 16upx;
|
|
|
+ background: #fff7f7;
|
|
|
+ border-radius: 10upx;
|
|
|
}
|
|
|
-.status.reject,
|
|
|
-.status.cancel {
|
|
|
- color: #999;
|
|
|
+.remark-label {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 60upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ color: #e54d42;
|
|
|
+ line-height: 36upx;
|
|
|
}
|
|
|
-.poster-btn-wrap {
|
|
|
+.remark-text {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 24upx;
|
|
|
+ color: #e54d42;
|
|
|
+ line-height: 36upx;
|
|
|
+ word-break: break-all;
|
|
|
+}
|
|
|
+.card-foot {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
margin-top: 16upx;
|
|
|
+ padding-top: 12upx;
|
|
|
+}
|
|
|
+.card-foot__spacer {
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+.poster-btn-wrap {
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
|
.poster-btn {
|
|
|
- width: 180upx;
|
|
|
+ width: 168upx;
|
|
|
+ height: 56upx;
|
|
|
+ line-height: 56upx;
|
|
|
margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ font-size: 24upx;
|
|
|
}
|
|
|
-.arrow {
|
|
|
- position: absolute;
|
|
|
- right: 20upx;
|
|
|
- top: 50%;
|
|
|
- margin-top: -16upx;
|
|
|
- color: #ccc;
|
|
|
+.foot-arrow {
|
|
|
+ color: #c8c9cc;
|
|
|
font-size: 28upx;
|
|
|
+ margin-left: 12upx;
|
|
|
}
|
|
|
.filter-overlay {
|
|
|
position: fixed;
|