Bladeren bron

增加个贷大中型业务反馈节点业务操作

wucl 3 weken geleden
bovenliggende
commit
4ca43f671d

+ 5 - 0
src/api/major.js

@@ -23,4 +23,9 @@ export function myOrder(params) {
 // 大中型正在进行订单
 export function pendingOrder(params) {
     return request.get(`major/page`, { params: params })
+}
+
+// 大中型客户反馈
+export function doFeedback(params) {
+    return request.post(`major/priceFeedback`, params )
 }

+ 6 - 0
src/api/personalTarget.js

@@ -0,0 +1,6 @@
+import request from '@/utils/request'
+
+// 个贷报价反馈节点
+export function doFeedback(params) {
+    return request.put('personalTarget/doFeedback', params)
+}

+ 4 - 4
src/views/home/todo.vue

@@ -266,13 +266,13 @@ export default {
       switch (nodeCode) {
         case 'DEPARTMENT_ALLOCATION':
         case 'DETERMINE_PRICE':
-        case 'QUOTATION_FEEDBACK':
+        // case 'QUOTATION_FEEDBACK':
         case 'GENERATE_STATEMENT':
         case 'REVIEW_STATEMENT':
         case 'STATEMENT_BOOKBINDING_STAMP':
         case 'STATEMENT_IN':
         case 'STATEMENT_OUT':
-        case 'STATEMENT_FEEDBACK':
+        //case 'STATEMENT_FEEDBACK':
         case 'WRITE_REPORT':
         case 'CHECK_REPORT':
         case 'REPORT_BOOKBINDING_STAMP':
@@ -284,8 +284,8 @@ export default {
         case 'LETTER_IN':
         case 'LETTER_OUT':
         case 'BUSINESS_ARCHIVING':
-        case 'REPORT_FEEDBACK':
-        case 'LETTER_FEEDBACK':
+        //case 'REPORT_FEEDBACK':
+        //case 'LETTER_FEEDBACK':
           showDialog({
             message: '当前节点需要业务操作, 请在电脑端处理节点',
           });

+ 127 - 11
src/views/major/todoDetail.vue

@@ -4,35 +4,81 @@
     <van-form>
       <van-cell-group inset>
         <van-field label="项目编号" v-model="major.orderId" name="orderId" readonly placeholder="-" />
-        <van-field label="订单名称" v-model="major.projectName" name="projectName" type="textarea" readonly placeholder="-" />
+        <van-field label="订单名称" v-model="major.projectName" name="projectName" type="textarea" readonly
+          placeholder="-" />
         <van-field label="意见书号" v-model="major.statementNo" name="statementNo" readonly placeholder="-" />
         <van-field label="报告/函号" v-model="major.reportNo" name="reportNo" readonly placeholder="-" />
+        <van-field label="已出产品" name="feedback" readonly>
+          <template #input>
+            <van-tag type="primary" v-for="(p, index) in feedback">{{ p == 'STATEMENT' ? '价值意见书' : (p == 'REPORT' ? '报告'
+              : (p == 'LETTER' ? '复评函' : '')) }}</van-tag>
+          </template>
+        </van-field>
         <van-field label="当前节点" v-model="currentNode.nodeName" name="nodeName" readonly :error="true" placeholder="-" />
         <van-field label="客户经理" v-model="major.clientManager" name="clientManager" readonly placeholder="-" />
         <van-field label="项目负责人" v-model="major.principal" name="principal" readonly placeholder="-" />
         <van-field label="对象类型" v-model="major.businessObjectType" name="businessObjectType" readonly placeholder="-" />
         <van-field label="客户名称" v-model="major.cclienteleName" name="clientName" readonly placeholder="-" />
         <van-field label="业务来源" v-model="major.cclienteleSubName" name="clientSubName" readonly placeholder="-" />
-        <van-field label="客户联系人" v-model="major.cclienteleContactName" name="cclienteleContactName" readonly placeholder="-" />
+        <van-field label="客户联系人" v-model="major.cclienteleContactName" name="cclienteleContactName" readonly
+          placeholder="-" />
         <van-field label="联系电话" v-model="major.cmobile" name="cmobile" readonly placeholder="-" />
         <van-field label="下单时间" v-model="major.created" name="created" readonly placeholder="-" />
         <van-field label="任务创建时间" v-model="currentNode.taskCreated" name="taskCreated" readonly placeholder="-" />
         <van-field label="最新备注" v-model="commitInfo.comments" name="comments" type="textarea" />
+        <van-cell title="反馈信息" v-show="currentNode.nodeCode=='QUOTATION_FEEDBACK' || currentNode.nodeCode=='STATEMENT_FEEDBACK'" is-link @click="showPopup" :rules="[{ required: true, message: '请选择反馈信息' }]"
+          :required="true" />
       </van-cell-group>
     </van-form>
+
+
+    <van-popup v-model:show="feedbackDialog" :style="{ padding: '10px' }" round >
+      <van-form>
+        <van-cell-group inset>
+
+          <van-field name="radio" label="产品类型" :rules="[{ required: true, message: '请选择反馈信息' }]" :required="true">
+            <template #input>
+              <van-radio-group v-model="productionType">
+                <van-radio name="STATEMENT" class="radio-class" :disabled="currentNode.nodeCode=='STATEMENT_FEEDBACK'">价值意见书</van-radio>
+                <van-radio name="REPORT" class="radio-class">报告</van-radio>
+                <van-radio name="LETTER" class="radio-class">复评函</van-radio>
+              </van-radio-group>
+            </template>
+          </van-field>
+
+          <van-field v-model="feedbackForm.printing" type="digit" label="打印份数" />
+
+          <van-field name="radio" label="打印备注">
+            <template #input>
+              <van-radio-group v-model="feedbackForm.printingRemark">
+                <van-radio name="一本不装订" class="radio-class">一本不装订</van-radio>
+                <van-radio name="一本带技术" class="radio-class">一本带技术</van-radio>
+                <van-radio name="一本带技术不装订" class="radio-class">一本带技术不装订</van-radio>
+              </van-radio-group>
+            </template>
+          </van-field>
+        </van-cell-group>
+        <van-button round block type="primary" native-type="submit" @click="saveFeedback()">
+          提交
+        </van-button>
+      </van-form>
+    </van-popup>
+
     <div class="button-style" style="float: left" v-if="currentNode.reversible">
-      <van-button type="warning" style="width: 100%" @click="commitNode('REVERSE')">退回</van-button>
+      <van-button type="warning" style="width: 100%" @click="commitNode('REVERSE')">退回流程</van-button>
     </div>
     <div class="button-style" style="float: right">
-      <van-button type="success" style="width: 100%" @click="commitNode('PASS')">提交</van-button>
+      <van-button type="success" style="width: 100%" @click="commitNode('PASS')">提交流程</van-button>
     </div>
+
+
   </div>
 </template>
 
 <script>
 import { showConfirmDialog } from 'vant';
 import { showNotify } from 'vant';
-import { getMajorTodoDetail } from '@/api/major';
+import { getMajorTodoDetail,doFeedback } from '@/api/major';
 import { currentNode } from '@/api/workFlowNodeInstance';
 import { commit } from '@/api/workflow';
 
@@ -44,8 +90,19 @@ export default {
       currentNode: {},
       // 节点提交信息
       commitInfo: {},
+      feedbackForm: {
+        printing: null,
+        printingRemark: null,
+        production: [],
+        majorId:null,
+        reportNo:null
+      },
+      productionType: null,
+      feedback: [],
+      feedbackDialog: false,
     };
   },
+  
   created() {
     this.major.id = this.$route.query.id;
     this.currentNode.nodeCode = this.$route.query.currentNodeCode;
@@ -62,6 +119,11 @@ export default {
             this.major.projectName = this.$route.query.projectName;
             this.major.reportNo = this.$route.query.reportNo;
             this.major.statementNo = this.$route.query.statementNo;
+            const feedback = res.data.feedbackInfo;
+            if (feedback) {
+              const feed = JSON.parse(res.data.feedbackInfo);
+              this.feedback = feed[feed.length-1].production;
+            }
             this.getCurrentNode();
           }
         });
@@ -88,14 +150,65 @@ export default {
         this.commitInfo.state = state;
         this.commitInfo.businessSubId = this.major.statementNo;
         this.commitInfo.businessMinId = this.major.reportNo;
-        commit(this.commitInfo).then((res) => {
-          if (res.code === 200 && res.data) {
-            showNotify({ type: 'success', message: '节点提交成功' });
-            history.back();
-          }
-        });
+        const valid = this.checkNodeCommit();
+        if (valid){
+          commit(this.commitInfo).then((res) => {
+            if (res.code === 200 && res.data) {
+              showNotify({ type: 'success', message: '节点提交成功' });
+              history.back();
+            }
+          });
+        }
+        
       });
     },
