Ver código fonte

添加新文件

panxingxin 5 anos atrás
pai
commit
1fda7aae0a

+ 1 - 0
api/request.js

@@ -73,6 +73,7 @@ fly.interceptors.request.use(function (request) {
     }).then((res) => {
       if (res.data.access_token) {
         wx.setStorageSync('token', res.data.access_token);
+        wx.setStorageSync('username', res.data.username);
       }
       console.log("token请求成功,值为: " +  res.data.access_token);
       console.log(`继续完成请求:path:${request.url},baseURL:${request.baseURL}`)

+ 8 - 2
app.json

@@ -11,7 +11,12 @@
     "pages/contract/detail",
     "pages/qc/index",
     "pages/qc/list",
-    "pages/qc/detail"
+    "pages/qc/detail",
+    "pages/inspection/index",
+    "pages/inspection/list",
+    "pages/inspection/detail",
+    "pages/timesheet/index",
+    "pages/timesheet/detail"
   ],
   "tabBar": {
     "list": [
@@ -20,7 +25,8 @@
         "iconPath": "./resources/home.png",
         "selectedIconPath": "./resources/home-selected.png",
         "text": "主页"
-      },{
+      },
+      {
         "pagePath": "pages/me/me",
         "iconPath": "./resources/me.png",
         "selectedIconPath": "./resources/me-selected.png",

+ 3 - 1
menu/menu.js

@@ -1,5 +1,7 @@
 export const menuList = [
   {name:'QA样品',url:'sample',icon:'../../resources/sample.png'},
   {name:'QA合同',url:'contract',icon:'../../resources/contract.png'},
-  {name:'QC验货',url:'qc',icon:'../../resources/qc.png'}
+  {name:'陪验录入',url:'inspection',icon:'../../resources/contract.png'},
+  {name:'QC验货',url:'qc',icon:'../../resources/qc.png'},
+  {name:'考勤查询',url:'timesheet',icon:'../../resources/contract.png'}
 ]

+ 18 - 0
models/dataModel.js

@@ -237,4 +237,22 @@ export function generateQcReport(form) {
     method: 'post',
     body: form
   })
+}
+
+// 获取Inspection验货列表
+export function getInspectionList(form) {
+  return fly.request({
+    url: '/inventory/isnspection/page',
+    method: 'get',
+    params: form
+  })
+}
+
+// 获取Inspection验货列表
+export function getTimeSheetList(form) {
+  return fly.request({
+    url: '/inventory/sgtimesheet/page',
+    method: 'get',
+    params: form
+  })
 }

+ 117 - 0
pages/inspection/detail.js

@@ -0,0 +1,117 @@
+import * as requestAPI from '../../models/dataModel'
+import baseURL from '../../api/baseUrlConfig.js'
+Page({
+  data: {
+  //  qcDetail: {},
+   // mark: '',
+  //  tempMark: '',
+    scCode: '',
+    scpCode: '',
+    poCode: '',
+    picture: '',
+    ids: '',
+    imageList: [],
+    showAllPic: false,
+    showDeleteBtn: true,
+    allImgList: []
+  },
+
+  onLoad: function (options) {
+    this.setData({
+      ids: options.ids,
+      picture: options.picture,
+      poCode: options.poCode,
+      scCode: options.scCode,
+      scpCode: options.scpCode
+    })
+    this.getImages()
+  },
+
+  // 获取图片
+  getImages() {
+ 
+      let allImgList = [] // 全部图片
+      let lessImgList = [] // 部分图片
+
+        if(this.data.picture) {
+          allImgList = this.data.picture.split(',')
+          for(let i = 0;i<this.data.picture.split(',').length&&i<2;i++) {
+            lessImgList.push(this.data.picture.split(',')[i])
+          }
+          this.setData({
+            allImgList: allImgList
+          })
+          this.setData({
+            imageList: this.data.showAllPic?allImgList:lessImgList
+          })
+        }
+  
+  },
+
+  getAllImg() {
+    this.setData({
+      showAllPic: true
+    })
+    this.getImages()
+  },
+  showDeleteBtn() {
+    this.setData({
+      showDeleteBtn: !this.data.showDeleteBtn
+    })
+  },
+
+  // 拍照
+  takePhoto() {
+    this.getPhotos(1, 'camera')
+  },
+  choosePhoto() {
+    this.getPhotos(9, 'album')
+  },
+  getPhotos(count, type) {
+    let _this = this
+    wx.chooseImage({
+      count: count,
+      sizeType: ['original', 'compressed'],
+      sourceType: [type],
+      success(res) {
+        let that=_this
+        for (let i of res.tempFilePaths) {
+          wx.uploadFile({
+            url: baseURL.mainUrl + `/inventory/isnspection/mobile/picture?ids=${_this.data.ids}`, //此处换上你的接口地址 
+            filePath: i,
+            name: 'file',
+            header: {
+              "Content-Type": "multipart/form-data",
+              'Authorization': `Bearer ${wx.getStorageSync('token')}`,
+            },
+            success: function (res) {
+              var jsonObj = JSON.parse(res.data);
+              that.setData({
+                picture: jsonObj.data
+              })
+              wx.showToast({
+                title: '上传成功',
+                icon: 'success',
+                duration: 2000
+                })
+              _this.getImages()
+            }
+          })
+        }
+      }
+    })
+  },
+  // 删除qa图片
+  delImg: function (event) {
+   // requestAPI.delQcPic(this.data.sscId, this.data.pId, event.currentTarget.dataset.url).then(res=>{
+   //   this.getImages()
+  //  })
+  },
+  // 图片预览
+  openPreview: function (event) {
+    wx.previewImage({
+      urls: this.data.imageList,
+      current: event.currentTarget.dataset.current
+    })
+  }
+})

+ 6 - 0
pages/inspection/detail.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "mp-icon": "../../components/icon/icon"
+  },
+  "navigationBarTitleText": "陪验资料详情"
+}

