Преглед на файлове

员工离职申请单人员档案弹窗

jbb преди 2 години
родител
ревизия
83fdd0c2c0

+ 9 - 0
src/api/oa/cd-personnel-files.js

@@ -0,0 +1,9 @@
+import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
+
+
+// 查询分页数据
+const personList = (params) => getAction('/sys/user/list', params)
+
+export {
+    personList
+}

+ 27 - 2
src/views/activiti/form/demoForm2.vue

@@ -50,14 +50,16 @@
         <!-- <a-button  type="primary"  v-if="printDisable" @click="changedd"   class="noprint" style="margin-left:10px">打印</a-button> -->
       </div>
     </a-card>
+    <personnel-files-modal ref="personnelFilesModal" @close="closeP"></personnel-files-modal>
   </div>
 </template>
 
 <script>
 import pick from 'lodash.pick'
 import todoManageOperation from '../operation/todoManageOperation'
+import PersonnelFilesModal from './personnelFilesModal'
 import { postAction, postFormDataAction } from '@/api/manage'
- import moment from 'moment'
+import moment from 'moment'
 export default {
     name: 'DemoForm',
     props: {
@@ -80,7 +82,8 @@ export default {
     },
     components: {
         todoManageOperation,
-        moment
+        moment,
+        PersonnelFilesModal
     },
     data () {
         return {
@@ -115,6 +118,8 @@ export default {
                 reimbursementTypeList: [], // 报销类型下拉数据
                 invoiceTypeList: [], // 发票类型下拉数据
                 add: this.add,
+                gv:this.funName,
+                handle:this.funName1
             },
             itemModelNameList: [], // 子表字段名
             buttonArr:[],
@@ -130,6 +135,7 @@ export default {
                 console.log('obj.a changed')
                 console.log(newName)
                 console.log(oldName)
+                newName.handle = this.funName1
             },
             immediate: true,
             deep: true
@@ -239,6 +245,25 @@ export default {
         })
     },
     methods: {
+        closeP(value){
+             var that = this
+            this.cvarr.map(item=>{
+                for(let key in value){
+                    if(item.model == key){
+                        setTimeout(function(){
+                        that.$refs.KFB.setData({[key]:value[key]})   
+                        },0)
+                    }
+                }
+                
+            })
+           
+           
+        },
+         funName1(){
+            this.$refs.personnelFilesModal.declareElementsModVis = true
+            this.$refs.personnelFilesModal.personLists()
+        },
     // 根据字典名字获取数据源
         getDataListByName (name) {
             this.getAction(this.url.leaveType + '/' + name).then(res => {

+ 168 - 0
src/views/activiti/form/personnelFilesModal.vue

@@ -0,0 +1,168 @@
+<template>
+  <div id="declareElementsModal">
+    <a-modal
+      title="人员档案"
+      v-model="declareElementsModVis"
+      @cancel="handleCancel"
+      width="80%"
+      style="top:330px;left:100px;"
+    >
+
+      <!-- 増行 子表 -->
+      <a-card :bordered="false" style="margin:10px 0">
+        <!-- 子表 -->
+          <a-form-model ref="formRef">
+            <a-table
+              v-if="declareElementsData"
+              bordered
+              rowKey="id"
+              :columns="declareElementsColumns"
+              :data-source="declareElementsData"
+              :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+              :pagination="false"
+               :scroll="{y: 300}"
+            >
+              
+            </a-table>
+          </a-form-model>
+      </a-card>
+
+      <!-- 页面底部保存取消 -->
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1
+        }"
+      >
+        <a-popconfirm title="确定放弃?" @confirm="handleCancel" okText="确定" cancelText="取消">
+          <a-button :style="{ marginRight: '8px' }">返回</a-button>
+        </a-popconfirm>
+        <a-button type="primary" @click="addSave">
+          确认
+        </a-button>
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+import {personList} from '@api/oa/cd-personnel-files'
+
+export default {
+  name: 'PersonnelFilesModal', // 报关要素
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      loading: false, // 表格加载
+      pushState: false, //是否推送
+      // 子表表头
+      declareElementsColumns: [ 
+           {
+          title: '员工姓名',
+          dataIndex: 'realname',
+          width: 90,
+          className: 'replacecolor',
+        },
+         {
+          title: '岗位',
+          dataIndex: 'post',
+          width: 90,
+          className: 'replacecolor',
+        },
+      ],
+      declareElementsData: [
+          {
+              employee_name:'d',
+              job_title:'r'
+          }
+      ], // 子表信息
+      declareElementsModVis: false,
+      selectedRowKeys:[],
+      selectedRows:[]
+    }
+  },
+  // 接收父组件 方法
+  props: {},
+
+  created() {  
+  },
+  methods: {
+    personLists(){
+      personList().then(res => {
+                    if (res.success) {
+                      this.declareElementsData = res.result.records
+                      //  this.dataSource =res.result.records
+                    }else{
+                       this.$message.error(res.message);
+                    }
+                })
+    },
+    close() {
+      this.$emit('close-declare')
+      this.declareElementsModVis = false
+      this.declareElements = {}
+      this.declareElementsData = []
+      this.selectedRowKeys = []
+    },
+    handleCancel() {
+      this.close()
+    },
+    onSelectChange(keys,rows){
+      this.selectedRowKeys = keys;
+      this.selectedRows = rows;
+    },
+    addSave(){
+        if(this.selectedRowKeys.length == 0){
+          this.$message.error('请勾选数据');
+        }else if(this.selectedRowKeys.length >1){
+          this.$message.error('一次只可勾选一行数据');
+        }else{
+          var data ={
+            employee_name : this.selectedRows[0].realname,
+            job_title:this.selectedRows[0].post
+          }
+          this.$emit('close',data)
+          this.close()
+        }
+    }
+  },
+
+  computed: {}
+}
+</script>
+<style lang="less" scoped>
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+// 对话框里的card样式
+/deep/ .ant-modal-content {
+  background-color: #f0f2f5;
+}
+/deep/ .ant-modal-body {
+  padding: 10px;
+}
+/deep/.ant-form-item{
+  margin-bottom: 0px !important;
+}
+</style>

+ 0 - 1
src/views/system/CertificateManagement.vue

@@ -238,7 +238,6 @@
           managementListId({id:record.id}).then(res => {
                     // console.log('>>>>', this.queryParam)
                     if (res.success) {
-                      debugger
                        this.$refs.AddCertificateManagement.visible = true
                        this.$refs.AddCertificateManagement.defult = 'edit'
                         res.result.beginDate =moment (res.result.beginDate)