Jelajahi Sumber

新增页面新增字段

QuKatie 3 tahun lalu
induk
melakukan
1401bd8f94

+ 47 - 0
src/api/basicData/salaryConfiguration.js

@@ -0,0 +1,47 @@
+import request from '@/router/axios';
+export const getList = (current, size, params) => {
+  return request({
+      url: '/api/blade-client/schoolconfig/list',
+      method: 'get',
+      params: {
+          ...params,
+          current,
+          size
+      }
+  })
+}
+export function detail(id) {
+  return request({
+    url: '/api/blade-client/schoolconfig/detail?id=' + id,
+    method: 'get'
+  })
+}
+//修改和新增
+export function submit(data) {
+  return request({
+    url: '/api/blade-client/schoolconfig/submit',
+    method: 'post',
+    data: data
+  })
+}
+//主表删除
+export function remove(data) {
+  return request({
+    url: '/api/blade-client/schoolconfig/remove',
+    method: 'post',
+    params: {
+      ids: data
+    }
+  })
+}
+
+//明细删除
+export function delItem(data) {
+  return request({
+    url: '/api/blade-client/schoolconfigitem/remove',
+    method: 'post',
+    params: {
+      ids: data
+    }
+  })
+}

+ 117 - 45
src/views/basicData/facultyManagement/detailsPage.vue