+ 33 - 0
pages/inspection/detail.wxml

@@ -0,0 +1,33 @@
+<view class="detail">
+	<view class="detail-item">
+		<label>PO号:</label>
+		<input value="{{poCode}}" disabled />
+	</view>
+	<view class="detail-item">
+		<label>SC号:</label>
+		<input value="{{scCode}}" disabled />
+	</view>
+	<view class="detail-item">
+		<label>我司货号:</label>
+		<input value="{{scpCode}}" disabled />
+	</view>
+	<view class="detail-item">
+		<label>图片:</label>
+	</view>
+	<view class="detail-item">
+		<view class="imageList">
+			<view class="image-item" wx:for="{{imageList}}" wx:key="index">
+				<icon type="cancel" size="25" hidden="{{showDeleteBtn}}" bindtap="delImg" data-index="{{index}}" data-url="{{item}}"/>
+				<image src="{{item}}" mode="scaleToFill" bindtap="openPreview" data-current="{{item}}"></image>
+			</view>
+			<text bindtap="getAllImg" hidden="{{showAllPic||allImgList.length<=2}}">查看更多</text>
+		</view>
+	</view>
+	<view class="detail-btns">
+		<view>
+			<mp-icon icon="camera" color="black" size="{{25}}" bindtap="takePhoto"></mp-icon>
+			<mp-icon icon="album" color="black" size="{{25}}" bindtap="choosePhoto"></mp-icon>
+		  <mp-icon icon="close2" color="black" size="{{25}}" bindtap="showDeleteBtn"></mp-icon>
+		</view>
+	</view>
+</view>

+ 48 - 0
pages/inspection/detail.wxss

