소스 검색

离职交接审批前端页面开发​

lizhenhao 2 년 전
부모
커밋
76ea1c0b70

+ 1 - 1
src/components/workClientInfoSelect/WorkClientInfoSelectDialog.vue

@@ -71,7 +71,7 @@
           ref="clientTable"
           @selection-change="selectionChangeHandle"
           @sort-change="sortChangeHandle"
-          height="calc(100% - 80px)"
+          height="calc(100% - 75px)"
           max-height="calc(100%)">
           <el-table-column
             header-align="center"

+ 1 - 1
src/views/common/RosterSelectDialog.vue

@@ -55,7 +55,7 @@
 
       <el-main>
         <el-table
-          stripe="true"
+          :stripe="true"
           :data="dataList"
           v-loading="loading"
           size="small"

+ 165 - 0
src/views/modules/changes/dimission/DimissionHandoverForm.vue

@@ -0,0 +1,165 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1000px"
+      @close="close"
+      :visible.sync="visible">
+      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="125px" @submit.native.prevent>
+        <el-row  :gutter="15">
+          <el-divider content-position="left"><i class="el-icon-document"></i> 人员信息</el-divider>
+          <el-col :span="12">
+            <el-form-item label="姓名" prop="rosterBaseDTO.name"
+                          :rules="[]"
+            >
+              <el-card shadow="always">
+                {{inputForm.rosterBaseDTO.name?inputForm.rosterBaseDTO.name:'--'}}
+              </el-card>
+
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工号" prop="rosterBaseDTO.jobNo"
+                          :rules="[]"
+            >
+              <el-card shadow="always">
+                {{inputForm.rosterBaseDTO.jobNo?inputForm.rosterBaseDTO.jobNo:'--'}}
+              </el-card>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="电话" prop="rosterBaseDTO.mobile"
+                          :rules="[]"
+            >
+              <el-card shadow="always">
+                {{inputForm.rosterBaseDTO.mobile?inputForm.rosterBaseDTO.mobile:'--'}}
+              </el-card>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row  :gutter="15">
+          <el-divider content-position="left"><i class="el-icon-document"></i> 交接内容</el-divider>
+          <el-col :span="24" v-for="item in contentList">
+            <el-form-item>
+            <el-card shadow="always">
+              {{item}}
+            </el-card>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-divider content-position="left"><i class="el-icon-document"></i> 会签对象</el-divider>
+          <el-col :span="24">
+            <el-form-item label="选择会签对象" prop="approvalHandoverId"
+                          :rules="[{required: true, message: '会签对象不能为空', trigger: 'blur'},{required: true, message: '会签对象不能为空', trigger: 'change'}]"
+            >
+              <RosterSelectForm :limit='1' :value="inputForm.approvalHandoverId" @getValue='(value) => {inputForm.approvalHandoverId=value}'></RosterSelectForm>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+<!--      <el-button size="small" type="primary" v-if="method !== 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>-->
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import DimissionService from '@/api/changes/dimission/DimissionService'
+  import RosterService from '@/api/roster/RosterService'
+  import RosterSelectForm from '@/views/common/RosterSelectForm'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          rosterId: '',
+          name: '',
+          approvalHandoverId: '',
+          rosterBaseDTO: {
+            jobNo: '',
+            mobile: ''
+          }
+        },
+        contentList: ['工作交接', '回收工作邮箱', '回收工作电话', '回收系统账号', '回收门禁等权限', '回收笔记本']
+      }
+    },
+    dimissionService: null,
+    rosterService: null,
+    created () {
+      this.dimissionService = new DimissionService()
+      this.rosterService = new RosterService()
+    },
+    components: {
+      RosterSelectForm
+    },
+    methods: {
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          rosterId: '',
+          name: '',
+          approvalHandoverId: '',
+          rosterBaseDTO: {
+            jobNo: '',
+            mobile: ''
+          }
+        }
+        this.inputForm.id = id
+        if (method === 'handover') {
+          this.title = '发起工作交接审批'
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.dimissionService.queryById(this.inputForm.id).then(({data}) => {
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            this.loading = false
+          })
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.dimissionService.save(this.inputForm).then(({data}) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.selectData = []
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-card__body {
+    padding: 0px 10px;
+  }
+  /deep/ .el-form-item {
+    margin-bottom: 10px;
+  }
+</style>

+ 11 - 2
src/views/modules/changes/dimission/DimissionList.vue

@@ -103,7 +103,7 @@
                   <el-dropdown-item v-if="hasPermission('changes:dimission:edit')&&scope.row.status === '2'" :command="{method:'removeSure', id:scope.row.id}">
                     取消确认
                   </el-dropdown-item>
-                  <el-dropdown-item v-if="hasPermission('changes:dimission:edit')&&scope.row.status === '2'" :command="{method:'sure', id:scope.row.id}">
+                  <el-dropdown-item v-if="hasPermission('changes:dimission:edit')&&scope.row.status === '2'" :command="{method:'handover', id:scope.row.id}">
                     发起工作交接审批
                   </el-dropdown-item>
                 </el-dropdown-menu>
@@ -125,12 +125,14 @@
     </div>
     <!-- 弹窗, 新增 / 修改 -->
     <component is="DimissionForm"  ref="dimissionForm" @refreshDataList="refreshList"></component>
+    <component is="DimissionHandoverForm"  ref="dimissionHandoverForm" @refreshDataList="refreshList"></component>
   </div>
 </template>
 
 <script>
   import DimissionService from '@/api/changes/dimission/DimissionService'
   import DimissionForm from './DimissionForm'
+  import DimissionHandoverForm from './DimissionHandoverForm'
   export default {
     data () {
       return {
@@ -154,7 +156,8 @@
       this.dimissionService = new DimissionService()
     },
     components: {
-      DimissionForm
+      DimissionForm,
+      DimissionHandoverForm
     },
     activated () {
       this.refreshList()
@@ -207,6 +210,10 @@
       sure (id) {
         this.$refs.dimissionForm.init('sure', id)
       },
+      // 发起工作交接审批
+      handover (id) {
+        this.$refs.dimissionHandoverForm.init('handover', id)
+      },
       // 删除
       del (id) {
         let ids = id || this.$refs.dimissionTable.getCheckboxRecords().map(item => {
@@ -251,6 +258,8 @@
           this.sure(command.id)
         } else if (command.method === 'removeSure') {
           this.removeSure(command.id)
+        } else if (command.method === 'handover') {
+          this.handover(command.id)
         }
       },
       async removeSure (id) {