浏览代码

Merge branch 'master' of http://47.108.172.52:3000/dayou/item-management-web

GouGengquan 1 年之前
父节点
当前提交
f789e122d8
共有 4 个文件被更改,包括 267 次插入11 次删除
  1. 3 0
      src/api/modules/commissonDeclare.js
  2. 3 1
      src/router/urlMap.js
  3. 246 0
      src/views/income/major/declareDetail.vue
  4. 15 10
      src/views/income/major/market.vue

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

@@ -11,5 +11,8 @@ export default {
   },
   declare(params){
     return request.post(`commissionDeclare/major`, params)
+  },
+  detail(params){
+    return request.get(`commissionDeclare/${params}`)
   }
 }

+ 3 - 1
src/router/urlMap.js

@@ -110,6 +110,7 @@ import _views_commission_major_rate from '@/views/commission/major'
 import _views_finance_fund_stats from '@/views/finance/realFundStat'
 import _views_income_major_declare_market from '@/views/income/major/market'
 import _views_income_major_declare_evaluate from '@/views/income/major/evaluate'
+import _views_income_major_declare_market_detail from '@/views/income/major/declareDetail'
 
 export default {
   _views_set_menu,
@@ -208,6 +209,7 @@ export default {
   _views_assets_archived_list,
   _views_assets_done_list,
   _views_assets_terminate_list,
-  _views_assets_repertory_list
+  _views_assets_repertory_list,
+  _views_income_major_declare_market_detail
 
 }

+ 246 - 0
src/views/income/major/declareDetail.vue

@@ -0,0 +1,246 @@
+<template>
+  <div class="app-container">
+    <div class="title-container">
+      <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
+    </div>
+    <el-collapse v-model="activeNames" style="margin-top: 30px;">
+      <el-collapse-item name="board">
+        <template slot="title">
+          <span style="font-size:15px; margin-left:15px;letter-spacing:2px; color:RGB(168,168,168)">
+            点击展开查看实时流程图
+          </span>
+        </template>
+        <WorkflowBoard ref='board' :nodeBusinessInfo="nodeBusinessInfo" />
+      </el-collapse-item>
+    </el-collapse>
+    <div class="button-area">
+      <el-button v-if="nodeBusinessInfo.currentNodePermission.commit && doWorkflow" class="y-save" type="success" round
+        @click="commit('PASS')">提交</el-button>
+      <el-button v-if="nodeBusinessInfo.currentNodePermission.reversible && doWorkflow" class="y-save" type="warning"
+        round @click="commit('REVERSE')">退回</el-button>
+      <el-button v-if="nodeBusinessInfo.currentNodePermission.skippable && doWorkflow" class="y-save" type="warning" round
+        @click="commit('SKIP')">跳过</el-button>
+      <el-button v-if="nodeBusinessInfo.currentNodePermission.terminable && doWorkflow" class="y-save" type="danger" round
+        @click="commit('TERMINATE')">终止</el-button>
+      <el-button v-if="nodeBusinessInfo.currentNodePermission.restartable && doWorkflow" class="y-save" type="danger"
+        round @click="commit('RESTART')">重置</el-button>
+      <el-button class="y-save" round type="info" @click="goBack">返回</el-button>
+    </div>
+    <el-card>
+      <el-divider content-position="left">
+        <span style="color:red;font-weight: bold;">
+          【市场人员】
+        </span>大中型业务提成申报详情</el-divider>
+      <el-form :model="declareForm" ref="declareForm">
+        <el-row>
+          <el-col :xs="24" :sm="12" :lg="24" :span="6">
+            <el-form-item label="项目名称:" prop="name" label-width="140px" class="postInfo-container-item">
+              <el-input :value="declareForm.name" :step="1" :max="100" style="width: 100%;" readonly disabled></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="12" :lg="12" :span="6">
+            <el-form-item label="订单号:" prop="orderId" label-width="140px" class="postInfo-container-item">
+              <el-input :value="declareForm.orderId" :step="1" :max="100" style="width: 100%;" readonly
+                disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="12" :span="6">
+            <el-form-item label="报告号:" prop="reportNo" label-width="140px" class="postInfo-container-item">
+              <el-input :value="declareForm.reportNo" :step="1" :max="100" style="width: 100%;" readonly
+                disabled></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="12" :lg="12" :span="6">
+            <el-form-item label="业务分类:" prop="businessCate" label-width="140px" class="postInfo-container-item">
+              <el-input :value="declareForm.businessCate" :step="1" :max="100" style="width: 100%;" readonly
+                disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="12" :span="6">
+            <el-form-item label="产品类型:" prop="production" label-width="140px" class="postInfo-container-item">
+              <el-input :value="prod" :step="1" :max="100" style="width: 100%;" readonly
+                disabled></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :xs="24" :sm="12" :lg="12" :span="6">
+            <el-form-item label="申报人:" prop="declareUser" label-width="140px" class="postInfo-container-item">
+              <el-input :value="declareForm.declareUser" style="width: 100%;" readonly disabled>
+              </el-input>
+            </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="12" :span="6">
+            <el-form-item label="申报日期:" prop="created" label-width="140px" class="postInfo-container-item">
+              <el-input :value="declareForm.created" :step="1" :max="100" style="width: 100%;" readonly
+                disabled></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-table :data="declareForm.userShareRates" border style="width: 100%; margin-top: 10px; margin-bottom: 10px;">
+          <el-table-column prop="userId" label="客户经理" align="center">
+            <template slot-scope="{row}">
+              <span>{{ row.name }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="rate" label="提成比例" align="center">
+            <template slot-scope="{row}">
+              <span  style="color: red;">{{ row.rate }}%</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
+    </el-card>
+  </div>
+</template>
+<script>
+import Breadcrumb from '@/components/Breadcrumb'
+import WorkflowBoard from '@/components/workflowBoard'
+
+
+export default {
+  name: 'declareDetail',
+  components: {
+    Breadcrumb,
+    WorkflowBoard
+  },
+  filters: {
+
+  },
+  computed: {
+    prod(){
+      if (this.declareForm.production==='REPORT'){
+         return "报告";
+      }
+      if (this.declareForm.production==='LETTER'){
+         return "复评函";
+      }
+      if (this.declareForm.production==='STATEMENT'){
+         return "价值意见书";
+      }
+    }
+  },
+  data() {
+    return {
+      activeNames: ['board'],
+      nodeBusinessInfo: {
+        currentNodePermission: {
+          commit: true,
+          reversible: true,
+          restartable: true,
+          terminable: true,
+          skippable: true,
+        },
+        mainBusiness: null,
+        doWorkflow: null,
+        businessSubId: null,
+        businessId: null,
+        currentNodeInstanceId: null,
+        production: []
+      },
+      doWorkflow: false,
+      declareForm: {
+        orderId: null,
+        name: null,
+        reportNo: null,
+        businessId: null,
+        productionId: null,
+        businessType: 'COMMISSION_DECLARE_MAJOR_MARKET',
+        commissionRateId: null,
+        userShareRates: [
+          {
+            userId: this.$store.getters.userInfo.id,
+            rate: 100
+          }
+        ],
+        production:null
+
+      },
+      users: [],
+      cates: []
+    }
+  },
+  created() {
+    this.nodeBusinessInfo.businessId = this.$route.query.businessId;
+    this.nodeBusinessInfo.mainBusiness = this.$route.query.businessType;
+    this.doWorkflow = this.$route.query.doWorkflow === 'true';
+    this.getCurrentNodeInfo();
+    this.businessId = this.$route.query.businessId;
+    this.getDeclareDetail();
+  },
+  methods: {
+
+    getCurrentNodeInfo() {
+      if (this.nodeBusinessInfo.businessId) {
+        this.$api.workNodeInstance.currentNode({
+          "mainBusiness": this.nodeBusinessInfo.mainBusiness,
+          "businessId": this.nodeBusinessInfo.businessId
+        }).then(res => {
+          if (res.code === 200) {
+            if (res.data) {
+              this.currentNode = res.data;
+              this.nodeBusinessInfo.currentNodeInstanceId = res.data.instanceId;
+              this.nodeBusinessInfo.currentNodePermission.restartable = res.data.restartable;
+              this.nodeBusinessInfo.currentNodePermission.reversible = res.data.reversible;
+              this.nodeBusinessInfo.currentNodePermission.skippable = res.data.skippable;
+              this.nodeBusinessInfo.currentNodePermission.terminable = res.data.terminable;
+              this.$refs.board.getInstanceQueue();
+            }
+          }
+        })
+      }
+    },
+    goBack() {
+      const back = this.$route.query.back
+      if (back) {
+        this.$router.push(back)
+      }
+    },
+    getSimpleAllUser() {
+      this.$api.user.simpleAll().then(res => {
+        if (res.code === 200) {
+          this.users = res.data;
+        }
+      })
+    },
+    getMajorMarketCate() {
+      this.$api.businessCommissionRate.cateList("BUSINESS_MAJOR", "MARKETER").then(res => {
+        if (res.code === 200) {
+          this.cates = res.data;
+        }
+      })
+    },
+    getDeclareDetail() {
+      this.$api.commissonDeclare.detail(this.businessId).then(res => {
+        if (res.code === 200) {
+          this.declareForm = res.data;
+        }
+      })
+    }
+
+  },
+
+}
+</script>
+<style lang="scss" scoped>
+/deep/.doWarehouseClass {
+  border-radius: 10px;
+}
+
+.real-amount {
+  /deep/ .el-form-item__label {
+    color: red;
+    font-weight: bold
+  }
+}
+
+.button-area {
+  position: absolute;
+  top: 70px;
+  right: 50px;
+}
+</style>

+ 15 - 10
src/views/income/major/market.vue

@@ -18,10 +18,11 @@
                   <el-option :value="true" label="产品">产品</el-option>
                   <el-option :value="false" label="订单">订单</el-option>
               </el-select>
-              <el-select  clearable  v-model="listQuery.result" placeholder="审核状态" style="margin-left: 20px;width: 200px;float: left;">
-                  <el-option :value="0" label="待申报">待申报</el-option>
-                  <el-option :value="1" label="通过">通过</el-option>
-                  <el-option :value="2" label="驳回">驳回</el-option>
+              <el-select  clearable  v-model="listQuery.declareResult" placeholder="审核状态" style="margin-left: 20px;width: 200px;float: left;">
+                  <el-option value="待申报" label="待申报"></el-option>
+                  <el-option value="审核中" label="审核中"></el-option>
+                  <el-option value="审核通过" label="审核通过"></el-option>
+                  <el-option value="审核拒绝" label="审核拒绝"></el-option>
               </el-select>
               <el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="searchList" round>搜索
               </el-button>
@@ -97,15 +98,16 @@
         <el-table-column label="审核状态" align="center">
           <template slot-scope="{row}">
             <el-tag v-if="row.declareResult==null" type="info" effect="plain">待申报</el-tag>
-            <el-tag v-else-if="row.declareResult==true" type="success" effect="plain">通过</el-tag>
-            <el-tag v-else="row.declareResult==false" type="danger" effect="plain">驳回</el-tag>
+            <el-tag v-else-if="row.declareResult=='审核中'" type="warning" effect="plain">审核中</el-tag>
+            <el-tag v-else-if="row.declareResult=='审核通过'" type="success" effect="plain">审核通过</el-tag>
+            <el-tag v-else type="danger" effect="plain">审核拒绝</el-tag>
           </template>
         </el-table-column>
         <el-table-column fixed="right" label="操作" align="center">
           <template slot-scope="{row}">
             <div>
-              <el-button type="text" size="small" @click="openDeclareDialog(row)">申报</el-button>
-              <el-button type="text" size="small" @click="">查看</el-button>
+              <el-button v-if ="row.declareResult==null || row.declareResult=='审核拒绝'" type="text" size="small" @click="openDeclareDialog(row)">申报</el-button>
+              <el-button v-if ="row.declareResult=='审核中' || row.declareResult=='审核通过'" type="text" size="small" @click="checkDetail(row.id)">查看</el-button>
             </div>
           </template>
         </el-table-column>
@@ -157,7 +159,7 @@
             </el-select>
           </template>
           </el-table-column>
-          <el-table-column prop="rate" label="提成比例" align="center">
+          <el-table-column prop="rate" label="提成比例%" align="center">
             <template slot-scope="{row}">
               <el-input-number  v-model="row.rate" :step="1" :max="100" style="width: 100%;" ></el-input-number>
           </template>
@@ -257,7 +259,7 @@ export default {
       })
     },
     getMajorMarketCate(){
-      this.$api.businessCommissionRate.cateList("BUSINESS_MAJOR","MARKETER").then(res=>{
+      this.$api.businessCommissionRate.cateList("MAJOR_BUSINESS","MARKETER").then(res=>{
         if (res.code === 200){
           this.cates = res.data;
         }
@@ -332,6 +334,9 @@ export default {
     },
     removeUser(index){
         this.declareForm.userShareRates.splice(index,1)
+    },
+    checkDetail(id){
+      this.$router.push(`/income/major/market/detail?businessId=${id}&businessType=COMMISSION_DECLARE_MAJOR_MARKET&doWorkflow=${false}&back=${'/income/major/declare/market'}`)
     }
    
   },