sunlupeng 1 year ago
parent
commit
9b3bf6ccfc
3 changed files with 25 additions and 11 deletions
  1. 12 6
      src/views/oa/entry/detail.vue
  2. 12 4
      src/views/oa/entry/edit.vue
  3. 1 1
      src/views/oa/universal/detail.vue

+ 12 - 6
src/views/oa/entry/detail.vue

@@ -130,7 +130,7 @@
         </div>
       </div>
 
-      <div class="fx-field x-grid-col-12" v-if="form.auditStatus==2">
+      <div class="fx-field x-grid-col-12" v-if="(form.auditStatus==2 || form.auditStatus==1) && name=='todo'">
         <div class="field-label">
           <span class="field-required">*</span>
           <div class="field-name">审批意见</div>
@@ -168,11 +168,13 @@
         </el-timeline>
       </div>
       <div class="fx-field x-grid-col-12">
-        <div>
-          <el-button v-if="form.auditStatus==1" type="primary" @click="handleRevocation()" v-loading.fullscreen.lock="fullscreenLoading">撤回</el-button>
-          <el-button v-if="form.auditStatus==2" @click="handleAudit(false)" v-loading.fullscreen.lock="fullscreenLoading">驳回</el-button>
-          <el-button v-if="form.auditStatus==2" type="primary" @click="handleAudit(true)" v-loading.fullscreen.lock="fullscreenLoading">同意</el-button>
-        </div>
+        <div v-if="name=='todo'">
+          <el-button type="primary" @click="handleAudit(true)" v-loading.fullscreen.lock="fullscreenLoading">同意</el-button>
+            <el-button @click="handleAudit(false)" v-loading.fullscreen.lock="fullscreenLoading">驳回</el-button>
+          </div>
+          <div v-if="name=='my'">
+            <el-button v-if="form.auditStatus==1" type="warning" @click="handleRevocation()" v-loading.fullscreen.lock="fullscreenLoading">撤回</el-button>
+          </div>
       </div>
 
     </div>
@@ -188,6 +190,10 @@ export default {
       type: [String, Number],
       default: undefined
     },
+    name: {
+      type: String,
+      default: undefined
+    },
   },
   data() {
     return {

+ 12 - 4
src/views/oa/entry/edit.vue

@@ -99,11 +99,15 @@
         </el-timeline>
       </el-form-item>
       <el-form-item>
-        <el-button v-if="form.auditStatus==5 || form.auditStatus==6" type="primary" @click="onReCommit()" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
-        <el-button v-if="form.auditStatus!=5 && form.auditStatus!=6" type="primary" @click="onSubmit()" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
-        <el-button v-if="!form.auditStatus || form.auditStatus==0" @click="onSave()" v-loading.fullscreen.lock="fullscreenLoading">暂存</el-button>
-        <el-button v-if="form.auditStatus==5 || form.auditStatus==6" type="warning" @click="onClose()" v-loading.fullscreen.lock="fullscreenLoading">关闭</el-button>
+        <div v-if="name=='todo'">
+          <el-button type="primary" @click="onReCommit()" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
+          <el-button type="warning" @click="onClose()" v-loading.fullscreen.lock="fullscreenLoading">关闭</el-button>
+        </div>
+       <div v-else>
+        <el-button type="primary" @click="onSubmit()" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
+        <el-button @click="onSave()" v-loading.fullscreen.lock="fullscreenLoading">暂存</el-button>
         <el-button v-if="form.auditStatus==0" type="danger" @click="onDelete()" v-loading.fullscreen.lock="fullscreenLoading">删除</el-button>
+       </div>
       </el-form-item>
     </el-form>
     <PeopleSelect ref="peopleSelect" :type="type" :isCheck="true" :open="peopleOpen" @cancel="peopleOpen = false"
@@ -133,6 +137,10 @@ export default {
       type: [String, Number],
       default: undefined
     },
+    name: {
+      type: String,
+      default: undefined
+    },
   },
   data() {
     return {

+ 1 - 1
src/views/oa/universal/detail.vue

@@ -81,7 +81,7 @@
       </div>
     </div>
     <div class="widget-list" v-loading="loading">
-      <div class="fx-field x-grid-col-12" v-if="(form.auditStatus==2 || form.auditStatus==1) && name=='todo' ">
+      <div class="fx-field x-grid-col-12" v-if="(form.auditStatus==2 || form.auditStatus==1) && name=='todo'">
         <div class="field-label">
           <span class="field-required">*</span>
           <div class="field-name">审批意见</div>