+
+
+    showPopup() {
+      this.feedbackDialog = true;
+    },
+    //反馈提交
+    saveFeedback(){
+      this.feedbackForm.production = this.feedback;
+      this.feedbackForm.production.push(this.productionType);
+      this.feedbackForm.production = Array.from(new Set(this.feedbackForm.production));
+      this.feedbackForm.majorId = this.major.id;
+      this.feedbackForm.reportNo = this.major.statementNo;
+      let feedback = new Object();
+      feedback.taskData = this.feedbackForm;
+      feedback.recordId = this.currentNode.tasks[0].recordId;
+      doFeedback(feedback).then((res) => {
+        if (res.code === 200 && res.data) {
+          showNotify({ type: 'success', message: '反馈提交成功。' });
+          this.feedbackDialog = false;
+        }
+        this.getTodoDetail();
+      })
+    },
+    checkNodeCommit() {
+      //提交报价客户反馈节点需要的参数
+      if (this.currentNode.nodeCode == 'QUOTATION_FEEDBACK') {
+        if (this.feedback.length==0) {
+          showNotify({ type: 'danger', message: '请选择反馈信息' });
+          return false;
+        }
+        this.commitInfo.production = this.feedback;
+        this.commitInfo.ifCheckTask = true;
+        this.commitInfo.reportNos = [];
+      }
+      if (this.currentNode.nodeCode == 'STATEMENT_FEEDBACK') {
+        const productions = this.feedback;
+        const filter = productions.filter(item => item != 'STATEMENT');
+        if (filter.length==0) {
+          showNotify({ type: 'danger', message: '请选择反馈信息' });
+          return false;
+        }
+        this.commitInfo.production = this.feedback;
+        this.commitInfo.ifCheckTask = true;
+        this.commitInfo.reportNos = [];
+      }
+      return true;
+    },
   },
 };
 </script>
