永康嘉持电器有限公司前端
小小儁爺
2024-12-25 c6da28cde9dc469ee1e2d4dba4b7234307d9bd5a
src/views/basicSettings/personList.vue
@@ -3,7 +3,7 @@
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="display: flex">
        <!--        background:rgba(248,248,250,1);-->
        <div style="width: 300px;margin: 10px 10px 0  0;background: #fff">
        <div style="width: 220px;margin: 10px 10px 0  0;background: #fff">
          <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
            <div style="display: flex;">
@@ -36,7 +36,7 @@
        </div>
        <div style="width: calc(100% - 300px)">
        <div style="width: calc(100% - 220px)">
          <div class="bodyTopButtonGroup" style="justify-content: space-between">
            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
            <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=3')">导入</el-button>
@@ -128,17 +128,20 @@
                prop="usercode"
                label="用户编码"
                sortable="custom"
                min-width="105"
                show-overflow-tooltip
              />
              <el-table-column
                prop="username"
                label="用户名称"
                min-width="105"
                sortable="custom"
                show-overflow-tooltip
              />
              <el-table-column
                prop="storg_name"
                label="所属组织"
                min-width="105"
                show-overflow-tooltip
                sortable="custom"
              >
@@ -149,6 +152,7 @@
              </el-table-column>
              <el-table-column
                prop="status"
                min-width="105"
                label="状态"
                show-overflow-tooltip
                sortable="custom"
@@ -158,9 +162,23 @@
                  <el-tag v-if="row.status==='N'" size="small" type="danger">离职</el-tag>
                </template>
              </el-table-column>
              <el-table-column
                prop="payrate"
                min-width="105"
                label="薪资类型"
                show-overflow-tooltip
                sortable="custom"
              >
                <template slot-scope="{row}">
                  {{ row.payrate ? PayRateArr.find(i=>i.code === row.payrate).name : '/' }}
                </template>
              </el-table-column>
              <el-table-column
                prop="email"
                label="邮箱"
                min-width="105"
                sortable="custom"
                show-overflow-tooltip
              >
@@ -171,6 +189,7 @@
              <el-table-column
                prop="mobile"
                label="号码"
                min-width="105"
                sortable="custom"
                show-overflow-tooltip
              >
@@ -182,6 +201,7 @@
                prop="postname"
                label="岗位"
                sortable="custom"
                min-width="105"
                show-overflow-tooltip
              >
                <template slot-scope="{row}">
@@ -192,6 +212,7 @@
                prop="rolename"
                label="角色"
                sortable="custom"
                min-width="105"
                show-overflow-tooltip
              >
                <template slot-scope="{row}">
@@ -201,6 +222,7 @@
              <el-table-column
                prop="group_name"
                label="班组"
                min-width="105"
                sortable="custom"
                show-overflow-tooltip
              >
@@ -212,6 +234,7 @@
                prop="createusername"
                label="创建人员"
                sortable="custom"
                min-width="105"
              />
              <el-table-column
                prop="lm_date"
@@ -221,7 +244,7 @@
              />
              <el-table-column
                label="操作"
                width="120"
                width="80"
                fixed="right"
              >
                <template slot-scope="{row}">
@@ -308,6 +331,22 @@
            <el-radio label="Y">在职</el-radio>
            <el-radio label="N">离职</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item prop="payrate" label="薪资类型">
          <el-select
            v-model="dialogForm.payrate"
            style="width:200px"
            placeholder="请选择"
            :popper-append-to-body="false"
          >
            <el-option
              v-for="item in PayRateArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
            />
          </el-select>
        </el-form-item>
        <el-form-item prop="post_code" label="岗位">
@@ -462,7 +501,8 @@
        storg_code: '', // 所属组织
        mobile: '', // 号码
        email: '', // 邮箱
        status: 'Y'// 状态
        status: 'Y', // 状态
        payrate: ''// 薪资类型
      },
      operation: '',
      dialogFormRules: {
@@ -483,6 +523,9 @@
        ],
        storg_code: [
          { required: true, message: '请选择所属组织', trigger: ['blur', 'change'] }
        ],
        payrate: [
          { required: true, message: '请选择薪资类型', trigger: ['blur', 'change'] }
        ]
      },
      defaultProps: {
@@ -497,6 +540,11 @@
      postArr: [],
      roleArr: [],
      groupArr: [],
      PayRateArr: [
        { code: 'S', name: '计件' },
        { code: 'T', name: '计时' },
        { code: 'M', name: '按月' }
      ],
      defaultPropsLeft: {
        children: 'children',
@@ -506,7 +554,11 @@
    }
  },
  activated() {   window.addEventListener('resize', this.getHeight)   this.getHeight() }, created() {
  activated() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  created() {
    this.getUserData()
  },
  mounted() {
@@ -594,6 +646,7 @@
        this.dialogForm.mobile = row.mobile
        this.dialogForm.email = row.email
        this.dialogForm.status = row.status
        this.dialogForm.payrate = row.payrate
        this.dialogForm.storg_code = this.findParent([], row.storg_code, this.cascaderOptions).reverse()
        this.dialogForm.post_code = row.post_code ? row.post_code.split(',') : []
@@ -669,6 +722,7 @@
      this.dialogForm.password = '123456'
      this.dialogForm.mobile = ''
      this.dialogForm.email = ''
      this.dialogForm.payrate = ''
      // this.dialogForm.storg_code = ''