diff --git a/src/views/lb-business/shopping-manage/index.vue b/src/views/lb-business/shopping-manage/index.vue
index f18b0aa..40101a1 100644
--- a/src/views/lb-business/shopping-manage/index.vue
+++ b/src/views/lb-business/shopping-manage/index.vue
@@ -2,9 +2,6 @@
-
-
-
@@ -14,6 +11,13 @@
+
+
+
+
+
+
+
@@ -115,6 +119,11 @@
+
+
+ {{ formatDataType(scope.row.dataType) }}
+
+
@@ -124,6 +133,21 @@
{{ formatAmount(scope.row.newTotal) }}
+
+
+ {{ formatAmount(scope.row.statTotalMoney) }}
+
+
+
+
+ {{ formatCount(scope.row.totalOrderCount) }}
+
+
+
+
+ {{ formatAmount(scope.row.avgAmount) }}
+
+
{{ formatDateTime(scope.row.createdAt) }}
@@ -163,8 +187,8 @@
-
-
+
+
@@ -375,7 +399,6 @@ export default {
mobileListText: [{ required: true, message: '请输入手机号', trigger: 'blur' }]
},
statFormRules: {
- buyerId: [{ required: true, message: '请输入买家ID', trigger: 'blur' }],
statType: [{ required: true, message: '请选择统计类型', trigger: 'change' }]
},
list: [],
@@ -392,7 +415,7 @@ export default {
sellerId: '',
merchandiseId: '',
buyerId: '',
- orderSn: '',
+ dataType: '',
sellerNickname: '',
sellerMobile: '',
buyerNickname: '',
@@ -448,16 +471,16 @@ export default {
this.$message.error('未获取到租户ID,请先登录或配置业务请求头中的租户')
return
}
+ const buyerIdText = (this.statForm.buyerId || '').trim()
const buyerId = parseOptionalLong(this.statForm.buyerId)
- if (buyerId == null) {
+ if (buyerIdText && buyerId == null) {
this.$message.warning('请输入有效的买家ID')
return
}
+ const payload = { statType: this.statForm.statType }
+ if (buyerId != null) payload.buyerId = buyerId
this.statLoading = true
- generateLbBuyerShoppingStat({
- buyerId,
- statType: this.statForm.statType
- })
+ generateLbBuyerShoppingStat(payload)
.then((res) => {
const isSuccess = res && (res.success === true || res.code === 200 || res.code === 20000)
if (!isSuccess) {
@@ -550,7 +573,7 @@ export default {
sellerId: parseOptionalLong(this.queryParams.sellerId),
merchandiseId: parseOptionalLong(this.queryParams.merchandiseId),
buyerId: parseOptionalLong(this.queryParams.buyerId),
- orderSn: this.queryParams.orderSn || undefined,
+ dataType: this.queryParams.dataType || undefined,
sellerNickname: this.queryParams.sellerNickname || undefined,
sellerMobile: this.queryParams.sellerMobile || undefined,
buyerNickname: this.queryParams.buyerNickname || undefined,
@@ -583,7 +606,7 @@ export default {
sellerId: '',
merchandiseId: '',
buyerId: '',
- orderSn: '',
+ dataType: '',
sellerNickname: '',
sellerMobile: '',
buyerNickname: '',
@@ -703,6 +726,20 @@ export default {
const n = Number(val)
return Number.isNaN(n) ? String(val) : n.toFixed(2)
},
+ formatDataType(val) {
+ const map = {
+ detail_data: '明细',
+ day_stat: '按天统计',
+ sum_data: '总和统计'
+ }
+ if (val === null || val === undefined || val === '') return '-'
+ return map[val] || String(val)
+ },
+ formatCount(val) {
+ if (val === null || val === undefined || val === '') return '-'
+ const n = Number(val)
+ return Number.isNaN(n) ? String(val) : String(n)
+ },
formatDateTime(dateTime) {
if (!dateTime) return '-'
const date = new Date(String(dateTime).replace('T', ' '))