Prechádzať zdrojové kódy

2022.8.12 费用报销审核原因,移动端日报审核筛选

ggooalice 2 rokov pred
rodič
commit
aff8388990

+ 44 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -251,18 +251,23 @@
                   {{feeType[scope.row.type]}}
                 </template>
               </el-table-column>
-              <el-table-column prop="remark" label="备注" width="250">
+              <el-table-column prop="remark" label="备注" width="180">
                 <template slot-scope="scope">
                   <span style="font-size:12px;">{{scope.row.remark}}</span>
                 </template>
               </el-table-column>
-              <el-table-column prop="status" label="状态" width="100">
+              <el-table-column prop="status" label="状态" width="80">
                 <template slot-scope="scope">
                   <span v-if="scope.row.status == 1" class="waiting">{{statusTxt[scope.row.status]}}</span>
                   <span v-if="scope.row.status == 2" class="rejected">{{statusTxt[scope.row.status]}}</span>
                   <span v-if="scope.row.status == 0 || scope.row.status == 3" >{{statusTxt[scope.row.status]}}</span>
                 </template>
               </el-table-column>
+              <el-table-column prop="denyReason" label="驳回原因" width="180">
+                <template slot-scope="scope">
+                  <span style="font-size:12px;">{{scope.row.denyReason}}</span>
+                </template>
+              </el-table-column>
               <el-table-column label="操作" :width="isAuditList?220:160">
                   <template slot-scope="scope" >
                       <div v-if="!isAuditList">
@@ -273,7 +278,7 @@
                       <div v-if="isAuditList">
                         <el-button  size="mini"  @click.stop.native="downloadByA(scope.row)" >查看</el-button>
                       <el-button  size="mini" style="margin-left:5px;" @click.stop.native="approve(scope.row)" >通过</el-button>
-                      <el-button  size="mini" style="margin-left:5px;" @click.stop.native="deny(scope.row)" >驳回</el-button>
+                      <el-button  size="mini" style="margin-left:5px;" @click.stop.native="denyReason(scope.row)" >驳回</el-button>
                       </div>
                   </template>
               </el-table-column>
@@ -503,6 +508,17 @@
             </span>
           </el-dialog>
         </el-dialog>
+
+        <!-- 驳回弹出框 -->
+        <el-dialog title="请输入原因"  v-if="denyReasonDialog" :visible.sync="denyReasonDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
+            <div>
+                <el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="'请输入您决定驳回的原因'" />
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button  @click="denyReasonDialog = false" >取消</el-button>
+                <el-button type="primary" @click="deny()" >确定</el-button>
+            </div>
+        </el-dialog>
   </section>
 </template>
 
@@ -513,6 +529,13 @@ export default {
   props: {},
   data() {
     return {
+      denyReasonDialog: false,
+      denyForm:{
+        reason: '',
+        id: null
+      },
+
+
       fileList: [],
       muHeight: document.documentElement.clientHeight || document.body.clientHeight,
       imgs: [],
@@ -795,12 +818,21 @@ export default {
             });
         });
     },
