Commit a179cdb5 authored by 刘杰's avatar 刘杰

企业微信前端

parent 87a2827c
......@@ -30,6 +30,9 @@ export function BindCompany(data) {
export function selectDailyReport(data) {
return Request(`/api/entry/{mini}/m-action/biz.zcgyl.DailyReport.service.selectDailyReport`, data)
}
export function selectDailyReportList(data) {
return Request(`/api/query/biz.zcgyl.DailyReport.zcgyl_dailyreport_search/paging`, data)
}
export function dailyReportSave(data) {
return Request(`/api/entry/{mini}/m-action/biz.zcgyl.DailyReport.service.auxVoSave`, data)
}
......
......@@ -4,12 +4,12 @@
<!-- 顶部统计卡片 -->
<view class="top-stats-wrapper">
<!-- 异常统计环状进度 -->
<view class="stats-card" @click="navigateToAbnormalReport">
<view class="stats-card" @click="navigateToOrderEventList">
<view class="circle-wrapper">
<view class="progress-ring" :style="{
background: `conic-gradient(
#FF4D4F 0% ${currentSearchData.overview.rate1}%,
#faad14 ${currentSearchData.overview.rate1}% ${currentSearchData.overview.rate2}%,
#fadf0d ${currentSearchData.overview.rate1}% ${currentSearchData.overview.rate2}%,
#52C41A ${currentSearchData.overview.rate2}% 100%
)`
}">
......@@ -72,7 +72,7 @@
</view>
</view>
<view class="stat-item">
<view class="stat-block light-orange ">
<view class="stat-block green ">
<text class="number">{{currentSearchData.overview.stats.positionCount}}</text>
<text class="rate">开启定位</text>
</view>
......@@ -541,7 +541,15 @@
itemStyle: {
color: '#52C41A',
borderRadius: [4, 4, 0, 0]
}
},
label: {
show: true, // 显示标签
position: 'top', // 标签位置在柱子上方
formatter: '{c}', // 显示的内容,{c} 表示数据值
color: '#333', // 标签颜色
fontSize:10, // 标签字体大小
},
},
{
name: '应付',
......@@ -550,7 +558,14 @@
itemStyle: {
color: '#FF4D4F',
borderRadius: [4, 4, 0, 0]
}
},
label: {
show: true, // 显示标签
position: 'top', // 标签位置在柱子上方
formatter: '{c}', // 显示的内容,{c} 表示数据值
color: '#333', // 标签颜色
fontSize: 10, // 标签字体大小
},
},
{
name: '利润率',
......@@ -563,7 +578,14 @@
},
lineStyle: {
width: 2
}
},
label: {
show: true, // 显示标签
position: 'line', // 标签位置在柱子上方
formatter: '{c}', // 显示的内容,{c} 表示数据值
color: '#333', // 标签颜色
fontSize: 10, // 标签字体大小
},
}
]
}
......@@ -579,7 +601,7 @@
// 获取数据点数量
const dataCount = this.currentData.projectChartData.receivable.length;
// 计算所需的最小宽度(假设每个数据点需要100px)
const minWidth = Math.max(dataCount * 60, 300);
const minWidth = Math.max(dataCount * 60, 400);
// 设置容器宽度
const wrapper = document.getElementById('myProjectChart');
......@@ -690,7 +712,14 @@
itemStyle: {
color: '#52C41A',
borderRadius: [4, 4, 0, 0]
}
},
label: {
show: true, // 显示标签
position: 'top', // 标签位置在柱子上方
formatter: '{c}', // 显示的内容,{c} 表示数据值
color: '#333', // 标签颜色
fontSize: 10, // 标签字体大小
},
},
{
name: '应付',
......@@ -699,7 +728,14 @@
itemStyle: {
color: '#FF4D4F',
borderRadius: [4, 4, 0, 0]
}
},
label: {
show: true, // 显示标签
position: 'top', // 标签位置在柱子上方
formatter: '{c}', // 显示的内容,{c} 表示数据值
color: '#333', // 标签颜色
fontSize: 10, // 标签字体大小
},
},
{
name: '利润率',
......@@ -712,7 +748,14 @@
},
lineStyle: {
width: 2
}
},
label: {
show: true, // 显示标签
position: 'line', // 标签位置在柱子上方
formatter: '{c}', // 显示的内容,{c} 表示数据值
color: '#333', // 标签颜色
fontSize: 10, // 标签字体大小
},
}
]
......@@ -902,11 +945,11 @@
]
})
},
navigateToAbnormalReport() {
navigateToOrderEventList() {
console.log('点击了日报跳转按钮');
// 直接触发父组件的 choiceItem
uni.navigateTo({
url: '/pages/abnormal/list/index'
url: '/pages/orderEvent/orderEventList'
});
// this.showOrderEvent = true
},
......@@ -1105,7 +1148,7 @@
}
&.approving {
color: #faad14; // 异常统计使用红色
color: #fadf0d; // 异常统计使用红色
}
&.approved {
......
<template>
<view class="daily-report">
<!-- 顶部统计 -->
<view class="report-stats">
<view class="stat-item" @click="selectReport('submit')">
<text class="number" style="color: #52c41a;">
{{ searchDatas.submitted }}
<text class="unit" style="color: #52c41a;"></text>
</text>
<text class="label">已提交</text>
</view>
<view class="stat-item" @click="selectReport('unSubmit')">
<text class="number" style="color: #ff4d4f;">
{{ searchDatas.unSubmitted }}
<text class="unit" style="color: #ff4d4f;"></text>
</text>
<text class="label">未提交</text>
</view>
<view class="stat-item" @click="selectReport('all')">
<text class="number" style="color: #1890ff;">{{ searchDatas.total }}
<text class="unit" style="color: #1890ff;"></text></text>
<text class="label">总人数</text>
</view>
</view>
<!-- 日报列表 -->
<scroll-view class="report-list" scroll-y>
<view class="report-card" v-for="(report, index) in dailyReportList" :key="index">
<view class="card-header">
<view class="left">
<text class="name">{{ report.reporter }}</text>
<text class="status" :class="report.status==='submitted' ? 'submitted' : 'unSubmitted'">
<text class="name">汇报对象:{{ report.reporterTo__name }}</text>
<!-- <text class="status" :class="report.status==='submitted' ? 'submitted' : 'unSubmitted'">
{{ report.status==='submitted' ? '已提交' : '未提交' }}
</text>
</text> -->
</view>
<text class="time">{{ report.date || '-' }}</text>
</view>
<view class="card-content" v-if="report.status==='submitted'">
<view class="card-content">
<view class="work-item">
<view class="work-header">
<text class="work-title">今日重点工作</text>
</view>
<view class="work-content">{{ report.todayWork }}</view>
<view class="work-content">{{ report.today_work }}</view>
</view>
<view class="work-item">
<view class="work-header">
<text class="work-title">本周重点工作</text>
</view>
<view class="work-content">{{ report.weekWork }}</view>
<view class="work-content">{{ report.week_work }}</view>
</view>
<view class="work-item">
<view class="work-header">
<text class="work-title">是否请假</text>
</view>
<view class="work-content">{{ report.is_leave }}</view>
</view>
<view class="work-item" v-if="report.is_leave==='是'">
<view class="work-header">
<text class="work-title">请假原因</text>
</view>
<view class="work-content">{{ report.leave_reason ||''}}</view>
</view>
</view>
</view>
......@@ -60,7 +47,7 @@
<script>
import {
selectDailyReport
selectDailyReportList
} from '../../api/apiList'
import {
formatGMT
......@@ -95,9 +82,9 @@
this.staffCode = uni.getStorageSync('staffCode');
this.staffKind = uni.getStorageSync('uc_staff_kind');
this.commonName = uni.getStorageSync('commonName');
console.log("this.staffCode"+this.staffCode)
console.log("this.staffKind"+this.staffKind)
console.log("this.commonName"+this.commonName)
console.log("this.staffCode" + this.staffCode)
console.log("this.staffKind" + this.staffKind)
console.log("this.commonName" + this.commonName)
console.log('获取到的commonName:', this.commonName);
......@@ -110,22 +97,53 @@
}
const data = {
aux: {
staffCode: this.staffCode,
staffKind: this.staffKind,
searchStatus: this.searchStatus
}
"getTotalBy": "count",
"fields": [],
"keyword": {
"value": "",
"exact": false,
"partialMatchMode": "contain",
"caseSensitive": true
},
"filter": {
"fields": []
},
"refFields": [],
"order": [],
"quickFilter": {
"relationDataset": "zcgyl_dailyreport_search__quickFilterDataSet",
"fields": [{
"name": "staff__code",
"label": "员工编号",
"ignore": false,
"caseSensitive": true,
"quickFilterField": "staff__code",
"restriction": "eq",
"value": this.staffCode,
"num": 0
}]
},
"tableHeaderFilter": {
"relationDataset": "zcgyl_dailyreport_search__tableHeaderFilterDataSet",
"fields": []
},
"pageNum": 1,
"pageSize": 20,
"aggregation": {}
}
uni.showLoading({
title: '加载中...',
});
selectDailyReport(data).then(res => {
selectDailyReportList(data).then(res => {
uni.stopPullDownRefresh();
const data = res.data.data;
this.searchDatas = data;
this.dailyReportList = this.searchDatas.dailyReportList
const data = res.data.data.datas;
data.map(item => { //格式化时间
item.date = formatGMT(item.date, 'T')
})
this.dailyReportList = data
}).catch(err => {
console.error('获取日报数据失败:', err);
uni.showToast({
......@@ -145,61 +163,24 @@
</script>
<style lang="scss">
html, body {
height: 95%; /* 确保 html 和 body 高度为 100% */
margin: 0; /* 去掉默认的 margin */
overflow: hidden; /* 禁用滚动条 */
html,
body {
height: 95%;
/* 确保 html 和 body 高度为 100% */
margin: 0;
/* 去掉默认的 margin */
overflow: hidden;
/* 禁用滚动条 */
}
.daily-report {
// padding: 15px;
background: #f5f7fa;
// min-height: 90vh;
min-height: calc(100vh - 60px);
// max-height: 100vh;
padding: 10px;
padding-top: 45px;
.report-stats {
position: fixed;
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;
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;
.unit {
font-size: 12px;
color: #999;
margin-left: 5px;
}
}
.label {
font-size: 14px;
color: #999;
}
}
}
.report-list {
......
{
"name": "兆驰运输管理系统",
"appid": "__UNI__EFB25AB",
"description": "TMS-承运商",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"name" : "兆驰运输管理系统",
"appid" : "__UNI__EFB25AB",
"description" : "TMS-承运商",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules": {},
"modules" : {},
/* 应用发布信息 */
"distribute": {
"distribute" : {
/* android打包配置 */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
......@@ -41,83 +41,83 @@
]
},
/* ios打包配置 */
"ios": {},
"ios" : {},
/* SDK配置 */
"sdkConfigs": {}
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp": {},
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "ww5b68e5106ed852c5",
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": true
"mp-weixin" : {
"appid" : "ww5b68e5106ed852c5",
"setting" : {
"urlCheck" : false,
"es6" : true,
"postcss" : false,
"minified" : true
},
"usingComponents": true,
"lazyCodeLoading": "requiredComponents",
"requiredPrivateInfos": ["getLocation"],
"permission": {}
"usingComponents" : true,
"lazyCodeLoading" : "requiredComponents",
"requiredPrivateInfos" : [ "getLocation" ],
"permission" : {}
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "2",
"h5": {
"devServer": {
"https": false,
"disableHostCheck": true,
"port": 8083,
"proxy": {
"/api": {
"vueVersion" : "2",
"h5" : {
"devServer" : {
"https" : false,
"disableHostCheck" : true,
"port" : 8083,
"proxy" : {
"/api" : {
// "target" : "http://122.112.220.204:8089",
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
// "target": "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
},
"/handler": {
"/handler" : {
// "target" : "http://122.112.220.204:8089",
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
// "target": "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
},
"/sandtable": {
"/sandtable" : {
// "target" : "http://122.112.220.204:8089",
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
// "target": "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
},
"/tmsca": {
"/tmsca" : {
// "target" : "http://122.112.220.204:8089",
"target": "http://localhost:8083",
// "target" : "https://stms.bjzc-scs.com",
"changeOrigin": true,
"secure": false
// "target": "http://localhost:8083",
"target" : "https://stms.bjzc-scs.com",
"changeOrigin" : true,
"secure" : false
}
}
},
"router": {
"mode": "hash",
"base": "./"
"router" : {
"mode" : "hash",
"base" : "./"
},
"template": "template.h5.html",
"sdkConfigs": {
"maps": {}
"template" : "template.h5.html",
"sdkConfigs" : {
"maps" : {}
}
}
}
......@@ -30,7 +30,7 @@
}
},
{
"path": "pages/abnormal/list/index",
"path": "pages/orderEvent/orderEventList",
"style": {
"navigationBarTitleText": "异常订单",
"enablePullDownRefresh": false,
......@@ -38,7 +38,7 @@
}
},
{
"path": "pages/abnormal/detail/index",
"path": "pages/orderEvent/orderEventDetail",
"style": {
"navigationBarTitleText": "异常订单详情",
"enablePullDownRefresh": false,
......
......@@ -10,22 +10,23 @@
</view>
<view class="content">
<!-- <view v-if="currentShow === 'dailyReport'">
<dailyReport></dailyReport>
</view> -->
<view v-if="currentShow === 'bossCard' && uc_staff_kind!==''">
<bossCard></bossCard>
</view>
<view v-if="currentShow === 'dailyReportCreate' && uc_staff_kind!=='boss'">
<dailyReportCreate></dailyReportCreate>
</view>
<view v-if="currentShow === 'dailyReport'">
<dailyReportList></dailyReportList>
</view>
</view>
</view>
</template>
<script>
import bossCard from '@/components/bossCard/bossCard.vue'
import dailyReport from '@/components/dailyReport/dailyReport.vue'
import dailyReportList from '@/components/dailyReportList/dailyReportList.vue'
import {
GetBindCompanyResult,
......@@ -93,12 +94,21 @@
key: 'dailyReportCreate',
url: '/pages/index/index'
},
{
name: '查看日报',
key: 'dailyReport',
url: '/pages/index/index'
},
];
} else {
this.topUserList = [{
name: '填写日报',
key: 'dailyReportCreate',
url: '/pages/index/index'
}, {
name: '查看日报',
key: 'dailyReport',
url: '/pages/index/index'
}, ]
}
},
......
<template>
<view class="content_box flex_col" :style="{ backgroundImage: `url(${loginBg})` }">
<view class="primary-description">
<view class="container-title flex_cen">TMS运输管理系统</view>
<view class="container-subTitle flex_cen">上海运匠信息科技有限公司</view>
<!-- <view class="container-title flex_cen">TMS运输管理系统</view>
<view class="container-subTitle flex_cen">兆驰供应链</view>
-->
</view>
<!-- 用户信息录入 -->
<view class="user-info flex_center">
......@@ -25,10 +26,11 @@
<u-checkbox-group placement="column" @change="onChanges">
<u-checkbox :checked="isChecked" iconSize="30rpx" shape="square" size="20spx" />
</u-checkbox-group>
<text style="color: black;font-size: 18px;">记住密码</text>
<text style="color: #d5d5d6;font-size: 18px;">记住密码</text>
</view>
</view>
<!-- 登录按钮 -->
<button class="loginBtn font_bolder" @click="submitForm">登录</button>
</view>
......@@ -73,7 +75,28 @@
},
onLoad() {
// //#ifdef MP
// this.loginBg = 'static/img/bg/souye-bg.jpg'
// //#endif
// //#ifdef H5
// this.loginBg = 'static/img/bg/loginBg.png'
// //#endif
const userAgent = navigator.userAgent;
// 判断是否为移动设备
const isMobile = /Mobi|Android/i.test(userAgent);
if (isMobile) {
console.log("当前设备为手机或平板");
// 在这里执行手机端的逻辑
this.loginBg = 'static/img/bg/souye-bg.jpg'
} else {
console.log("当前设备为电脑");
// 在这里执行电脑端的逻辑
this.loginBg = 'static/img/bg/loginBg.png'
}
this.projectMini = getApp().globalData.projectMini
this.rememberPd()
......@@ -272,13 +295,16 @@
<style lang="scss">
.content_box {
height: 100vh;
color: #FFFFFF;
letter-spacing: 6rpx;
background-size: 100%;
background-size: 100% 100%;
background-repeat: no-repeat;
padding: 0 32rpx;
justify-content: space-between;
.primary-description {
font-size: 28rpx;
font-weight: 400;
......@@ -318,6 +344,7 @@
border-radius: 48rpx;
background: linear-gradient(90deg, #2E75E6 0%, #5E58EE 100%);
border: none !important;
margin-bottom: 20px;
&:after {
border: none;
......@@ -340,7 +367,7 @@
padding: 6rpx 40rpx !important;
border-radius: 48rpx;
margin-bottom: 64rpx;
background: rgba(225, 225, 225, .2);
background: #dadbde;
.u-input {
padding: 16rpx 24rpx !important;
......
......@@ -138,7 +138,7 @@
import {
searchOrderEventDetail,
downloadImg
} from '../../../api/apiList'
} from '../../api/apiList'
export default {
data() {
return {
......
......@@ -3,24 +3,24 @@
<!-- 状态统计卡片 -->
<view class="report-stats">
<view class="stat-item" @click="selectReport('new')">
<text class="number" style="color: #faad14;">{{ searchDatas.new }}</text>
<text class="number" style="color: #FF4D4F;">{{ searchDatas.new }}</text>
<text class="label">未审批</text>
<text class="number2" style="color: #faad14;">¥{{ searchDatas.newAmount }}</text>
<text class="number2" style="color: #FF4D4F;">¥{{ searchDatas.newAmount }}</text>
</view>
<view class="stat-item" @click="selectReport('approving')">
<text class="number" style="color: #1890ff;">{{ searchDatas.approving }}</text>
<text class="number" style="color: #fadf0d;">{{ searchDatas.approving }}</text>
<text class="label">审批中</text>
<text class="number2" style="color: #1890ff;">¥{{ searchDatas.approvingAmount }}</text>
<text class="number2" style="color: #fadf0d;">¥{{ searchDatas.approvingAmount }}</text>
</view>
<view class="stat-item" @click="selectReport('approved')">
<text class="number" style="color:#52c41a;">{{ searchDatas.approved }}</text>
<text class="number" style="color:#52C41A;">{{ searchDatas.approved }}</text>
<text class="label">审批完成</text>
<text class="number2" style="color:#52c41a;">¥{{ searchDatas.approvedAmount }}</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="number" style="color:#461516;">{{ searchDatas.total }}</text>
<text class="label">总计</text>
<text class="number2" style="color:#ff4d4f;">¥{{ searchDatas.totalAmount }}</text>
<text class="number2" style="color:#461516;">¥{{ searchDatas.totalAmount }}</text>
</view>
</view>
......@@ -71,7 +71,7 @@
<script>
import {
searchOrderEvent
} from '../../../api/apiList'
} from '../../api/apiList'
export default {
data() {
......@@ -136,7 +136,7 @@
goToDetail(id) {
// 跳转到详情页面
uni.navigateTo({
url: `/pages/abnormal/detail/index?id=${id}`
url: `/pages/orderEvent/orderEventDetail?id=${id}`
})
}
}
......@@ -237,19 +237,19 @@
&.status-pending {
background: rgba(250, 173, 20, 0.1);
color: #faad14;
color: #FF4D4F;
border: 1px solid rgba(250, 173, 20, 0.2);
}
&.status-processing {
background: rgba(24, 144, 255, 0.1);
color: #1890ff;
color: #fadf0d;
border: 1px solid rgba(24, 144, 255, 0.2);
}
&.status-completed {
background: rgba(82, 196, 26, 0.1);
color: #52c41a;
color: #52C41A;
border: 1px solid rgba(82, 196, 26, 0.2);
}
}
......
......@@ -9,9 +9,9 @@ let BASEURL = {
// url: 'http://192.168.1.199:7080' //唐浩然
// url: 'http://192.168.0.230:8080' // xiaohan
// url: "https://botms-demo.logwirecloud.com",
url: "http://localhost:8083", //开发
// url: "http://localhost:8083", //开发
// url: "http://122.112.220.204:8089", //开发
// url: "https://stms.bjzc-scs.com", //生产
url: "https://stms.bjzc-scs.com", //生产
};
//当使用多域名代理服务时生效,用于统一添加API前缀以区分服务代理地址。本地开发H5注意修改manifest.json中Proxy代理规则
......
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