@@ -106,4 +219,7 @@ export default {
   margin: 20px;
   width: 100px;
 }
+.radio-class{
+  margin-bottom: 10px;
+}
 </style>

+ 1 - 1
src/views/personal/detail.vue

@@ -12,7 +12,7 @@
           <template #button>元/平</template>
         </van-field>
         <van-field label="总价" v-model="personal.amount" name="amount" readonly placeholder="-">
-          <template #button>元</template>
+          <template #button>元</template>
         </van-field>
         <van-field label="客户名称" v-model="personal.clientName" name="clientName" readonly placeholder="-" />
         <van-field label="业务来源" v-model="personal.clientSubName" name="clientSubName" readonly placeholder="-" />

+ 133 - 9
src/views/personal/todoDetail.vue

@@ -14,7 +14,13 @@
           <template #button>元</template>
         </van-field>
         <van-field label="总价" v-model="personalTarget.amount" name="amount" readonly placeholder="-">
-          <template #button>万元</template>
+          <template #button>元</template>
+        </van-field>
+        <van-field label="已出产品" name="feedback" readonly>
+          <template #input>
+            <van-tag type="primary"
+              v-for="(p, index) in feedback">{{ p == 'STATEMENT' ? '价值意见书' : (p == 'REPORT' ? '报告' : (p == 'LETTER'? '复评函':'')) }}</van-tag>
+          </template>
         </van-field>
         <van-field label="客户名称" v-model="personal.clientName" name="clientName" readonly placeholder="-" />
         <van-field label="业务来源" v-model="personal.clientSubName" name="clientSubName" readonly placeholder="-" />
