ggooalice 2 年之前
父节点
当前提交
a1bfd8faf4

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -134,7 +134,7 @@
       </div>
       <p :style="ins == 9 ? 'float: right;margin-right: 25px;width:20%' : 'float: right;margin-right: 25px;width:10%'" >
         <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
-        <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9">按季度导出</el-button>
+        <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9 && user.companyId == 876">按季度导出</el-button>
       </p>
       
     </div>

+ 37 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -6,11 +6,23 @@
             <div>
             <van-field readonly clickable name="datetimePicker" :value="form.createDate" label="时间选择" placeholder="点击选择时间" 
             @click="showPicker = true" :rules="rules.createDate" />
-                <div v-if="report.time" class="attendanceRecord">
+            <van-cell v-if="user.timeType.syncDingding == 1 || user.timeType.syncCorpwxTime == 1">
+                <template #default>
+                    <div class="attendanceRecord">
+                    <span>考勤打卡:</span>
+                    <span v-if="!report.time">暂无考勤记录</span>
+                    <span v-else>{{report.time.startTime}}-{{report.time.endTime}}, {{report.time.workHours}}小时</span>
+                    </div>
+                </template>
+                <template #right-icon>
+                    <van-button icon="replay" type="default" size="mini" style="height:0.6rem;padding:0 0.16667rem;" :loading="cardRefLoading" loading-size="0.26667rem" @click="cardtimeRefresh(form.createDate)" v-if="user.timeType.syncCorpwxTime==1 && (form.createDate == today || !report.time || report.time.workHours == 0)"></van-button>
+                </template>
+            </van-cell>
+                <!-- <div v-if="report.time" class="attendanceRecord">
                     <i class="iconfont firerock-icondakajilu" style="font-size:0.35rem;margin-right:0.12rem"></i>
                     <span v-if="user.timeType.syncDingding==1&&!report.time">暂无考勤记录</span>
                     <span v-else>{{report.time.startTime}}-{{report.time.endTime}}, {{report.time.workHours}}小时</span>
-                </div>
+                </div> -->
             </div>
             <van-popup v-model="showPicker" position="bottom">
                 <van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" :max-date="maxDate" @confirm="changeTime" @cancel="showPicker = false"/>
