Pārlūkot izejas kodu

计划员提交

jbb 2 gadi atpakaļ
vecāks
revīzija
d431b695a7
1 mainītis faili ar 27 papildinājumiem un 2 dzēšanām
  1. 27 2
      src/views/oa/SyCarryList.vue

+ 27 - 2
src/views/oa/SyCarryList.vue

@@ -64,9 +64,18 @@
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
-
+        state
+         <span slot="state" slot-scope="text, record">
+           <span v-if="record.state == '0'">草稿</span>
+           <span v-if="record.state == '1'">计划签字中</span>
+           <span v-if="record.state == '2'">人事行政审批中</span>
+           <span v-if="record.state == '3'">财务经理审批中</span>
+           <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,'1')">详情</a>
 
           <a-divider type="vertical" />
           <a-dropdown>
@@ -76,7 +85,7 @@
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>
                 </a-popconfirm>
-                  <a @click="handleEdit(record,'1')">详情</a>
+                <a @click='plannerSubmit(record)'>计划员提交</a>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -136,6 +145,12 @@
             align:"center",
             dataIndex: 'code'
           },
+          {
+            title: '状态',
+            align:"center",
+            dataIndex: 'state',
+            scopedSlots: { customRender: 'state' },
+          },
           {
             title: '备注',
             align:"center",
@@ -180,6 +195,16 @@
       searchQuery(){
         this.getList()
       },
+      // 计划员提交
+      plannerSubmit(record){
+         getAction('/oa/syCarry/commitBatch', {ids:record.id,state:'1'}).then((res) => {
+          if(res.success){
+            record.state = '1'
+          }else{
+            this.$message.warning(res.message)
+          }
+        })
+      },
       searchReset(){
        this.queryParam={}
        this.getList()