@@ -0,0 +1,48 @@
+page{
+  background-color: #ebebeb;
+}
+.detail {
+  border-radius: 0.5rem;
+  background-color: #fff;
+  margin: 0.2rem;
+}
+.detail-item {
+  display: flex;
+  padding: 0.4rem 1rem;
+}
+.detail-item label {
+  width: 5rem;
+  margin-right: 2rem;
+}
+.detail-item .imageList{
+  display: flex;
+  width: 100%;
+  flex-wrap: wrap;
+  align-items: center;
+}
+.detail-item .imageList .image-item{
+  display: flex;
+  flex-direction: column;
+}
+.detail-item .imageList image {
+  height: 4rem;
+  width: 4rem;
+  margin-top: 5px;
+  margin-right: 2px;
+}
+.detail-item .imageList text {
+  font-size: 14px;
+  text-decoration: underline;
+  color: green;
+  margin-left: 1rem;
+}
+.detail-btns {
+  display: flex;
+  justify-content: center;
+  padding: 0.5rem;
+}
+.detail-btns view{
+  display: flex;
+  width: 16rem;
+  justify-content: space-between;
+}

+ 24 - 0
pages/inspection/index.js

@@ -0,0 +1,24 @@
+Page({
+  data: {
+     poCode: '',
+     scCode: ''
+  },
+  onLoad: function (options) {
+  },
+
+  bindpoCodeInput: function (e) {
+    this.setData({
+      poCode: e.detail.value
+    })
+  },
+  bindscCodeInput: function (e) {
+    this.setData({
+      scCode: e.detail.value
+    })
+  },
+  search() {
+    wx.navigateTo({
+      url: `/pages/inspection/list?scCode=${this.data.scCode}&poCode=${this.data.poCode}`,
+    })
+  }
+})

+ 3 - 0
pages/inspection/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 14 - 0
pages/inspection/index.wxml

@@ -0,0 +1,14 @@
+<view>
+	<view class="inputView">
+		<label class="inputLabel">PO号:</label>
+		<input class="inputText" focus placeholder="请输入PO号" bindinput="bindpoCodeInput" />
+	</view>
+
+	<view class="inputView">
+		<label class="inputLabel">SC号:</label>
+		<input class="inputText" placeholder="请输入SC号" bindinput="bindscCodeInput" />
+	</view>
+	<view class="btnView">
+		<button type="primary" bindtap="search">搜索</button>
+	</view>
+</view>

+ 4 - 0
pages/inspection/index.wxss

@@ -0,0 +1,4 @@
+picker {
+  margin-top: 1rem;
+  width: 60%;
+}

+ 120 - 0
pages/inspection/list.js

