Sfoglia il codice sorgente

个贷外业提交实勘信息

wucl 1 anno fa
parent
commit
4ac1bd27a8
2 ha cambiato i file con 161 aggiunte e 2 eliminazioni
  1. 16 0
      src/api/modules/personalScene.js
  2. 145 2
      src/views/personal/todoDetail.vue

+ 16 - 0
src/api/modules/personalScene.js

@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+/*
+* 个贷实勘
+*/
+export default {
+  saveScene(params){
+    return request.post(`personalScene`, params)
+  },
+  getScene(params){
+    return request.get(`personalScene/${params}`)
+  },
+  updateScene(params){
+    return request.put(`personalScene`,params)
+  }
+
+}

+ 145 - 2
src/views/personal/todoDetail.vue

@@ -277,6 +277,93 @@
           </div>
         </el-form>
       </el-tab-pane>
+      <el-tab-pane name="scene" class="pane-class" :lazy=true>
+        <span slot="label"><i class="el-icon-pie-chart"></i> 外业实勘</span>
+        <el-form ref="sceneForm" :model="sceneForm" class="form-container" :rules="rules">
+          <div class="createMajor-main-container">
+            <div class="postInfo-container">
+              <div>
+                <el-divider content-position="left">
+                  <h3 class="title">
+                    <div class="avatar-wrapper icon-title">实勘</div>
+                    <div class="icon-info">实勘信息</div>
+                  </h3>
+                </el-divider>
+              </div>
+              <div >
+                <el-row class="row-style">
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-button type="danger" round @click="saveScene()">保存</el-button>
+                  </el-col>
+                </el-row>
+                <el-row class="row-style" style="margin-top: 10px;">
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-form-item prop="orderId" label-width="120px" class="postInfo-container-item" label="订单号:">
+                      <el-input  disabled readonly :value="personal.orderId"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-form-item prop="sceneUserName" label-width="120px" class="postInfo-container-item" label="实勘人:">
+                      <el-input  disabled readonly :value="personal.outwardStaffName"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :xs="24" :sm="12" :lg="12" :span="6">
+                    <el-form-item prop="productionType" label-width="120px" class="postInfo-container-item"
+                      label="坐落:">
+                      <el-input  disabled readonly :value="personal.location"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                  </el-row>
+                  <el-row class="row-style">
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-form-item prop="inRingDewlling" label-width="120px" class="postInfo-container-item"
+                    :rules="{ required: true, message: '绕城内住宅不能为空', trigger: 'blur' }"
+                      label="绕城内住宅:">
+                      <el-input v-model="sceneForm.inRingDewlling"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-form-item prop="outRingDewlling" label-width="120px" class="postInfo-container-item"
+                    :rules="{ required: true, message: '绕城外住宅不能为空', trigger: 'blur' }"
+                      label="绕城外住宅:">
+                      <el-input   v-model="sceneForm.outRingDewlling"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-form-item prop="inRingBuilding" label-width="120px" class="postInfo-container-item"
+                    :rules="{ required: true, message: '绕城内商业不能为空', trigger: 'blur' }"
+                      label="绕城内商业:">
+                      <el-input  v-model="sceneForm.inRingBuilding"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :xs="24" :sm="12" :lg="6" :span="6">
+                    <el-form-item prop="outRingBuilding" label-width="120px" class="postInfo-container-item"
+                    :rules="{ required: true, message: '绕城外商业不能为空', trigger: 'blur' }"
+                      label="绕城外商业:">
+                      <el-input v-model="sceneForm.outRingBuilding"
+                        class="filter-item" />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row class="row-style">
+                  <el-col :xs="24" :sm="12" :lg="24" :span="6">
+                      <el-form-item label="实勘备注:" prop="remark" label-width="120px" class="postInfo-container-item">
+                        <el-input v-model="sceneForm.remark" :autosize="{ minRows: 3, maxRows: 3 }" class="filter-item"
+                          type="textarea" />
+                      </el-form-item>
+                    </el-col>
+                </el-row>
+              </div>
+            </div>
+          </div>
+        </el-form>
+      </el-tab-pane>
       <el-tab-pane id="evaluteObject" name="evaluate" class="pane-class" :lazy=true>
         <span slot="label"><i class="el-icon-office-building"></i> 评估对象</span>
         <el-form ref="targetForm" :model="target">
@@ -1359,7 +1446,16 @@ export default {
         targetId: null,
         production: null
       },
-      showProds: true
+      showProds: true,
+      sceneForm:{
+        id:null,
+        personalId:null,
+        inRingDewlling:null,
+        outRingDewlling:null,
+        inRingBuilding:null,
+        outRingBuilding:null,
+        remark:null
+      }
 
     }
   },
@@ -1378,6 +1474,7 @@ export default {
     this.getWorkflowLogs();
     this.getCurrentNodeInfo();
     this.getProductions();
+    this.getScene();
 
   },
 
@@ -1463,6 +1560,9 @@ export default {
       if ("producution" === tab && this.feedback == null) {
         this.feedback = [];
       }
+      if ("scene" === tab){
+        this.getScene();
+      }
     },
     showCredentials() {
       this.showCred = {};
@@ -1662,8 +1762,9 @@ export default {
     },
     jumpTabs() {
       const orderTag = ['OPENING_ORDER', 'DEPARTMENT_ALLOCATION'];
-      const evaluate = ['SPOT_RECONNAISSANCE', 'DETERMINE_PRICE'];
+      const evaluate = ['DETERMINE_PRICE'];
       const certificates = ['GENERATE_STATEMENT', 'WRITE_REPORT', 'WRITE_LETTER']
+      const scenesTag = ['SPOT_RECONNAISSANCE']
       const nodeCode = this.$route.query.currentNodeCode;
       if (orderTag.includes(nodeCode)) {
         return 'order';
@@ -1677,6 +1778,9 @@ export default {
       if (this.feedback == null) {
         this.feedback = [];
       }
+      if (scenesTag.includes(nodeCode)){
+        return 'scene';
+      }
       return 'producution'
     },
     calulate() {
@@ -2175,6 +2279,45 @@ export default {
         })
       }
     },
+    saveScene(){
+      this.$refs.sceneForm.validate((valid) => {
+        if (valid) {
+          if (this.sceneForm.id) {
+            this.$api.personalScene.updateScene(this.sceneForm).then(res => {
+              if (res.code === 200 && res.data) {
+                this.$notify({
+                  title: '成功',
+                  message: '实勘信息更新成功',
+                  type: 'success',
+                  duration: 2000
+                })
+                this.getScene();
+              }
+            })
+          }else{
+            this.sceneForm.personalId = this.personal.id;
+            this.$api.personalScene.saveScene(this.sceneForm).then(res => {
+              if (res.code === 200 && res.data) {
+                this.$notify({
+                  title: '成功',
+                  message: '实勘信息添加成功',
+                  type: 'success',
+                  duration: 2000
+                })
+                this.getScene();
+              }
+            })
+          }
+        }
+      })
+    },
+    getScene(){
+      this.$api.personalScene.getScene(this.personalId).then(res => {
+        if (res.code === 200) {
+          this.sceneForm = res.data;
+        }
+      })
+    }
 
   }
 }