Prechádzať zdrojové kódy

个贷意见书撰写

wucl 1 rok pred
rodič
commit
1fdb3aad37

+ 4 - 1
src/api/modules/businessProduction.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 /*
-* 订单应收款
+* 业务产品
 */
 export default {
    bag(params1,params2){
@@ -17,5 +17,8 @@ export default {
    },
    allotMajorProduction(params){
       return request.post(`businessProduction/major/allot`,params)
+   },
+   doStamp(params){
+      return request.post(`businessProduction/doStamp`, params)
    }
 }

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

@@ -12,5 +12,8 @@ export default {
    },
    removeFile(params){
       return request.get(`personalProduction/remove/${params}`)
+   },
+   downloadPkg(params){
+      return request.get(`personalProduction/downloadPkg/${params}`)
    }
 }

+ 68 - 26
src/views/personal/todoDetail.vue

@@ -907,54 +907,59 @@
           </div>
               <div style="display: flex;margin-top: 100px; width: 100%;">
                 <div style="position:absolute;top:80px; left:6%">
-                  <el-button type="text">一键生成</el-button> <el-button type="text">全部下载</el-button>
+                  <el-button type="text">一键生成</el-button> <el-button type="text" @click="downloadPkg()">全部下载</el-button>
                 </div>
                 <el-card :body-style="{ padding: '0px'}" shadow="always" style="margin-left: 5%; margin-right: 5%; width: 20%;">
                   <img :src="statementCardPNG"  class="image">
                   <div style="padding: 14px;">
                     <span>房地产意见书</span> <time class="time">{{ statementProd.modified }}</time>
                     <div class="control" >
-                      <el-button type="text" class="button" @click="genProductionFile(1)">系统生成</el-button>
-                      <el-upload class="myupload"
+                      <el-button type="text" class="button" @click="doStamp(statementProd.files)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">加盖公章</el-button>
+                      <el-button type="text" class="button" @click="doStamp(statementProd.files)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">出入库</el-button>
+                      <el-button type="text" class="button" @click="genProductionFile(1)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">系统生成</el-button>
+                    </div>
+                  </div>
+                      <el-upload style="position: relative; top: -10px; padding: 10px;"
                               :action="'/api/personalProduction/upload/'+target.id+'/1'" :file-list="statementProd.files" 
                               :limit="1" :on-exceed="handleExceed" :on-preview="handleAttachmentPreview" :on-success="getProductions"
                               :before-remove="handleRemoveFile"	>
-                          <el-button type="text" >手动上传</el-button>
-                          </el-upload>
-                    </div>
-                  </div>
+                          <el-button type="text" style="position: relative; left: 10px;top: -4px;"  :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">手动上传</el-button>
+                      </el-upload>
+                   
                 </el-card>
                 <el-card :body-style="{ padding: '0px' }" shadow="always" style="margin-left: 5%; margin-right: 5%;width: 20%;">
                   <img :src="technicCardPNG" class="image">
                   <div style="padding: 14px;">
                     <span>技术报告</span><time class="time">{{ technicReportProd.modified }}</time>
                     <div class="control">
-                      <el-button type="text" class="button"  @click="genProductionFile(2)">系统生成</el-button>
-                      <el-upload class="myupload"
+                        <el-button type="text" class="button" @click="doStamp(statementProd.files)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">加盖公章</el-button>
+                        <el-button type="text" class="button" @click="doStamp(statementProd.files)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">出入库</el-button>
+                        <el-button type="text" class="button" @click="genProductionFile(2)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">系统生成</el-button>
+                    </div>
+                  </div>
+                  <el-upload style="position: relative; top: -10px; padding: 10px;"
                       :action="'/api/personalProduction/upload/'+target.id+'/2'" :file-list="technicReportProd.files"
                               :limit="1" :on-exceed="handleExceed" :on-preview="handleAttachmentPreview" :on-success="getProductions"
                               :before-remove="handleRemoveFile">
-                          <el-button  type="text">手动上传</el-button>
-                          </el-upload>
-                      
-                    </div>
-                  </div>
+                              <el-button type="text" style="position: relative; left: 10px;top: -4px;"  :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">手动上传</el-button>
+                      </el-upload>
                 </el-card>
                 <el-card :body-style="{ padding: '0px'}" shadow="always" style="margin-left: 5%; margin-right: 5%;width: 20%;">
                   <img :src="finalCardPNG"  class="image">
                   <div style="padding: 14px;">
                     <span>结果报告</span><time class="time">{{ finalReprotProd.modified }}</time>
-                    <div class="control">
-                      <el-button type="text" class="button" @click="genProductionFile(3)">系统生成</el-button>
-                      <el-upload class="myupload"
-                      :action="'/api/personalProduction/upload/'+target.id+'/3'" :file-list="finalReprotProd.files" 
-                              :limit="1" :on-exceed="handleExceed" :on-preview="handleAttachmentPreview" :on-success="getProductions"
-                              :before-remove="handleRemoveFile">
-                          <el-button type="text">手动上传</el-button>
-                          </el-upload>
-                          
-                    </div>
+                    <div class="control" >
+                      <el-button type="text" class="button" @click="doStamp(statementProd.files)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">加盖公章</el-button>
+                      <el-button type="text" class="button" @click="doStamp(statementProd.files)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">出入库</el-button>
+                      <el-button type="text" class="button" @click="genProductionFile(3)" :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">系统生成</el-button>
+                    </div>    
                   </div>
+                  <el-upload style="position: relative; top: -10px;padding: 10px;"
+                        :action="'/api/personalProduction/upload/'+target.id+'/3'" :file-list="finalReprotProd.files" 
+                                :limit="1" :on-exceed="handleExceed" :on-preview="handleAttachmentPreview" :on-success="getProductions"
+                                :before-remove="handleRemoveFile">
+                                <el-button type="text" style="position: relative; left: 10px;top: -4px;"  :disabled="currentNode.nodeCode!='GENERATE_STATEMENT'">手动上传</el-button>
+                      </el-upload>
                 </el-card>
               </div>
         </el-tab-pane>
@@ -1536,6 +1541,18 @@
                   this.decideProductionTypeDialog = true
                   return ;
                 }
+              case "GENERATE_STATEMENT":
+                  if (this.statementProd==null || this.statementProd.files.length===0){
+                      this.$notify({
+                            title: '提示',
+                            message: '请生成或上传房地产意见书后,再提交流程',
+                            type: 'error',
+                            duration: 3000
+                          });
+                      verify.state = false;
+                  }
+                  callback(verify);
+                  return ;
             }
           }
         },
@@ -1877,6 +1894,31 @@
           }else {
             this.selectRoll();
           }
+        },
+        downloadPkg(){
+          if (this.target.id){
+            this.$api.personalProduction.downloadPkg(this.target.id);
+          }
+        },
+        doStamp(files){
+            const file = files[0];
+            this.$api.businessProduction.doStamp(file).then(res=>{
+              if (res.code ===200 && res.data){
+                this.$notify({
+                      title: '成功',
+                      message:'加盖公章成功',
+                      type: 'success',
+                      duration: 2000
+                  });
+              }else{
+                this.$notify({
+                      title: '失败',
+                      message:'加盖公章失败',
+                      type: 'error',
+                      duration: 2000
+                    });
+              }
+            })
         }
       }
     }
@@ -1956,7 +1998,6 @@
 
   .button {
     float:left;
-    margin-right:10px;
   }
 
   .image {
@@ -1966,7 +2007,8 @@
   }
 
   .control{
-      margin-top:10px;
+      position: relative;
+      top: 10px;
   }
   </style>