zhengnaiwen_citu 6 months ago
parent
commit
1175a31b3a

+ 10 - 0
src/api/salary.js

@@ -61,6 +61,16 @@ export function confirmComparisonVersion (data) {
   return http.post('/employee/performance/confirmation/save', data)
   return http.post('/employee/performance/confirmation/save', data)
 }
 }
 
 
+// 薪酬对比 - 方案清单
+export function getComparisonSchemeList (data) {
+  return http.post('/employee/performance/record/scheme/page', data)
+}
+
+// 薪酬对比 - 方案字典
+export function getComparisonSchemeDict (data) {
+  return http.post('/employee/performance/record/scheme/dict', data)
+}
+
 // 工资单 - 分页查询
 // 工资单 - 分页查询
 export function getPayrollPage (data) {
 export function getPayrollPage (data) {
   return http.post('/employee/payroll/page', data)
   return http.post('/employee/payroll/page', data)

+ 0 - 0
src/views/salary/payroll/index.vue → src/views/humanResources/payroll/index.vue


+ 0 - 1
src/views/salary/comparison/salaryEmployeeComparison/index.vue

@@ -6,7 +6,6 @@
           <m-button type="primary" icon="el-icon-upload2" :loading="importLoading">导入手工数据</m-button>
           <m-button type="primary" icon="el-icon-upload2" :loading="importLoading">导入手工数据</m-button>
         </el-upload>
         </el-upload>
         <m-button type="primary" icon="el-icon-download" :loading="downloadLoading" @click="onExport">导出手工数据模板</m-button>
         <m-button type="primary" icon="el-icon-download" :loading="downloadLoading" @click="onExport">导出手工数据模板</m-button>
-        <!-- <m-button type="primary" icon="el-icon-check" :loading="submitLoading" :disable="checked" @click="onSubmit">薪酬对比确认</m-button> -->
       </template>
       </template>
     </m-search>
     </m-search>
     <m-table
     <m-table

+ 116 - 2
src/views/salary/comparison/salaryOptionComparison/index.vue

@@ -1,12 +1,126 @@
 <template>
 <template>
   <div>
   <div>
-
+    <m-search :items="searchItems" v-model="searchValues" class="mb-3" @search="onSearch"></m-search>
+    <m-table
+      :items="items"
+      :headers="headers"
+      :loading="loading"
+      :total="total"
+      :page-size="pageInfo.size"
+      :page-current="pageInfo.current"
+      @page-change="onPageChange"
+    ></m-table>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import { dateFormat } from '@/utils/date'
+import {
+  getComparisonSchemeList,
+  getComparisonSchemeDict
+} from '@/api/salary'
 export default {
 export default {
-  name: 'salary-option-comparison'
+  name: 'salary-option-comparison',
+  data () {
+    return {
+      searchValues: {
+        month: dateFormat('YYYY-mm', new Date()),
+        organizationName: null,
+        employeeName: null
+      },
+      headers: [
+        { type: 'expand', prop: 'expand' },
+        { label: '机构', prop: 'organizationName' },
+        { label: '姓名', prop: 'employeeName' },
+        { label: '统一认证号', prop: 'unifiedCertificationNumber' },
+        { label: '月份', prop: 'month' }
+        // { label: '操作', prop: 'action', align: 'center', width: 100 }
+      ],
+      items: [
+      ],
+      loading: false,
+      total: 0,
+      pageInfo: {
+        current: 1,
+        size: 10
+      },
+      selectLoading: false,
+      selectItems: []
+    }
+  },
+  computed: {
+    searchItems () {
+      return [
+        {
+          label: '月份',
+          prop: 'month',
+          type: 'datePicker',
+          option: {
+            editable: false,
+            clearable: false,
+            placeholder: '请选择月份',
+            type: 'month',
+            valueFormat: 'yyyy-MM',
+            format: 'yyyy 年 MM 月'
+          }
+        },
+        {
+          label: '方案',
+          prop: 'versions',
+          type: 'autocomplete',
+          option: {
+            placeholder: '请选择方案',
+            multiple: true,
+            filterable: true,
+            remote: true,
+            labelText: 'employeeName',
+            labelValue: 'personnelCode',
+            remoteMethod: this.remoteMethod,
+            valueKey: 'personnelCode',
+            defaultFirstOption: true,
+            loading: this.selectLoading,
+            items: this.selectItems
+          }
+        }
+      ]
+    }
+  },
+  methods: {
+    async onInit () {
+      try {
+        const { data } = await getComparisonSchemeList({
+          month: this.searchValues.month
+
+        })
+        console.log(data)
+      } catch (error) {
+        this.$message.error(error)
+      }
+    },
+    onSearch () {
+      this.pageInfo.current = 1
+      this.onInit()
+    },
+    onPageChange (index) {
+      this.pageInfo.current = index
+      this.onInit()
+    },
+    async remoteMethod (version) {
+      this.selectLoading = true
+      try {
+        const { data } = await getComparisonSchemeDict({
+          version,
+          month: this.searchValues.month
+        })
+        this.selectItems = data.records
+      } catch (error) {
+        this.selectItems = []
+        this.$message.error(error)
+      } finally {
+        this.selectLoading = false
+      }
+    }
+  }
 }
 }
 </script>
 </script>