@@ -382,6 +394,8 @@ import timetoolVue from '../timetool/timetool.vue';
     export default {
         data() {
             return {
+                cardRefLoading: false,
+                today: '',
 
                 showPickerStage: false,
                 showPickerTaskGroup: false,
@@ -475,6 +489,22 @@ import timetoolVue from '../timetool/timetool.vue';
         },
 
         methods: {
+            cardtimeRefresh(workdate){  // 考勤记录刷新
+            if (!workdate) return;
+            this.cardRefLoading = true;
+                this.$axios.post('/user-corpwx-time/getPunchRecordBySelf',{
+                    date: workdate
+                })
+                .then(res => {
+                    if(res.code == 'ok'){
+                        this.cardRefLoading = false;
+                        this.report.time = res.data.time;
+                    }else{
+                        this.cardRefLoading = false;
+                        this.$toast.fail('获取失败:'+res.msg);
+                    }
+                }).catch(err => {this.$toast.clear();this.cardRefLoading = false;})
+            },
             auditorClick(domainIndex,auditorIndex){
                 this.auditor.index = domainIndex
                 this.auditor.auditorIndex = auditorIndex
@@ -1825,6 +1855,7 @@ import timetoolVue from '../timetool/timetool.vue';
         },
         
         mounted() {
+            this.today = this.format(new Date(), 'yyyy-MM-dd')
             this.timeRange = []
             for(let i=0.5; i<=20; i+=0.5){
                 this.timeRange.push(i)
@@ -1888,10 +1919,11 @@ import timetoolVue from '../timetool/timetool.vue';
         position: relative;
     }
     .attendanceRecord{
-        position: absolute;
-        top: 0.26667rem;
-        right: 0.42667rem;
+        // position: absolute;
+        // top: 0.26667rem;
+        // right: 0.42667rem;
         color: #969799;
+        text-align: center;
         font-size: 0.35rem;
         line-height: 0.64rem;
     }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/details.vue

@@ -82,7 +82,7 @@
             <!-- 发票 -->
             <van-field label="发票" readonly>
                 <template #input
-                    >总费用:{{ totalCost | numtosum }}</template
+                    >总费用:{{ totalCost | numtosum }}</template
                 >
             </van-field>
             <div class="invoice" v-if="invoiceList.length != 0">

+ 33 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/index.vue

@@ -62,7 +62,7 @@
                 <van-field v-model="editForm.remark" label="备注" type="textarea"></van-field>
                 <!-- 发票 -->
                 <van-field label="发票" readonly>
-                    <template #input>总费用:{{totalCost | numtosum}}</template>
+                    <template #input>总费用:{{totalCost | numtosum}}</template>
                 </van-field>
                 <div class="invoice" v-if="invoiceList.length != 0">
                     <div v-for="item,index in invoiceList" :key="item.id" style="position:relative" :class="index == 0 ? '' : 'invoice_item'">
@@ -142,6 +142,9 @@
         <!-- #endregion -->
         <!-- 单据列表 -->
         <div class="list" v-if="active == 1">
+            <!-- <van-pull-refresh v-model="downLoading" @refresh="onDownRefresh">
+                <van-list v-model="uploading" :finished="upFinished" :immediate-check="false" :offset="100" finished-text="没有更多了" @load="onLoadList"></van-list>
+            </van-pull-refresh> -->
             <van-collapse v-model="activeName" accordion class="list_collapse">
                 <van-collapse-item v-for="item in billList" :key="item.id" title="标题1" :name="item.id">
                     <template #title>
@@ -188,8 +191,8 @@
                         <div class="collapse_label_l">金额: ¥{{item.totalAmount | numtosum}}</div>
                         <div class="collapse_label_r">状态:<span :class="statusClass[item.status]">{{statusList[item.status]}}</span></div>
                         <div class="operation">
-                            <van-button size="small" type="info" @click="approve(item.id)">通过</van-button>
-                            <van-button style="margin-left:15px" size="small" type="danger" @click="deny(item.id)">驳回</van-button>
+                            <van-button size="small" type="info" @click.stop="approve(item.id)">通过</van-button>
+                            <van-button style="margin-left:15px" size="small" type="danger" @click.stop="denyToReason(item.id)">驳回</van-button>
                         </div>
                     </template>
                     <div class="wrapper">
@@ -211,6 +214,13 @@
                     </div>
                 </van-collapse-item>
             </van-collapse>
+            <van-popup v-model="denyReasonDialog" position="bottom" closeable >
+                <van-cell>请输入原因</van-cell>
+                <van-field class="form_input"
+                    v-model="denyParm.denyReason" name="reason" type="textarea" placeholder="请输入您决定驳回的原因"
+                    rows="3" autosize  />
+                <van-button style="width:100%;" type="info" @click="deny()">提交</van-button>
+            </van-popup>
         </div>
     </div>
 </div>
@@ -279,9 +289,16 @@ export default {
             statusList: ['审核通过','待审核','已驳回','已撤销'],
             statusClass: ['','waiting','rejected',''],
 
+            uploading: false,
+
             // 单据审核
             auditName: '',
-            examineList: []
+            examineList: [],
+            denyReasonDialog: false,
+            denyParm: {
+                id: '',
+                denyReason: ''
+            }
 
         }
     },
@@ -320,6 +337,7 @@ export default {
         back(){
             sessionStorage.removeItem("page");
             history.back();
+            
         },
         formatDate(date) {
             let mon = date.getMonth() + 1
@@ -461,6 +479,11 @@ export default {
                                 type: 0,
                                 remark: ''
                             }
+                            this.formshowText = {
+                                name: '',
+                                inProjectName: []
+                            }
+                            this.totalCost = 0
                             this.invoiceList = []
                             this.uploader = []
                         } else {
@@ -511,8 +534,12 @@ export default {
                 }
             }).catch(err=> {this.$toast.clear();console.log(err)});
         },
-        deny(pid){
-            this.$axios.post("/expense-sheet/deny", {id: pid,denyReason:''})
+        denyToReason(pid){
+            this.denyParm.id = pid
+            this.denyReasonDialog = true
+        },
+        deny(){
+            this.$axios.post("/expense-sheet/deny", this.denyParm)
             .then(res => {
                 if(res.code == "ok") {
                     this.$toast.success('已驳回')