Browse Source

团队功能

wucl 2 năm trước cách đây
mục cha
commit
cc32462ad5

+ 20 - 0
src/api/modules/postCultivate.js

@@ -0,0 +1,20 @@
+import request from '@/utils/request'
+import { fileDown } from '../../utils/file'
+import md5 from 'js-md5'
+/*
+* 岗位培育关系
+*/
+export default {
+  list(params) {
+    return request.get(`postCultivate`, { params: params })
+  },
+  add(params) {
+    return request.post(`postCultivate`, params)
+  },
+  edit(params) {
+    return request.put(`postCultivate`, params)
+  },
+   delete(params) {
+     return request.delete(`postCultivate/${params}`)
+   },
+}

+ 26 - 0
src/api/modules/team.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+import { fileDown } from '../../utils/file'
+import md5 from 'js-md5'
+/*
+* 团队
+*/
+export default {
+  list(params) {
+    return request.get(`team`, { params: params })
+  },
+  detail(params) {
+    return request.get(`team/${params}`)
+  },
+  simpleAll() {
+    return request.get(`team/simpleAll`)
+  },
+  add(params) {
+    return request.post(`team`, params)
+  },
+  edit(params) {
+    return request.put(`team`, params)
+  },
+   delete(params) {
+     return request.delete(`team/${params}`)
+   },
+}

+ 2 - 0
src/router/urlMap.js

@@ -57,6 +57,7 @@ import _views_brokerage_detail from '@/views/brokerage/detail'
 import _views_brokerage_settle from '@/views/brokerage/sequence'
 import _views_brokerage_settle_detail from '@/views/brokerage/sequenceDetail'
 import _views_brokerage_deduction from '@/views/brokerage/deduction'
+import _views_market_team from '@/views/market/team/list'
 export default {
   _views_set_menu,
   _view_department,
@@ -102,4 +103,5 @@ export default {
   _views_brokerage_settle,
   _views_brokerage_settle_detail,
   _views_brokerage_deduction,
+  _views_market_team
 }

+ 2 - 2
src/views/brokerage/detail.vue

@@ -96,12 +96,12 @@
             <span>{{ row.aheadAmount}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="预计提成金额(元)" align="center" width="160">
+        <el-table-column label="预计提成金额(元)" align="center" width="160">
           <template slot-scope="{row}">
             <span>{{ row.predictAmount}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="实际提成金额(元)" align="center" width="150">
+        <el-table-column label="实际提成金额(元)" align="center" width="150">
           <template slot-scope="{row}">
             <span>{{row.actualAmount}}</span>
           </template>

+ 2 - 5
src/views/market/index.vue

@@ -211,13 +211,10 @@
       toPaymentPage(val) {
         const date = new Date();
         if (val === 'year'){
-          const curYear = date.getFullYear();
-          this.$router.push(`/market/payment/list?year=${curYear}`)
+          this.$router.push(`/market/payment/list?isCurYear=true`)
         }
         if (val === 'month'){
-          const curYear = date.getFullYear();
-          const curMonth = date.getMonth() +1;
-          this.$router.push(`/market/payment/list?year=${curYear}&month=${curMonth}`)
+          this.$router.push(`/market/payment/list?isCurMonth=true`)
         }
       },
       saveSet(){

+ 6 - 0
src/views/market/payment/detailList.vue

@@ -117,6 +117,12 @@
       if (this.$route.query.month) {
         this.listQuery.month = this.$route.query.month;
       }
+      if (this.$route.query.isCurYear) {
+        this.listQuery.isCurYear = this.$route.query.isCurYear;
+      }
+      if (this.$route.query.isCurMonth) {
+        this.listQuery.isCurMonth = this.$route.query.isCurMonth;
+      }
       this.getList();
     },
     methods: {

+ 329 - 0
src/views/market/team/list.vue

@@ -0,0 +1,329 @@
+<template>
+  <div class="app-container">
+    <div class="title-container">
+      <breadcrumb id="breadcrumb-container" class="breadcrumb-container"/>
+    </div>
+    <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
+      <template slot="left">
+        <el-button
+          class-name="filter-item"
+          type="primary"
+          size="mini"
+          round
+          style="float: left"
+        >创建团队</el-button>
+      </template>
+      <parentTable
+        v-loading="listLoading"
+        :data="pageData.records"
+        slot="table"
+        style="width: 100%;"
+      >
+        <el-table-column type="expand">
+          <template slot-scope="{row}">
+            <parentTable style="font-size: 5px;color: #8c939d" v-loading="listLoading" inline :data="row.members">
+              <el-table-column label="组员名称" align="center">
+                <template slot-scope="{row}">
+                  <span>{{ row.memberName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="组员岗位" align="center">
+                <template slot-scope="{row}">
+                  <span>{{ row.memberPost}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="加入时间" align="center">
+                <template slot-scope="{row}">
+                  <span>{{ row.created }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="{row}">
+                  <el-button
+                    class-name="filter-item"
+                    name=""
+                    type="primary"
+                    round
+                    size="mini"
+                  >添加组员</el-button>
+                  <el-button
+                    class-name="filter-item"
+                    name=""
+                    type="danger"
+                    round
+                    size="mini"
+                  >移除组员</el-button>
+                </template>
+              </el-table-column>
+            </parentTable>
+          </template>
+        </el-table-column>
+        <el-table-column label="团队名称" align="center" width="220">
+          <template slot-scope="{row}">
+            <span>{{ row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="营销主管" align="center" width="220">
+          <template slot-scope="{row}">
+            <span>{{ row.supervisorName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="上级领导" align="center" width="220">
+          <template slot-scope="{row}">
+            <span>{{ row.cultivateName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="领导岗位" align="center" width="220">
+          <template slot-scope="{row}">
+            <span>{{ row.cultivatePost }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建时间" align="center" width="220">
+          <template slot-scope="{row}">
+            <span>{{ row.created }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center">
+          <template slot-scope="{row}">
+            <el-button
+              class-name="filter-item"
+              name=""
+              type="danger"
+              round
+              size="mini"
+            >解散团队</el-button>
+          </template>
+        </el-table-column>
+      </parentTable>
+    </y-page-list-layout>
+
+<!--      <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">-->
+<!--        <el-tab-pane label="创建团队" name="first">-->
+<!--          <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">-->
+<!--            <template slot="left">-->
+<!--              <el-button-->
+<!--                class="filter-item"-->
+<!--                style="margin-left: 10px;float: left;"-->
+<!--                type="primary"-->
+<!--                @click="searchList"-->
+<!--                round-->
+<!--              >搜索-->
+<!--              </el-button>-->
+<!--              <el-button-->
+<!--                class="filter-item"-->
+<!--                style="float: left;"-->
+<!--                round-->
+<!--                type="warning"-->
+<!--                @click="resetSearch()"-->
+<!--              >重置-->
+<!--              </el-button>-->
+<!--            </template>-->
+<!--            <parentTable-->
+<!--              v-loading="listLoading"-->
+<!--              :data="pageData.records"-->
+<!--              slot="table"-->
+<!--              style="width: 100%;"-->
+<!--            >-->
+<!--              <el-table-column label="组员姓名" align="center" width="220">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  <span>{{ row.userName }}</span>-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--              <el-table-column label="组员岗位" align="center" width="220">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  <span>{{ row.userPostName }}</span>-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--              <el-table-column label="上级组员" align="center" width="220">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  <span>{{ row.parentUserName }}</span>-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--              <el-table-column label="上级组员岗位" align="center" width="220">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  <span>{{ row.parentUserPostName }}</span>-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--              <el-table-column label="团队别名" align="center" width="220">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  <span>{{ row.alias }}</span>-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--              <el-table-column label="创建时间" align="center" width="220">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  <span>{{ row.created }}</span>-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--              <el-table-column label="操作" align="center" fixed="right">-->
+<!--                <template slot-scope="{row}">-->
+<!--                  &lt;!&ndash;            <PermissionButton&ndash;&gt;-->
+<!--                  &lt;!&ndash;              menu-code="_views_market_customer_detail"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              class-name="filter-item"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              name=""&ndash;&gt;-->
+<!--                  &lt;!&ndash;              type="primary"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              :page-jump="true"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              :page-query="{id: row.id,listQuery:listQuery}"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              round&ndash;&gt;-->
+<!--                  &lt;!&ndash;              size="mini"&ndash;&gt;-->
+<!--                  &lt;!&ndash;            />&ndash;&gt;-->
+<!--                  &lt;!&ndash;            <PermissionButton&ndash;&gt;-->
+<!--                  &lt;!&ndash;              menu-code="_views_market_customer_remove"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              class-name="filter-item"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              name=""&ndash;&gt;-->
+<!--                  &lt;!&ndash;              type="danger"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              round&ndash;&gt;-->
+<!--                  &lt;!&ndash;              size="mini"&ndash;&gt;-->
+<!--                  &lt;!&ndash;              @click="deleteInfo(row.id)"&ndash;&gt;-->
+<!--                  &lt;!&ndash;            />&ndash;&gt;-->
+<!--                </template>-->
+<!--              </el-table-column>-->
+<!--            </parentTable>-->
+<!--          </y-page-list-layout>-->
+<!--        </el-tab-pane>>-->
+<!--      </el-tabs>-->
+  </div>
+</template>
+<script>
+  import YPageListLayout from '@/components/YPageListLayout'
+  import Breadcrumb from '@/components/Breadcrumb'
+  import PermissionButton from '@/components/PermissionButton/PermissionButton'
+
+  export default {
+    name: 'ViewsMarketTeamList',
+    components: {
+      Breadcrumb,
+      YPageListLayout,
+      PermissionButton,
+    },
+    filters: {
+      statusFilter(status) {
+        const statusMap = {
+          published: 'success',
+          draft: 'info',
+          deleted: 'danger',
+        }
+        return statusMap[status]
+      },
+    },
+    data() {
+      return {
+        activeName: 'first',
+        tableKey: 0,
+        pageData: { records: [] },
+        total: 20,
+        listLoading: true,
+        listQuery: {
+          page: 1,
+          size: 10,
+          descs: 'id',
+          departmentName:'市场部'
+        },
+      }
+    },
+    created() {
+      const that = this;
+      if (that.$route.query.current && !isNaN(that.$route.query.current)) {
+        that.listQuery.current = parseInt(that.$route.query.current);
+      }
+      that.getList();
+    },
+    methods: {
+      resetSearch() {
+        this.$router.push({ query: {} });
+        this.listQuery = {
+          current: 1,
+          size: 10,
+          descs: 'id',
+        }
+        this.getList()
+      },
+      removeHandle(row) {
+        // console.log(data)
+        const that = this
+        that
+          .$confirm('确认删除当前记录吗?', '警告', {
+            confirmButtonText: '确认',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(async () => {
+            this.$api.customer.delete(row.id).then((res) => {
+              if (res.code === 200) {
+                this.$message({
+                  type: 'success',
+                  message: '删除成功',
+                })
+                this.getList()
+              }
+            })
+          })
+          .catch((err) => {
+            console.error(err)
+          })
+      },
+      searchList() {
+        // 重置分页
+        this.listQuery.page = 1
+        this.listQuery.size = 10
+        this.getList()
+      },
+      getList() {
+        const that = this
+        this.listLoading = true
+        // console.log(that.listQuery)
+        const key = {}
+        key[this.listQueryKey] = this.listQuery.description
+        this.$api.team
+          .list(Object.assign({}, that.listQuery, key))
+          .then((res) => {
+            that.pageData = res.data
+            setTimeout(() => {
+              that.listLoading = false
+            }, 200)
+          })
+          .catch(() => {
+            that.listLoading = false
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .right {
+    flex: 1;
+
+    .title {
+      font-size: 16px;
+      font-weight: 500;
+      color: rgba(51, 51, 51, 1);
+      line-height: 35px;
+      margin-bottom: 8px;
+    }
+
+    .menu-2-box {
+      display: flex;
+      flex-wrap: wrap;
+      width: 100%;
+    }
+
+    .menu-2-item {
+      display: flex;
+      align-items: center;
+      color: #656565;
+      font-size: 12px;
+      width: 230px;
+      height: 101px;
+      background: rgb(255, 185, 129);
+      border-radius: 3px;
+      padding-left: 20px;
+      margin-right: 10px;
+      margin-bottom: 10px;
+      cursor: pointer;
+      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
+
+      .text {
+        margin-left: 16px;
+      }
+    }
+  }
+</style>

+ 0 - 118
src/views/set/brokerage.vue

@@ -223,70 +223,6 @@
             </el-table>
           </y-page-list-layout>
         </el-tab-pane>
-        <el-tab-pane label="配置项">
-          <el-form ref="postForm" :model="globalConfigs" class="form-container">
-            <div class="createPost-main-container">
-              <div class="postInfo-container">
-                <div style="margin-bottom: 30px">
-                  <h3 class="title">
-                    <div class="avatar-wrapper icon-title">配</div>
-                    <div class="icon-info">配置项</div>
-                  </h3>
-                </div>
-                <el-row>
-                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                    <el-form-item
-                      label="土规部市场人员提成比例:"
-                      label-width="250px"
-                      :rules="{required: true, message: '必填', trigger: 'blur'}"
-                      class="postInfo-container-item"
-                    >
-                      <el-input v-model="globalConfigs.marketerBrokeragePercentage.value" class="filter-item" @blur="doSave(globalConfigs.marketerBrokeragePercentage)">
-                        <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">%</i>
-                      </el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                    <el-form-item
-                      label="土规部参与项目整体提成比例:"
-                      label-width="250px"
-                      :rules="{required: true, message: '必填', trigger: 'blur'}"
-                      class="postInfo-container-item"
-                    >
-                      <el-input v-model="globalConfigs.participantBrokeragePercentage.value" class="filter-item" @blur="doSave(globalConfigs.participantBrokeragePercentage)">
-                        <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">%</i>
-                      </el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                    <el-form-item
-                      label="土规部非市场人员每月默认预提金额:"
-                      label-width="300px"
-                      :rules="{required: true, message: '必填', trigger: 'blur'}"
-                      class="postInfo-container-item"
-                    >
-                      <el-input v-model="globalConfigs.nonMarketerMonthBrokerage.value" class="filter-item" @blur="doSave(globalConfigs.nonMarketerMonthBrokerage)">
-                        <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">¥</i>
-                      </el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                    <el-form-item
-                      label="系统自定义一年月份个数:"
-                      label-width="250px"
-                      :rules="{required: true, message: '必填', trigger: 'blur'}"
-                      class="postInfo-container-item"
-                    >
-                      <el-input v-model="globalConfigs.monthOfYear.value" class="filter-item" @blur="doSave(globalConfigs.monthOfYear)">
-                        <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">个</i>
-                      </el-input>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </div>
-            </div>
-          </el-form>
-        </el-tab-pane>
       </el-tabs>
     </el-form>
   </div>
@@ -319,24 +255,6 @@
         marketerRatioRecord: {},
         baseAmount:{},
         itemPageData: {},
-        globalConfigs:{
-          marketerBrokeragePercentage:{
-            id:null,
-            value:null
-          },
-          participantBrokeragePercentage:{
-            id:null,
-            value:null
-          },
-          nonMarketerMonthBrokerage:{
-            id:null,
-            value:null
-          },
-          monthOfYear:{
-            id:null,
-            value:null
-          },
-        },
         postRatioRecord:{ records: [] },
         listLoading: true,
         listQuery1: {
@@ -410,30 +328,6 @@
         }).catch(() => {
         });
       },
-      doSave(config) {
-        if (!config.value) {
-          this.$notify({
-            title: '错误',
-            message: '不能配置为空',
-            type: 'error',
-            duration: 2000
-          });
-          return
-        }
-        this.$api.globalConfig.edit(config).then(res => {
-          if (res.code === 200) {
-            this.$notify({
-              title: '成功',
-              message: '修改成功',
-              type: 'success',
-              duration: 2000
-            })
-          }
-          this.getGlobalConfig();
-        }).catch(() => {
-          this.listLoading = false
-        });
-      },
       getBaseAmount(){
         const that = this;
         this.listLoading = true;
@@ -485,18 +379,6 @@
           that.listLoading = false
         });
       },
-      getGlobalConfig(){
-        const that = this;
-        this.listLoading = true;
-        this.$api.globalConfig.getByKey("FINANCE").then(res => {
-          that.globalConfigs = res.data;
-          setTimeout(() => {
-            that.listLoading = false
-          }, 200)
-        }).catch(() => {
-          that.listLoading = false
-        });
-      },
       resetTemp() {
         this.temp = {
           code: '',