Procházet zdrojové kódy

技能博物馆退休录入

jbb před 2 roky
rodič
revize
67bd6a5ade

+ 11 - 1
src/views/activiti/form/demoForm2.vue

@@ -54,6 +54,8 @@
     <fixed-zy-modal ref="FixedZyModal" @close="closeP"></fixed-zy-modal>
     <car-sq-modal ref="CarSqModal" @close="closeP"></car-sq-modal>
     <material-sl-modal ref="MaterialSlModal" @close="closeP"></material-sl-modal>
+    <!-- 技能博物馆人员列表 -->
+    <personnel-files-modall-jn ref="personnelFilesModallJn" @close="closeP"></personnel-files-modall-jn> 
   </div>
 </template>
 
@@ -61,6 +63,7 @@
 import pick from 'lodash.pick'
 import todoManageOperation from '../operation/todoManageOperation'
 import PersonnelFilesModal from './personnelFilesModal'
+import personnelFilesModallJn from './personnelFilesModallJn'
 import CarSqModal from './carSqModal'
 import MaterialSlModal from './materialSlModal'
 import FixedZyModal from './fixedZyModal'
@@ -93,7 +96,8 @@ export default {
         PersonnelFilesModal,
         FixedZyModal,
         CarSqModal,
-        MaterialSlModal
+        MaterialSlModal,
+        personnelFilesModallJn
     },
     data () {
         return {
@@ -155,6 +159,7 @@ export default {
                 newName.fixed_bf=this.fixedBf
                 newName.car_sq = this.carSq
                 newName.material_sl = this.materialSl
+                newName.pesonListJn = this.pesonListJn
             },
             immediate: true,
             deep: true
@@ -322,6 +327,11 @@ export default {
          this.$refs.DepartmentModal.departmentModVis = true
             this.$refs.DepartmentModal.personLists()
         },
+        // 技能博物馆获取人员信息
+        pesonListJn(){
+            this.$refs.personnelFilesModallJn.personnelFilesModallJn = true
+            this.$refs.personnelFilesModallJn. personLists()
+        },
         closeP(value){
              var that = this
             this.cvarr.map(item=>{

+ 199 - 0
src/views/activiti/form/personnelFilesModallJn.vue

@@ -0,0 +1,199 @@
+<template>
+<!-- 技能博物馆人员档案 -->
+  <div id="personnelFilesModallJn" ref="personnelFilesModallJn">
+    <a-modal
+      title="人员档案"
+      v-model="personnelFilesModallJn"
+       :getContainer ='()=>$refs.personnelFilesModallJn'
+      @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="personnelFilesModallJnData"
+              bordered
+              rowKey="id"
+              :columns="personnelFilesModallJnColumns"
+              :data-source="personnelFilesModallJnData"
+              :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+              :pagination="pagination"
+               :scroll="{y:300,x:1200}"
+                @change="handleTableChange"
+            >
+              
+            </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 {pesonListJn} from '@api/oa/cd-personnel-files'
+
+export default {
+  name: 'personnelFilesModallJn', // 报关要素
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      loading: false, // 表格加载
+      pushState: false, //是否推送
+      // 子表表头
+      personnelFilesModallJnColumns: [ 
+           {
+          title: '员工姓名',
+          dataIndex: 'realname',
+          width:'20%',
+          className: 'replacecolor',
+        },
+         {
+          title: '岗位',
+          dataIndex: 'post',
+          width:'20%',
+          className: 'replacecolor',
+        },
+        {
+          title: '员工编号',
+          dataIndex: 'workNo',
+          width:'20%',
+          className: 'replacecolor',
+        },
+        {
+          title: '入职日期',
+          dataIndex: 'nInductionTime',
+          width:'20%',
+          className: 'replacecolor',
+        },
+      ],
+      personnelFilesModallJnData: [
+          
+      ], // 子表信息
+      pagination:{},
+      personnelFilesModallJn: false,
+      selectedRowKeys:[],
+      selectedRows:[],
+      queryParam:{
+        pageSize:10
+      }
+    }
+  },
+  // 接收父组件 方法
+  props: {},
+
+  created() {  
+  },
+
+  methods: {
+    personLists(){
+      pesonListJn(this.queryParam).then(res => {
+                    if (res.success) {
+                      this.personnelFilesModallJnData = res.result.records
+                      this.pagination = {
+                        pageSize:10,
+                       total: res.result.total,
+                       current: res.result.current,
+                       }
+                      //  this.dataSource =res.result.records
+                    }else{
+                       this.$message.error(res.message);
+                    }
+                })
+    },
+    // // 分页、排序、筛选变化时触发
+    handleTableChange(pagination, filters, sorter) {
+      this.queryParam.pageNo = pagination.current
+      this.personLists()
+    },
+    handleCancel() {
+     this.personnelFilesModallJn = false
+     this.personnelFilesModallJnData = []
+     this.selectedRowKeys = []
+    },
+    onSelectChange(keys,rows){
+      this.selectedRowKeys = keys;
+      this.selectedRows = rows;
+    },
+    addSave(){
+       if(this.selectedRows.length >1){
+         this.$message.error('一次只可勾选一行数据');
+       }else if(this.selectedRows.length == 0){
+         this.$message.error('请勾选数据');
+       }else{
+         var data ={
+            name : this.selectedRows[0].realname,
+            employee_number:this.selectedRows[0].workNo,
+            post:this.selectedRows[0].post,
+            rz_date:this.selectedRows[0].nInductionTime,
+          }
+          this.$emit('close',data)
+          this.handleCancel()
+       }
+          
+    }
+  },
+
+  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;
+  margin:0 !important;
+  margin-left: 0px !important;
+}
+/deep/.ant-form-item{
+  margin-bottom: 0px !important;
+}
+ /deep/.ant-modal{
+      top: 106px !important;
+    left: 10px !important;
+}
+</style>