-    deny(item) {
+    denyReason(item){
+      this.denyForm.id = item.id
+      this.denyForm.reason = ''
+      this.denyReasonDialog = true
+    },
+    deny() {
       //审核驳回
-      this.http.post('/expense-sheet/deny', {id:item.id
+
+      this.http.post('/expense-sheet/deny', {
+          id: this.denyForm.id,
+          denyReason: this.denyForm.reason
         },
         res => {
             if (res.code == "ok") {
+                this.denyReasonDialog = false
                 this.getList();
             } else {
                 this.$message({
@@ -825,6 +857,11 @@ export default {
                 this.allExpList = res.data;
                 this.customTypeList = res.data
                 this.expenseTypeList = this.allExpList.filter(a=>a.mainType == 0);
+                if(!res.data != res.data.length == 0){
+                  this.http.post('/company/settingExpenseType',{},res => {
+                    if(res.code == 'ok'){}else{this.$message({message: res.msg,type: 'error'})}
+                  },err => {this.$message({message: err,type: 'error'})})
+                }
             } else {
                 this.$message({
                 message: res.msg,
@@ -1400,10 +1437,10 @@ export default {
               var sl = zhi.toFixed(2)
               sl += ' 元';
             } else {
-              sums[index] = 'N/A';
+              sums[index] = '';
             }
           } else {
-            sums[index] = 'N/A';
+            sums[index] = '';
           }
           
         });

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -162,6 +162,7 @@
         <el-table :data="list" highlight-current-row v-loading="listLoading" 
         :show-summary='user.timeType.isSecretSalary==0?true:false'
         ref="table"
+        :summary-method="getSummaries"
         @selection-change="deleteSel"
         :height="300" style="width: 100%;">
             <el-table-column type="selection" width="80" fixed="left"></el-table-column>
@@ -1248,6 +1249,10 @@ import { error } from 'dingtalk-jsapi';
                     sums[index] = '总价';
                     return;
                 }
+                if (index === 1 || index === 2){
+                    sums[index] = ''
+                    return
+                }
                 const values = data.map(item => Number(item[column.property]));
                 if (!values.every(value => isNaN(value))) {
                     sums[index] = values.reduce((prev, curr) => {

+ 31 - 5
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -4,14 +4,22 @@
         
         <div class="login_form">
             <van-sticky offset-top="1.22667rem" style="margin-bottom:10px">
-                <van-cell title="选择日期" :value="selectDateValue" @click="selectShow = true" />
+                <van-cell title="选择日期" :value="selectDateValue" @click="selectShow = true">
+                    <template #extra>
+                        <van-icon v-if="selectDateValue" name="close" style="line-height:0.64rem;position:relative;left:5px;" @click.stop="selectDateClear"/>
+                    </template>
+                </van-cell>
                 <van-calendar v-model="selectShow" :min-date="minDate" type="range" @confirm="selectConfirm" />
-                <van-cell title="选择人员" :value="userNameValue" @click="selectUserShow = true" value-class="userNameValue" />
+                <van-cell title="选择人员" :value="userNameValue" @click="selectUserClick" value-class="userNameValue">
+                    <template #extra>
+                        <van-icon v-if="userNameValue" name="close" style="line-height:0.64rem;position:relative;left:5px;" @click.stop="selectUserClear"/>
+                    </template>
+                </van-cell>
                 <van-popup v-model="selectUserShow" position="bottom">
                     <van-search v-model="searchInputValue" placeholder="输入员工姓名搜索" @search="userListSearch"></van-search>
                     <div style="minHeight:300px;">
                         <van-checkbox class="userCheckbox" v-for="(item) in showUserList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
-                        <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="selectUserConfirm();selectUserShow=false">确定</van-button>
+                        <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="selectUserConfirm()">确定</van-button>
                     </div>
                 </van-popup>
             </van-sticky>
@@ -171,7 +179,23 @@
         created() {
         },
         methods: {
-
+            selectDateClear(){
+                this.selectDate = []
+                this.selectDateValue = ''
+                this.getReport()
+            },
+            selectUserClear(){
+                this.userNameValue = ''
+                this.userIdList = []
+                this.userList.forEach(item => {delete item.isChecked})
+                this.showUserList = this.userList
+                this.getReport()
+            },
+            selectUserClick(){
+                this.selectUserShow = true
+                this.searchInputValue = ''
+                this.showUserList = this.userList
+            },
             selectConfirm(date){
                 const [start, end] = date;
                 this.selectShow = false;
@@ -183,7 +207,6 @@
                 return `${date.getFullYear()}-${(date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)}-${date.getDate() < 10 ? '0' + date.getDate() : date.getDate()}`;
             },
             userListSearch(val) {
-                console.log(val);
                 this.showUserList = [];
                 this.userList.forEach(u=>{if (u.name.startsWith(val)) {
                     this.showUserList.push(u);
@@ -201,7 +224,9 @@
                     this.userNameValue = this.userNameValue.substring(0, this.userNameValue.length-1);
                     this.userIdList = this.userIdList.substring(0, this.userIdList.length-1);
                 }
+                this.selectUserShow = false
                 this.getReport()
+                
             },
 
             getUsers() {
@@ -498,6 +523,7 @@
     }
     .userNameValue{
         white-space: nowrap;
+        text-overflow: ellipsis;
     }
     .formBatch{
         position: fixed;