@@ -30,11 +36,18 @@
         <van-field label="最新备注" v-model="commitInfo.comments" name="comments" type="textarea" />
       </van-cell-group>
     </van-form>
+    <van-form v-show="currentNode.nodeCode=='QUOTATION_FEEDBACK' || currentNode.nodeCode=='STATEMENT_FEEDBACK' || currentNode.nodeCode=='REPORT_FEEDBACK' || currentNode.nodeCode=='LETTER_FEEDBACK'">
+      <van-cell-group inset>
+        <VanSinglePicker label="反馈信息" v-model="productionType" v-bind:columns="productionTypes" name="productionType"
+          placeholder="选择反馈信息" clearable :rules="[{ required: true, message: '请选择反馈信息' }]" :required="true"
+          @change="doFeedback()" />
+      </van-cell-group>
+    </van-form>
     <div class="button-style" style="float: left" v-if="currentNode.reversible">
-      <van-button type="warning" style="width: 100%" @click="commitNode('REVERSE')">退回</van-button>
+      <van-button type="warning" style="width: 100%" @click="commitNode('REVERSE')">退回流程</van-button>
     </div>
     <div class="button-style" style="float: right">
-      <van-button type="success" style="width: 100%" @click="commitNode('PASS')">提交</van-button>
+      <van-button type="success" style="width: 100%" @click="commitNode('PASS')">提交流程</van-button>
     </div>
   </div>
 </template>
@@ -45,6 +58,7 @@ import { showNotify } from 'vant';
 import { getPersonalTodoDetail, getPersonalTargetDetail } from '@/api/personal';
 import { currentNode } from '@/api/workFlowNodeInstance';
 import { commit } from '@/api/workflow';
