Browse Source

搬运工

jbb 2 năm trước cách đây
mục cha
commit
8595bbaa6f
2 tập tin đã thay đổi với 23 bổ sung13 xóa
  1. 10 7
      src/views/oa/SyCarryList.vue
  2. 13 6
      src/views/oa/modules/SyCarryDetailModal.vue

+ 10 - 7
src/views/oa/SyCarryList.vue

@@ -73,8 +73,8 @@
            <span v-if="record.state == '4'">已完成</span>
          </span>
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record,'0')">编辑</a>
-          <a-divider type="vertical" />
+          <a @click="handleEdit(record,'0')" v-if="record.state == '0'">编辑</a>
+          <a-divider type="vertical" v-if="record.state == '0'"/>
            <a @click="handleEdit(record,'1')">详情</a>
 
           <a-divider type="vertical" />
@@ -82,10 +82,12 @@
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
             <a-menu slot="overlay">
               <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" v-if="record.state == '0'">
                   <a>删除</a>
                 </a-popconfirm>
-                <a @click='plannerSubmit(record)'>计划员提交</a>
+                <a @click='plannerSubmit(record,1)' v-if="record.state == '0'">计划员提交</a>
+                <a @click='plannerSubmit(record,2)' v-if="record.state == '1'">人事行政审批</a>
+                <!-- <a @click='plannerSubmit(record,3)'>财务经理审批</a> -->
               </a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -196,10 +198,11 @@
         this.getList()
       },
       // 计划员提交
-      plannerSubmit(record){
-         getAction('/oa/syCarry/commitBatch', {ids:record.id,state:'1'}).then((res) => {
+      plannerSubmit(record,state){
+         getAction('/oa/syCarry/commitBatch', {ids:record.id,state:state}).then((res) => {
           if(res.success){
-            record.state = '1'
+            this.getAction()
+            this.$forceUpdate()
           }else{
             this.$message.warning(res.message)
           }

+ 13 - 6
src/views/oa/modules/SyCarryDetailModal.vue

@@ -123,7 +123,7 @@
   import { FormTypes } from '@/utils/JEditableTableUtil'
   import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
   import {personList,subimtList} from '@api/oa/cd-personnel-files'
-   import { putAction } from '@/api/manage'
+  import { getAction } from '@/api/manage'
 
   export default {
     name: 'SyCarryDetailModa',
@@ -247,11 +247,18 @@
     },
     methods: {
       handelAutograph(record){
-        if(record.jhyNameData == this.$store.getters.nickname){
-          record.jhyName = record.jhyNameData
-        }else{
-           this.$message.error('不可签名');
-        }
+         getAction('/oa/syCarry/signPlan', {id:record.id}).then((res) => {
+          if(res.success){
+            debugger
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+        // if(record.jhyNameData == this.$store.getters.nickname){
+        //   record.jhyName = record.jhyNameData
+        // }else{
+        //    this.$message.error('不可签名');
+        // }
         
       },
        //关闭