Kaynağa Gözat

规则配置

zhengnaiwen_citu 5 ay önce
ebeveyn
işleme
95c8464e8b

+ 5 - 0
src/api/system.js

@@ -232,3 +232,8 @@ export function deleteWebSetting (params) {
 export function fileUpload (params) {
   return http.upload('/file/upload', params)
 }
+
+// 钻取接口
+export function drilling (params) {
+  return http.post('/drilling/detail ', params)
+}

+ 10 - 0
src/views/humanResources/accumulatePoints/accumulatePointsApply/index.vue

@@ -11,8 +11,15 @@
       @page-change="onPageChange"
     >
       <template #card-tools>
+        <!-- 当前总积分:
+        <el-tag>985</el-tag> -->
         <m-button type="orange" icon="el-icon-plus" @click="onAdd">申报</m-button>
       </template>
+      <!-- <template #actions="{ row }">
+        <m-button text type="primary" @click="onDetails(row)">查看明细</m-button>
+        <m-button text type="danger" @click="onApply(row)">重新申报</m-button>
+        <m-button text type="danger" @click="onDelete(row)">作废</m-button>
+      </template> -->
     </m-table>
     <AccumulatePointsApplyEdit ref="accumulatePointsApplyEditRefs" @refresh="onInit"></AccumulatePointsApplyEdit>
   </div>
@@ -49,7 +56,9 @@ export default {
         { label: '员工姓名', prop: 'employeeName' },
         { label: '机构', prop: 'organizationName' },
         { label: '总积分', prop: 'score' },
+        // { label: '状态', prop: 'status' },
         { label: '创建时间', prop: 'createDate' }
+        // { label: '操作', prop: 'actions' }
       ],
       items: [],
       total: 0,
@@ -98,6 +107,7 @@ export default {
         })
         .catch(_ => {})
     },
