Browse Source

修改bug

QuKatie 3 years ago
parent
commit
948a63552b

+ 23 - 6
src/util/calculate.js

@@ -64,19 +64,36 @@ export function grossProfitCal(num, num2, num3, num4) {
   return Number(sum).toFixed(2)
 }
 //单票毛利: (金额*汇率+费用应收合计)-(成本*数量+费用应付合计)
-export function STGPCal(num, num2, num3, num4){
-  const amountSum= Number(num ? num : 0)
+export function STGPCal(num, num2, num3, num4) {
+  const amountSum = Number(num ? num : 0)
   const reSum = Number(num2 ? num2 : 0)
   const costSum = Number(num3 ? num3 : 0)
   const paySum = Number(num4 ? num4 : 0)
-  const sum=_.subtract(_.add(amountSum,reSum),_.add(costSum,paySum))
+  const sum = _.subtract(_.add(amountSum, reSum), _.add(costSum, paySum))
   return Number(sum).toFixed(2)
 }
 //校验值是否合法
-export function numCal(num){
-  if(isNaN(Number(num))){
+export function numCal(num) {
+  if (isNaN(Number(num))) {
     return Number(0)
-  }else{
+  } else {
     return Number(num ? num : 0)
   }
 }
+//工资拨付标准+职级工资
+export function addAllsalary(num, num2, num3) {
+  const Sum1 = Number(num ? num : 0)
+  const Sum2 = Number(num2 ? num2 : 0)
+  const Sum3 = Number(num3 ? num3 : 0)
+  const sum = _.add(_.add(Sum1, Sum2), Sum3)
+  return Number(sum)
+}
+//
+export function addAllsalary2(num, num2, num3, num4) {
+  const Sum1 = Number(num ? num : 0)
+  const Sum2 = Number(num2 ? num2 : 0)
+  const Sum3 = Number(num3 ? num3 : 0)
+  const Sum4 = Number(num4 ? num4 : 0)
+  const sum = _.add(_.add(Sum1, Sum2), _.add(Sum3, Sum4))
+  return Number(sum)
+}

+ 293 - 477
src/views/basicData/facultyManagement/detailsPage.vue

@@ -30,307 +30,6 @@
           v-model="form"
           :option="option"
         >
-          <template slot="salaryWithdrawalStandardName">
-            <el-select
-              size="small"
-              v-model="form.salaryWithdrawalStandardName"
-              placeholder="请选择"
-              @change="
-                dictChange(
-                  form.salaryWithdrawalStandardName,
-                  'salaryWithdrawalStandard'
-                )
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="rankWithdrawalStandardName">
-            <el-select
-              size="small"
-              v-model="form.rankWithdrawalStandardName"
-              placeholder="请选择"
-              @change="
-                dictChange(
-                  form.rankWithdrawalStandardName,
-                  'rankWithdrawalStandard'
-                )
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList2"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="performanceAwardName">
-            <el-select
-              size="small"
-              v-model="form.performanceAwardName"
-              placeholder="请选择"
-              @change="
-                dictChange(form.performanceAwardName, 'performanceAward')
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList3"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="schoolAgeSalaryName">
-            <el-select
-              size="small"
-              v-model="form.schoolAgeSalaryName"
-              placeholder="请选择"
-              @change="dictChange(form.schoolAgeSalaryName, 'schoolAgeSalary')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList4"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="capitalIncreaseName">
-            <el-select
-              size="small"
-              v-model="form.capitalIncreaseName"
-              placeholder="请选择"
-              @change="dictChange(form.capitalIncreaseName, 'capitalIncrease')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList5"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="educationSalaryName">
-            <el-select
-              size="small"
-              v-model="form.educationSalaryName"
-              placeholder="请选择"
-              @change="dictChange(form.educationSalaryName, 'educationSalary')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList6"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="rankSalaryName">
-            <el-select
-              size="small"
-              v-model="form.rankSalaryName"
-              placeholder="请选择"
-              @change="dictChange(form.rankSalaryName, 'rankSalary')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList7"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="salaryBaseName">
-            <el-select
-              size="small"
-              v-model="form.salaryBaseName"
-              placeholder="请选择"
-              @change="dictChange(form.salaryBaseName, 'salaryBase')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList8"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="workloadSalaryName">
-            <el-select
-              size="small"
-              v-model="form.workloadSalaryName"
-              placeholder="请选择"
-              @change="dictChange(form.workloadSalaryName, 'workloadSalary')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList9"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="dailyAssessmentCriteriaName">
-            <el-select
-              size="small"
-              v-model="form.dailyAssessmentCriteriaName"
-              placeholder="请选择"
-              @change="
-                dictChange(
-                  form.dailyAssessmentCriteriaName,
-                  'dailyAssessmentCriteria'
-                )
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList10"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="dailyAssessmentSalaryName">
-            <el-select
-              size="small"
-              v-model="form.dailyAssessmentSalaryName"
-              placeholder="请选择"
-              @change="
-                dictChange(
-                  form.dailyAssessmentSalaryName,
-                  'dailyAssessmentSalary'
-                )
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList11"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="termPerformanceSalaryName">
-            <el-select
-              size="small"
-              v-model="form.termPerformanceSalaryName"
-              placeholder="请选择"
-              @change="
-                dictChange(
-                  form.termPerformanceSalaryName,
-                  'termPerformanceSalary'
-                )
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList12"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="leadingCadreSubsidyName">
-            <el-select
-              size="small"
-              v-model="form.leadingCadreSubsidyName"
-              placeholder="请选择"
-              @change="
-                dictChange(form.leadingCadreSubsidyName, 'leadingCadreSubsidy')
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList13"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="prepareLessonsName">
-            <el-select
-              size="small"
-              v-model="form.prepareLessonsName"
-              placeholder="请选择"
-              @change="dictChange(form.prepareLessonsName, 'prepareLessons')"
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList14"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
-          <template slot="teachingResearchName">
-            <el-select
-              size="small"
-              v-model="form.teachingResearchName"
-              placeholder="请选择"
-              @change="
-                dictChange(form.teachingResearchName, 'teachingResearch')
-              "
-              clearable
-              :disabled="detailData.status == 1"
-            >
-              <el-option
-                v-for="item in dictList15"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.remark"
-              >
-              </el-option>
-            </el-select>
-          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="事业编考试的记录"></containerTitle>
@@ -376,6 +75,7 @@
 
 <script>
 import { detail, submit, delItem } from "@/api/basicData/facultyManagement";
+import { addAllsalary, addAllsalary2 } from "@/util/calculate";
 export default {
   name: "index",
   data() {
@@ -384,7 +84,7 @@ export default {
       dataList: [],
       option: {
         menuBtn: false,
-        labelWidth: 120,
+        labelWidth: 130,
         column: [
           {
             label: "姓名",
@@ -486,11 +186,21 @@ export default {
             span: 6
           },
           {
-            label: "是否班主任",
-            prop: "doubleTeachers",
-            type: "radio",
-            dataType: "string",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
+            label: "级部",
+            prop: "department",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=department",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            span: 6
+          },
+          {
+            label: "班级",
+            prop: "inStaffRoom",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_staff_room",
             props: {
               label: "dictValue",
               value: "dictValue"
@@ -510,153 +220,354 @@ export default {
             span: 6
           },
           {
-            label: "工资拨付标准",
-            prop: "salaryWithdrawalStandardName",
+            label: "职工类别",
+            prop: "staffType",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=staff_type",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
           {
-            label: "工资拨付金额",
-            prop: "salaryWithdrawalStandard",
+            label: "授课类别",
+            prop: "classType",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=class_type",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            row: true,
             span: 6
           },
           {
-            label: "职级拨付标准",
-            prop: "rankWithdrawalStandardName",
+            label: "工资拨付标准",
+            prop: "salaryWithdrawalStandard",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "职级拨付金额",
+            label: "职级工资",
             prop: "rankWithdrawalStandard",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "履约奖标准",
-            prop: "performanceAwardName",
+            label: "履约奖",
+            prop: "performanceAward",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "履约奖金额",
-            prop: "performanceAward",
+            label: "校龄工资",
+            prop: "schoolAgeSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "校龄工资标准",
-            prop: "schoolAgeSalaryName",
+            label: "增资工资",
+            prop: "capitalIncrease",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "校龄工资金额",
-            prop: "schoolAgeSalary",
+            label: "学历工资",
+            prop: "educationSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "增资标准",
-            prop: "capitalIncreaseName",
+            label: "职级等级工资",
+            prop: "rankSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "增资金额",
-            prop: "capitalIncrease",
+            label: "工资基数工资",
+            prop: "salaryBase",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "学历工资标准",
-            prop: "educationSalaryName",
+            label: "工作量工资",
+            prop: "workloadSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "学历工资金额",
-            prop: "educationSalary",
+            label: "虚拟工作量工资标准",
+            prop: "virtualWorkloadSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "职级工资",
-            prop: "rankSalaryName",
+            label: "日常考核工资",
+            prop: "dailyAssessmentCriteria",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "职级金额",
-            prop: "rankSalary",
+            label: "日常考核等级工资",
+            prop: "dailyAssessmentSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "工资基数",
-            prop: "salaryBaseName",
+            label: "学期绩效工资",
+            prop: "termPerformanceSalary",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "工资基数金额",
-            prop: "salaryBase",
+            label: "领导干部补贴工资",
+            prop: "leadingCadreSubsidy",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "工作量工资",
-            prop: "workloadSalaryName",
+            label: "备课组长补贴",
+            prop: "prepareLessons",
+            precision: 2,
+            type: "number",
+            controls: false,
             span: 6
           },
           {
-            label: "工作量金额",
-            prop: "workloadSalary",
+            label: "教研组长补贴",
+            prop: "teachingResearch",
+            precision: 2,
+            type: "number",
+            controls: false,
+            row: true,
             span: 6
           },
           {
-            label: "日常考核标准",
-            prop: "dailyAssessmentCriteriaName",
+            label: "教师类别",
+            prop: "salaryWithdrawalStandardName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Salary_allocation_standard",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
           {
-            label: "日常考核金额",
-            prop: "dailyAssessmentCriteria",
+            label: "职级拨付标准",
+            prop: "rankWithdrawalStandardName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Level_Allocation_Criteria",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
           {
-            label: "日常考核等级工资",
-            prop: "dailyAssessmentSalaryName",
+            label: "履约奖标准",
+            prop: "performanceAwardName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Performance_Award_Criteria",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
           {
-            label: "日常考核等级金额",
-            prop: "dailyAssessmentSalary",
+            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: "termPerformanceSalaryName",
+            label: "增资标准",
+            prop: "capitalIncreaseName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Capital_increase_standard",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
+
           {
-            label: "学期绩效金额",
-            prop: "termPerformanceSalary",
+            label: "学历标准",
+            prop: "educationSalaryName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Educational_qualification_wage_standard",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
+
           {
-            label: "领导干部补贴标准",
-            prop: "leadingCadreSubsidyName",
+            label: "职级等级",
+            prop: "rankSalaryName",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=Grade_salary",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
+
           {
-            label: "领导干部补贴金额",
-            prop: "leadingCadreSubsidy",
+            label: "工资基数",
+            prop: "salaryBaseName",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=Wage_base",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
+
           {
-            label: "备课组长标准",
-            prop: "prepareLessonsName",
+            label: "工作量标准",
+            prop: "workloadSalaryName",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=Workload_Wages",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
+
           {
-            label: "备课组长金额",
-            prop: "prepareLessons",
+            label: "日常考核标准",
+            prop: "dailyAssessmentCriteriaName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Daily_Assessment_Criteria",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            span: 6
+          },
+
+          {
+            label: "日常考核等级",
+            prop: "dailyAssessmentSalaryName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Daily_assessment_grade_salary",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            span: 6
+          },
+
+          {
+            label: "学期绩效标准",
+            prop: "termPerformanceSalaryName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Term_Performance_Pay",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
+
           {
-            label: "教研组长标准",
+            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: "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: "teachingResearchName",
+            type: "select",
+            dicUrl:
+              "/api/blade-system/dict-biz/dictionary?code=Standard_for_Teacher-Leader",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
+            row: true,
             span: 6
           },
           {
-            label: "教研组长金额",
-            prop: "teachingResearch",
+            label: "是否班主任",
+            prop: "doubleTeachers",
+            type: "radio",
+            dataType: "string",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            },
             span: 6
           },
           {
@@ -703,22 +614,7 @@ export default {
             cell: true
           }
         ]
-      },
-      dictList: [],
-      dictList2: [],
-      dictList3: [],
-      dictList4: [],
-      dictList5: [],
-      dictList6: [],
-      dictList7: [],
-      dictList8: [],
-      dictList9: [],
-      dictList10: [],
-      dictList11: [],
-      dictList12: [],
-      dictList13: [],
-      dictList14: [],
-      dictList15: []
+      }
     };
   },
   props: {
@@ -733,53 +629,6 @@ export default {
     if (this.detailData.status == 1) {
       this.option.disabled = true;
     }
-    this.getWorkDicts("Salary_allocation_standard").then(res => {
-      this.dictList = res.data.data;
-    });
-    this.getWorkDicts("Level_Allocation_Criteria").then(res => {
-      this.dictList2 = res.data.data;
-    });
-    this.getWorkDicts("Performance_Award_Criteria").then(res => {
-      this.dictList3 = res.data.data;
-    });
-    this.getWorkDicts("School_Age_Wage_Standard").then(res => {
-      this.dictList4 = res.data.data;
-    });
-    this.getWorkDicts("Capital_increase_standard").then(res => {
-      this.dictList5 = res.data.data;
-    });
-    this.getWorkDicts("Educational_qualification_wage_standard").then(res => {
-      this.dictList6 = res.data.data;
-    });
-    this.getWorkDicts("Grade_salary").then(res => {
-      this.dictList7 = res.data.data;
-    });
-    this.getWorkDicts("Wage_base").then(res => {
-      this.dictList8 = res.data.data;
-    });
-    this.getWorkDicts("Workload_Wages").then(res => {
-      this.dictList9 = res.data.data;
-    });
-    this.getWorkDicts("Daily_Assessment_Criteria").then(res => {
-      this.dictList10 = res.data.data;
-    });
-    this.getWorkDicts("Daily_assessment_grade_salary").then(res => {
-      this.dictList11 = res.data.data;
-    });
-    this.getWorkDicts("Term_Performance_Pay").then(res => {
-      this.dictList12 = res.data.data;
-    });
-    this.getWorkDicts("Standards_for_subsidies_for_leading_cadres").then(
-      res => {
-        this.dictList13 = res.data.data;
-      }
-    );
-    this.getWorkDicts("Standard_for_Leader_of_Lesson_Preparation").then(res => {
-      this.dictList14 = res.data.data;
-    });
-    this.getWorkDicts("Standard_for_Teacher-Leader").then(res => {
-      this.dictList15 = res.data.data;
-    });
   },
   methods: {
     cellStyle() {
@@ -804,55 +653,6 @@ export default {
         this.$set(row, "$cellEdit", true);
       }
     },
-    dictChange(row, name) {
-      switch (name) {
-        case "salaryWithdrawalStandard":
-          this.form.salaryWithdrawalStandard = row;
-          break;
-        case "rankWithdrawalStandard":
-          this.form.rankWithdrawalStandard = row;
-          break;
-        case "performanceAward":
-          this.form.performanceAward = row;
-          break;
-        case "schoolAgeSalary":
-          this.form.schoolAgeSalary = row;
-          break;
-        case "capitalIncrease":
-          this.form.capitalIncrease = row;
-          break;
-        case "educationSalary":
-          this.form.educationSalary = row;
-          break;
-        case "rankSalary":
-          this.form.rankSalary = row;
-          break;
-        case "salaryBase":
-          this.form.salaryBase = row;
-          break;
-        case "workloadSalary":
-          this.form.workloadSalary = row;
-          break;
-        case "dailyAssessmentCriteria":
-          this.form.dailyAssessmentCriteria = row;
-          break;
-        case "dailyAssessmentSalary":
-          this.form.dailyAssessmentSalary = row;
-          break;
-        case "termPerformanceSalary":
-          this.form.termPerformanceSalary = row;
-          break;
-        case "leadingCadreSubsidy":
-          this.form.leadingCadreSubsidy = row;
-          break;
-        case "prepareLessons":
-          this.form.prepareLessons = row;
-          break;
-        case "teachingResearch":
-          this.form.teachingResearch = row;
-          break;
-      }
-    },
     rowDel(row, index) {
       this.$confirm("确定删除数据?", {
         confirmButtonText: "确定",
@@ -881,6 +681,22 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
+          const num = addAllsalary(
+            this.form.salaryWithdrawalStandard,
+            this.form.rankWithdrawalStandard,
+            this.form.virtualWorkloadSalary
+          );
+          const num2 = addAllsalary2(
+            this.form.salaryBase,
+            this.form.workloadSalary,
+            this.form.dailyAssessmentCriteria,
+            this.form.termPerformanceSalary
+          );
+          if (num != num2) {
+            return this.$message.error(
+              "拨付金额" + num + "不等于标准金额" + num2
+            );
+          }
           submit({ ...this.form, causeList: this.dataList })
             .then(res => {
               this.$message.success("保存成功");

+ 13 - 4
src/views/basicData/facultyManagement/index.vue

@@ -1,11 +1,10 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container v-show="show" class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
         :data="dataList"
-        :before-open="beforeOpen"
         :page.sync="page"
         :search.sync="search"
         @search-change="searchChange"
@@ -20,6 +19,13 @@
         <template slot="menuLeft">
           <el-button
             type="primary"
+            icon="el-icon-plus"
+            size="small"
+            @click.stop="newAdd()"
+            >新增
+          </el-button>
+          <el-button
+            type="primary"
             size="small"
             icon="el-icon-bottom"
             @click="excelBox = true"
@@ -102,7 +108,7 @@
         </p>
       </el-dialog>
     </basic-container>
-    <details-page v-else @goBack="backToList" :detailData="detailData" />
+    <details-page v-if="!show" @goBack="backToList" :detailData="detailData" />
   </div>
 </template>
 
@@ -133,6 +139,7 @@ export default {
         searchSpan: 8,
         border: true,
         index: true,
+        addBtn: false,
         viewBtn: false,
         editBtn: false,
         delBtn: false,
@@ -415,7 +422,7 @@ export default {
         }=${getToken()}`
       );
     },
-    beforeOpen(row, index) {
+    newAdd() {
       this.show = false;
     },
     uploadAfter(res, done, loading) {
@@ -469,7 +476,9 @@ export default {
     },
     //返回列表
     backToList() {
+      this.detailData = this.$options.data().detailData;
       this.show = true;
+      this.onLoad(this.page, this.search);
     }
   }
 };