|
@@ -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>
|