Преглед на файлове

个贷报告出库申请

wucl преди 1 година
родител
ревизия
4ea1100c73

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

@@ -13,5 +13,8 @@ export default {
 
   majorTaskDoneList(params){
     return request.get(`workTaskRecord/major/done`,{ params: params })
+  },
+  personalTaskTodoList(params){
+    return request.get(`workTaskRecord/personal/todo`,{ params: params })
   }
 }

+ 2 - 8
src/components/workflowBoard.vue

@@ -1,13 +1,6 @@
 <template>
   <div class="contanier">
       <el-card shadow="always" style="margin-bottom:20px;">
-        <!-- <div class="button-area">
-        <el-button v-if="nodeBusinessInfo.currentNodePermission.commit" class="y-save"  type="success" round @click="commit('PASS')" :disabled="!nodeBusinessInfo.doWorkflow">提交</el-button>
-        <el-button v-if="nodeBusinessInfo.currentNodePermission.reversible" class="y-save"  type="info" round @click="commit('REVERSE')" :disabled="!nodeBusinessInfo.doWorkflow">退回</el-button>
-        <el-button v-if="nodeBusinessInfo.currentNodePermission.skippable" class="y-save"  type="warning" round @click="commit('SKIP')" :disabled="!nodeBusinessInfo.doWorkflow">跳过</el-button>
-        <el-button v-if="nodeBusinessInfo.currentNodePermission.terminable" class="y-save"  type="danger" round @click="commit('TERMINATE')" :disabled="!nodeBusinessInfo.doWorkflow">终止</el-button>
-        <el-button v-if="nodeBusinessInfo.currentNodePermission.restartable" class="y-save"  type="danger" round @click="commit('RESTART')" :disabled="!nodeBusinessInfo.doWorkflow">重置</el-button>
-      </div> -->
       <div class="node-area" >
         <div class="node-seq">
           <WrokflowNode name="开始" state="START" />