@@ -0,0 +1,120 @@
+import * as requestAPI from '../../models/dataModel'
+Page({
+  data: {
+    inspectionList: [],
+    scCode: '',
+    poCode: '',
+    current: 1,
+    size: 10,
+    total: 0,
+    selectinspectionList: []
+  },
+  onLoad: function (options) {
+    this.setData({
+      poCode: options?options.poCode:this.data.poCode,
+      scCode: options?options.scCode:this.data.scCode
+    })
+  },
+  onReady() {
+    this.getinspectionList()
+  },
+  onUnload() {
+  },
+  // 获取样品单列表
+  getinspectionList() {
+    //wx.showLoading({title: '加载中', icon: 'loading'});
+    let form = {
+      current: this.data.current,
+      size: this.data.size,
+      scCode: this.data.scCode,
+      poCode: this.data.poCode
+    }
+    requestAPI.getInspectionList(form).then(res => {
+      this.setData({
+        inspectionList: res.data.data.records,
+        total: res.data.data.total
+      })
+    })
+  },
+
+  // 获取资料详情
+  getDetail: function (event) {
+    let filterList =  this.data.inspectionList.filter(item=>{return item.id == event.currentTarget.dataset.id})
+
+    wx.navigateTo({
+      url: `/pages/inspection/detail?ids=${filterList[0].id}&scpCode=${filterList[0].scpCode}&scCode=${filterList[0].scCode}&poCode=${filterList[0].poCode}&picture=${filterList[0].picture}`,
+    })
+
+  },
+
+  selectList:function(e) {
+    let tempList = this.data.inspectionList
+    tempList[e.currentTarget.dataset.index].checked = !tempList[e.currentTarget.dataset.index].checked
+    this.setData({
+      inspectionList: tempList
+    })
+  },
+
+  // 下拉刷新
+  onPullDownRefresh: function () {
+    wx.showNavigationBarLoading(); //在当前页面显示导航条加载动画
+    this.onLoad(); //刷新页面
+    setTimeout(function () {
+      wx.hideNavigationBarLoading(); //在当前页面隐藏导航条加载动画
+      wx.stopPullDownRefresh(); //停止下拉动作
+    }, 2000)
+  },
+
+  // 下拉加载
+  onReachBottom: function () {
+    if (this.data.size > this.data.total) {
+      return;
+    } else {
+      this.getinspectionList();
+      this.setData({
+        size: this.data.size+10
+      })
+    }
+  },
+
+  openPreview: function (event) {
+    wx.previewImage({
+      urls: new Array(event.currentTarget.dataset.url),
+    })
+  },
+    // 全选反选
+    selectall() {
+      let tempList = this.data.inspectionList
+      for(let i of tempList) {
+       i.checked =!i.checked
+      }
+      this.setData({
+        inspectionList: tempList
+      })
+    
+    },
+
+  // 进入图片选择界面
+  generate() {
+    let tempList = []
+    let filterList = [] 
+    for(let i of this.data.inspectionList) {
+      if(i.checked) {
+        tempList.push(i.id)
+        filterList.push(i)
+      }
+    }
+    if(tempList.length==0) {
+      wx.showToast({
+        title: `至少选择一个货号`,
+        icon: 'warn',
+        duration: 30000
+      })
+      return
+    }
+    wx.navigateTo({
+      url: `/pages/inspection/detail?ids=${tempList.join('-')}&scpCode='多个货号'&scCode=${filterList[0].scCode}&poCode=${filterList[0].poCode}&picture=''`,
+    })
+  
+  }
+})

+ 3 - 0
pages/inspection/list.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 21 - 0
pages/inspection/list.wxml

@@ -0,0 +1,21 @@
+	<view class="list-item">
+		<label>PO号:</label>
+		<input value="{{inspectionList[0].poCode}}" disabled/>
+	</view>
+		<view class="list-item">
+		<label>SC号:</label>
+		<input value="{{inspectionList[0].scCode}}" disabled/>
+	</view>
+
+<view class="list" wx:for="{{inspectionList}}" wx:key="index"  data-id="{{item.id}}" bindtap="getDetail">
+	<view class="list-item">
+		<label>我司货号:</label>
+		<input value="{{item.scpCode}}" disabled/>
+		<checkbox catchtap="selectList" data-index="{{index}}" checked="{{item.checked}}"></checkbox>
+	</view>
+
+</view>
+<view class="generateBtnView">
+  <button class="generateBtnViewleft" type="primary" bindtap="selectall">全选</button>
+  <button class="generateBtnViewright" type="primary" bindtap="generate">批量上传</button>
+</view>

+ 33 - 0
pages/inspection/list.wxss

@@ -0,0 +1,33 @@
+page{
+  background-color: #ebebeb;
+}
+.list {
+  border-radius: 0.5rem;
+  background-color: #fff;
+  margin: 0.2rem;
+}
+.list-item {
+  display: flex;
+  padding: 0.4rem 1rem;
+}
+.list-item label {
+  width: 6rem;
+  margin-right: 2rem;
+}
+.list-item image {
+  width: 6rem;
+}
+.generateBtnViewleft{
+  width: 40% !important;
+  position: fixed;
+  bottom: 0.1rem;
+  left: 5%;
+  z-index: 10;
+}
+.generateBtnViewright{
+  width: 40% !important;
+  position: fixed;
+  bottom: 0.1rem;
+  left: 55%;
+  z-index: 10;
+}

+ 3 - 0
pages/login/login.js

