ソースを参照

1.大中型提成申报新增业务分类修改

GouGengquan 9 ヶ月 前
コミット
c0d14693b5

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

@@ -44,5 +44,9 @@ export default {
   // 更新资产绩效申报提成比例与下限信息
   updateAssetsCommissionDeclare(params){
     return request.put(`commissionDeclare/assets/check/update`, params)
+  },
+  // 更新大中型绩效申报
+  updateMajorCommissionDeclare(params){
+    return request.put(`commissionDeclare/major/check/update`, params)
   }
 }

+ 101 - 45
src/views/administration/major/declareDetail.vue

@@ -23,7 +23,7 @@
     <el-card>
       <el-divider content-position="left">
         <span style="color:red;font-weight: bold;">
-          【{{ this.nodeBusinessInfo.mainBusiness==='COMMISSION_DECLARE_MAJOR_EVALUATE'?'评估人员':'市场人员' }}】
+          【{{ this.nodeBusinessInfo.mainBusiness === 'COMMISSION_DECLARE_MAJOR_EVALUATE' ? '评估人员' : '市场人员' }}】
         </span>大中型业务提成申报详情</el-divider>
       <el-form :model="declareForm" ref="declareForm">
         <el-row>
@@ -50,14 +50,20 @@
         <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-select clearable v-model="declareForm.commissionRateId" placeholder="请选择业务分类" style="width: 92%;"
+                :disabled="!nodeBusinessInfo.currentNodeCode == 'DEPARTMENT_LEADER_CHECK'">
+                <el-option v-for="(c, id) in cates" :value="c.id" :label="c.name">{{ c.name }}</el-option>
+              </el-select>
+              <el-button @click="updateMajorCommissionDeclare()" style="margin-left: 10px;" type="danger" :disabled="!nodeBusinessInfo.currentNodeCode == 'DEPARTMENT_LEADER_CHECK'" round>
+                修改
+              </el-button>
+              <!-- <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-input :value="prod" :step="1" :max="100" style="width: 100%;" readonly disabled></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -67,37 +73,37 @@
               <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-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" style="width: 100%;" readonly
-                disabled></el-input>
+              <el-input :value="declareForm.created" 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="declareResult" label-width="140px" class="postInfo-container-item">
-              <el-input :value="declareForm.declareResult"  :class="['filter-item','resaon_input']" readonly disabled>
+              <el-input :value="declareForm.declareResult" :class="['filter-item', 'resaon_input']" readonly disabled>
               </el-input>
             </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="12" :span="6">
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="12" :span="6">
             <el-form-item label="审核备注:" prop="remarks" label-width="140px" class="postInfo-container-item">
-              <el-input :value="declareForm.remarks+''"  style="width: 100%; color: red;" readonly
-                disabled></el-input>
+              <el-input :value="declareForm.remarks + ''" style="width: 100%; color: red;" 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="this.nodeBusinessInfo.mainBusiness==='COMMISSION_DECLARE_MAJOR_EVALUATE'?'评估人员':'市场人员'" align="center">
+          <el-table-column prop="userId"
+            :label="this.nodeBusinessInfo.mainBusiness === 'COMMISSION_DECLARE_MAJOR_EVALUATE' ? '评估人员' : '市场人员'"
+            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*100 }}%</span>
+              <span style="color: red;">{{ row.rate * 100 }}%</span>
             </template>
           </el-table-column>
         </el-table>
