yz_08
2021-02-04 0d78623ad767cc507e6442066905255d56e6d027
添加提交信息验证
2个文件已修改
88 ■■■■ 已修改文件
src/views/login/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/Informationinput.vue 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue
@@ -10,7 +10,7 @@
        <img src="../../assets/login/pic03.png" style="float: left;">
        <img src="../../assets/login/pic04.png"></el-col>
      <el-col :span="5" style="background-color: #fff;height: 515px;"> <el-form ref="loginForm" :model="loginForm" :rules="rules" class="login-form" autocomplete="off" label-position="left">
        <h2 id="form-biao-dan"><span style="position: relative;">登陆</span></h2>
        <h2 id="form-biao-dan"><span style="position: relative;">登录</span></h2>
        <span v-if="login.type === 'up'">
          <el-form-item prop="username" class="form-input">
            <el-input
src/views/user/Informationinput.vue
@@ -381,7 +381,7 @@
      </el-main>
    </el-container>
    <el-dialog title="基本信息" :visible.sync="dialogshowArr[0].show" width="50%">
      <el-form :model="empBaseInfoForm" :rules="rules" label-position="right" label-width="120px">
      <el-form ref="empBaseInfoForm" :model="empBaseInfoForm" :rules="rules" label-position="right" label-width="120px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="档案号">
@@ -543,7 +543,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="护卫点" required prop="deptNeme">
            <el-form-item label="护卫点" required message="请选择护卫点" prop="deptNeme">
              <treeselect
                v-model="empBaseInfoForm.deptId"
                :multiple="false"
@@ -635,8 +635,8 @@
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="putEmpBase()">保 存</el-button>
        <el-button type="primary" @click="putEmpBaseContinue()">保存并继续新增</el-button>
        <el-button type="primary" @click="putEmpBase('empBaseInfoForm')">保 存</el-button>
        <el-button type="primary" @click="putEmpBaseContinue('empBaseInfoForm')">保存并继续新增</el-button>
        <el-button @click="dialogIsShow()">取 消</el-button>
      </div>
    </el-dialog>
@@ -2760,42 +2760,50 @@
      this.empBaseInfoForm.version = row.version
      this.dialogshowArr[0].show = true
    },
    putEmpBase() {
      if (this.isAdd) {
        this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
          this.buttonLoading = false
          this.$message({
            message: this.$t('tips.createSuccess'),
            type: 'success'
          })
          this.cleanEmpBase()
          this.selectEmpBase()
        })
      } else {
        this.$put('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
          this.$message({
            message: this.$t('tips.updateSuccess'),
            type: 'success'
          })
          this.$emit('success')
          this.cleanEmpBase()
          this.selectEmpBase()
        })
      }
      this.dialogIsShow()
    putEmpBase(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          if (this.isAdd) {
            this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
              this.buttonLoading = false
              this.$message({
                message: this.$t('tips.createSuccess'),
                type: 'success'
              })
              this.cleanEmpBase()
              this.selectEmpBase()
            })
          } else {
            this.$put('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
              this.$message({
                message: this.$t('tips.updateSuccess'),
                type: 'success'
              })
              this.$emit('success')
              this.cleanEmpBase()
              this.selectEmpBase()
            })
          }
          this.dialogIsShow()
        }
      })
    },
    putEmpBaseContinue() {
      if (this.isAdd) {
        this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
          this.buttonLoading = false
          this.$message({
            message: this.$t('tips.createSuccess'),
            type: 'success'
          })
          this.cleanEmpBase()
          this.selectEmpBase()
        })
      }
    putEmpBaseContinue(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          if (this.isAdd) {
            this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => {
              this.buttonLoading = false
              this.$message({
                message: this.$t('tips.createSuccess'),
                type: 'success'
              })
              this.cleanEmpBase()
              this.selectEmpBase()
            })
          }
        }
      })
    },
    selectWorkExperience() {
      this.$get('hr/empWorkExperience/list')