@@ -47,6 +47,7 @@ Page({
           } else {
             if (res.data.access_token) {
               wx.setStorageSync('token', res.data.access_token);
+              wx.setStorageSync('username', res.data.username);
               wx.switchTab({
                 url: '/pages/home/home',
               })
@@ -85,6 +86,7 @@ Page({
           })
           requestAPI.getSmsToken(self.data.phone, self.data.code).then(res => {
             wx.setStorageSync('token', res.data.access_token)
+            wx.setStorageSync('username', res.data.username)
             wx.login({
               success(wxres) {
                 requestAPI.bindOpenId(wxres.code).then(res => {
@@ -108,6 +110,7 @@ Page({
   },
   getIfExpired() {
     requestAPI.getUserInfo().then(res => {
+      wx.setStorageSync('userName',  res.data.data.sysUser.username);
     })
   }
 })

+ 1 - 0
pages/me/me.js

@@ -11,6 +11,7 @@ Page({
   onShow() {
     if(wx.getStorageSync('token') && !this.data.userName) {
       requestAPI.getUserInfo().then(res => {
+        wx.setStorageSync('userName',  res.data.data.sysUser.username);
         this.setData({
           userName: res.data.data.sysUser.username,
           isLogin: true

+ 66 - 0
pages/timesheet/detail.js

@@ -0,0 +1,66 @@
+// pages/timesheet/detail.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/timesheet/detail.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 15 - 0
pages/timesheet/detail.wxml

@@ -0,0 +1,15 @@
+<view class="WViewColumn1" style="">
+  
+  <view class="WViewRow1" style="">关于加班:</view>
+  <view class="WViewRow2" style="">1.	加班:1小时起算,工作日晚间加班时间,18:00 ~ 20:00(17:30 ~18:00为晚餐时间),双休日加班时间,9:00 ~ 17:30(12:10 ~12:50为午餐时间)。</view>
+  <view class="WViewRow3" style="">2.	加班前请填写好《工时异动单》,请部门主管签字确认,主管同意后方可加班。</view>
+ <view class="WViewRow3" style="">3.	加班进出公司,请打卡。加班后的下一个工作日将《工时异动单》交人事行政部备案。</view>
+ <view class="WViewRow2" style="">4.	《工时异动单》所填加班时间应与打卡时间保持一致,二者若不符将不予认可。</view>
+ <view class="WViewRow1" style="">关于请假:</view>
+ <view class="WViewRow4" style="">1.	年假:0.5天起算。</view>
+ <view class="WViewRow3" style="">2.	调休、事假、病假:1小时起算。调休原则:先加班,后换休。病假原则:需提供区级以上医院开具的病假单。</view>
+ <view class="WViewRow3" style="">3.	各种请假必须提前办理请假手续,填写《工时异动单》,经批准后及时交人事行政部备案。</view>
+ <view class="WViewRow2" style="">4.	因特殊、紧急情况未能提前办理手续的,请先电话告知所属主管及人事行政部,事后上班第一天必须补办手续,并交人事行政部备案,没有及时备案的将根据公司规定作事假或旷工处理。</view>
+
+
+</view>

+ 95 - 0
pages/timesheet/detail.wxss

@@ -0,0 +1,95 @@
+.WViewColumn1{
+  box-sizing:border-box;
+   display:flex;
+   justify-content:flex-start;
+   align-items:flex-start;
+   flex-direction:column; 
+   flex-wrap:nowrap; 
+   align-content:stretch; 
+   width:100%;
+   height: 1960rpx; 
+   background-color: transparent; 
+   color: #FFFFFF; 
+   font-size: 20PX; 
+   line-height:40rpx; 
+   
+  }
+  .WViewRow1{
+  box-sizing:border-box;
+   display:flex;
+   justify-content:flex-start;
+   align-items:flex-start;
+   flex-direction:row; 
+   flex-wrap:wrap; 
+   align-content:stretch; 
+  margin: 16rpx 0rpx 0rpx 0rpx; 
+   width:100%;
+   height: 4%; 
+   display: -webkit-box;
+  display: -moz-box;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-all;
+  -webkit-box-orient:vertical;
+  -webkit-line-clamp:2;
+   background-color: #FFFFFF; 
+   color: #322fe7;  font-size: 20PX; 
+   line-height:40rpx; 
+   
+  }
+  .WViewRow2{
+  box-sizing:border-box;
+   display:flex;
+   justify-content:flex-start;
+   align-items:flex-start;
+   flex-direction:row; 
+   flex-wrap:wrap; 
+   align-content:stretch; 
+  margin: 16rpx 0rpx 0rpx 0rpx; 
+   width:100%;
+   height: 6%; 
+   background-color: #FFFFFF; 
+   color: #000000;  font-size: 12PX; 
+   line-height:40rpx; 
+   
+  }
+  .WViewRow3{
+    box-sizing:border-box;
+    display:flex;
+    justify-content:flex-start;
+    align-items:flex-start;
+    flex-direction:row; 
+    flex-wrap:wrap; 
+    align-content:stretch; 
+   margin: 16rpx 0rpx 0rpx 0rpx; 
+    width:100%;
+    height: 4%; 
+    background-color: #FFFFFF; 
+    color: #000000;  font-size: 12PX; 
+    line-height:40rpx; 
+   
+  }
+
+  .WViewRow4{
+    box-sizing:border-box;
+     display:flex;
+     justify-content:flex-start;
+     align-items:flex-start;
+     flex-direction:row; 
+     flex-wrap:wrap; 
+     align-content:stretch; 
+    margin: 16rpx 0rpx 0rpx 0rpx; 
+     width:100%;
+     height: 2%; 
+     display: -webkit-box;
+    display: -moz-box;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    word-break: break-all;
+    -webkit-box-orient:vertical;
+    -webkit-line-clamp:1;
+     background-color: #FFFFFF; 
+     color: #000000;  font-size: 12PX; 
+     line-height:40rpx; 
+     
+    }

+ 68 - 0
pages/timesheet/index.js

@@ -0,0 +1,68 @@
+import * as requestAPI from '../../models/dataModel'
+Page({
+  data: {
+    timesheetList: [],
+    current: 1,
+    size: 10,
+    total: 0
+  },
+  //onLoad: function (options) {
+   //  this.gettimesheetList()
+ // },
+  onReady() {
+    this.gettimesheetList()
+  },
+  // 获取列表
+   gettimesheetList() {
+    //wx.showLoading({title: '加载中', icon: 'loading'});
+    let form = {
+      current: this.data.current,
+      size: this.data.size,
+      eCnname:wx.getStorageSync('username')
+    }
+    requestAPI.getTimeSheetList(form).then(res => {
+      this.setData({
+       timesheetList: res.data.data.records,
+        total: res.data.data.total
+      })
+    })
+  },
+
+  // 下拉刷新
+  onPullDownRefresh: function () {
+    wx.showNavigationBarLoading(); //在当前页面显示导航条加载动画
+    this.onLoad(); //刷新页面
+    setTimeout(function () {
+      wx.hideNavigationBarLoading(); //在当前页面隐藏导航条加载动画
+      wx.stopPullDownRefresh(); //停止下拉动作
+    }, 2000)
+  },
+
+  // 下拉加载
+  onReachBottom: function () {
+    if (this.data.size > this.data.total) {
+      return;
+    } else {
+      this.gettimesheetList();
+      this.setData({
+        size: this.data.size+10
+      })
+    }
+  },
+
+  openPreview: function (event) {
+    wx.previewImage({
+      urls: new Array(event.currentTarget.dataset.url),
+    })
+  },
+
+  generate() {
+    wx.navigateTo({
+      url: `/pages/timesheet/detail`,
+    })
+
+ 
+  }
+
+
+})

+ 3 - 0
pages/timesheet/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 63 - 0
pages/timesheet/index.wxml

@@ -0,0 +1,63 @@
+<view class="generateBtnView">
+  <button class="generateBtn"  bindtap="generate">考勤说明(点击进入)</button>
+</view>
+<view class="index" wx:for="{{timesheetList}}" wx:key="index"  data-id="{{item.id}}" >
+	 	<view class="index-item-odd">
+		<label>姓名:</label>
+		<input value="{{item.ecnname}}" disabled/>
+	</view>
+	<view class="index-item-even">
+		<label>时间 :</label>
+		<input value="{{item.timeMonth}}" disabled/>
+	</view>
+  	<view class="index-item-odd">
+		<label>本月加班(小时):</label>
+		<input value="{{item.monthOvertimeAdd}}" disabled/>
+	</view>
+	<view class="index-item-even">
+		<label>本月调休(小时):</label>
+		<input value="{{item.monthOvertimeDecrease}}" disabled/>
+	</view>
+ 		<view class="index-item-odd">
+		<label>本月结余(小时):</label>
+		<input value="{{item.monthOvertimeSurplus}}" disabled/>
+	</view>
+			<view class="index-item-even">
+		<label>本月年假使用(天):</label>
+		<input value="{{item.annualLeaveDecrease}}" disabled/>
+	</view>
+ 		<view class="index-item-odd">
+		<label>本月年假结余(天):</label>
+		<input value="{{item.annualLeaveSurplus}}" disabled/>
+	</view>
+				<view class="index-item-even">
+		<label>本月病假(小时):</label>
+		<input value="{{item.silkLeaveAdd}}" disabled/>
+	</view>
+			<view class="index-item-odd">
+		<label>病假累计(小时):</label>
+		<input value="{{item.silkLeaveAdd}}" disabled/>
+	</view>
+			<view class="index-item-even">
+		<label>本月事假(小时):</label>
+		<input value="{{item.leaveAbsenceAdd}}" disabled/>
+	</view>
+				<view class="index-item-odd">
+		<label>事假累计(小时):</label>
+		<input value="{{item.leaveAbsenceAll}}" disabled/>
+	</view>
+				<view class="index-item-even">
+		<label>迟到(小于5分钟/次):</label>
+		<input value="{{item.lateLess5}}" disabled/>
+	</view>
+		<view class="index-item-odd">
+		<label>迟到(大于6分钟/次):</label>
+		<input value="{{item.lateGreate6}}" disabled/>
+	</view>
+			<view class="index-item-even">
+		<label>本月迟到累计(次):</label>
+		<input value="{{item.lateAll}}" disabled/>
+	</view>
+
+
+</view>

+ 48 - 0
pages/timesheet/index.wxss

@@ -0,0 +1,48 @@
+page{
+  background-color: #ebebeb;
+}
+.title {
+  width: 20rem;
+  height: 3rem;
+   font-size: 2rem;
+   border-radius: 1rem;
+   background-color: #c7c6c6;
+   color: rgb(20, 34, 240);
+   display: flex; /*设置显示样式**/
+   align-items: center; /**子view垂直居中*/
+   vertical-align: center; /**垂直居中*/
+   justify-content: center; /**内容居中*/
+   flex-direction: row;
+   margin-right: 2rem;
+}
+.index {
+  border-radius: 0.5rem;
+  background-color: #fff;
+  margin: 0.2rem;
+}
+.index-item-odd {
+  display: flex;
+  padding: 0.4rem 1rem;
+  background-color: #e9b596;
+}
+.index-item-even {
+  display: flex;
+  padding: 0.4rem 1rem;
+  background-color: #ecd895;
+}
+.index-item-odd label {
+  width: 16rem;
+  margin-right: 2rem;
+}
+.index-item-even label {
+  width: 16rem;
+  margin-right: 2rem;
+}
+.generateBtnView button{
+  width: 90% !important;
+  position: fixed;
+  bottom: 0.1rem;
+  left: 5%;
+  z-index: 10;
+  background-color: #f0af89;
+}

+ 1 - 1
project.config.json

@@ -22,7 +22,7 @@
 			"disablePlugins": [],
 			"outputPath": ""
 		},
-		"useCompilerModule": false,
+		"useCompilerModule": true,
 		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",