+import { doFeedback } from '@/api/personalTarget';
 
 export default {
   data() {
@@ -55,6 +69,8 @@ export default {
       currentNode: {},
       // 节点提交信息
       commitInfo: {},
+      productionType: null,
+      feedback: []
     };
   },
   created() {
@@ -64,6 +80,39 @@ export default {
     this.getTargetDetail();
     this.getCurrentNode();
   },
+  computed: {
+    productionTypes() {
+      if (this.currentNode.nodeCode == 'QUOTATION_FEEDBACK') {
+        return [
+          { text: '出价值意见书', value: 'STATEMENT' },
+          { text: '出报告', value: 'REPORT' },
+          { text: '出复评函', value: 'LETTER' },
+          { text: '结束', value: 'NONE' },
+        ]
+      }
+      if (this.currentNode.nodeCode == 'STATEMENT_FEEDBACK') {
+        return [
+          { text: '修改意见书', value: 'CHANGE_STATEMENT' },
+          { text: '出报告', value: 'REPORT' },
+          { text: '出复评函', value: 'LETTER' },
+          { text: '结束', value: 'NONE' },
+        ]
+      }
+      if (this.currentNode.nodeCode == 'REPORT_FEEDBACK') {
+        return [
+          { text: '修改报告', value: 'CHANGE_REPORT' },
+          { text: '出复评函', value: 'LETTER' },
+          { text: '结束', value: 'NONE' },
+        ]
+      }
+      if (this.currentNode.nodeCode == 'LETTER_FEEDBACK') {
+        return [
+          { text: '修改复评函', value: 'CHANGE_LETTER' },
+          { text: '结束', value: 'NONE' },
+        ]
+      }
+    }
+  },
   methods: {
     // 获取待办详情
     getTodoDetail() {
@@ -81,6 +130,10 @@ export default {
         getPersonalTargetDetail(this.personal.id).then((res) => {
           if (res.code === 200) {
             this.personalTarget = res.data;
+            const feedback = res.data.feedback;
+            if (feedback){
+              this.feedback = JSON.parse(res.data.feedback);
+            }
           }
         });
       }
@@ -106,14 +159,85 @@ export default {
         this.commitInfo.instanceNodeId = this.currentNode.instanceId;
         this.commitInfo.state = state;
         this.commitInfo.businessSubId = this.personal.orderId;
-        commit(this.commitInfo).then((res) => {
-          if (res.code === 200 && res.data) {
-            showNotify({ type: 'success', message: '节点提交成功' });
-            history.back();
-          }
-        });
+        //检查提交的节点
+        const valid = this.checkNodeCommit();
+        if (valid) {
+          commit(this.commitInfo).then((res) => {
+            if (res.code === 200 && res.data) {
+              showNotify({ type: 'success', message: '节点提交成功' });
+              history.back();
+            }
+          });
+        }
       });
     },
+    //报价客户反馈提交
+    doFeedback() {
+      let taskData = new Object();
+      taskData.id = this.personalTarget.id;
+      taskData.personalId = this.personalTarget.personalId;
+      this.feedback.push(this.productionType);
+      this.feedback = Array.from(new Set(this.feedback));
+      taskData.feedback = JSON.stringify(this.feedback);
+      let feedback = new Object();
+      feedback.taskData = taskData;
+      feedback.recordId = this.currentNode.tasks[0].recordId;
+      doFeedback(feedback).then((res) => {
+        if (res.code === 200 && res.data) {
+          showNotify({ type: 'success', message: '反馈提交成功。' });
+        }
+        this.getTargetDetail();
+      });
+    },
+    checkNodeCommit() {
+      //提交报价客户反馈节点需要的参数
+      if (this.currentNode.nodeCode == 'QUOTATION_FEEDBACK') {
+        if (!this.feedback || this.feedback.length==0) {
+          showNotify({ type: 'danger', message: '请选择反馈信息' });
+          return false;
+        }
+        this.commitInfo.production = this.feedback;
+        this.commitInfo.ccId = this.personal.clienteleId;
+        this.commitInfo.ifFeedback = false;
+      }
+      if (this.currentNode.nodeCode == 'STATEMENT_FEEDBACK') {
+        const filter = this.feedback.filter(item => item != 'STATEMENT');
+        if (filter.length==0) {
+          showNotify({ type: 'danger', message: '请选择反馈信息' });
+          return false;
+        }
+        this.commitInfo.production = this.feedback;
+        this.commitInfo.ccId = this.personal.clienteleId;
+        this.commitInfo.ifFeedback = false;
+      }
+      if (this.currentNode.nodeCode == 'REPORT_FEEDBACK') {
+        let filter = this.feedback.filter(item => item != 'STATEMENT');
+        filter = filter.filter(item => item != 'CHANGE_STATEMENT');
+        filter = filter.filter(item => item != 'REPORT');
+        if (filter.length==0) {
+          showNotify({ type: 'danger', message: '请选择反馈信息' });
+          return false;
+        }
+        this.commitInfo.production = this.feedback;
+        this.commitInfo.ccId = this.personal.clienteleId;
+        this.commitInfo.ifFeedback = false;
+      }
+      if (this.currentNode.nodeCode == 'LETTER_FEEDBACK') {
+        let filter = this.feedback.filter(item => item != 'STATEMENT');
+        filter = filter.filter(item => item != 'CHANGE_STATEMENT');
+        filter = filter.filter(item => item != 'REPORT');
+        filter = filter.filter(item => item != 'CHANGE_REPORT');
+        filter = filter.filter(item => item != 'LETTER');
+        if (filter.length==0) {
+          showNotify({ type: 'danger', message: '请选择反馈信息' });
+          return false;
+        }
+        this.commitInfo.production = this.feedback;
+        this.commitInfo.ccId = this.personal.clienteleId;
+        this.commitInfo.ifFeedback = false;
+      }
+      return true;
+    },
   },
 };
 </script>