+    onDetails (item) {},
     onSearch () {
       this.pageInfo.current = 1
       this.onInit()

+ 94 - 0
src/views/humanResources/payroll/PayrollDrill.vue

@@ -0,0 +1,94 @@
+<template>
+  <m-dialog title="绩效明细" ref="dialog">
+    <el-breadcrumb separator="/">
+      <el-breadcrumb-item
+        v-for="type in parentDetailType"
+        :key="type.value"
+      >{{ type.label }}</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-empty v-if="headers.length === 0"></el-empty>
+    <template v-else>
+      <m-table
+        shadow="never"
+        clearHeader
+        :headers="headers"
+        :items="items"
+        :loading="loading"
+      >
+        <template
+          v-for="header in headers"
+          #[header.prop]="{ row }"
+        >
+          <span
+            :class="{ 'text-link': header.existsDetail }"
+            :key="header.prop"
+            @click="header.existsDetail && onRender(row, header)"
+          >{{ row[header.prop] }}</span>
+        </template>
+      </m-table>
+    </template>
+  </m-dialog>
+</template>
+
+<script>
+import {
+  drilling
+} from '@/api/system'
+export default {
+  name: 'PayrollDrill',
+  data () {
+    return {
+      loading: false,
+      items: [],
+      headers: [],
+      parentDetailType: []
+    }
+  },
+  methods: {
+    async open (item) {
+      this.$refs.dialog.open()
+      this.parentDetailType = [{
+        label: '上级员工薪资绩效钻取',
+        value: '上级员工薪资绩效钻取'
+      }]
+      this.onRender(
+        { employeeCode: '201500008' },
+        { detailType: '员工薪资绩效钻取' }
+      )
+    },
+    async onRender (item, header) {
+      this.loading = true
+      try {
+        const { data } = await drilling({
+          parentDetailType: this.parentDetailType.at(-1).value,
+          detailType: header.detailType,
+          entity: item,
+          page: {
+            size: 9999
+          }
+        })
+        this.parentDetailType.push({
+          label: header.detailType,
+          value: header.detailType
+        })
+        this.headers = data.columns.map(e => {
+          return {
+            label: e.title,
+            prop: e.column,
+            ...e
+          }
+        })
+        this.items = data.page.records
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 12 - 0
src/views/humanResources/payroll/index.vue

@@ -11,14 +11,19 @@
       :page-current="pageInfo.current"
       @page-change="onPageChange"
     >
+      <template #meritPay="{row}">
+        <span class="text-link" @click="onDrill(row)">{{ row.meritPay }}</span>
+      </template>
       <template #card-tools>
         <m-button v-if="!$attrs.panorama" type="orange" icon="el-icon-download" size="small" :loading="exportLoading" @click="onExport">导出报表</m-button>
       </template>
     </m-table>
+    <PayrollDrill ref="payrollDrillRefs"></PayrollDrill>
   </div>
 </template>
 
 <script>
+import PayrollDrill from './PayrollDrill.vue'
 import {
   getPayrollPage,
   downloadPayroll
@@ -27,8 +32,12 @@ import { downloadFile } from '@/utils'
 import {
   PAYROLL_HEADER
 } from '@/utils/panorama'
+// import { drilling } from '@/api/system'
 export default {
   name: 'salary-payroll',
+  components: {
+    PayrollDrill
+  },
   data () {
     return {
       exportLoading: false,
@@ -130,6 +139,9 @@ export default {
     onDetail (item) {
       this.$refs.payrollDetailsRefs.open(item)
     },
+    onDrill (item) {
+      this.$refs.payrollDrillRefs.open(item)
+    },
     async onExport () {
       try {
         this.exportLoading = true

+ 1 - 1
src/views/salary/solution/salarySolution/salarySolutionEdit.vue

@@ -171,7 +171,7 @@ export default {
               performanceSolutionId: this.itemData.entity?.performanceSolutionId,
               ...this.formQuery
             },
-            calculateConfigurations: this.itemData.calculateConfigurations ?? []
+            performanceSolutionDetailRespCategoryVos: this.itemData.performanceSolutionDetailRespCategoryVos
           }
           try {
             await saveSolution(query)

+ 38 - 64
src/views/salary/solution/salarySolution/salarySolutionRulesEdit.vue

@@ -38,6 +38,8 @@
                 size="small"
                 v-model="formQuery.items[scope.$index].value"
                 placeholder="参数名称"
+                :min="0"
+                :step="0.1"
               ></el-input-number>
             </el-form-item>
           </template>
@@ -55,47 +57,12 @@
             :mode="mode"
         />
         <Editor
-            style="height: 150px; overflow-y: hidden;"
+            style="height: 250px; overflow-y: hidden;"
             v-model="formulaData"
             :defaultConfig="editorConfig"
             :mode="mode"
             @onCreated="onCreated"
         />
-          <!-- <el-tree
-            :data="formulaData"
-            node-key="uuid"
-            ref="formulaTreeRefs"
-            default-expand-all
-            :expand-on-click-node="false"
-          >
-            <div class="custom-tree-node" slot-scope="{ data, node }">
-              <el-input size="small" v-model="data.content" style="width: 300px" placeholder="描述文字"></el-input>
-              <template v-if="node.level > 6">
-                <el-dropdown @command="e => onCommon(e, data)">
-                  <m-button size="small" class="ml-3">
-                    查看更多
-                  </m-button>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item
-                      v-for="(item, index) in btnList"
-                      :key="item.label"
-                      :command="index"
-                    >{{ item.label }}</el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </template>
-              <template v-else>
-                <el-button
-                  v-for="item in btnList"
-                  :key="item.label"
-                  class="ml-3"
-                  size="small"
-                  @click="item.click(data)">
-                  {{ item.label }}
-                </el-button>
-              </template>
-            </div>
-          </el-tree> -->
         </m-card>
       </el-form-item>
 
@@ -133,16 +100,16 @@ export default {
       mode: 'default', // or 'simple'
       formQuery: {
         items: []
-      },
+      }
       // formulaData: [{
       //   uuid: '1',
       //   content: null
       // }],
-      btnList: [
-        { label: '同级追加', click: this.onInsertAfter },
-        { label: '插入下一级', click: this.onAppend },
-        { label: '删除', click: this.onRemove }
-      ]
+      // btnList: [
+      //   { label: '同级追加', click: this.onInsertAfter },
+      //   { label: '插入下一级', click: this.onAppend },
+      //   { label: '删除', click: this.onRemove }
+      // ]
     }
   },
   beforeDestroy () {
@@ -162,26 +129,26 @@ export default {
         this.formQuery.items.splice(scope.$index, 1)
       }).catch(_ => {})
     },
-    onRemove (data) {
-      this.$confirm('确定要删除吗?', '提示').then(e => {
-        this.$refs.formulaTreeRefs.remove(data)
-      }).catch(_ => {})
-    },
-    onInsertAfter (data) {
-      this.$refs.formulaTreeRefs.insertAfter({
-        uuid: Date.now(),
-        content: null
-      }, data)
-    },
-    onAppend (data) {
-      this.$refs.formulaTreeRefs.append({
-        uuid: Date.now(),
-        content: null
-      }, data)
-    },
-    onCommon (index, data) {
-      this.btnList[index].click(data)
-    },
+    // onRemove (data) {
+    //   this.$confirm('确定要删除吗?', '提示').then(e => {
+    //     this.$refs.formulaTreeRefs.remove(data)
+    //   }).catch(_ => {})
+    // },
+    // onInsertAfter (data) {
+    //   this.$refs.formulaTreeRefs.insertAfter({
+    //     uuid: Date.now(),
+    //     content: null
+    //   }, data)
+    // },
+    // onAppend (data) {
+    //   this.$refs.formulaTreeRefs.append({
+    //     uuid: Date.now(),
+    //     content: null
+    //   }, data)
+    // },
+    // onCommon (index, data) {
+    //   this.btnList[index].click(data)
+    // },
     valid () {
       return new Promise((resolve, reject) => {
         this.$refs.form.validate(valid => {
@@ -204,7 +171,9 @@ export default {
           value: e.value
         }
       })
-      this.formulaData = data.calculateFormulas
+      this.$nextTick(() => {
+        this.formulaData = data.calculateFormulas.length ? data.calculateFormulas[0].content : ''
+      })
     },
     getValue () {
       // const calculateFormulas = removeUuidFromArrayTree(this.formulaData)
@@ -229,7 +198,12 @@ export default {
             value: e.value
           }
         }),
-        calculateFormula: this.formulaData
+        calculateFormulas: [
+          {
+            category: this.item.title,
+            content: this.formulaData
+          }
+        ]
       }
     }
   }