@@ -50,8 +43,10 @@ export default {
   watch:{
     nodeBusinessInfo:{
       handler(newVal,oldVal){
+        console.log(newVal.production,oldVal.production);
           if (newVal.ccId){
              this.workNodeCommit.ccId= newVal.ccId;
+             this.workNodeCommit.production= newVal.production;
           }
       },
       deep:true
@@ -161,7 +156,6 @@ export default {
       commit.doSecondCheck = this.nodeBusinessInfo.doSecondCheck;
       commit.doThirdCheck = this.nodeBusinessInfo.doThirdCheck;
       commit.ifFeedback = this.nodeBusinessInfo.ifFeedback;
-      console.log(commit);
       let isOk = true
       this.$emit('workflowCommitVerify',{"commit":commit},val =>{
         if (!val.state){

+ 20 - 14
src/views/finance/outWarehouseCheck.vue

@@ -19,12 +19,12 @@
         </el-button>
       </template>
       <parentTable  :data="pageData.records" slot="table" style="width: 100%;">
-        <el-table-column label="业务类型" align="center">
+        <el-table-column label="业务类型" align="center" width='120'>
           <template slot-scope="{row}">
             <span>{{ businessTypeAlias(row.businessType) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="报告号" align="center" width='200' >
+        <el-table-column label="报告号" align="center" width='300' >
           <template slot-scope="{row}">
             <span>{{ row.reportNo }}</span>
           </template>
@@ -39,7 +39,7 @@
             <span>{{ row.standardAmount }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="申请原因" align="center" width='150' show-overflow-tooltip>
+        <el-table-column label="申请原因" align="center" width='300' show-overflow-tooltip>
           <template slot-scope="{row}">
             <span>{{ row.remark==null?'-':row.remark}}</span>
           </template>
@@ -49,12 +49,12 @@
             <span>{{ row.applyName}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="部门审核状态" align="center" width='150'>
+        <el-table-column label="部门审核状态" align="center" >
           <template slot-scope="{row}">
             <span>{{ row.departmentCheckState}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="部门审核人" align="center" width='150'>
+        <el-table-column label="部门审核人" align="center" >
           <template slot-scope="{row}">
             <span>{{ row.departmentChecker}}</span>
           </template>
@@ -69,7 +69,7 @@
             <span>{{ row.departmentReply==null?'-':row.departmentReply}}</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.financeCheckState}}</span>
           </template>
@@ -88,13 +88,13 @@
           <template slot-scope="{row}">
             <span>{{ row.financeReply==null?'-':row.departmentReply}}</span>
           </template>
-        </el-table-column>
-        <el-table-column
+        </el-table-column> -->
+        <el-table-column v-if="taskId"
         align = "center" fixed="right"  width='120'
           label="操作">
           <template slot-scope="{row}">
             <PermissionButton menu-code="_views_do_out_warehouse_check" class-name="filter-item" type="success"
-              :page-jump="false" round size="mini" @click="doCheck(row.id)" />
+              :page-jump="false" round size="mini" @click="doCheck(row.id)" :disabled="row.departmentCheckState" />
           </template>
         </el-table-column>
       </parentTable>
@@ -147,7 +147,7 @@ export default {
         page: 1,
         size: 10,
         descs: 'id',
-        keyword:null
+        keyword:null,
       },
       checkDialog:false,
       checkDTO:{
@@ -163,13 +163,14 @@ export default {
     }
   },
   created() {
-    this.getList();
     this.todoBusinessId = this.$route.query.todoBusinessId;
     this.statementNo = this.$route.query.sNo;
     this.reportNo = this.$route.query.rNo;
     this.taskId = this.$route.query.tId;
     this.currentNodeId = this.$route.query.cId;
     this.nodeCode = this.$route.query.nCode;
+    this.businessType = this.$route.query.businessType;
+    this.getList();
   },
   methods: {
   
@@ -191,15 +192,20 @@ export default {
       this.getList()
     },
     getList() {
-      this.listQuery.keyword = this.$route.query.rNo;
-      this.$api.productionOutWarehouse.list(Object.assign({}, this.listQuery)).then(res=>{
+      this.listQuery.keyword = this.$route.query.sNo;
+      this.$api.productionOutWarehouse.list(Object.assign({businessType:this.businessType}, this.listQuery)).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
         }
       })
     },
     businessTypeAlias(code){
-      return '大中型'
+      if (code === 'MAJOR_BUSINESS'){
+        return '大中型业务'
+      }
+      if (code === 'PERSONAL_BUSINESS'){
+        return '个贷业务'
+      }
     },
     doCheck(id){
         this.checkDialog = true;

+ 1 - 1
src/views/major/todoList.vue

@@ -236,7 +236,7 @@ export default {
          return;
       }
       if (row.nodeCode === 'REPORT_OUT_FINANCE_CHECK' || row.nodeCode === 'REPORT_OUT_DEPARTMENT_CHECK' || row.nodeCode === 'LETTER_OUT_FINANCE_CHECK' || row.nodeCode === 'LETTER_OUT_DEPARTMENT_CHECK'){
-         this.$router.push(`/out/warehouse/check?todoBusinessId=${row.businessId}&sNo=${statementNo}&rNo=${reportNo}&tId=${row.taskId}&cId=${row.currentNodeId}&nCode=${row.nodeCode}`)
+         this.$router.push(`/out/warehouse/check?todoBusinessId=${row.businessId}&sNo=${statementNo}&rNo=${reportNo}&tId=${row.taskId}&cId=${row.currentNodeId}&nCode=${row.nodeCode}&businessType=PERSONAL_BUSINESS`)
          return;
       }
       if (row.nodeCode === 'BUSINESS_ARCHIVING'){

+ 90 - 32
src/views/personal/myOrder.vue

@@ -39,7 +39,7 @@
             <span>{{ row.orderId }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="面积" align="center" width="130" prop="reportNo">
+        <el-table-column label="面积" align="center" width="130">
           <template slot-scope="{row}">
             <span>{{ row.acreage }}</span>
           </template>
@@ -102,12 +102,12 @@
         <el-table-column fixed="right" label="操作" width="130" align="center">
           <template slot-scope="{row}">
             <el-button round type="text" size="small" @click="orderDetail(row)">详情</el-button>
-            <el-button type="text" size="small" @click="productionList(row)">产品包</el-button>
+            <el-button type="text" size="small" @click="productionList(row.id)">产品包</el-button>
           </template>
         </el-table-column>
       </parentTable>
     </y-page-list-layout>
-    <el-dialog :visible.sync="productionListDialog" width="60%" center  custom-class="doWarehouseClass">
+    <el-dialog :visible.sync="productionListDialog" width="60%" center  custom-class="doWarehouseClass" @closed="cleanProductionListDialog()">
       <el-collapse v-model="activeName" accordion v-if="bag.productions.length>0">
         <el-collapse-item v-for="(r,index) in bag.productions" :name="index">
           <template slot="title">
@@ -116,10 +116,11 @@
             {{r.productionNo}}
           </template>
           <el-card style="margin-top:20px" shadow="hover">
-            <div slot="header" class="clearfix">
-              <!-- <span style="font-size:16px;font-weight:bold;">{{aliasProductionType(r.production)}}</span> -->
-              <el-button v-if="(r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)" 
-                style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openApplyOutWarehouseList(bag)">出库申请</el-button>
+            <div slot="header" class="clearfix"  >
+              <el-button v-if="(r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)"
+                style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openApplyOutWarehouseList(bag.businessId)">出库申请记录</el-button>
+              <el-button v-if="(taskId && r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)"
+                style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openOutApply(bag.businessId)">出库申请</el-button>
             </div>
             <el-form :model="r">
               <el-row>
@@ -205,7 +206,6 @@
       <el-empty v-else description="暂无产品"></el-empty>
     </el-dialog>
     <el-dialog :visible.sync="outWarehouseListDialog" width="70%" center  custom-class="doWarehouseClass" >
-      <el-button type="danger" round @click="outWarehouseDialog = true">新增出库申请</el-button>
       <div style="margin-top:30px;">
         <el-table
           :data="outApllyList"
@@ -217,7 +217,7 @@
             label="申请时实收款金额(元)"
             width="180">
             <template slot-scope="{row}">
-              <span>{{ row.realAmount==null?'-': row.realAmount}}</span>
+              <span style="color:red;font-weight: bold;">{{ row.realAmount==null?'未收款': row.realAmount}}</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -376,7 +376,6 @@ export default {
       bag:{
         businessId:null,
         businessType:null,
-        reportNo:null,
         productions:[]
       },
       activeName: '0',
@@ -393,6 +392,14 @@ export default {
   },
   created() {
     this.getPage();
+    this.todoBusinessId = this.$route.query.todoBusinessId;
+    this.taskId = this.$route.query.tId;
+    this.currentNodeId = this.$route.query.cId;
+    this.orderId = this.$route.query.orderId;
+    if(this.todoBusinessId){
+      this.productionListDialog = true;
+      this.productionList(this.todoBusinessId)
+    }
   },
   methods: {
     getPage() {
@@ -431,12 +438,10 @@ export default {
     orderDetail(row){
       this.$router.push(`/personal/order?id=${row.id}&couldEdit=${false}&recall=${true}$couldBack=${true}&back=${'/personal/my/order'}`)
     },
-    productionList(row){
+    productionList(id){
       this.productionListDialog = true;
-      this.outWarehouse.orderFundId = row.orderFundId;
-      this.outWarehouse.realAmount = row.realAmount;
-      if (row.id){
-          this.$api.businessProduction.personalBag(row.id).then(res=>{
+      if (id){
+          this.$api.businessProduction.personalBag(id).then(res=>{
             if (res.code === 200 && res.data!=null){
                 let prods = res.data.productions
                 if (prods){
@@ -473,44 +478,97 @@ export default {
         }
         return '报告(技术报告、结果报告)'
     },
-    openApplyOutWarehouseList(bag){
-      this.getListByBizTypeProductionId(bag.businessId);
+    openApplyOutWarehouseList(businessId){
+      this.getListByBizTypeProductionId(businessId);
       this.outWarehouseListDialog = true;
-      this.outWarehouse.businessType = 'PERSOANL_BUSINESS';
-      this.outWarehouse.businessId = bag.businessId;
+    
     },
-    getListByBizTypeProductionId(orderId){
-      this.$api.productionOutWarehouse.getPersonalByOrderId(orderId).then(res=>{
+    getListByBizTypeProductionId(businessId){
+      this.$api.productionOutWarehouse.getPersonalByOrderId(businessId).then(res=>{
           if (res.code === 200){
               this.outApllyList = res.data;
           }
         })
     },
     doApplyOut(){
-      let taskRecordDTO = new Object();
-      taskRecordDTO.recordId = this.taskId;
-      taskRecordDTO.taskData = this.outWarehouse;
-      console.log(this.outWarehouse);
-      this.$api.productionOutWarehouse.add(taskRecordDTO).then(res=>{
+      this.$refs.outWarehouse.validate(valid=>{
+        if (valid){
+          let taskRecordDTO = new Object();
+          taskRecordDTO.recordId = this.taskId;
+          taskRecordDTO.taskData = this.outWarehouse;
+          console.log(this.outWarehouse);
+          this.$api.productionOutWarehouse.add(taskRecordDTO).then(res=>{
+            if (res.code === 200 && res.data){
+              this.$notify({
+                  title: '成功',
+                  message: '出库申请已提交',
+                  type: 'success',
+                  duration: 2000
+                });
+                this.commitNode();
+                this.outWarehouseDialog = false;
+                this.outWarehouseListDialog = false;
+                this.productionListDialog = false;
+            }else {
+              this.$notify({
+                  title: '失败',
+                  message: '出库申请提交失败',
+                  type: 'error',
+                  duration: 2000
+                });
+            }
+          })
+        }
+      })
+    },
+    commitNode(){
+      let commit = new Object;
+      commit.instanceNodeId = this.currentNodeId;
+      commit.state = 'PASS';
+      commit.comments = this.outWarehouse.remark;
+      commit.businessSubId = this.orderId;
+      this.$api.workflow.commit(commit).then(res=>{
         if (res.code === 200 && res.data){
           this.$notify({
               title: '成功',
-              message: '出库申请已提交',
+              message: '工作流节点提交成功。',
               type: 'success',
               duration: 2000
             });
-            this.commitNode();
-            this.outWarehouseDialog = false;
-            this.outWarehouseListDialog = false;
-        }else {
+        }else{
           this.$notify({
               title: '失败',
-              message: '出库申请提交失败',
+              message: '工作流节点提交失败,请联系管理员。',
               type: 'error',
               duration: 2000
             });
         }
       })
+    },
+    cleanProductionListDialog(){
+      this.bag.productions = [];
+      this.bag.businessId=null;
+      this.bag.property = null;
+    },
+    openOutApply(businessId){
+      const applys = this.outApllyList;
+      if (applys.length===0){
+        this.getListByBizTypeProductionId(businessId);
+      }
+      for (let i in applys){
+        if (applys[i].departmentCheckState==null){
+          this.$notify({
+              title: '提示',
+              message: '已有申请待审核,请勿重复申请。',
+              type: 'info',
+              duration: 2000
+            });
+            return;
+        }
+      }
+      this.outWarehouse.businessType = 'PERSONAL_BUSINESS';
+      this.outWarehouse.businessId = businessId;
+      this.outWarehouseDialog = true;
     }
   },
   

+ 21 - 13
src/views/personal/todoDetail.vue

@@ -1085,23 +1085,23 @@
           <el-button type="primary" @click="saveFeedback()" >保存</el-button>
         </span>
       </el-dialog>
-      <el-dialog  :visible.sync="inWarehouseDialog" width="25%" center top="35vh" custom-class="doWarehouseClass">
+      <el-dialog  :visible.sync="inWarehouseDialog" width="30%" center top="35vh" custom-class="doWarehouseClass">
         <div>
           <i class="el-icon-warning" style="color:RGB(230,162,60);font-size:22px;margin-right:10px;"></i>
           <span style="position:absolute;top:58px;padding-right:50px">{{ warehouseTip }}</span>
         </div>
         <span slot="footer" class="dialog-footer">
-          <el-button @click="warehouseDialog = false">取 消</el-button>
+          <el-button @click="inWarehouseDialog = false">取 消</el-button>
           <el-button type="primary" @click="doInWareHouse()">确 定</el-button>
         </span>
       </el-dialog>
-      <el-dialog  :visible.sync="outWarehouseDialog" width="25%" center top="35vh" custom-class="doWarehouseClass">
+      <el-dialog  :visible.sync="outWarehouseDialog" width="30%" center top="35vh" custom-class="doWarehouseClass">
         <div>
           <i class="el-icon-warning" style="color:RGB(230,162,60);font-size:22px;margin-right:10px;"></i>
           <span style="position:absolute;top:58px">{{ warehouseTip }}</span>
         </div>
         <span slot="footer" class="dialog-footer">
-          <el-button @click="warehouseDialog = false">取 消</el-button>
+          <el-button @click="outWarehouseDialog = false">取 消</el-button>
           <el-button type="primary" @click="doOutWareHouse()">确 定</el-button>
         </span>
       </el-dialog>
@@ -1230,6 +1230,14 @@
           },
           deep:true
         },
+        feedback:{
+          handler(newVal,oldVal){
+            if (newVal!=oldVal){
+              this.$refs.board.getInstanceQueue();
+            }
+          },
+          deep:true
+        }
       },
       computed: {
         certificateCouldEdit(){
@@ -1591,12 +1599,14 @@
                       this.target.sellingAbility = JSON.parse(res.data.sellingAbility);
                     }
                     this.feedback = JSON.parse(res.data.feedback);
+                    this.nodeBusinessInfo.production = this.feedback;
                     if (this.feedback.includes("STATEMENT")){
                       this.hasStatement = true;
                     }
                     if (this.feedback.includes("REPORT")){
                       this.hasReport = true;
                     }
+                    
                 }
               })
           }
@@ -1606,15 +1616,13 @@
                 this.$api.workNodeInstance.currentNode({"mainBusiness":"PERSONAL_BUSINESS","businessId":this.personalId,"businessSubId":this.businessSubId}).then(res=>{
                     if (res.code === 200){
                         if(res.data){
-                        this.currentNode = res.data;
-                        this.nodeBusinessInfo.currentInstanceNodeId = res.data.instanceId;
-                        this.nodeBusinessInfo.currentNodeInstanceCode = res.data.nodeCode;
-                        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.nodeBusinessInfo.production = JSON.parse(this.target.feedback);
-                        this.$refs.board.getInstanceQueue();
+                          this.currentNode = res.data;
+                          this.nodeBusinessInfo.currentInstanceNodeId = res.data.instanceId;
+                          this.nodeBusinessInfo.currentNodeInstanceCode = res.data.nodeCode;
+                          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;
                         }
                     }
                 })

+ 25 - 11
src/views/personal/todoList.vue

@@ -27,17 +27,17 @@
         </el-button>
       </template>
       <parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
-        <el-table-column label="项目编号" align="center" width="200" >
+        <el-table-column label="坐落" align="center" width="200">
           <template slot-scope="{row}">
-            <span>{{ row.orderId }}</span>
+            <span>{{ row.location }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="坐落" align="center" width="150">
+        <el-table-column label="项目编号" align="center" width="140" >
           <template slot-scope="{row}">
-            <span>{{ row.location }}</span>
+            <span>{{ row.orderId }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="面积" align="center" width="280" prop="reportNo">
+        <el-table-column label="面积" align="center" width="130">
           <template slot-scope="{row}">
             <span>{{ row.acreage }}</span>
           </template>
@@ -82,9 +82,9 @@
             <span>{{ row.bailorA}}{{ row.bailorB}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="委托人电话" align="center">
+        <el-table-column label="委托人电话" align="center" width="130">
           <template slot-scope="{row}">
-            <span>{{ row.bailoraTel }} {{ row.bailorbTel }}</span>
+            <span>{{ row.bailorATel }} {{ row.bailorBTel }}</span>
           </template>
         </el-table-column>
         <el-table-column label="客户经理" align="center">
@@ -109,7 +109,7 @@
         </el-table-column>
         <el-table-column label="当前节点" align="center" width="130">
           <template slot-scope="{row}">
-            <span>{{ row.currentNodeName }}</span>
+            <span>{{ row.nodeName }}</span>
           </template>
         </el-table-column>
         <el-table-column label="处理人" align="center" width="130">
@@ -117,11 +117,16 @@
             <span>{{ row.handlerName }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="下单时间" align="center" width="100" prop="created" sortable>
+        <el-table-column label="下单时间" align="center" width="100" >
           <template slot-scope="{row}">
             {{ row.created }}
           </template>
         </el-table-column>
+        <el-table-column label="节点生成时间" align="center" width="120"  >
+          <template slot-scope="{row}">
+            {{ row.nodeCreated }}
+          </template>
+        </el-table-column>
         <el-table-column label="操作" align="center" width="80" fixed="right">
           <template slot-scope="{row}">
             <el-button round type="primary" @click="toDetail(row)">办理</el-button>
@@ -165,7 +170,7 @@ export default {
   },
   methods: {
     getPage() {
-      this.$api.personal.list(this.listQuery).then(res=>{
+      this.$api.workNodeTaskRecord.personalTaskTodoList(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
         }
@@ -197,7 +202,16 @@ export default {
     },
 
     toDetail(row){
-      this.$router.push(`/personal/todo?id=${row.id}&currentNodeCode=${row.currentNodeCode}&orderId=${row.orderId}&doWorkflow=${true}&back=${'/personal/todo/list'}`)
+      const nodeCode = row.nodeCode;
+      if (nodeCode==='REPORT_OUT_APPLY' || nodeCode==='LETTER_OUT_APPLY' ){
+        this.$router.push(`/personal/my/order?todoBusinessId=${row.businessId}&orderId=${row.orderId}&tId=${row.taskId}&cId=${row.currentNodeId}`)
+      }
+      else if(nodeCode==='REPORT_OUT_DEPARTMENT_CHECK' || nodeCode==='LETTER_OUT_DEPARTMENT_CHECK'){
+        this.$router.push(`/out/warehouse/check?todoBusinessId=${row.businessId}&sNo=${row.orderId}&tId=${row.taskId}&cId=${row.currentNodeId}&nCode=${row.nodeCode}&businessType=PERSONAL_BUSINESS`)
+      }
+      else{
+        this.$router.push(`/personal/todo?id=${row.businessId}&currentNodeCode=${row.nodeCode}&orderId=${row.orderId}&doWorkflow=${true}&back=${'/personal/todo/list'}`)
+      }
     },
   },