Commit b6d9ce25 authored by 刘杰's avatar 刘杰

企业微信前端

parent 240d8e4b
......@@ -258,8 +258,7 @@
<!-- 项目运营表格 -->
<view class="table-container">
<text class="table-title">模拟老板运营情况</text>
<scroll-view scroll-x class="table-scroll">
<!-- <view class="table-scroll"> -->
<scroll-view scroll-x @scroll="scroll" :show-scrollbar="true" scroll-left="20" class="table-scroll">
<uni-table :data="currentData.tableData" border :loading="loading" emptyText="暂无数据">
<uni-tr>
<uni-th align="center" width="70">模拟老板</uni-th>
......@@ -284,10 +283,19 @@
<uni-td>{{ item.manpower }}</uni-td>
</uni-tr>
</uni-table>
<!-- </view> -->
</scroll-view>
</view>
</scroll-view>
<u-popup :show="showOrderEvent" mode="bottom">
<scroll-view scroll-y="true" class="scroll-Y">
<orderEventList ref="orderEventList" :isEdit="showOrderEvent" @close="orderEventClose"></orderEventList>
<!-- <orderInsertContent ref="orderInsertContent" :isEdit="showEdit" @close="orderEditClose">
</orderInsertContent> -->
</scroll-view>
</u-popup>
</view>
</template>
......@@ -323,6 +331,7 @@
sortType: 'receivable',
projectSortType: 'receivable',
timeData: {},
showOrderEvent: false
}
},
computed: {
......@@ -379,6 +388,9 @@
})
},
methods: {
orderEventClose() {
this.showOrderEvent = false
},
async initData() {
this.staffCode = uni.getStorageSync(`staffCode`);
this.staffKind = uni.getStorageSync('uc_staff_kind');
......@@ -862,6 +874,7 @@
uni.navigateTo({
url: '/pages/abnormal/list/index'
});
// this.showOrderEvent = true
},
navigateToDailyReport() {
console.log('点击了日报跳转按钮');
......@@ -903,6 +916,12 @@
.scroll-list {
height: calc(100vh - 60px);
touch-action: pan-x;
/* 允许横向滚动 */
overflow-x: auto;
/* 允许横向滚动 */
-webkit-overflow-scrolling: touch;
/* 启用 iOS 的平滑滚动 */
}
.report-container {
......@@ -1543,10 +1562,10 @@
}
.table-container {
display: block;
width: 100%;
white-space: nowrap;
background-color: #fff;
border-radius: 8px;
overflow-x: hidden;
margin-bottom: 10px;
......@@ -1559,13 +1578,21 @@
}
.table-scroll {
scroll-margin-left: 0;
width: 95%;
margin-bottom: 10px;
display: block;
width: 100%;
height: 180px;
overflow-x: auto;
overflow-y: auto;
/* 允许横向滚动 */
-webkit-overflow-scrolling: touch;
/* 启用 iOS 的平滑滚动 */
touch-action: pan-x;
/* 允许横向滚动 */
border: 1px solid #e8e8e8;
/* 可选:为滚动条添加边框 */
max-width: 100%;
/* 确保容器宽度适应 */
order-radius: 3px;
white-space: nowrap;
/deep/ .uni-table {
min-width: 100%;
......
This diff is collapsed.
<template>
<view class="abnormal-report">
<!-- 状态统计卡片 -->
<view class="report-stats">
<view class="stat-item" @click="selectReport('new')">
<text class="number" style="color: #faad14;">{{ searchDatas.new }}</text>
<text class="label">未审批</text>
<text class="number2" style="color: #faad14;">¥{{ searchDatas.newAmount }}</text>
</view>
<view class="stat-item" @click="selectReport('approving')">
<text class="number" style="color: #1890ff;">{{ searchDatas.approving }}</text>
<text class="label">审批中</text>
<text class="number2" style="color: #1890ff;">¥{{ searchDatas.approvingAmount }}</text>
</view>
<view class="stat-item" @click="selectReport('approved')">
<text class="number" style="color:#52c41a;">{{ searchDatas.approved }}</text>
<text class="label">审批完成</text>
<text class="number2" style="color:#52c41a;">¥{{ searchDatas.approvedAmount }}</text>
</view>
<view class="stat-item" @click="selectReport('total')">
<text class="number" style="color:#ff4d4f;">{{ searchDatas.total }}</text>
<text class="label">总计</text>
<text class="number2" style="color:#ff4d4f;">¥{{ searchDatas.totalAmount }}</text>
</view>
</view>
<!-- 异常订单列表 -->
<scroll-view class="order-list" scroll-y>
<view class="order-card" v-for="(order, index) in orderList" :key="index" @click="goToDetail(order.id)">
<view class="card-header">
<view class="left">
<text class="order-id">{{ order.orderEventNo }}</text>
<text class="status" :class="getStatusClass(order.approvalStatus)">
{{ order.approvalStatus }}
</text>
</view>
<view class="right">
<text class="time">{{ order.eventTime }}</text>
</view>
</view>
<view class="card-content">
<view class="info-row">
<text class="label">客户:</text>
<text class="value">{{ order.customerName }}</text>
</view>
<view class="info-row">
<text class="label">二级异常:</text>
<text class="value">{{ order.childrenException }}</text>
</view>
<view class="info-row">
<text class="label">涉及金额:</text>
<text class="value amount">¥{{ order.involvingAmount }}</text>
</view>
<view class="info-row">
<text class="label">处理状态:</text>
<text class="value" :class="getProcessClass(order.orderEventStatus)">
{{ order.orderEventStatus }}
</text>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import {
searchOrderEvent
} from '../../api/apiList'
export default {
data() {
return {
staffCode: "",
staffKind: "",
activeStatus: "total",
searchDatas: {},
orderList: []
}
},
mounted() {
this.initData()
},
methods: {
selectReport(active) {
this.activeStatus = active
this.orderList = []
this.initData()
},
initData() {
this.staffCode = uni.getStorageSync('staffCode');
this.staffKind = uni.getStorageSync('uc_staff_kind');
if (!this.staffCode || !this.staffKind) {
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
});
return;
}
const data = {
aux: {
staffCode: this.staffCode,
staffKind: this.staffKind,
activeStatus: this.activeStatus
}
}
searchOrderEvent(data).then(res => {
const data = res.data.data;
this.searchDatas = data;
this.orderList = data.orderList
})
},
getStatusClass(status) {
const classMap = {
'未审批': 'status-pending',
'审批中': 'status-processing',
'审批完成': 'status-completed'
}
return classMap[status] || ''
},
getProcessClass(status) {
const classMap = {
'待处理': 'process-pending',
'处理中': 'process-ongoing',
'已处理': 'process-completed'
}
return classMap[status] || ''
},
goToDetail(id) {
// 跳转到详情页面
uni.navigateTo({
url: `/pages/abnormal/detail/index?id=${id}`
})
}
}
}
</script>
<style lang="scss">
.abnormal-report {
padding: 0 12px;
background: #f5f7fa;
// min-height: 100vh;
.report-stats {
display: flex;
justify-content: space-around;
background: #fff;
padding: 20px 15px;
border-radius: 8px;
margin-bottom: 8px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
.stat-item {
text-align: center;
// padding: 15px 24px;
background: #f9f9f9;
// border-radius: 6px;
width: 25%;
transition: background 0.3s, transform 0.3s;
/* 添加过渡效果 */
&:hover {
background: #e6f7ff;
/* 鼠标悬停时的背景色 */
transform: scale(1.05);
/* 鼠标悬停时的放大效果 */
}
.number {
display: block;
font-size: 28px;
font-weight: bold;
color: #333;
margin-bottom: 8px;
}
.number2 {
display: block;
font-size: 10px;
// font-weight: bold;
color: #333;
margin-bottom: 8px;
}
.label {
font-size: 14px;
color: #999;
}
}
}
.order-list {
height: calc(100vh - 120px);
.order-card {
background: #fff;
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
.left {
display: flex;
align-items: center;
gap: 10px;
.order-id {
font-size: 16px;
font-weight: bold;
color: #333;
}
.status {
padding: 4px 12px;
border-radius: 10px;
font-size: 12px;
&.status-pending {
background: rgba(250, 173, 20, 0.1);
color: #faad14;
border: 1px solid rgba(250, 173, 20, 0.2);
}
&.status-processing {
background: rgba(24, 144, 255, 0.1);
color: #1890ff;
border: 1px solid rgba(24, 144, 255, 0.2);
}
&.status-completed {
background: rgba(82, 196, 26, 0.1);
color: #52c41a;
border: 1px solid rgba(82, 196, 26, 0.2);
}
}
}
.time {
font-size: 14px;
color: #999;
float: right;
}
}
.card-content {
.info-row {
display: flex;
margin-bottom: 8px;
align-items: center;
&:last-child {
margin-bottom: 0;
}
.label {
width: 80px;
font-size: 14px;
color: #666;
}
.value {
flex: 1;
font-size: 14px;
color: #333;
&.amount {
color: #ff4d4f;
font-weight: 500;
}
&.process-pending {
color: #faad14;
}
&.process-ongoing {
color: #1890ff;
}
&.process-completed {
color: #52c41a;
}
}
}
}
}
}
}
.right{
float: right;
}
</style>
\ No newline at end of file
......@@ -102,7 +102,7 @@ export default {
mounted() {
this.orderQuery()
this.getOptionEnumInit()
// this.getOptionEnumInit()
},
methods: {
......@@ -189,7 +189,7 @@ export default {
OrderQuery({
"args": {
pageNum: 1,
pageSize: 10000,
pageSize: 10,
restrictions
}
}).then(res => {
......
......@@ -36,8 +36,10 @@
{{ order.approvalStatus }}
</text>
</view>
<view class="right">
<text class="time">{{ order.eventTime }}</text>
</view>
</view>
<view class="card-content">
<view class="info-row">
......@@ -158,7 +160,7 @@
text-align: center;
// padding: 15px 24px;
background: #f9f9f9;
border-radius: 6px;
// border-radius: 6px;
width: 25%;
transition: background 0.3s, transform 0.3s;
/* 添加过渡效果 */
......@@ -180,7 +182,7 @@
.number2 {
display: block;
font-size: 28px;
font-size: 10px;
// font-weight: bold;
color: #333;
margin-bottom: 8px;
......@@ -301,4 +303,8 @@
}
}
}
.right{
float: right;
}
</style>
\ No newline at end of file
......@@ -72,7 +72,7 @@
updateTopUserList() {
if (this.uc_staff_kind === 'boss') {
this.topUserList = [{
this.topUserList = [ {
name: '老板看板',
key: 'bossCard',
url: '/pages/index/index'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment