wucl 2 anni fa
parent
commit
473fd3361c

+ 24 - 0
src/api/modules/dictData.js

@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+/*
+* 字典数据
+*/
+export default {
+  list(params) {
+    return request.get(`dictData`, { params: params })
+  },
+  detail(params) {
+    return request.get(`dictData/${params}`)
+  },
+  add(params) {
+    return request.post(`dictData`, params)
+  },
+  edit(params) {
+    return request.put(`dictData`, params)
+  },
+  delete(params) {
+    return request.delete(`dictData/${params}`)
+  },
+  simpleType(params){
+    return request.get(`dictData/simple/${params}`)
+  }
+}

+ 21 - 0
src/api/modules/itemBrokerageGeneral.js

@@ -0,0 +1,21 @@
+import request from '@/utils/request'
+/*
+* 项目提成总表
+*/
+export default {
+  list(params) {
+    return request.get(`itemBrokerageGeneral`, { params: params })
+  },
+  detail(params) {
+    return request.get(`itemBrokerageGeneral/${params}`)
+  },
+  add(params) {
+    return request.post(`itemBrokerageGeneral`, params)
+  },
+  edit(params) {
+    return request.put(`itemBrokerageGeneral`, params)
+  },
+  delete(params) {
+    return request.delete(`itemBrokerageGeneral/${params}`)
+  },
+}

+ 24 - 0
src/api/modules/itemEvaluate.js

@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+/*
+* 项目评价
+*/
+export default {
+  list(params) {
+    return request.get(`itemEvaluate`, { params: params })
+  },
+  detail(params) {
+    return request.get(`itemEvaluate/${params}`)
+  },
+  add(params) {
+    return request.post(`itemEvaluate`, params)
+  },
+  edit(params) {
+    return request.put(`itemEvaluate`, params)
+  },
+  delete(params) {
+    return request.delete(`itemEvaluate/${params}`)
+  },
+  detailByItemId(params) {
+    return request.get(`itemEvaluate/itemId/${params}`)
+  },
+}

+ 3 - 0
src/api/modules/itemStage.js

@@ -26,5 +26,8 @@ export default {
   },
   stageList(params){
     return request.get(`itemStage/list`, {params:params})
+  },
+  confirm(params){
+    return request.get(`itemStage/confirm`, {params:params})
   }
 }

+ 5 - 1
src/router/urlMap.js

@@ -50,6 +50,8 @@ import _views_market_log_list from '@/views/market/log/list'
 import _views_market_log_collect from '@/views/market/log/rateCollect'
 import _views_operation_log from '@/views/set/operationLog'
 import _views_set_brokerage from '@/views/set/brokerage'
+import _views_item_plan_list from '@/views/item/planList'
+import _views_brokerage_ahead from '@/views/brokerage/ahead'
 export default {
   _views_set_menu,
   _view_department,
@@ -87,5 +89,7 @@ export default {
   _views_market_log_list,
   _views_market_log_collect,
   _views_operation_log,
-  _views_set_brokerage
+  _views_set_brokerage,
+  _views_item_plan_list,
+  _views_brokerage_ahead,
 }

+ 185 - 0
src/views/brokerage/ahead.vue

@@ -0,0 +1,185 @@
+<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">
+      <parentTable
+        v-loading="listLoading"
+        :data="pageData.records"
+        slot="table"
+        style="width: 100%;"
+      >
+        <el-table-column label="项目名称" align="center" width="250">
+          <template slot-scope="{row}">
+            <span>{{ row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="事业部流水号" align="center" width="135">
+          <template slot-scope="{row}">
+            <span>{{ row.businessNo }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目编号" align="center" width="180">
+          <template slot-scope="{row}">
+            <span>{{row.belongTo}}{{ row.oaNo }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目类型" align="center" width="130">
+          <template slot-scope="{row}">
+            <span>{{ row.cateName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="业务来源" align="center" width="130">
+          <template slot-scope="{row}">
+            <span>{{ row.businessSourceName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="委托单位" align="center" width="130">
+          <template slot-scope="{row}">
+            <span>{{ row.clientUnit}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="客户名字" align="center" width="130">
+          <template slot-scope="{row}">
+            <span>{{ row.clientName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="合同金额" align="center" width="100">
+          <template slot-scope="{row}">
+            <span>{{ row.amount}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="客户经理" align="center" width="100">
+          <template slot-scope="{row}">
+            <span>{{ row.clientManager}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="客户经理提成金额" align="center" width="150">
+          <template slot-scope="{row}">
+            <span>{{ row.marketerBrokerageAmount}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="客户经理提成率" align="center" width="150">
+          <template slot-scope="{row}">
+            <span>{{ row.brokerageRate}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="是否预提" align="center" >
+          <template slot-scope="{row}">
+            <el-switch
+              style="display: block;height: 40px"
+              v-model= row.marketerAdvanceBrokerageAble
+              active-color="#13ce66"
+              inactive-color="#ff4949"
+              active-text="可预提"
+              inactive-text="不可预提"
+            >
+            </el-switch>
+          </template>
+        </el-table-column>
+      </parentTable>
+    </y-page-list-layout>
+  </div>
+</template>
+<script>
+  import YPageListLayout from '@/components/YPageListLayout'
+  import Breadcrumb from '@/components/Breadcrumb'
+  import PermissionButton from '@/components/PermissionButton/PermissionButton'
+  import { fileDown } from '../../utils/file'
+
+  export default {
+    name: 'ViewsBrokerageAhead',
+    components: {
+      Breadcrumb,
+      YPageListLayout,
+      PermissionButton,
+    },
+    filters: {
+      statusFilter(status) {
+        const statusMap = {
+          published: 'success',
+          draft: 'info',
+          deleted: 'danger',
+        }
+        return statusMap[status]
+      },
+    },
+    data() {
+      return {
+        isDisable:false,
+        tableKey: 0,
+        pageData: { records: [] },
+        total: 20,
+        listLoading: true,
+        listQuery: {
+          page: 1,
+          size: 10,
+          descs: 'id',
+          state:null
+        },
+        listQueryKey: 'keyword',
+        importLoading: false,
+      }
+    },
+    created() {
+      this.getList()
+    },
+    methods: {
+      getList() {
+        const that = this;
+        this.listLoading = true;
+        const key = {};
+        this.$api.itemBrokerageGeneral.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>

+ 17 - 27
src/views/item/detail.vue

@@ -90,27 +90,7 @@
                           class="filter-item"
                           style=" width: 100%"
                         >
-                          <el-option key="1" label="测绘" value="测绘"/>
-                          <el-option key="2" label="航飞" value="航飞"/>
-                          <el-option key="3" label="公示地价" value="公示地价"/>
-                          <el-option key="4" label="宗地评估" value="宗地评估"/>
-                          <el-option key="5" label="资产评估" value="资产评估"/>
-                          <el-option key="6" label="亩均论英雄" value="亩均论英雄"/>
-                          <el-option key="7" label="社会稳定性风险评价" value="社会稳定性风险评价"/>
-                          <el-option key="8" label="节地评价" value="节地评价"/>
-                          <el-option key="9" label="选址论证" value="选址论证"/>
-                          <el-option key="10" label="踏勘论证" value="踏勘论证"/>
-                          <el-option key="11" label="土地复垦" value="土地复垦"/>
-                          <el-option key="12" label="国土空间规划" value="国土空间规划"/>
-                          <el-option key="13" label="自然资源资产清查信号收集" value="自然资源资产清查信号收集"/>
-                          <el-option key="14" label="成片开发" value="成片开发"/>
-                          <el-option key="15" label="增减挂钩" value="增减挂钩"/>
-                          <el-option key="16" label="司法评估" value="司法评估"/>
-                          <el-option key="17" label="房地产评估" value="房地产评估"/>
-                          <el-option key="18" label="规划计划类" value="规划计划类"/>
-                          <el-option key="19" label="地灾评估" value="地灾评估"/>
-                          <el-option key="20" label="用地调查" value="用地调查"/>
-                          <el-option key="21" label="用地报件" value="用地报件"/>
+                          <el-option v-for="item in cateList" :key="item.id" :label="item.name" :value="item.id"/>
                         </el-select>
                       </el-form-item>
                     </el-col>
@@ -132,8 +112,6 @@
                         <el-select v-show="false" v-model="postForm.clientName" />
                       </el-form-item>
                     </el-col>
-
-
                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
                       <el-form-item
                         label="委托单位:"
@@ -182,9 +160,7 @@
                           class="filter-item"
                           style=" width: 100%"
                         >
-                          <el-option key="1" label="自主营销" value="自主营销"/>
-                          <el-option key="2" label="公司转接" value="公司转接"/>
-                          <el-option key="3" label="投标抽签" value="投标抽签"/>
+                          <el-option v-for="item in businessSourceList" :key="item.id" :label="item.name" :value="item.id"/>
                         </el-select>
                       </el-form-item>
                     </el-col>
@@ -351,7 +327,9 @@
         customerInfo:[],
         tip:null,
         oaNoDisable:false,
-        oaNoReadonly:false
+        oaNoReadonly:false,
+        cateList:[],
+        businessSourceList:[]
       }
     },
     created() {
@@ -359,9 +337,21 @@
       this.getDepartment();
       this.getDetail();
       this.getCustomerSelect();
+      this.getCateList();
+      this.getBusinessSourceList();
     },
     methods: {
 
+      getCateList(){
+        this.$api.dictData.simpleType("项目类型").then(res => {
+          this.cateList = res.data
+        })
+      },
+      getBusinessSourceList(){
+        this.$api.dictData.simpleType("业务来源").then(res => {
+          this.businessSourceList = res.data
+        })
+      },
       getCustomerDetail(){
         this.postForm.clientName = this.customerInfo[1];
         this.postForm.customerId = this.customerInfo[0];

+ 12 - 2
src/views/item/list.vue

@@ -93,12 +93,12 @@
         </el-table-column>
         <el-table-column label="项目类型" align="center" width="130">
           <template slot-scope="{row}">
-            <span>{{ row.cate }}</span>
+            <span>{{ row.cateName }}</span>
           </template>
         </el-table-column>
         <el-table-column label="业务来源" align="center" width="130">
           <template slot-scope="{row}">
-            <span>{{ row.businessSource }}</span>
+            <span>{{ row.businessSourceName }}</span>
           </template>
         </el-table-column>
         <el-table-column label="委托单位" align="center" width="130">
@@ -150,6 +150,16 @@
               size="mini"
             />
             <PermissionButton
+              menu-code="_views_item_plan_list"
+              class-name="filter-item"
+              name=""
+              type="primary"
+              :page-jump="true"
+              :page-query="{id: row.id,itemName: row.name}"
+              round
+              size="mini"
+            />
+            <PermissionButton
               menu-code="_view_item_log_write"
               class-name="filter-item"
               name=""

+ 44 - 17
src/views/item/plan.vue

@@ -162,20 +162,6 @@
               </el-row>
             </div>
             <div class="postInfo-container">
-              <el-row>
-                <el-col>
-                  <el-form-item
-                    label="备注信息:"
-                    prop="remark"
-                    label-width="180px"
-                    class="postInfo-container-item"
-                  >
-                    <el-input type="textarea" v-model="postForm.remark" class="filter-item" placeholder="200字符"/>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </div>
-            <div class="postInfo-container">
               <el-form-item
                 label="参与人员:"
                 prop="remark"
@@ -186,10 +172,17 @@
               </el-form-item>
               <el-dialog
                 width="600px"
-                :title=" '['+postForm.name +']参与人员提成系数设置'"
+                :title=" '['+title+']参与人员提成系数设置'"
                 :visible.sync="dialogFormVisible"
                 :close-on-click-modal="true"
+                custom-class="customClass"
               >
+                <el-alert
+                  title="打勾并设置提成系数有效,否则无效。"
+                  type="info"
+                  show-icon
+                  :closable="false">
+                </el-alert>
                 <y-page-list-layout :get-page-list="getJoinUsers" >
                   <el-table
                     slot="table"
@@ -220,6 +213,20 @@
                 </y-page-list-layout>
               </el-dialog>
             </div>
+            <div class="postInfo-container">
+              <el-row>
+                <el-col>
+                  <el-form-item
+                    label="备注信息:"
+                    prop="remark"
+                    label-width="180px"
+                    class="postInfo-container-item"
+                  >
+                    <el-input type="textarea" v-model="postForm.remark" class="filter-item" placeholder="200字符"/>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </div>
             <el-button type="success" id="addNode" @click="saveNode">保存</el-button>
             <el-button type="normal"  @click="clean">清空</el-button>
           </el-form>
@@ -235,8 +242,16 @@
                     <div class="it">
                       <icon class="el-icon-time"/> <el-tag>{{s.startDate}}</el-tag> 至 <el-tag>{{s.endDate}}</el-tag>
                     </div>
+                    <div v-if="s.weight" class="it">
+                      <icon class="el-icon-coin"/> <el-tag type="danger">{{s.weight}}%</el-tag>
+                    </div>
                     <div v-if="s.dutyer" class="it">
-                      <icon class="el-icon-user"/> <el-tag>{{s.dutyer}}</el-tag>
+                      <icon class="el-icon-user-solid"/> <el-tag>{{s.dutyer}}</el-tag>
+                    </div>
+                    <div v-if="s.participated" >
+                      <span  v-for="(p,index) in s.participated" :key="index" class="it">
+                        <icon class="el-icon-user"/> <el-tag>{{p.userName}} : {{p.weight}}%</el-tag>
+                      </span>
                     </div>
                     <el-button class="del" type="danger" icon="el-icon-delete" @click="remove(s.id)"/>
                   </el-card>
@@ -279,6 +294,8 @@
         users: [],
         joinUsers: [],
         dialogFormVisible:false,
+        selectedJoiners : [],
+        title:null
       }
     },
     created() {
@@ -293,7 +310,7 @@
       toggleSelection(rows) {
         if (rows) {
           rows.forEach(row => {
-            if (row.id!=null){
+            if (row.id!=null && row.weight!=null){
               this.$refs.multipleTable.toggleRowSelection(row, true);
             }
           });
@@ -304,6 +321,10 @@
       },
       openJoiner(){
         this.dialogFormVisible = true;
+        this.title = " ";
+        if (this.postForm.name!=null && this.postForm.name!=undefined){
+          this.title = this.postForm.name;
+        }
         setTimeout(() => {
           this.toggleSelection(this.joinUsers);
         }, 200)
@@ -427,6 +448,7 @@
         this.postForm = {id:null};
         this.postForm.itemId = this.itemId;
         this.id = null;
+        this.getJoinUsers();
       },
       },
   }
@@ -476,3 +498,8 @@
       left: 480px;
     }
 </style>
+<style lang="scss" scoped>
+  /deep/.customClass{
+    border-radius: 20px;
+  }
+</style>

+ 248 - 0
src/views/item/planList.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="app-container">
+    <div class="title-container">
+      <breadcrumb id="breadcrumb-container" class="breadcrumb-container"/>
+    </div>
+    <div style="padding-top: 30px;">
+      <el-tabs v-model="activeName">
+        <el-tab-pane :label="itemName +'【项目阶段确认和评价】' " name="first" class="pane">
+          <div class="form-container" >
+            <div style="height: 300px;">
+              <el-timeline v-if="stageFlow.length>0">
+                <el-timeline-item v-for="(s,index) in stageFlow" :key="index" :timestamp="s.name" placement="top"  color="green">
+                  <el-card class="card">
+                    <div class="it">
+                      <span class="el-icon-s-flag">目标:</span> <el-tag type="success">{{s.target}}</el-tag>
+                    </div>
+                    <div class="it">
+                      <span class="el-icon-time">时间段:</span> <el-tag>{{s.startDate}}</el-tag> 至 <el-tag>{{s.endDate}}</el-tag>
+                    </div>
+                    <div v-if="s.weight" class="it">
+                      <span class="el-icon-coin">提成比重:</span> <el-tag type="danger">{{s.weight}}%</el-tag>
+                    </div>
+                    <div v-if="s.dutyer" class="it">
+                      <span class="el-icon-user-solid">负责人:</span> <el-tag>{{s.dutyer}}</el-tag>
+                    </div>
+                    <div v-if="s.coefficient" class="it">
+                      <span class="el-icon-coin">逾期提成系数:</span> <el-tag type="danger">{{s.coefficient}}%</el-tag>
+                    </div>
+                    <div v-if="s.participated" class="it" >
+                      <icon class="el-icon-user"/> 参与人提成系数:
+                      <span v-for="(p,index) in s.participated" :key="index"><el-tag>{{p.userName}} : {{p.weight}}%</el-tag>
+                      </span>
+                    </div>
+                    <el-switch
+                      class="del"
+                      style="display: block"
+                      v-model= s.overdue
+                      active-color="#ff4949"
+                      inactive-color="#13ce66"
+                      active-text="逾期"
+                      inactive-text="未逾期"
+                      @change="updateOverdue(s)">
+                    </el-switch>
+                  </el-card>
+                </el-timeline-item>
+              </el-timeline>
+              <el-alert v-else
+                  title="此项目还未排期"
+                  type="error"
+                  :closable="false"
+                  show-icon>
+              </el-alert>
+            </div>
+          </div>
+          <div class="form-container" style="margin-left: 50px; margin-right:100px;">
+            <el-form ref="postForm" :model="postForm" >
+              <el-row>
+                <el-col>
+                  <el-form-item
+                    label="项目评语:"
+                    prop="remark"
+                    label-width="180px"
+                    class="postInfo-container-item"
+                  >
+                    <el-input type="textarea" :autosize="{ minRows: 8, maxRows: 8}" v-model="postForm.comments" class="filter-item" placeholder="200字符"/>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col>
+                  <el-form-item
+                    label="评价权重:"
+                    label-width="180px"
+                    class="postInfo-container-item"
+                  >
+                    <div class="block" style="height: 250px">
+                      <el-rate v-model="postForm.weight" :max="maxScore" score-template="{value}%" show-score allow-half	class="filter-item"></el-rate>
+                    </div>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col>
+                  <el-form-item
+                    label-width="180px"
+                    class="postInfo-container-item"
+                  >
+                    <el-button type="success" @click="commit" class="filter-item">提 交</el-button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+<script>
+  import Breadcrumb from '@/components/Breadcrumb'
+  export default {
+    name: 'planList',
+    components: {
+      Breadcrumb,
+    },
+    data() {
+      return {
+        type: 'detail',
+        itemId: this.$route.query.id,
+        itemName: this.$route.query.itemName,
+        id:null,
+        activeName: 'first',
+        vLoading: false,
+        listQuery:{},
+        filterMethod(query, item) {
+          return item.label.indexOf(query) > -1;
+        },
+        stageFlow:[],
+        stages:[],
+        value1: null,
+        colors: ['#99A9BF', '#F7BA2A', '#FF9900'], // 等同于 { 2: '#99A9BF', 4: { value: '#F7BA2A', excluded: true }, 5: '#FF9900' }
+        maxScore:100,
+        postForm:{
+          id:null,
+          itemId:null,
+          weight:null,
+          comments:null
+        }
+      }
+    },
+    created() {
+      this.getFlow();
+      this.getEvaluate();
+    },
+    methods: {
+      commit(){
+        if (!this.id){
+          this.$notify({
+            title: '错误',
+            message: '提交失败',
+            type: 'error',
+            duration: 1000
+          });
+          return;
+        }
+        this.postForm.itemId = this.itemId;
+        if (this.postForm.id){
+          this.$api.itemEvaluate.edit(Object.assign({}, this.postForm, {
+          })).then(res=>{
+            if (res.code ===200){
+              this.$notify({
+                title: '成功',
+                message: '修改成功',
+                type: 'success',
+                duration: 1000
+              });
+              this.getEvaluate();
+            }
+          });
+        }else {
+          this.$api.itemEvaluate.add(Object.assign({}, this.postForm, {
+          })).then(res=>{
+            if (res.code ===200){
+              this.$notify({
+                title: '成功',
+                message: '评价成功',
+                type: 'success',
+                duration: 1000
+              });
+              this.getEvaluate();
+            }
+          })
+        }
+      },
+      getEvaluate(){
+        this.$api.itemEvaluate.detailByItemId(this.itemId).then(res => {
+          this.postForm = res.data === null ? [] : res.data;
+        });
+      },
+      updateOverdue(stage){
+        this.$api.itemStage.confirm({stageId:stage.id ,overdue:stage.overdue}).then(res=>{
+          if (res.code === 200){
+            this.$notify({
+              title: '成功',
+              message: '修改成功',
+              type: 'success',
+              duration: 2000
+            });
+          }
+        })
+      },
+      getSimpleAll() {
+        this.$api.itemStage.simpleAll(this.itemId).then(res => {
+          this.stages = res.data;
+        });
+      },
+      getFlow() {
+        this.$api.itemStage.flow(this.itemId).then(res => {
+          this.stageFlow = res.data === null ? [] : res.data;
+        });
+      }
+    }
+  }
+</script>
+<style lang="css" scoped>
+    .pane{
+      display: flex;
+    }
+    .pane>div{
+      flex: 1;
+    }
+    .form-container{
+      padding-top: 30px;
+      width: 500px;
+      height: 800px;
+      border: 1px solid darkgray;
+      box-shadow: 10px 10px 5px #888888;;
+      border-radius: 10px;
+      overflow: auto;
+    }
+    .form-container:hover{
+
+    }
+    .evaluate{
+      width: 300px;
+      /*height: 800px;*/
+      margin-left: 100px;
+      overflow: auto;
+    }
+    div.it{
+      margin-top: 10px;
+    }
+    .card{
+      display: flex;
+      width: 600px;
+    }
+    .del{
+      position: absolute;
+      top:60px;
+      left: 480px;
+    }
+    .filter-item{
+      width: 80%;
+    }
+  /deep/ .el-rate__icon{
+    font-size: 30px;
+  }
+</style>