@@ -120,15 +126,15 @@ export default {
 
   },
   computed: {
-    prod(){
-      if (this.declareForm.production==='REPORT'){
-         return "报告";
+    prod() {
+      if (this.declareForm.production === 'REPORT') {
+        return "报告";
       }
-      if (this.declareForm.production==='LETTER'){
-         return "复评函";
+      if (this.declareForm.production === 'LETTER') {
+        return "复评函";
       }
-      if (this.declareForm.production==='STATEMENT'){
-         return "价值意见书";
+      if (this.declareForm.production === 'STATEMENT') {
+        return "价值意见书";
       }
     }
   },
@@ -149,8 +155,8 @@ export default {
         businessId: null,
         currentInstanceNodeId: null,
         production: [],
-        ifSkip:false,
-        currentNodeCode:null
+        ifSkip: false,
+        currentNodeCode: null
       },
       doWorkflow: false,
       declareForm: {
@@ -167,12 +173,28 @@ export default {
             rate: 100
           }
         ],
-        production:null,
-        remarks:[]
+        production: null,
+        remarks: []
 
       },
       users: [],
-      cates: []
+      cates: [],
+      currentNode: {
+        flowId: null,
+        pnodeId: null,
+        nodeId: null,
+        flowCode: null,
+        nodeName: "",
+        nodeCode: null,
+        state: "",
+        instanceId: null,
+        sequence: null,
+        restartable: null,
+        reversible: null,
+        skippable: null,
+        terminable: null,
+        tasks: []
+      }
     }
   },
   created() {
@@ -180,6 +202,7 @@ export default {
     this.nodeBusinessInfo.mainBusiness = this.$route.query.businessType;
     this.declareForm.businessType = this.$route.query.businessType;
     this.doWorkflow = this.$route.query.doWorkflow === 'true';
+    this.getMajorMarketCate();
     this.getCurrentNodeInfo();
     this.businessId = this.$route.query.businessId;
     this.getDeclareDetail();
@@ -192,11 +215,12 @@ export default {
           "mainBusiness": this.nodeBusinessInfo.mainBusiness,
           "businessId": this.nodeBusinessInfo.businessId
         }).then(res => {
-          if (res.code === 200 && res.data!=null) {
-              this.nodeBusinessInfo.currentInstanceNodeId = res.data.instanceId;
-              this.nodeBusinessInfo.currentNodeCode = res.data.nodeCode;
+          if (res.code === 200 && res.data != null) {
+            this.currentNode = res.data;
+            this.nodeBusinessInfo.currentInstanceNodeId = res.data.instanceId;
+            this.nodeBusinessInfo.currentNodeCode = res.data.nodeCode;
           }
-          this.$refs.board.getInstanceArray(this.nodeBusinessInfo.mainBusiness,this.nodeBusinessInfo.businessId);
+          this.$refs.board.getInstanceArray(this.nodeBusinessInfo.mainBusiness, this.nodeBusinessInfo.businessId);
         })
       }
     },
@@ -228,16 +252,47 @@ export default {
       })
     },
     //提交节点
-    commit(state){
-        if (this.declareForm.businessCate==='一般业务'  
-              && this.nodeBusinessInfo.currentNodeCode === 'DEPARTMENT_LEADER_CHECK'
-                && this.nodeBusinessInfo.mainBusiness === 'COMMISSION_DECLARE_MAJOR_EVALUATE'){
-               
-          this.nodeBusinessInfo.ifSkip = true;
-          
+    commit(state) {
+      if (this.declareForm.businessCate === '一般业务'
+        && this.nodeBusinessInfo.currentNodeCode === 'DEPARTMENT_LEADER_CHECK'
+        && this.nodeBusinessInfo.mainBusiness === 'COMMISSION_DECLARE_MAJOR_EVALUATE') {
+
+        this.nodeBusinessInfo.ifSkip = true;
+
+      }
+      this.$refs.board.commit(state);
+    },
+    getMajorMarketCate() {
+      this.$api.businessCommissionRate.cateList("MAJOR_BUSINESS", "MARKETER").then(res => {
+        if (res.code === 200) {
+          this.cates = res.data;
         }
-       this.$refs.board.commit(state);
+      })
     },
+    updateMajorCommissionDeclare() {
+      let declareDTO = new Object();
+      declareDTO.id = this.businessId;
+      declareDTO.commissionRateId = this.declareForm.commissionRateId;
+      declareDTO.recordId = this.currentNode.tasks[0].recordId;
+      this.$api.commissonDeclare.updateMajorCommissionDeclare(declareDTO).then(res => {
+        if (res.code === 200 && res.data) {
+          this.$notify({
+            title: '成功',
+            message: '提成比例与下限信息更新成功!',
+            type: 'success',
+            duration: 3000
+          });
+          this.getDeclareDetail();
+        } else {
+          this.$notify({
+            title: '失败',
+            message: '提成比例与下限信息更新失败!请稍后重试!',
+            type: 'warning',
+            duration: 3000
+          });
+        }
+      })
+    }
 
   },
 
@@ -249,10 +304,11 @@ export default {
   top: 70px;
   right: 50px;
 }
-.resaon_input{
-    /deep/ .el-input__inner{
-      color: red !important;
-      font-weight: bold;
-    }
+
+.resaon_input {
+  /deep/ .el-input__inner {
+    color: red !important;
+    font-weight: bold;
   }
+}
 </style>