diff --git a/src/api/mes/report.js b/src/api/mes/report.js
index 94c92c4..d539a9e 100644
--- a/src/api/mes/report.js
+++ b/src/api/mes/report.js
@@ -61,3 +61,43 @@ export function deleteByReportId(id) {
method: 'delete'
})
}
+
+// 30天报工数据
+export function getReportTime(id) {
+ return request({
+ url: '/admin-api/mes/app/product/get30DaysReportList?userId='+id,
+ method: 'get'
+ })
+}
+
+// 上月报工汇总
+export function getLastMonthSum(id) {
+ return request({
+ url: '/admin-api/mes/app/product/getLastMonthSum?userId='+id,
+ method: 'get'
+ })
+}
+
+// 本月报工汇总
+export function getThisMonthSum(id) {
+ return request({
+ url: '/admin-api/mes/app/product/getThisMonthSum?userId='+id,
+ method: 'get'
+ })
+}
+
+// 本月上月计时汇总
+export function getSumReportTime(id) {
+ return request({
+ url: '/admin-api/mes/app/product/getSumReportTime?userId='+id,
+ method: 'get'
+ })
+}
+
+// 最近30天计时列表
+export function getDayReportTime(id) {
+ return request({
+ url: '/admin-api/mes/app/product/getDay30ReportTime?userId='+id,
+ method: 'get'
+ })
+}
diff --git a/src/config.js b/src/config.js
index e3d4cf7..5fb86fb 100644
--- a/src/config.js
+++ b/src/config.js
@@ -1,7 +1,7 @@
// 应用全局配置
const config = {
// baseUrl: 'http://47.106.185.127:48080',127.0.0.1
- baseUrl: 'http://47.106.185.127:48080',
+ baseUrl: 'http://192.168.0.122:48080',
// 应用信息
appInfo: {
// 应用名称
diff --git a/src/page_report/ViewForm.vue b/src/page_report/ViewForm.vue
index f764f89..6783889 100644
--- a/src/page_report/ViewForm.vue
+++ b/src/page_report/ViewForm.vue
@@ -108,8 +108,8 @@ export default {
// 自定义表单数据
customFormData: {
id: undefined,
- name: this.getUserInfo.name,
- userId: this.getUserInfo.userId,
+ name: this.getUserInfo().name,
+ userId: this.getUserInfo().userId,
orgId: undefined,
orgType: undefined,
reportTime: undefined,
diff --git a/src/page_report/reportForm.vue b/src/page_report/reportForm.vue
index 6ee65c4..f18b3f9 100644
--- a/src/page_report/reportForm.vue
+++ b/src/page_report/reportForm.vue
@@ -124,8 +124,8 @@ export default {
// 自定义表单数据
customFormData: {
id: undefined,
- name: this.getUserInfo.name,
- userId: this.getUserInfo.userId,
+ name: this.getUserInfo().name,
+ userId: this.getUserInfo().userId,
orgId: undefined,
orgType: undefined,
reportTime: undefined,
diff --git a/src/pages.json b/src/pages.json
index b2c2290..12cbe5c 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -51,12 +51,6 @@
"navigationStyle": "custom"
}
},
- {
- "path": "pages/template",
- "style": {
- "navigationBarTitleText": "模板"
- }
- },
{
"path": "pages/report",
"style": {
@@ -315,12 +309,6 @@
"selectedIconPath": "static/images/tabbar/material_.png",
"text": "投料"
},
- /*{
- "pagePath": "pages/template",
- "iconPath": "static/images/tabbar/work.png",
- "selectedIconPath": "static/images/tabbar/work_.png",
- "text": "模板"
- },*/
{
"pagePath": "pages/mine",
"iconPath": "static/images/tabbar/mine.png",
diff --git a/src/pages/js/common.js b/src/pages/js/common.js
new file mode 100644
index 0000000..2cccd25
--- /dev/null
+++ b/src/pages/js/common.js
@@ -0,0 +1,170 @@
+let isReadyLogin = 1
+let loginFlag = 1
+export default {
+ //提示窗
+ tipMsg: function (title, icon, time, mask,callback) {
+ title = title == undefined ? "系统繁忙" : title;
+ icon = icon == undefined ? "none" : icon;
+ time = time == undefined ? 1300 : time;
+ mask = mask == undefined ? true : mask;
+ uni.showToast({
+ title: title,
+ icon: icon,
+ mask: mask,
+ duration: time,
+ success() {
+ if(callback){
+ setTimeout(()=>{
+ callback()
+ },time);
+ }
+ }
+ })
+ },
+ getTelephoneInfo(){
+ return new Promise((resolve, reject) => {
+ var data = uni.getStorageSync("telephoneInfo");
+ if(!data){
+ // 获取右上角胶囊的位置信息
+ //#ifndef H5
+ let btn = wx.getMenuButtonBoundingClientRect();
+ uni.getSystemInfo({
+ success: e => {
+ let info = {
+ screenHeight:e.screenHeight,
+ statusBarHeight:e.statusBarHeight,
+ windowWidth:e.windowWidth,
+ top:btn.top
+ }
+ uni.setStorageSync("telephoneInfo",info);
+ resolve(info);
+ },
+ fail: (err) => {
+ reject(err);
+ }
+ })
+ //#endif
+ }else{
+ resolve(data);
+ }
+ })
+ },
+ // 获取当前年月日
+ getNowDate(){
+ let date = new Date;
+ let now = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate();
+ return now;
+ },
+ // 获取上个月的年月日
+ getPreMonth(date) {
+ var arr = date.split('-');
+ var year = arr[0]; //获取当前日期的年份
+ var month = arr[1]; //获取当前日期的月份
+ var day = arr[2]; //获取当前日期的日
+ var days = new Date(year, month, 0);
+ days = days.getDate(); //获取当前日期中月的天数
+ var year2 = year;
+ var month2 = parseInt(month) - 1;
+ if (month2 == 0) {
+ year2 = parseInt(year2) - 1;
+ month2 = 12;
+ }
+ var day2 = day;
+ var days2 = new Date(year2, month2, 0);
+ days2 = days2.getDate();
+ if (day2 > days2) {
+ day2 = days2;
+ }
+ if (month2 < 10) {
+ month2 = '0' + month2;
+ }
+ var t2 = year2 + '-' + month2 + '-' + "01";
+ return t2;
+ },
+ //检测小程序更新
+ checkUpdateVersion(){
+ //新版本更新
+ if (uni.canIUse('getUpdateManager')) {
+ //判断当前微信版本是否支持版本更新
+ const updateManager = uni.getUpdateManager();
+ updateManager.onCheckForUpdate(function (res) {
+ if (res.hasUpdate) {
+ // 请求完新版本信息的回调
+ updateManager.onUpdateReady(function () {
+ uni.showModal({
+ title: '更新提示',
+ content: '已更新版本,是否重启小程序?',
+ showCancel:false,
+ cancelColor:'#eeeeee',
+ confirmColor:'#40A2ED',
+ success: function (res) {
+ if (res.confirm) {
+ // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+ updateManager.applyUpdate();
+ }
+ },
+ });
+ });
+ // 新的版本下载失败
+ updateManager.onUpdateFailed(function () {
+ uni.showModal({
+ title: '更新失败',
+ content: '请检查网络设置,若仍更新失败,重新搜索打开',
+ success(res) {
+ if (res.confirm) {
+ // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+ updateManager.applyUpdate();
+ }
+ }
+ });
+ });
+ }
+ });
+ } else {
+ uni.showModal({
+ // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
+ title: '提示',
+ content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。',
+ });
+ }
+ },
+ /**
+ * @param {string} url 目标页面的路由
+ * @param {Object} param 传递给目标页面的参数
+ * @description 处理目标页面的参数,转成json字符串传递给param字段,在目标页面通过JSON.parse(options.param)接收
+ */
+ navigateTo(url, param = {},flag) {
+ if(isReadyLogin<=0 && !flag){
+ this.loginTip();
+ }else{
+ let part = '';
+ for(var item in param){
+ part += '&' + item + '=' + param[item];
+ }
+ url = url + part.replace('&','?');
+ uni.navigateTo({
+ url: url,
+ fail:err=> {
+ this.tipMsg('页面正在火速开发中,敬请期待!');
+ },
+ })
+ }
+ },
+ navigateBack(url, param = {}) {
+ if (loginFlag <= 0) {
+ this.tipMsg("很抱歉,你没有权限!");
+ } else {
+ let part = '';
+ for (var item in param) {
+ part += '&' + item + '=' + param[item];
+ }
+ url = "/pages" + url + part.replace('&', '?');
+ uni.navigateBack({
+ url: url,
+ fail: err => {
+ this.tipMsg('暂未开放该功能!');
+ },
+ })
+ }
+ },
+}
\ No newline at end of file
diff --git a/src/pages/js/config.js b/src/pages/js/config.js
new file mode 100644
index 0000000..074515b
--- /dev/null
+++ b/src/pages/js/config.js
@@ -0,0 +1,79 @@
+
+const COLOR = [
+ "#EE6A66", "#6BC588", "#FFC300", "#24ABFD"
+];
+
+var ISCANVAS2D = true;
+
+switch (uni.getSystemInfoSync().platform) {
+ case 'android':
+ ISCANVAS2D = true
+ break;
+ case 'ios':
+ ISCANVAS2D = true
+ break;
+ default:
+ ISCANVAS2D = false
+ break;
+}
+
+const RESPOND = {
+ success: 0,
+ warn: 301,
+ error: 500,
+};
+
+const TIMEARRAY = [
+ {
+ text: '当天',
+ value: 'today'
+ },
+ {
+ text: '昨天',
+ value: 'yesterday'
+ },
+ {
+ text: '本周',
+ value: 'week'
+ },
+ {
+ text: '上周',
+ value: 'weeklast'
+ },
+ {
+ text: '本月',
+ value: 'month'
+ },
+ {
+ text: '上月',
+ value: 'monthlast'
+ },
+ {
+ text: '指定日期',
+ value: 'auto'
+ }
+];
+const TABLIST = [
+ {name:"企业微信",type:"WECHAT"},
+ {name:"会员运营",type:"OPERATE"},
+ {name:"会员健康",type:"GJJK"},
+ {name:"会员服务",type:"SERVICE"},
+];
+
+const CARD_MENU = [
+ {title:"会员报表中心",author:"howcode",img:"https://s1.ax1x.com/2023/03/31/ppRp4iV.jpg",url:"/myPackageA/pages/main/index"},
+ {title:"智慧教育报表中心",author:"howcode",img:"https://s1.ax1x.com/2023/03/31/ppRp5GT.jpg",url:"/myPackageA/pages/school/index"},
+ {title:"差旅报表中心",author:"秋云",img:"https://s1.ax1x.com/2023/03/31/ppRpfI0.jpg",url:""},
+ {title:"运动报表中心",author:"howcode",img:"https://s1.ax1x.com/2023/03/31/ppRpWaq.jpg",url:"/myPackageA/pages/sport/index"},
+ {title:"财务报表中心",author:"howcode",img:"https://s1.ax1x.com/2023/03/31/ppRpozF.jpg",url:"/myPackageA/pages/finance/index"},
+]
+
+
+export default {
+ COLOR,
+ TIMEARRAY,
+ TABLIST,
+ RESPOND,
+ ISCANVAS2D,
+ CARD_MENU
+}
\ No newline at end of file
diff --git a/src/pages/json/1.json b/src/pages/json/1.json
new file mode 100644
index 0000000..83e162e
--- /dev/null
+++ b/src/pages/json/1.json
@@ -0,0 +1,68 @@
+{
+ "expend":{
+ "categories": [
+ "1月",
+ "2月",
+ "2月",
+ "4月",
+ "5月"
+ ],
+ "series": [
+ {
+ "name": "支出情况",
+ "data": [1201,2501.5,985,1760,2013.85],
+ "type": "line",
+ "style": "curve",
+ "color": "#4ECDB6",
+ "unit":""
+ }
+ ],
+ "yAxis":[
+ {"calibration":true,"position":"left","title":"单位/元","titleFontSize":12,"unit":"","tofix":0,"min":0,"disableGrid":true}
+ ]
+ },
+ "income":{
+ "categories": [
+ "1月",
+ "2月",
+ "2月",
+ "4月",
+ "5月"
+ ],
+ "series": [
+ {
+ "name": "收入情况",
+ "data": [1601,1840.5,1900,1760,1500.85],
+ "type": "line",
+ "style": "curve",
+ "color": "#4ECDB6",
+ "unit":""
+ }
+ ],
+ "yAxis":[
+ {"calibration":true,"position":"left","title":"单位/元","titleFontSize":12,"unit":"","tofix":0,"min":0,"disableGrid":true}
+ ]
+ },
+ "remaining":{
+ "categories": [
+ "1月",
+ "2月",
+ "2月",
+ "4月",
+ "5月"
+ ],
+ "series": [
+ {
+ "name": "结余情况",
+ "data": [815,712.5,378,450,600.85],
+ "type": "line",
+ "style": "curve",
+ "color": "#4ECDB6",
+ "unit":""
+ }
+ ],
+ "yAxis":[
+ {"calibration":true,"position":"left","title":"单位/元","titleFontSize":12,"unit":"","tofix":0,"min":0,"disableGrid":true}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/pages/json/2.json b/src/pages/json/2.json
new file mode 100644
index 0000000..1d899cf
--- /dev/null
+++ b/src/pages/json/2.json
@@ -0,0 +1,33 @@
+{
+ "series": [
+ {
+ "data":[
+ {
+ "name": "住房相关",
+ "value": 3200,
+ "color":"#4DCCB3"
+ },
+ {
+ "name": "食品酒水",
+ "value": 1020,
+ "color":"#5A77EC"
+ },
+ {
+ "name": "娱乐休闲",
+ "value": 500,
+ "color":"#4E94EC"
+ },
+ {
+ "name": "交流通讯",
+ "value": 214.5,
+ "color":"#4FD4EB"
+ },
+ {
+ "name": "其他",
+ "value": 320.13,
+ "color":"#B5ED21"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/pages/mine.vue b/src/pages/mine.vue
index ff3917d..92017ee 100644
--- a/src/pages/mine.vue
+++ b/src/pages/mine.vue
@@ -114,8 +114,6 @@ uni.$on('refresh', () => {
avatar.value = userStore.avatar;
})
-console.log(avatar.value)
-
function handleToInfo() {
uni.navigateTo({
url: '/pages_mine/pages/info/index'
diff --git a/src/pages/progress-bar.vue b/src/pages/progress-bar.vue
new file mode 100644
index 0000000..5c47640
--- /dev/null
+++ b/src/pages/progress-bar.vue
@@ -0,0 +1,125 @@
+
+
+
+
+ {{content.name}}
+
+
+
+ {{content.num}}
+
+
+
+
+
+
+
+
diff --git a/src/pages/report.vue b/src/pages/report.vue
index 05bc0a4..dcab91c 100644
--- a/src/pages/report.vue
+++ b/src/pages/report.vue
@@ -132,7 +132,7 @@
- 报工报表
+
@@ -147,7 +147,9 @@ import { showConfirm } from "@/utils/common";
import { getCurrentDate, timestampToTime } from "@/utils/dateUtil";
import { processTypes } from "@/api/system/dict/data";
import { getOtherPersonalUser } from "@/api/mes/organization";
+import WorkReport from "@/pages/workReport.vue";
export default {
+ components: { WorkReport },
computed: {
Delete() { return Delete },
Promotion() { return Promotion },
diff --git a/src/pages/work.vue b/src/pages/work.vue
index 12e5715..d816c4e 100644
--- a/src/pages/work.vue
+++ b/src/pages/work.vue
@@ -26,13 +26,12 @@
-
+
-
+
-
-
-
- 提交
-
-
- 删除
-
-
@@ -144,10 +144,10 @@ import auth from "@/plugins/auth";
const menuList = ref([
{
- name: '已提交'
+ name: '草稿'
},
{
- name: '草稿'
+ name: '已提交'
}
])
@@ -184,13 +184,11 @@ function handleFinishClick(id, index){
getDetailByRecordId(id).then(response => {
finishList.value[index].detailList = response.data
})
- return finishList.value[index].detailList
}
function handleDraftClick(id, index){
getDetailByRecordId(id).then(response => {
draftList.value[index].detailList = response.data
})
- return draftList.value[index].detailList
}
/** 提交 */
function handleUpdate(id){
@@ -247,4 +245,7 @@ function handleAdd(){
}
}
}
+.u-button {
+ height: 24.8px
+}
diff --git a/src/pages/workReport.vue b/src/pages/workReport.vue
new file mode 100644
index 0000000..d63c99c
--- /dev/null
+++ b/src/pages/workReport.vue
@@ -0,0 +1,512 @@
+
+
+
+
+ {{ nowTime.month }}
+ 月
+ {{ nowTime.year }}
+ .
+ 报工报表
+
+
+
+ 上月报工汇总
+ 总数
+ {{ lastMonthSum.sumNumber }}
+
+
+ 合格数
+ {{ lastMonthSum.totalQualityNumber }}
+
+
+ 废品数
+ {{ lastMonthSum.totalWasteNumber }}
+
+
+
+
+ 本月报工汇总
+ 总数
+ {{ thisMonthSum.sumNumber }}
+
+
+ 合格数
+ {{ thisMonthSum.totalQualityNumber }}
+
+
+ 废品数
+ {{ thisMonthSum.totalWasteNumber }}
+
+
+
+
+
+
+
+
+
+
+ 30天报工数据
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+ 最近30天计时列表
+
+
+
+
+ 报工日期
+ {{ item.reportDay }}
+
+
+ 计时时长
+ {{ item.reportTime }}
+
+
+
+
+
+
+
+ 本月上月计时汇总
+
+
+
+ 上月总计时
+ {{ sumReportTime.totalWasteNumber }}
+
+
+ 本月总计时
+ {{ sumReportTime.totalQualityNumber }}
+
+
+
+
+
+
+
+
+
+