|
|
@@ -8,12 +8,8 @@
|
|
|
<view class="header-content">
|
|
|
<view class="title-group">
|
|
|
<text class="main-title">感冒灵大批量跨区域客户</text>
|
|
|
- <text class="sub-title"
|
|
|
- >订单维度:单笔订单实际盒数 {{ ">" }} 20000盒</text
|
|
|
- >
|
|
|
- <text class="sub-title"
|
|
|
- >地域维度:出库企业所在省份 ≠ 入库企业所在省份</text
|
|
|
- >
|
|
|
+ <text class="sub-title">订单维度:单笔订单实际盒数 {{ ">" }} 20000盒</text>
|
|
|
+ <text class="sub-title">地域维度:出库企业所在省份 ≠ 入库企业所在省份</text>
|
|
|
</view>
|
|
|
<view class="stat-box">
|
|
|
<text class="stat-num">{{ totalCount }}</text>
|
|
|
@@ -24,41 +20,26 @@
|
|
|
<view class="header-toolbar">
|
|
|
<view class="update-tip">
|
|
|
<!-- <text class="tip-icon">🕒</text> -->
|
|
|
- <text
|
|
|
- >更新:{{
|
|
|
- formatDate(
|
|
|
- new Date().setDate(new Date().getDate() - 1),
|
|
|
- "YYYY-MM-DD",
|
|
|
- ) || "--"
|
|
|
- }}</text
|
|
|
- >
|
|
|
+ <text>更新:{{
|
|
|
+ formatDate(
|
|
|
+ new Date().setDate(new Date().getDate() - 1),
|
|
|
+ "YYYY-MM-DD",
|
|
|
+ ) || "--"
|
|
|
+ }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 列表区域 -->
|
|
|
- <scroll-view
|
|
|
- class="list-scroll"
|
|
|
- scroll-y="true"
|
|
|
- refresher-enabled
|
|
|
- :refresher-triggered="isRefreshing"
|
|
|
- @refresherrefresh="onRefresh"
|
|
|
- >
|
|
|
+ <scroll-view class="list-scroll" scroll-y="true" refresher-enabled :refresher-triggered="isRefreshing"
|
|
|
+ @refresherrefresh="onRefresh">
|
|
|
<view class="list-container">
|
|
|
- <view
|
|
|
- class="card-item"
|
|
|
- v-for="(item, index) in rows"
|
|
|
- :key="index"
|
|
|
- @click="toDetail(item)"
|
|
|
- >
|
|
|
+ <view class="card-item" v-for="(item, index) in rows" :key="index" @click="toDetail(item)">
|
|
|
<view class="card-header">
|
|
|
<view class="header-left">
|
|
|
<text class="index-num">{{ index + 1 }}</text>
|
|
|
<text class="company-name">{{ item.customerName }}</text>
|
|
|
- <text
|
|
|
- class="level-tag"
|
|
|
- :class="getLevelClass(item.customerLevel)"
|
|
|
- >
|
|
|
+ <text class="level-tag" :class="getLevelClass(item.customerLevel)">
|
|
|
{{ item.customerLevel }}
|
|
|
</text>
|
|
|
</view>
|
|
|
@@ -102,62 +83,31 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 蒙层 -->
|
|
|
- <view
|
|
|
- class="report-export-create-modal-mask"
|
|
|
- v-if="emailModalOpen"
|
|
|
- @click="closeEmailModal"
|
|
|
- @touchmove.stop.prevent
|
|
|
- ></view>
|
|
|
+ <view class="report-export-create-modal-mask" v-if="emailModalOpen" @click="closeEmailModal"
|
|
|
+ @touchmove.stop.prevent></view>
|
|
|
|
|
|
<!-- 邮箱导出弹窗 -->
|
|
|
- <view
|
|
|
- class="report-export-create-modal report-export-create-email-modal"
|
|
|
- :class="{ 'report-export-create-modal--open': emailModalOpen }"
|
|
|
- v-if="emailModalOpen"
|
|
|
- >
|
|
|
+ <view class="report-export-create-modal report-export-create-email-modal"
|
|
|
+ :class="{ 'report-export-create-modal--open': emailModalOpen }" v-if="emailModalOpen">
|
|
|
<view class="report-export-create-modal-title">
|
|
|
<text>发送至邮箱</text>
|
|
|
- <view
|
|
|
- class="report-export-create-modal-close"
|
|
|
- @click.stop="closeEmailModal"
|
|
|
- >×</view
|
|
|
- >
|
|
|
+ <view class="report-export-create-modal-close" @click.stop="closeEmailModal">×</view>
|
|
|
</view>
|
|
|
- <view
|
|
|
- class="report-export-create-modal-body"
|
|
|
- >
|
|
|
- <up-input
|
|
|
- v-model="emailForm.email"
|
|
|
- border="none"
|
|
|
- :customStyle="{
|
|
|
- backgroundColor: '#ebf3fb',
|
|
|
- height: '80rpx',
|
|
|
- paddingLeft: '20rpx',
|
|
|
- }"
|
|
|
- placeholder="请填写邮箱"
|
|
|
- @input="emailError = false"
|
|
|
- >
|
|
|
+ <view class="report-export-create-modal-body">
|
|
|
+ <up-input v-model="emailForm.email" border="none" :customStyle="{
|
|
|
+ backgroundColor: '#ebf3fb',
|
|
|
+ height: '80rpx',
|
|
|
+ paddingLeft: '20rpx',
|
|
|
+ }" placeholder="请填写邮箱" @input="emailError = false">
|
|
|
<template #suffix>
|
|
|
<view style="margin-right: 20rpx; color: #666">@999.com.cn</view>
|
|
|
</template>
|
|
|
</up-input>
|
|
|
- <text v-if="emailError" class="report-export-error-text"
|
|
|
- >请输入邮箱</text
|
|
|
- >
|
|
|
+ <text v-if="emailError" class="report-export-error-text">请输入邮箱</text>
|
|
|
</view>
|
|
|
- <view
|
|
|
- class="report-export-create-modal-footer"
|
|
|
- >
|
|
|
- <view
|
|
|
- class="report-export-create-modal-btn cancel-btn"
|
|
|
- @click.stop="closeEmailModal"
|
|
|
- >取消</view
|
|
|
- >
|
|
|
- <view
|
|
|
- class="report-export-create-modal-btn confirm-btn"
|
|
|
- @click.stop="handleSendEmail"
|
|
|
- >发送</view
|
|
|
- >
|
|
|
+ <view class="report-export-create-modal-footer">
|
|
|
+ <view class="report-export-create-modal-btn cancel-btn" @click.stop="closeEmailModal">取消</view>
|
|
|
+ <view class="report-export-create-modal-btn confirm-btn" @click.stop="handleSendEmail">发送</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -187,6 +137,8 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.resetFetch();
|
|
|
+ const userEmail = uni.getStorageSync('traceCode_useremail')
|
|
|
+ this.emailForm.email = userEmail
|
|
|
},
|
|
|
methods: {
|
|
|
formatDate,
|
|
|
@@ -203,9 +155,8 @@ export default {
|
|
|
this.loading = true;
|
|
|
|
|
|
request(
|
|
|
- `/report/ganmaoling/list`,
|
|
|
+ `/report/ganmaoling/list?days=1`,
|
|
|
{
|
|
|
- days: 1,
|
|
|
path: "traceabilityReport/pages/ganmaoling/index.vue",
|
|
|
},
|
|
|
"get",
|
|
|
@@ -236,6 +187,13 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleExport() {
|
|
|
+ if (this.rows.length == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无数据...',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.emailModalOpen = true;
|
|
|
this.emailForm.email = "";
|
|
|
this.emailError = false;
|
|
|
@@ -252,14 +210,18 @@ export default {
|
|
|
}
|
|
|
uni.showLoading({ title: "发送中..." });
|
|
|
|
|
|
+ const yesterday = new Date();
|
|
|
+ yesterday.setDate(yesterday.getDate() - 1);
|
|
|
+ const dateStr = this.formatDate(yesterday, "YYYY-MM-DD");
|
|
|
+
|
|
|
request(
|
|
|
- `/report/ganmaoling/list`,
|
|
|
+ `/report/ganmaoling/sendemail`,
|
|
|
{
|
|
|
- days: 1,
|
|
|
- email: this.emailForm.email + "@999.com.cn",
|
|
|
+ updatedTime: dateStr,
|
|
|
+ emailAddress: this.emailForm.email + "@999.com.cn",
|
|
|
path: "traceabilityReport/pages/ganmaoling/index.vue",
|
|
|
},
|
|
|
- "get",
|
|
|
+ "post",
|
|
|
).then((res) => {
|
|
|
uni.hideLoading();
|
|
|
if (res.code == 200) {
|
|
|
@@ -302,7 +264,8 @@ export default {
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
width: 100%;
|
|
|
- height: 320rpx; /* Fixed height for background */
|
|
|
+ height: 320rpx;
|
|
|
+ /* Fixed height for background */
|
|
|
background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
|
|
|
border-bottom-left-radius: 40rpx;
|
|
|
border-bottom-right-radius: 40rpx;
|
|
|
@@ -314,7 +277,8 @@ export default {
|
|
|
.header-section {
|
|
|
padding: 40rpx 40rpx 80rpx;
|
|
|
position: relative;
|
|
|
- z-index: 3; /* Above List */
|
|
|
+ z-index: 3;
|
|
|
+ /* Above List */
|
|
|
color: #fff;
|
|
|
/* Transparent background to allow overlap effect */
|
|
|
}
|
|
|
@@ -396,9 +360,11 @@ export default {
|
|
|
height: 0;
|
|
|
padding: 0 24rpx;
|
|
|
box-sizing: border-box;
|
|
|
- margin-top: -50rpx; /* Overlap effect */
|
|
|
+ margin-top: -50rpx;
|
|
|
+ /* Overlap effect */
|
|
|
position: relative;
|
|
|
- z-index: 2; /* Between bg and header content */
|
|
|
+ z-index: 2;
|
|
|
+ /* Between bg and header content */
|
|
|
}
|
|
|
|
|
|
.list-container {
|