소스 검색

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/remuneration into dev

lifanagju_citu 4 달 전
부모
커밋
593f214464

+ 1 - 1
src/api/salary.js

@@ -163,7 +163,7 @@ export function getSalaryFixedEmployeeStatistics (data) {
 
 // 客户分润认领 列表
 export function getCustomerProfitSharingClaim (data) {
-  return http.post('/customer/performance/page', data)
+  return http.post('/customer/performance/customer/page', data)
 }
 
 // 客户分润认领 提交

+ 6 - 1
src/components/AutoComponents/MSearch/index.vue

@@ -20,7 +20,7 @@
           <!-- 输入框 -->
           <el-input
             v-if="item.type === 'input'"
-            v-model="query[item.prop]"
+            v-model.trim="query[item.prop]"
             @keydown.enter.native="onSubmit"
             :clearable="item.options?.clearable ?? true"
             v-bind="item.options"
@@ -101,6 +101,10 @@ export default {
     showResetBtn: {
       type: Boolean,
       default: true
+    },
+    customReset: {
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -129,6 +133,7 @@ export default {
     },
     onReset () {
       this.$refs.form.resetFields()
+      if (this.customReset) return this.$emit('reset', this.query)
       this.$emit('search', this.query)
     }
   }

+ 3 - 0
src/views/salary/claim/index.vue

@@ -47,11 +47,14 @@ export default {
         if (!this.$refs[this.activeName]) {
           return
         }
+        // 员工分润认领必须输入客户编号才能搜索
+        if (this.activeName === 'staff') return
         this.$refs[this.activeName][0].onInit && this.$refs[this.activeName][0].onInit(this.name)
       })
     },
     handleClick () {
       this.$router.push(`${this.$route.path}?name=${this.activeName}`)
+      if (this.activeName === 'staff') return
       this.$nextTick(() => {
         this.$refs[this.activeName][0].onInit && this.$refs[this.activeName][0].onInit(this.name)
       })

+ 114 - 0
src/views/salary/claim/staff/index.vue

@@ -0,0 +1,114 @@
+<template>
+  <div>
+    <m-search class="mb-3" :items="searchItems" v-model="searchValues" :customReset="true" @search="onSearch" @reset="onReset"></m-search>
+    <m-table
+      v-loading="loading"
+      :items="items"
+      :headers="headers"
+      :page-size="pageInfo.size"
+      :page-current="pageInfo.current"
+      :total="total"
+      @page-change="onPageChange"
+    >
+      <template #card-tools>
+        <m-button type="orange" icon="el-icon-plus" @click="onAdd">新增</m-button>
+      </template>
+      <template #actions="{ row }">
+        <m-button type="primary" text @click="onEdit(row)">编辑</m-button>
+      </template>
+    </m-table>
+  </div>
+</template>
+
+<script>
+import { getCustomerProfitSharingClaim } from '@/api/salary'
+export default {
+  name: 'salaryClaimStaff',
+  data () {
+    return {
+      searchItems: [
+        {
+          label: '客户编号',
+          prop: 'customerId',
+          type: 'input',
+          options: {
+            placeholder: '请输入客户编号'
+          }
+        },
+        {
+          label: '科目名称',
+          prop: 'subjectName',
+          type: 'input',
+          options: {
+            placeholder: '请输入科目名称'
+          }
+        }
+      ],
+      searchValues: {
+        subjectName: null,
+        customerId: null
+      },
+      headers: [
+        { label: '客户编号', prop: 'customerId' },
+        { label: '一级科目编码/名称', prop: 'oneLevelSubject' },
+        { label: '二级科目编码/名称', prop: 'twoLevelSubject' },
+        { label: '金额', prop: 'amount' },
+        { label: '统一认证号1', prop: 'unifiedCertificationNumber1' },
+        { label: '统一认证号2', prop: 'unifiedCertificationNumber2' },
+        { label: '数据日期', prop: 'dataDate' },
+        { label: '管户层级标识', prop: 'customerLevelIdentifier' },
+        { label: '客户类别标识', prop: 'customerCategoryIdentifier' },
+        { label: '员工分润比例', prop: 'employeeProfitSharingRatio' },
+        { label: '操作', prop: 'actions', fixed: 'right' }
+      ],
+      items: [],
+      total: 0,
+      pageInfo: {
+        current: 1,
+        size: 10
+      },
+      loading: false
+    }
+  },
+  methods: {
+    async onInit () {
+      this.loading = true
+      try {
+        const { data } = await getCustomerProfitSharingClaim({
+          ...this.pageInfo,
+          ...this.searchValues
+        })
+        this.items = data.records
+        this.total = data.total
+      } catch (error) {
+        this.$message.error(error)
+      } finally {
+        this.loading = false
+      }
+    },
+    onAdd () {
+      this.$refs.templateRefs.open()
+    },
+    onEdit (item) {
+      this.$refs.templateRefs.open(item)
+    },
+    onSearch () {
+      if (!this.searchValues.customerId) return this.$message.warning('请输入要查询的客户编码')
+      this.pageInfo.current = 1
+      this.onInit()
+    },
+    onReset () {
+      this.items = []
+      this.total = 0
+    },
+    onPageChange (index) {
+      this.pageInfo.current = index
+      this.onInit()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  /* 自定义样式 */
+</style>

+ 10 - 2
src/views/system/role/roleData.vue

@@ -133,14 +133,22 @@ export default {
     },
     onCheck ({ showPanel }, treeObj) {
       if (showPanel) {
-        showPanel.props.values = treeObj.checkedNodes.filter(e => !e.children).map(e => e.tag)
+        showPanel.props = {
+          ...showPanel.props,
+          values: treeObj.checkedNodes.filter(e => !e.children).map(e => e.tag)
+        }
+        // showPanel.props.values = treeObj.checkedNodes.filter(e => !e.children).map(e => e.tag)
       }
     },
     onChange (data, e) {
       const tree = data.items.find(_e => _e.value === e)?.tree
       data.showPanel = tree
       if (tree) {
-        tree.props.values = []
+        // tree.props.values = []
+        tree.props = {
+          ...tree.props,
+          values: []
+        }
       }
     }
   }