فهرست منبع

前端-投资-页面

armg 1 سال پیش
والد
کامیت
5cf9552e22

+ 16 - 2
ruoyi-ui/src/api/invest/pool.js

@@ -22,7 +22,10 @@ export function addPool(data) {
   return request({
     url: '/invest/pool',
     method: 'post',
-    data: data
+    data: data,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
   })
 }
 
@@ -31,7 +34,10 @@ export function updatePool(data) {
   return request({
     url: '/invest/pool',
     method: 'put',
-    data: data
+    data: data,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
   })
 }
 
@@ -42,3 +48,11 @@ export function delPool(id) {
     method: 'delete'
   })
 }
+// 修改项目池状态
+export function editStage(data) {
+  return request({
+    url: '/invest/editStage',
+    method: 'put',
+    data: data
+  })
+}

+ 5 - 0
ruoyi-ui/src/utils/request.js

@@ -22,6 +22,11 @@ const service = axios.create({
 
 // request拦截器
 service.interceptors.request.use(config => {
+  console.log("------------config=",config)
+  
+  // if(config.headers.post){
+  //   config.headers.post['Content-Type']= config.headers
+  // }
   // 是否需要设置 token
   const isToken = (config.headers || {}).isToken === false
   // 是否需要防止数据重复提交

+ 13 - 5
ruoyi-ui/src/views/invest/channel/index.vue

@@ -17,6 +17,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+        <el-form-item label="渠道类别" prop="channelType">
+          <el-select v-model="form.channelType" placeholder="请选择渠道类别">
+            <el-option
+              v-for="dict in dict.type.channel_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
       <el-form-item label="联系人" prop="contacts">
         <el-input
           v-model="queryParams.contacts"
@@ -98,7 +108,7 @@
       <el-table-column label="主键ID" align="center" prop="id" />
       <el-table-column label="渠道名称" align="center" prop="channelName" />
       <el-table-column label="渠道编号" align="center" prop="channelCode" />
-      <el-table-column label="类别" align="center" prop="channelType" />
+      <el-table-column label="渠道类别" align="center" prop="channelType" />
       <el-table-column label="联系人" align="center" prop="contacts" />
       <el-table-column label="联系电话" align="center" prop="telephone" />
       <el-table-column label="渠道负责人" align="center" prop="channelHead" />
@@ -136,10 +146,7 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="渠道名称" prop="channelName">
           <el-input v-model="form.channelName" placeholder="请输入渠道名称" />
-        </el-form-item>
-        <el-form-item label="渠道编号" prop="channelCode">
-          <el-input v-model="form.channelCode" placeholder="请输入渠道编号" />
-        </el-form-item>
+        </el-form-item> 
         <el-form-item label="简介" prop="channelBlurb">
           <el-input v-model="form.channelBlurb" placeholder="请输入简介" />
         </el-form-item>
@@ -175,6 +182,7 @@ import { listChannel, getChannel, delChannel, addChannel, updateChannel } from "
 
 export default {
   name: "Channel",
+  dicts: ["channel_type"],
   data() {
     return {
       // 遮罩层

+ 15 - 11
ruoyi-ui/src/views/invest/components/contractList.vue

@@ -163,23 +163,23 @@
         <el-form-item label="项目ID" prop="projectPoolId">
           <el-input v-model="form.projectPoolId" placeholder="请输入项目ID" />
         </el-form-item>
-        <el-form-item label="项目阶段" prop="projectStage">
+        <!-- <el-form-item label="项目阶段" prop="projectStage">
           <el-input v-model="form.projectStage" placeholder="请输入项目阶段" />
-        </el-form-item>
-        <el-form-item label="会议编号" prop="meetingCode">
+        </el-form-item> -->
+        <!-- <el-form-item label="会议编号" prop="meetingCode">
           <el-input v-model="form.meetingCode" placeholder="请输入会议编号" />
-        </el-form-item>
-        <el-form-item label="状态" prop="delFlag">
+        </el-form-item> -->
+        <!-- <el-form-item label="状态" prop="delFlag">
           <el-input v-model="form.delFlag" placeholder="请输入状态" />
-        </el-form-item>
-        <el-form-item label="附件业务ID" prop="fileBusinessId">
+        </el-form-item> -->
+        <el-form-item label="文件" prop="files">
           <el-input
-            v-model="form.fileBusinessId"
-            placeholder="请输入附件业务ID"
+            v-model="form.files"
+            placeholder=""
           />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注" />
+          <el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -239,7 +239,11 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {},
+      rules: {
+        contractName: [{ required: true, trigger: "blur", message: "请输入" }],
+        projectPoolId: [{ required: true, trigger: "blur", message: "请输入" }],
+        files: [{ required: true,  message: "请上传" }]
+      },
     };
   },
   created() {

+ 17 - 6
ruoyi-ui/src/views/invest/components/fileList.vue

@@ -157,20 +157,30 @@
         <el-form-item label="项目阶段" prop="projectStage">
           <el-input v-model="form.projectStage" placeholder="请输入项目阶段" />
         </el-form-item>
+        <el-form-item label="文件类别" prop="fileType">
+          <el-select v-model="form.fileType" placeholder="请选择文件类别">
+            <el-option
+              v-for="dict in dict.type.file_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="会议编号" prop="meetingCode">
           <el-input v-model="form.meetingCode" placeholder="请输入会议编号" />
         </el-form-item>
-        <el-form-item label="附件业务ID" prop="fileBusinessId">
+        <el-form-item label="文件" prop="files">
           <el-input
-            v-model="form.fileBusinessId"
-            placeholder="请输入附件业务ID"
+            v-model="form.files"
+            placeholder="文件"
           />
         </el-form-item>
-        <el-form-item label="状态" prop="delFlag">
+        <!-- <el-form-item label="状态" prop="delFlag">
           <el-input v-model="form.delFlag" placeholder="请输入状态" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注" />
+          <el-input type="teatarea" v-model="form.remark" placeholder="请输入备注" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -197,6 +207,7 @@ export default {
       default: "1",//1=显示全部列表  2=显示某项目下的详情列表
     },
   },
+  dicts: ["file_type"],
   data() {
     return {
       // 遮罩层

+ 72 - 12
ruoyi-ui/src/views/invest/components/followList.vue

@@ -92,11 +92,14 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="主键ID" align="center" prop="id" />
-      <el-table-column label="项目ID" align="center" prop="porjectId" />
-      <el-table-column label="联系人" align="center" prop="contacts" />
+      <!-- <el-table-column label="主键ID" align="center" prop="id" /> -->
+      <el-table-column label="项目编号" align="center" prop="porjectId" />
+      <el-table-column label="项目名称" align="center" prop="porjectName" />
+      <el-table-column label="跟进人" align="center" prop="upPerson" />
+      <el-table-column label="跟进方式" align="center" prop="upWay" />
+      <el-table-column label="跟进内容" align="center" prop="upContent" />
       <el-table-column
-        label="实际跟进日期"
+        label="跟进日期"
         align="center"
         prop="realityUpDate"
         width="180"
@@ -105,8 +108,7 @@
           <span>{{ parseTime(scope.row.realityUpDate, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="跟进人" align="center" prop="upPerson" />
-      <el-table-column label="跟进方式" align="center" prop="upWay" />
+      <el-table-column label="创建时间" align="center" prop="creatTime" />
       <el-table-column
         label="操作"
         align="center"
@@ -144,25 +146,69 @@
     <!-- 添加或修改跟进记录对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="实际跟进日期" prop="realityUpDate">
+        <el-form-item label="项目名称">
+          <el-input
+            readonly
+            v-model="form.id"
+            placeholder="请选择"
+            @click="showProjectItem = true"
+          />
+          <!-- <div @click="showProjectItem = true">请选择</div> -->
+          <projectItem :showProjectItem="showProjectItem"></projectItem>
+        </el-form-item>
+        <el-form-item label="跟进日期" prop="realityUpDate">
           <el-date-picker
             clearable
             v-model="form.realityUpDate"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="请选择实际跟进日期"
+            placeholder="请选择跟进日期"
           >
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="跟进人" prop=""> </el-form-item>
+        <el-form-item label="跟进方式" prop="">
+          <el-select v-model="form.porjectGroup" placeholder="请选择跟进方式">
+            <el-option
+              v-for="dict in dict.type.up_way"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="跟进内容">
-          <editor v-model="form.upContent" :min-height="192" />
+          <el-input
+            rows="4"
+            type="textarea"
+            v-model="form.upContent"
+            placeholder="请输入跟进内容"
+          />
+        </el-form-item>
+        <el-form-item label="附件" prop="file">
+          <el-upload
+            class="upload-demo"
+            action=""
+            :on-preview="handlePreview"
+            :on-remove="handleRemove"
+            :before-remove="beforeRemove"
+            multiple
+            :file-list="fileList"
+          >
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
         </el-form-item>
         <el-form-item label="备注">
-          <editor v-model="form.mark" :min-height="192" />
+          <el-input
+            rows="4"
+            type="textarea"
+            v-model="form.mark"
+            placeholder="请输入备注"
+          />
         </el-form-item>
-        <el-form-item label="状态" prop="delFlag">
+        <!-- <el-form-item label="状态" prop="delFlag">
           <el-input v-model="form.delFlag" placeholder="请输入状态" />
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -180,6 +226,7 @@ import {
   addRecord,
   updateRecord,
 } from "@/api/invest/record";
+import projectItem from "./projectItem";
 
 export default {
   props: {
@@ -188,8 +235,12 @@ export default {
       default: "1", //1=显示全部列表  2=显示某项目下的详情列表
     },
   },
+  dicts: ["up_way"],
+  components: { projectItem },
   data() {
     return {
+      fileList: [],
+      showProjectItem: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -337,6 +388,15 @@ export default {
         `record_${new Date().getTime()}.xlsx`
       );
     },
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePreview(file) {
+      console.log(file);
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${file.name}?`);
+    },
   },
 };
 </script>

+ 14 - 2
ruoyi-ui/src/views/invest/components/meetingList.vue

@@ -187,6 +187,16 @@
         <el-form-item label="会议编号" prop="meetingCode">
           <el-input v-model="form.meetingCode" placeholder="请输入会议编号" />
         </el-form-item>
+        <el-form-item label="会议类别" prop="meetingType">
+          <el-select v-model="form.meetingType" placeholder="请选择会议类别">
+            <el-option
+              v-for="dict in dict.type.meeting_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="项目ID" prop="projectPoolId">
           <el-input v-model="form.projectPoolId" placeholder="请输入项目ID" />
         </el-form-item>
@@ -223,9 +233,9 @@
             placeholder="请输入内容"
           />
         </el-form-item>
-        <el-form-item label="状态" prop="delFlag">
+        <!-- <el-form-item label="状态" prop="delFlag">
           <el-input v-model="form.delFlag" placeholder="请输入状态" />
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -251,6 +261,8 @@ export default {
       default: "1",//1=显示全部列表  2=显示某项目下的详情列表
     },
   },
+  dicts: ["meeting_type"],
+  
   data() {
     return {
       // 遮罩层

+ 210 - 86
ruoyi-ui/src/views/invest/components/poolForm.vue

@@ -34,10 +34,10 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="所属行业" prop="industryGroup">
-        <el-select v-model="form.industryGroup" placeholder="请选择所属行业">
+      <el-form-item label="所属行业" prop="industry">
+        <el-select v-model="form.industry" placeholder="请选择所属行业">
           <el-option
-            v-for="dict in dict.type.porject_group"
+            v-for="dict in dict.type.CUSTOMER_TRADE"
             :key="dict.value"
             :label="dict.label"
             :value="dict.value"
@@ -62,85 +62,115 @@
       </el-form-item>
       <h3>项目公司信息</h3>
       <el-divider></el-divider>
-      <el-form-item label="公司名称" prop="companyName">
-        <el-input v-model="form.companyName" placeholder="请输入公司名称" />
+      <el-form-item label="公司名称" prop="tProjectCompany.companyName">
+        <el-input
+          v-model="form.tProjectCompany.companyName"
+          placeholder="请输入公司名称"
+        />
       </el-form-item>
-      <el-form-item label="统一社会信用代码" prop="companyCode">
+      <el-form-item label="统一社会信用代码" prop="tProjectCompany.companyCode">
         <el-input
-          v-model="form.companyCode"
+          v-model="form.tProjectCompany.companyCode"
           placeholder="请输入企业统一社会信用代码"
         />
       </el-form-item>
-      <el-form-item label="营业开始时间" prop="startTime">
+      <el-form-item label="营业开始时间" prop="tProjectCompany.startTime">
         <el-date-picker
           clearable
-          v-model="form.startTime"
+          v-model="form.tProjectCompany.startTime"
           type="date"
           value-format="yyyy-MM-dd"
           placeholder="请选择营业开始时间"
         >
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="营业结束时间" prop="endTime">
+      <el-form-item label="营业结束时间" prop="tProjectCompany.endTime">
         <el-date-picker
           clearable
-          v-model="form.endTime"
+          v-model="form.tProjectCompany.endTime"
           type="date"
           value-format="yyyy-MM-dd"
           placeholder="请选择营业结束时间"
         >
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="注册资本" prop="registeredCapital">
+      <el-form-item label="注册资本" prop="tProjectCompany.registeredCapital">
         <el-input
-          v-model="form.registeredCapital"
+          v-model="form.tProjectCompany.registeredCapital"
           placeholder="请输入注册资本"
         />
       </el-form-item>
-      <el-form-item label="注册地址" prop="registeredAddress">
+      <el-form-item label="注册地址" prop="tProjectCompany.registeredAddress">
         <el-input
-          v-model="form.registeredAddress"
+          v-model="form.tProjectCompany.registeredAddress"
           placeholder="请输入注册地址"
         />
       </el-form-item>
-      <el-form-item label="实缴资本" prop="paidCapital">
-        <el-input v-model="form.paidCapital" placeholder="请输入实缴资本" />
+      <el-form-item label="实缴资本" prop="tProjectCompany.paidCapital">
+        <el-input
+          v-model="form.tProjectCompany.paidCapital"
+          placeholder="请输入实缴资本"
+        />
       </el-form-item>
-      <el-form-item label="办公地址" prop="businessAddress">
-        <el-input v-model="form.businessAddress" placeholder="请输入办公地址" />
+      <el-form-item label="办公地址" prop="tProjectCompany.businessAddress">
+        <el-input
+          v-model="form.tProjectCompany.businessAddress"
+          placeholder="请输入办公地址"
+        />
       </el-form-item>
-      <el-form-item label="实控人" prop="actualBod">
-        <el-input v-model="form.actualBod" placeholder="请输入实控人" />
+      <el-form-item label="实控人" prop="tProjectCompany.actualBod">
+        <el-input
+          v-model="form.tProjectCompany.actualBod"
+          placeholder="请输入实控人"
+        />
       </el-form-item>
-      <el-form-item label="联系电话" prop="phone">
-        <el-input v-model="form.phone" placeholder="请输入联系电话" />
+      <el-form-item label="联系电话" prop="tProjectCompany.phone">
+        <el-input
+          v-model="form.tProjectCompany.phone"
+          placeholder="请输入联系电话"
+          maxlength="11"
+        />
       </el-form-item>
-      <el-form-item label="所属类型" prop="type">
-        <el-input v-model="form.type" placeholder="请输入所属类型" />
+      <el-form-item label="所属类型" prop="tProjectCompany.type">
+        <el-input
+          v-model="form.tProjectCompany.type"
+          placeholder="请输入所属类型"
+        />
       </el-form-item>
-      <el-form-item label="附件" prop="file">
+      <el-form-item label="附件" prop="tProjectCompany.files">
         <el-upload
           class="upload-demo"
           action=""
           :on-preview="handlePreview"
           :on-remove="handleRemove"
           :before-remove="beforeRemove"
+          :on-change="handleChange"
           multiple
           :file-list="fileList"
+          :auto-upload="false"
         >
           <el-button size="small" type="primary">点击上传</el-button>
         </el-upload>
       </el-form-item>
       <h3>项目公司联系人信息</h3>
       <el-divider></el-divider>
-      <el-form-item label="联系人姓名" prop="name">
-        <el-input v-model="form.name" placeholder="请输入联系人姓名" />
+      <el-form-item label="联系人姓名" prop="tProjectContacts.name">
+        <el-input
+          v-model="form.tProjectContacts.name"
+          placeholder="请输入联系人姓名"
+        />
       </el-form-item>
-      <el-form-item label="职位" prop="position">
-        <el-input v-model="form.position" placeholder="请输入职位" />
+      <el-form-item label="职位" prop="tProjectContacts.position">
+        <el-input
+          v-model="form.tProjectContacts.position"
+          placeholder="请输入职位"
+        />
       </el-form-item>
-      <el-form-item label="联系电话/微信" prop="contact">
-        <el-input v-model="form.contact" placeholder="请输入联系电话/微信" />
+      <el-form-item label="联系电话/微信" prop="tProjectContacts.contact">
+        <el-input
+          v-model="form.tProjectContacts.contact"
+          placeholder="请输入联系电话/微信"
+        />
       </el-form-item>
       <h3>项目融资信息</h3>
       <el-divider></el-divider>
@@ -249,7 +279,7 @@ export default {
       default: "1", //1可编辑  2不可编辑
     },
   },
-  dicts: ["porject_group"],
+  dicts: ["CUSTOMER_TRADE", "porject_group"],
   data() {
     return {
       title: "新增项目",
@@ -259,27 +289,32 @@ export default {
         id: null,
         porjectName: null,
         porjectGroup: null,
+        industry: null,
         recordDate: null,
         porjectCode: null,
         channel: null,
         contactDate: null,
         projectDate: null,
         decisionDate: null,
-        industry: null,
-        companyName: null,
-        companyCode: null,
-        startTime: null,
-        endTime: null,
-        registeredCapital: null,
-        registeredAddress: null,
-        paidCapital: null,
+        tProjectCompany: {
+          companyName: null,
+          companyCode: null,
+          startTime: null,
+          endTime: null,
+          registeredCapital: null,
+          registeredAddress: null,
+          paidCapital: null,
+          businessAddress: null,
+          actualBod: null,
+          phone: null,
+          type: null,
+        },
+        tProjectContacts: {
+          name: null,
+          position: null,
+          contact: null,
+        },
 
-        name: null,
-        position: null,
-        contact: null,
-
-        businessAddress: null,
-        actualBod: null,
         description: null,
         projectContacts: null,
         investHead: null,
@@ -303,6 +338,7 @@ export default {
         createTime: null,
         updateBy: null,
         updateTime: null,
+        files:null
       },
       // 表单校验
       rules1: {},
@@ -313,27 +349,37 @@ export default {
         porjectGroup: [
           { required: true, trigger: "change", message: "请选择" },
         ],
-        industryGroup: [
-          { required: true, trigger: "change", message: "请选择" },
-        ],
+        industry: [{ required: true, trigger: "change", message: "请选择" }],
         investHead: [{ required: true, trigger: "blur", message: "请输入" }],
         // description: [{ required: true, trigger: "blur", message: "请输入" }],
-        companyName: [{ required: true, trigger: "blur", message: "请输入" }],
-        companyCode: [{ required: true, trigger: "blur", message: "请输入" }],
-        startTime: [{ required: true, trigger: "blur", message: "请选择" }],
-        endTime: [{ required: true, trigger: "blur", message: "请选择" }],
-        registeredCapital: [
+        "tProjectCompany.companyName": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        "tProjectCompany.companyCode": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        "tProjectCompany.startTime": [
+          { required: true, trigger: "blur", message: "请选择" },
+        ],
+        "tProjectCompany.endTime": [
+          { required: true, trigger: "blur", message: "请选择" },
+        ],
+        "tProjectCompany.registeredCapital": [
           { required: true, trigger: "blur", message: "请输入" },
         ],
-        registeredAddress: [
+        "tProjectCompany.registeredAddress": [
           { required: true, trigger: "blur", message: "请输入" },
         ],
-        paidCapital: [{ required: true, trigger: "blur", message: "请输入" }],
-        businessAddress: [
+        "tProjectCompany.paidCapital": [
           { required: true, trigger: "blur", message: "请输入" },
         ],
-        actualBod: [{ required: true, trigger: "blur", message: "请输入" }],
-        phone: [
+        "tProjectCompany.businessAddress": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        "tProjectCompany.actualBod": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        "tProjectCompany.phone": [
           { required: true, trigger: "blur", message: "请输入手机号" },
           {
             pattern: /^1[3456789]\d{9}$/,
@@ -341,11 +387,19 @@ export default {
             trigger: "blur",
           },
         ],
-        type: [{ required: true, trigger: "blur", message: "请输入" }],
-        // file: [{ required: true, trigger: "blur", message: "请输入" }],
-        name: [{ required: true, trigger: "blur", message: "请输入" }],
-        position: [{ required: true, trigger: "blur", message: "请输入" }],
-        contact: [{ required: true, trigger: "blur", message: "请输入" }],
+        "tProjectCompany.type": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        // files: [{ required: true, trigger: "blur", message: "请输入" }],
+        "tProjectContacts.name": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        "tProjectContacts.position": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
+        "tProjectContacts.contact": [
+          { required: true, trigger: "blur", message: "请输入" },
+        ],
         financingStage: [
           { required: true, trigger: "blur", message: "请输入" },
         ],
@@ -368,7 +422,7 @@ export default {
     };
   },
   mounted() {
-    console.log("------mounted------");
+    console.log("------mounted------", this.id);
     if (this.id) {
       this.getPoolDetail(this.id);
     } else {
@@ -379,6 +433,9 @@ export default {
     getPoolDetail(id) {
       getPool(id).then((response) => {
         this.form = response.data;
+        if (this.form.files ) {
+          this.fileList = this.form.files;
+        }
       });
     },
     handleRemove(file, fileList) {
@@ -390,25 +447,45 @@ export default {
     beforeRemove(file, fileList) {
       return this.$confirm(`确定移除 ${file.name}?`);
     },
+    handleChange(file, fileList) {
+      this.fileList = fileList;
+    },
     /** 提交按钮 */
     submitForm() {
       let that = this;
       this.$refs["form"].validate((valid, rules) => {
         if (valid) {
+          // this.form.tProjectCompany.files = this.fileList;
+          // const formData = new FormData();
+          // Object.keys(that.form).map((key) => {
+          //   formData.append(key, that.form[key]);
+          // });
+
+          //使用
+          var r = this.JsonToFormData("", this.form, null);
+          this.fileList.forEach((item) => {
+            //文件信息中raw才是真的文件
+            r.append("files", item.raw);
+            //console.log(item.raw)
+          });
+          //打印转换后的结果
+          for (var [key, value] of r) {
+            console.log("=====", key, value);
+          }
+          // console.log(formData);
           if (this.form.id != null) {
-            updatePool(this.form).then((response) => {
+            updatePool(r).then((response) => {
               this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
+              setTimeout(() => {
+                that.goBack();
+              }, 1500);
             });
           } else {
-            addPool(this.form).then((response) => {
+            addPool(r).then((response) => {
               this.$modal.msgSuccess("新增成功");
               setTimeout(() => {
                 that.goBack();
               }, 1500);
-              // this.open = false;
-              // this.getList();
             });
           }
         } else {
@@ -438,27 +515,32 @@ export default {
         id: null,
         porjectName: null,
         porjectGroup: null,
+        industry: null,
         recordDate: null,
         porjectCode: null,
         channel: null,
         contactDate: null,
         projectDate: null,
         decisionDate: null,
-        industry: null,
-        companyName: null,
-        companyCode: null,
-        startTime: null,
-        endTime: null,
-        registeredCapital: null,
-        registeredAddress: null,
-        paidCapital: null,
-
-        name: null,
-        position: null,
-        contact: null,
+        tProjectCompany: {
+          companyName: null,
+          companyCode: null,
+          startTime: null,
+          endTime: null,
+          registeredCapital: null,
+          registeredAddress: null,
+          paidCapital: null,
+          businessAddress: null,
+          actualBod: null,
+          phone: null,
+          type: null,
+        },
+        tProjectContacts: {
+          name: null,
+          position: null,
+          contact: null,
+        },
 
-        businessAddress: null,
-        actualBod: null,
         description: null,
         projectContacts: null,
         investHead: null,
@@ -482,9 +564,51 @@ export default {
         createTime: null,
         updateBy: null,
         updateTime: null,
+        files:null
       };
       this.resetForm("form");
     },
+    /*
+ 复杂json转为FormData
+ parent:key值,data:数据值,form:FormData实例
+ 使用:JsonToFormData("", a, null);
+ */
+    JsonToFormData(parent, data, form) {
+      form = form || new FormData();
+      //循环传入的值转换formData
+      let index = 0;
+      Object.keys(data).forEach((key) => {
+        let val = data[key];
+        // console.log(key, typeof val, val.length);
+        if (val == null) {
+          let pk = parent ? `${parent}[${key}]` : key;
+          form.append(pk, this.NVL(val, ""));
+        } else if (typeof val === "object") {
+          if (val.length == 0) {
+          } else if (val.length >= 1) {
+            //数组
+            let pk = parent ? `${parent}[${index}][${key}]` : key;
+            this.JsonToFormData(pk, val, form);
+          } else {
+            //纯对象
+            let pk = parent ? `${parent}[${key}]` : key;
+            this.JsonToFormData(pk, val, form);
+          }
+        } else {
+          let pk = parent ? `${parent}[${key}]` : key;
+          form.append(pk, this.NVL(val, ""));
+        }
+        index++;
+      });
+      if (parent == "") return form;
+    },
+    NVL(obj, newValue) {
+      return obj === null || obj === undefined
+        ? newValue
+          ? newValue
+          : ""
+        : obj;
+    },
   },
 };
 </script>

+ 103 - 0
ruoyi-ui/src/views/invest/components/projectItem.vue

@@ -0,0 +1,103 @@
+<template>
+  <div>
+    <!-- 选择项目 -->
+    <el-dialog
+      title="选择项目"
+      :visible.sync="showProjectItem"
+      width="500px"
+      append-to-body
+    >
+      <el-table :data="poolList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <!-- <el-table-column label="主键id" align="center" prop="id" /> -->
+        <el-table-column label="项目名称" align="center" prop="porjectName" />
+        <el-table-column label="所属组别" align="center" prop="porjectGroup">
+          <template slot-scope="scope">
+            <dict-tag
+              :options="dict.type.porject_group"
+              :value="scope.row.porjectGroup"
+            />
+          </template>
+        </el-table-column>
+        <el-table-column label="项目编号" align="center" prop="porjectCode" />
+        <el-table-column label="渠道" align="center" prop="channel" />
+        <el-table-column label="投资负责人" align="center" prop="investHead" />
+        <el-table-column label="项目阶段" align="center" prop="projectStage">
+          <template slot-scope="scope">
+            <dict-tag
+              :options="dict.type.project_stage"
+              :value="scope.row.projectStage"
+            />
+          </template>
+        </el-table-column>
+        <el-table-column label="项目状态" align="center" prop="projectState" />
+      </el-table>
+      <pagination
+        v-show="projectItemTotal > 0"
+        :total="projectItemTotal"
+        :page.sync="projectQueryParams.pageNum"
+        :limit.sync="projectQueryParams.pageSize"
+        @pagination="getList"
+      />
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { listPool } from "@/api/invest/pool";
+export default {
+  props: {
+    showProjectItem: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  dicts: ["porject_group", "project_stage"],
+  data() {
+    return {
+      // 总条数
+      projectItemTotal: 0,
+      poolList: [],
+      projectQueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+    };
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      console.log("selection=", selection);
+      this.ids = selection.map((item) => item.id);
+      this.projectItem = selection;
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 查询项目池列表 */
+    getList() {
+      listPool(this.projectQueryParams).then((response) => {
+        this.poolList = response.rows;
+        this.projectItemTotal = response.total;
+      });
+    },
+    submit() {
+      console.log("确定", this.ids);
+    },
+    cancel() {
+      this.open = false;
+    },
+  },
+};
+</script>

+ 16 - 7
ruoyi-ui/src/views/invest/components/projectList.vue

@@ -240,8 +240,10 @@
       </el-table-column>
       <el-table-column label="项目编号" align="center" prop="porjectCode" />
       <el-table-column label="渠道" align="center" prop="channel" />
+      <el-table-column label="投资负责人" align="center" prop="investHead" />
       <el-table-column label="项目阶段" align="center" prop="projectStage" />
       <el-table-column label="项目状态" align="center" prop="projectState" />
+
       <el-table-column
         label="初次接触日期"
         align="center"
@@ -279,7 +281,7 @@
         align="center"
         prop="projectContacts"
       />
-      <el-table-column label="投资负责人" align="center" prop="investHead" />
+
       <el-table-column
         label="历次融资"
         align="center"
@@ -400,6 +402,7 @@ import {
   delPool,
   addPool,
   updatePool,
+  editStage,
 } from "@/api/invest/pool";
 
 export default {
@@ -549,13 +552,17 @@ export default {
     };
   },
   created() {
-    console.log("========type=", this.type, "====stage=", this.stage);
+    console.log("========created=======");
     // 项目阶段
     if (this.stage != "0") {
       this.queryParams.projectStage = this.stage;
     }
     this.getList();
   },
+  activated() {
+    console.log("========activated=");
+    this.getList();
+  },
   methods: {
     // 下拉框改变
     handleProjectSelect(index) {
@@ -609,7 +616,7 @@ export default {
       this.form = row;
       this.reset();
       this.open = true;
-      this.title = "修改项目阶段";
+      this.title = "设置项目阶段";
     },
     // 表单重置
     reset() {
@@ -646,12 +653,14 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
+      let that = this;
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          if (this.form.id != null) {
-            // this.getList();
-          } else {
-          }
+          editStage(this.form).then((response) => {
+            that.$modal.msgSuccess("修改成功");
+            that.open = false;
+            that.getList();
+          });
         }
       });
     },

+ 3 - 1
ruoyi-ui/src/views/invest/pool/add.vue

@@ -25,7 +25,8 @@ export default {
       title: "新增项目",
     };
   },
-  activated() {
+  // activated
+  created() {
     this.type = "1";
     if (this.$route.query.id) {
       this.id = this.$route.query.id;
@@ -34,6 +35,7 @@ export default {
       this.id = null;
       this.title = "新增项目";
     }
+    console.log("id=",this.id)
   },
   methods: {},
 };