@@ -84,7 +84,7 @@ export default {
       dataList: [],
       option: {
         menuBtn: false,
-        labelWidth: 130,
+        labelWidth: 140,
         column: [
           {
             label: "姓名",
@@ -127,17 +127,6 @@ export default {
             span: 6
           },
           {
-            label: "学历",
-            prop: "code",
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=marital_status",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            },
-            span: 6
-          },
-          {
             label: "入职时间",
             prop: "joiningDate",
             type: "date",
@@ -275,7 +264,7 @@ export default {
             span: 6
           },
           {
-            label: "增资工资",
+            label: "增资",
             prop: "capitalIncrease",
             precision: 2,
             type: "number",
@@ -315,6 +304,14 @@ export default {
             span: 6
           },
           {
+            label: "双休日工作量工资标准",
+            prop: "doubleCease",
+            precision: 2,
+            type: "number",
+            controls: false,
+            span: 6
+          },
+          {
             label: "虚拟工作量工资标准",
             prop: "virtualWorkloadSalary",
             precision: 2,
@@ -339,6 +336,14 @@ export default {
             span: 6
           },
           {
+            label: "虚拟日常考核标准",
+            prop: "virtualDailyAssessmentCriteria",
+            precision: 2,
+            type: "number",
+            controls: false,
+            span: 6
+          },
+          {
             label: "学期绩效工资",
             prop: "termPerformanceSalary",
             precision: 2,
@@ -346,25 +351,65 @@ export default {
             controls: false,
             span: 6
           },
+          // {
+          //   label: "领导干部补贴工资",
+          //   prop: "leadingCadreSubsidy",
+          //   precision: 2,
+          //   type: "number",
+          //   controls: false,
+          //   span: 6
+          // },
           {
-            label: "领导干部补贴工资",
-            prop: "leadingCadreSubsidy",
+            label: "领导干部考核补贴工资",
+            prop: "assessLeadingCadreSubsidy",
             precision: 2,
             type: "number",
             controls: false,
             span: 6
           },
+          // {
+          //   label: "备课组长补贴",
+          //   prop: "prepareLessons",
+          //   precision: 2,
+          //   type: "number",
+          //   controls: false,
+          //   span: 6
+          // },
           {
-            label: "备课组长补贴",
-            prop: "prepareLessons",
+            label: "备课组长考核补贴标准",
+            prop: "assessPrepareLessons",
             precision: 2,
             type: "number",
             controls: false,
             span: 6
           },
+          // {
+          //   label: "教研组长补贴",
+          //   prop: "teachingResearch",
+          //   precision: 2,
+          //   type: "number",
+          //   controls: false,
+          //   span: 6
+          // },
           {
             label: "教研组长补贴",
-            prop: "teachingResearch",
+            prop: "assessTeachingResearch",
+            precision: 2,
+            type: "number",
+            controls: false,
+            span: 6
+          },
+          {
+            label: "班主任补贴标准",
+            prop: "teacherSubsidy",
+            precision: 2,
+            type: "number",
+            controls: false,
+            span: 6
+          },
+          {
+            label: "班主任考核补贴标准",
+            prop: "teacherAssessSubsidy",
             precision: 2,
             type: "number",
             controls: false,
@@ -381,6 +426,13 @@ export default {
               label: "dictValue",
               value: "dictValue"
             },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
             span: 6
           },
           {
@@ -408,19 +460,6 @@ export default {
             span: 6
           },
           {
-            label: "校龄工资标准",
-            prop: "schoolAgeSalaryName",
-            type: "select",
-            dicUrl:
-              "/api/blade-system/dict-biz/dictionary?code=School_Age_Wage_Standard",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            },
-            span: 6
-          },
-
-          {
             label: "增资标准",
             prop: "capitalIncreaseName",
             type: "select",
@@ -432,20 +471,17 @@ export default {
             },
             span: 6
           },
-
           {
-            label: "学历标准",
-            prop: "educationSalaryName",
+            label: "学历",
+            prop: "code",
             type: "select",
-            dicUrl:
-              "/api/blade-system/dict-biz/dictionary?code=Educational_qualification_wage_standard",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=marital_status",
             props: {
               label: "dictValue",
               value: "dictValue"
             },
             span: 6
           },
-
           {
             label: "职级等级",
             prop: "rankSalaryName",
@@ -520,10 +556,21 @@ export default {
             },
             span: 6
           },
-
+          // {
+          //   label: "领导干部补贴标准",
+          //   prop: "leadingCadreSubsidyName",
+          //   type: "select",
+          //   dicUrl:
+          //     "/api/blade-system/dict-biz/dictionary?code=Standards_for_subsidies_for_leading_cadres",
+          //   props: {
+          //     label: "dictValue",
+          //     value: "dictValue"
+          //   },
+          //   span: 6
+          // },
           {
             label: "领导干部补贴标准",
-            prop: "leadingCadreSubsidyName",
+            prop: "assessLeadingCadreSubsidyName",
             type: "select",
             dicUrl:
               "/api/blade-system/dict-biz/dictionary?code=Standards_for_subsidies_for_leading_cadres",
@@ -533,9 +580,21 @@ export default {
             },
             span: 6
           },
+          // {
+          //   label: "备课组长补贴标准",
+          //   prop: "prepareLessonsName",
+          //   type: "select",
+          //   dicUrl:
+          //     "/api/blade-system/dict-biz/dictionary?code=Standard_for_Leader_of_Lesson_Preparation",
+          //   props: {
+          //     label: "dictValue",
+          //     value: "dictValue"
+          //   },
+          //   span: 6
+          // },
           {
             label: "备课组长补贴标准",
-            prop: "prepareLessonsName",
+            prop: "assessPrepareLessonsName",
             type: "select",
             dicUrl:
               "/api/blade-system/dict-biz/dictionary?code=Standard_for_Leader_of_Lesson_Preparation",
@@ -545,9 +604,21 @@ export default {
             },
             span: 6
           },
-          {
-            label: "教研组长补贴标准",
-            prop: "teachingResearchName",
+          // {
+          //   label: "教研组长补贴标准",
+          //   prop: "teachingResearchName",
+          //   type: "select",
+          //   dicUrl:
+          //     "/api/blade-system/dict-biz/dictionary?code=Standard_for_Teacher-Leader",
+          //   props: {
+          //     label: "dictValue",
+          //     value: "dictValue"
+          //   },
+          //   span: 6
+          // },
+          {
+            label: "教研组长考核补贴标准",
+            prop: "assessTeachingResearchName",
             type: "select",
             dicUrl:
               "/api/blade-system/dict-biz/dictionary?code=Standard_for_Teacher-Leader",
@@ -559,11 +630,12 @@ export default {
             span: 6
           },
           {
-            label: "是否班主任",
+            label: "正班、副班",
             prop: "doubleTeachers",
             type: "radio",
             dataType: "string",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=double_teachers",
             props: {
               label: "dictValue",
               value: "dictValue"

+ 421 - 0
src/views/basicData/salaryConfiguration/detailsPage.vue

@@ -0,0 +1,421 @@
+<template>
+  <div>
+    <div class="borderless">
+      <div class="customer-head">
+        <div class="customer-back">
+          <el-button
+            type="danger"
+            style="border: none;background: none;color: red"
+            icon="el-icon-arrow-left"
+            @click="backToList"
+            >返回列表
+          </el-button>
+        </div>
+        <el-button
+          class="el-button--small-yh add-customer-btn"
+          type="primary"
+          size="small"
+          @click="editCustomer"
+          >保存数据
+        </el-button>
+      </div>
+      <containerTitle
+        title="基础资料"
+        style="margin-top: 60px"
+      ></containerTitle>
+      <basic-container>
+        <avue-form
+          ref="form"
+          class="trading-form"
+          v-model="form"
+          :option="option"
+        >
+          <template slot="resultType">
+            <el-select
+              size="small"
+              v-model="form.resultType"
+              placeholder="请选择"
+              clearable
+              :disabled="detailData.status == 1"
+            >
+              <el-option
+                v-for="item in resultList"
+                :key="item.id"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </avue-form>
+      </basic-container>
+      <containerTitle title="基础明细"></containerTitle>
+      <basic-container>
+        <avue-crud
+          ref="crud"
+          :option="tableOption"
+          :data="dataList"
+          :table-loading="loading"
+          @saveColumn="saveColumn"
+          :cell-style="cellStyle"
+        >
+          <template slot="menuLeft">
+            <el-button
+              type="primary"
+              @click="addRow"
+              size="small"
+              :disabled="detailData.status == 1"
+              >新增
+            </el-button>
+          </template>
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button
+              size="small"
+              type="text"
+              @click="rowCell(row, index)"
+              :disabled="detailData.status == 1"
+              >编辑</el-button
+            >
+            <el-button
+              size="small"
+              type="text"
+              @click="rowDel(row, index)"
+              :disabled="detailData.status == 1"
+              >删除</el-button
+            >
+          </template>
+          <template slot="parameter" slot-scope="{ row, index }">
+            <span v-if="row.$cellEdit">
+              <el-select
+                size="small"
+                v-model="row.parameter"
+                placeholder="请选择"
+                @change="parameterChange(row, index)"
+                clearable
+                :disabled="detailData.status == 1"
+                v-if="form.resultType == '职称'"
+              >
+                <el-option
+                  v-for="item in jobTitleList"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictValue"
+                >
+                </el-option>
+              </el-select>
+              <el-select
+                size="small"
+                v-model="row.parameter"
+                placeholder="请选择"
+                @change="parameterChange(row, index)"
+                clearable
+                :disabled="detailData.status == 1"
+                v-else-if="form.resultType == '级别'"
+              >
+                <el-option
+                  v-for="item in jobLevelList"
+                  :key="item.id"
+                  :label="item.dictValue"
+                  :value="item.dictValue"
+                >
+                </el-option>
+              </el-select>
+              <el-input-number
+                size="small"
+                v-else-if="form.resultType == '校龄'"
+                v-model="row.parameter"
+                :min="0"
+                :controls="false"
+                placeholder="请输入 数字"
+                style="width:100%"
+                @change="parameterChange(row, index)"
+              ></el-input-number>
+              <el-input
+                v-else
+                size="small"
+                v-model="row.parameter"
+                placeholder="请输入 类别"
+                @change="parameterChange(row, index)"
+              ></el-input>
+            </span>
+            <span v-else>{{ row.parameter }}</span>
+          </template>
+        </avue-crud>
+      </basic-container>
+    </div>
+  </div>
+</template>
+
+<script>
+import { detail, submit, delItem } from "@/api/basicData/salaryConfiguration";
+export default {
+  name: "index",
+  data() {
+    return {
+      form: {},
+      dataList: [],
+      option: {
+        menuBtn: false,
+        labelWidth: 130,
+        column: [
+          {
+            label: "部门",
+            prop: "inSection",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_section",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 6
+          },
+          {
+            label: "教师类别",
+            prop: "salaryWithdrawalStandardName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Salary_allocation_standard",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 6
+          },
+          {
+            label: "标准类别",
+            prop: "normType",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=norm_type",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 6
+          },
+          {
+            label: "计算类别",
+            prop: "resultType",
+            // type: "select",
+            // dicUrl: "/api/blade-system/dict-biz/dictionary?code=result_type",
+            // props: {
+            //   label: "dictValue",
+            //   value: "dictValue"
+            // },
+            // rules: [
+            //   {
+            //     required: true,
+            //     message: "",
+            //     trigger: "blur"
+            //   }
+            // ],
+            span: 6
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            disabled: true,
+            span: 6
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            type: "textarea",
+            minRows: 2,
+            span: 18
+          }
+        ]
+      },
+      tableOption: {
+        align: "center",
+        addBtn: false,
+        refreshBtn: false,
+        editBtn: false,
+        delBtn: false,
+        border: true,
+        menuWidth: 120,
+        stripe: true,
+        column: [
+          {
+            label: "类别",
+            prop: "parameter",
+            overHidden: true
+          },
+          {
+            label: "工资标准",
+            prop: "salary",
+            precision: 2,
+            type: "number",
+            controls: false,
+            overHidden: true,
+            cell: true
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            overHidden: true,
+            cell: true
+          }
+        ]
+      },
+      resultList: [],
+      jobTitleList: [],
+      jobLevelList: []
+    };
+  },
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  created() {
+    if (this.detailData.id) {
+      this.getDetail(this.detailData.id);
+    }
+    if (this.detailData.status == 1) {
+      this.option.disabled = true;
+    }
+    this.getWorkDicts("result_type").then(res => {
+      this.resultList = res.data.data;
+    });
+    this.getWorkDicts("job_title").then(res => {
+      this.jobTitleList = res.data.data;
+    });
+    this.getWorkDicts("job_level").then(res => {
+      this.jobLevelList = res.data.data;
+    });
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    getDetail(id) {
+      detail(id)
+        .then(res => {
+          this.form = res.data.data;
+          this.dataList = res.data.data.schoolConfigItems;
+        })
+        .finally(() => {
+          // this.loading = false;
+          // this.showBut = true;
+          // this.pageLoading = false;
+        });
+    },
+    addRow() {
+      // if (!this.form.resultType) {
+      //   return this.$message.error("请选择计算类别");
+      // }
+      this.dataList.push({ $cellEdit: true });
+    },
+    rowCell(row, index) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    rowDel(row, index) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          delItem(row.id).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.dataList.splice(index, 1);
+          });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.dataList.splice(index, 1);
+        }
+      });
+    },
+    parameterChange(row, index) {
+      if (
+        this.dataList.filter(value => value.parameter == row.parameter).length >
+        1
+      ) {
+        row.parameter = "";
+        return this.$message.error("明细类别不能重复");
+      }
+    },
+    //修改提交触发
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          for (let i = 0; i < this.dataList.length; i++) {
+            if (
+              this.dataList[i].salary == null ||
+              this.dataList[i].salary == undefined ||
+              this.dataList[i].salary == ""
+            ) {
+              return this.$message.error(`请输入第${i + 1}行的工资标准`);
+            }
+          }
+          submit({ ...this.form, schoolConfigItems: this.dataList })
+            .then(res => {
+              this.$message.success("保存成功");
+              this.form = res.data.data;
+              this.dataList = res.data.data.schoolConfigItems;
+            })
+            .finally(() => {});
+        } else {
+          return false;
+        }
+      });
+    },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+.img-form ::v-deep .el-form-item {
+  height: 150px;
+  line-height: 150px;
+  margin-bottom: 8px !important;
+}
+.img-form ::v-deep .avue-upload__icon {
+  font-size: 20px;
+  width: 150px;
+  height: 150px;
+  line-height: 150px;
+}
+</style>

+ 213 - 0
src/views/basicData/salaryConfiguration/index.vue

@@ -0,0 +1,213 @@
+<template>
+  <div>
+    <basic-container v-show="show" class="page-crad">
+      <avue-crud
+        ref="crud"
+        :option="option"
+        :data="dataList"
+        :page.sync="page"
+        :search.sync="search"
+        @search-change="searchChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @on-load="onLoad"
+        :table-loading="loading"
+        @saveColumn="saveColumn"
+        :cell-style="cellStyle"
+      >
+        <template slot="menuLeft">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="small"
+            @click.stop="newAdd()"
+            >新增
+          </el-button>
+        </template>
+        <template slot-scope="{ row, index }" slot="menu">
+          <el-button type="text" size="small" @click.stop="editOpen(row, 1)">
+            查看
+          </el-button>
+          <el-button type="text" size="small" @click.stop="editOpen(row, 2)">
+            编辑
+          </el-button>
+          <el-button type="text" size="small" @click.stop="rowDel(row, index)">
+            删除
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <details-page v-if="!show" @goBack="backToList" :detailData="detailData" />
+  </div>
+</template>
+
+<script>
+import detailsPage from "./detailsPage";
+import { getList, remove } from "@/api/basicData/salaryConfiguration";
+export default {
+  name: "index",
+  data() {
+    return {
+      show: true,
+      loading: false,
+      form: {},
+      search: {},
+      detailData: {},
+      dataList: [],
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 50, 100, 200, 300, 400, 500]
+      },
+      option: {
+        searchShow: true,
+        searchMenuSpan: 16,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 140,
+        dialogClickModal: false,
+        searchLabelWidth: 100,
+        searchIcon: true,
+        searchIndex: 2,
+        addBtnText: "新单",
+        stripe: true,
+        column: [
+          {
+            label: "部门",
+            prop: "inSection",
+            width: "100",
+            search: true,
+            overHidden: true,
+            span: 8
+          },
+          {
+            label: "教师类别",
+            prop: "salaryWithdrawalStandardName",
+            width: "100",
+            search: true,
+            overHidden: true,
+            span: 8
+          },
+          {
+            label: "标准类别",
+            prop: "normType",
+            width: "100",
+            search: true,
+            overHidden: true,
+            span: 8
+          },
+          {
+            label: "计算类别",
+            prop: "resultType",
+            width: "100",
+            overHidden: true,
+            search: true
+          },
+          {
+            label: "创建人",
+            prop: "createUserName",
+            width: "100",
+            overHidden: true
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            width: "150",
+            overHidden: true
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            overHidden: true
+          }
+        ]
+      }
+    };
+  },
+  components: {
+    detailsPage
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    newAdd() {
+      this.show = false;
+    },
+    onLoad(page, params) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, params)
+        .then(res => {
+          this.dataList = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 350;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    rowDel(row, index, done) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        remove(row.id).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.onLoad(this.page, this.search);
+          }
+        });
+      });
+    },
+    //返回列表
+    backToList() {
+      this.detailData = this.$options.data().detailData;
+      this.show = true;
+      this.onLoad(this.page, this.search);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+</style>