edit.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  1. <template>
  2. <div :class="type === '2' ? 'poolAdd poolDetail' : 'poolAdd'">
  3. <el-form
  4. ref="form"
  5. :model="form"
  6. :rules="type === '2' ? rules1 : rules"
  7. label-width="160px"
  8. class="special-el-form"
  9. >
  10. <h3>项目基础信息</h3>
  11. <el-divider></el-divider>
  12. <el-form-item label="项目名称" prop="projectName">
  13. <el-input
  14. maxlength="100"
  15. v-model="form.projectName"
  16. placeholder="请输入项目名称"
  17. :disabled="type === '2'"
  18. />
  19. </el-form-item>
  20. <el-form-item label="渠道" prop="tProjectChannel.channelName">
  21. <el-select
  22. :disabled="type === '2'"
  23. v-model="form.tProjectChannel.channelName"
  24. placeholder="请选择"
  25. clearable
  26. filterable
  27. @change="handleChannel"
  28. >
  29. <el-option
  30. v-for="item in channelList"
  31. :key="item.id"
  32. :label="item.channelName"
  33. :value="item.id"
  34. />
  35. <el-option label="直接触达" value="1" />
  36. <el-option label="内部推荐" value="2" />
  37. </el-select>
  38. <!-- <channelItem
  39. ref="channelItem"
  40. @getChannelInfo="getChannelInfo"
  41. ></channelItem> -->
  42. <!-- <el-input v-model="form.channel" placeholder="请输入渠道" /> -->
  43. </el-form-item>
  44. <el-form-item label="初次接触日期" prop="contactDate">
  45. <el-date-picker
  46. :disabled="type === '2'"
  47. clearable
  48. v-model="form.contactDate"
  49. type="date"
  50. value-format="yyyy-MM-dd"
  51. placeholder="请选择初次接触日期"
  52. >
  53. </el-date-picker>
  54. </el-form-item>
  55. <el-form-item label="所属组别">
  56. <el-select
  57. v-model="form.tProjectChannel.channelGroup"
  58. disabled
  59. placeholder="请选择所属组别"
  60. >
  61. <el-option
  62. v-for="dict in dict.type.project_group"
  63. :key="dict.value"
  64. :label="dict.label"
  65. :value="dict.value"
  66. ></el-option>
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item label="所属行业" prop="industry">
  70. <el-select
  71. v-model="form.industry"
  72. placeholder="请选择所属行业"
  73. :disabled="type === '2'"
  74. >
  75. <el-option
  76. v-for="dict in dict.type.CUSTOMER_TRADE"
  77. :key="dict.value"
  78. :label="dict.label"
  79. :value="dict.value"
  80. ></el-option>
  81. </el-select>
  82. </el-form-item>
  83. <el-form-item label="项目负责人" prop="investHead">
  84. <el-input
  85. v-if="type === '2'"
  86. maxlength="30"
  87. v-model="form.investHead"
  88. :disabled="type === '2'"
  89. />
  90. <div
  91. class="el-input__inner inputSimulation"
  92. @click="openSelectDept"
  93. v-else
  94. >
  95. {{ form.investHead ? form.investHead : "请选择项目负责人" }}
  96. </div>
  97. <selecDept
  98. ref="selecDepts"
  99. @getDeptUserInfo="getDeptUserInfo"
  100. :deptId="deptId"
  101. ></selecDept>
  102. </el-form-item>
  103. <el-form-item
  104. label="项目情况描述"
  105. prop="description"
  106. class="special-el-form-item"
  107. >
  108. <el-input
  109. :disabled="type === '2'"
  110. maxlength="200"
  111. rows="4"
  112. type="textarea"
  113. v-model="form.description"
  114. placeholder="请输入项目情况描述"
  115. />
  116. </el-form-item>
  117. <h3>项目公司信息</h3>
  118. <el-divider></el-divider>
  119. <el-form-item label="公司名称" prop="tProjectCompany.companyName">
  120. <el-input
  121. :disabled="type === '2'"
  122. maxlength="100"
  123. v-model="form.tProjectCompany.companyName"
  124. placeholder="请输入公司名称"
  125. />
  126. </el-form-item>
  127. <el-form-item label="统一社会信用代码" prop="tProjectCompany.companyCode">
  128. <el-input
  129. :disabled="type === '2'"
  130. maxlength="35"
  131. v-model="form.tProjectCompany.companyCode"
  132. placeholder="请输入企业统一社会信用代码"
  133. />
  134. </el-form-item>
  135. <el-form-item label="营业开始时间" prop="tProjectCompany.startTime">
  136. <el-date-picker
  137. :disabled="type === '2'"
  138. clearable
  139. v-model="form.tProjectCompany.startTime"
  140. type="date"
  141. value-format="yyyy-MM-dd"
  142. placeholder="请选择营业开始时间"
  143. >
  144. </el-date-picker>
  145. </el-form-item>
  146. <el-form-item label="营业结束时间" prop="tProjectCompany.endTime">
  147. <el-date-picker
  148. :disabled="type === '2'"
  149. clearable
  150. v-model="form.tProjectCompany.endTime"
  151. type="date"
  152. value-format="yyyy-MM-dd"
  153. placeholder="请选择营业结束时间"
  154. >
  155. </el-date-picker>
  156. </el-form-item>
  157. <el-form-item
  158. label="注册资本(万元)"
  159. prop="tProjectCompany.registeredCapital"
  160. >
  161. <el-input
  162. :disabled="type === '2'"
  163. maxlength="20"
  164. v-model="form.tProjectCompany.registeredCapital"
  165. @input="
  166. (value) =>
  167. (form.tProjectCompany.registeredCapital = value
  168. .replace(/[^0-9.]/g, '')
  169. .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
  170. .replace(/-/g, ''))
  171. "
  172. placeholder="请输入注册资本"
  173. />
  174. </el-form-item>
  175. <el-form-item label="实缴资本(万元)" prop="tProjectCompany.paidCapital">
  176. <el-input
  177. :disabled="type === '2'"
  178. maxlength="20"
  179. v-model="form.tProjectCompany.paidCapital"
  180. @input="
  181. (value) =>
  182. (form.tProjectCompany.paidCapital = value
  183. .replace(/[^0-9.]/g, '')
  184. .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
  185. .replace(/-/g, ''))
  186. "
  187. placeholder="请输入实缴资本"
  188. />
  189. </el-form-item>
  190. <el-form-item label="实控人" prop="tProjectCompany.actualBod">
  191. <el-input
  192. :disabled="type === '2'"
  193. maxlength="25"
  194. v-model="form.tProjectCompany.actualBod"
  195. placeholder="请输入实控人"
  196. />
  197. </el-form-item>
  198. <el-form-item label="联系电话" prop="tProjectCompany.phone">
  199. <el-input
  200. :disabled="type === '2'"
  201. maxlength="20"
  202. v-model="form.tProjectCompany.phone"
  203. placeholder="请输入联系电话"
  204. />
  205. </el-form-item>
  206. <el-form-item label="所属类型" prop="tProjectCompany.type">
  207. <el-input
  208. :disabled="type === '2'"
  209. maxlength="25"
  210. v-model="form.tProjectCompany.type"
  211. placeholder="请输入所属类型"
  212. />
  213. </el-form-item>
  214. <el-form-item label="备案时间" prop="tProjectCompany.filingTime">
  215. <el-date-picker
  216. :disabled="type === '2'"
  217. clearable
  218. v-model="form.tProjectCompany.filingTime"
  219. type="date"
  220. value-format="yyyy-MM-dd"
  221. placeholder="请选择备案时间"
  222. >
  223. </el-date-picker>
  224. </el-form-item>
  225. <el-form-item
  226. label="注册地址"
  227. prop="tProjectCompany.registeredAddress"
  228. class="special-el-form-item"
  229. >
  230. <el-input
  231. :disabled="type === '2'"
  232. type="textarea"
  233. rows="4"
  234. maxlength="100"
  235. v-model="form.tProjectCompany.registeredAddress"
  236. placeholder="请输入注册地址"
  237. />
  238. </el-form-item>
  239. <el-form-item
  240. label="办公地址"
  241. prop="tProjectCompany.businessAddress"
  242. class="special-el-form-item"
  243. >
  244. <el-input
  245. :disabled="type === '2'"
  246. type="textarea"
  247. rows="4"
  248. maxlength="100"
  249. v-model="form.tProjectCompany.businessAddress"
  250. placeholder="请输入办公地址"
  251. />
  252. </el-form-item>
  253. <el-form-item
  254. label="公司附件"
  255. prop="listFile"
  256. class="special-el-form-item"
  257. >
  258. <fileItem
  259. ref="fileItem"
  260. :id="form.id"
  261. @getFileList="getFileList"
  262. ></fileItem>
  263. </el-form-item>
  264. <h3>项目公司联系人信息</h3>
  265. <el-divider></el-divider>
  266. <el-form-item label="联系人姓名" prop="tProjectContacts.name">
  267. <el-input
  268. :disabled="type === '2'"
  269. maxlength="25"
  270. v-model="form.tProjectContacts.name"
  271. placeholder="请输入联系人姓名"
  272. />
  273. </el-form-item>
  274. <el-form-item label="职位" prop="tProjectContacts.position">
  275. <el-input
  276. :disabled="type === '2'"
  277. maxlength="25"
  278. v-model="form.tProjectContacts.position"
  279. placeholder="请输入职位"
  280. />
  281. </el-form-item>
  282. <el-form-item label="联系电话/微信" prop="tProjectContacts.contact">
  283. <el-input
  284. :disabled="type === '2'"
  285. maxlength="25"
  286. v-model="form.tProjectContacts.contact"
  287. placeholder="请输入联系电话/微信"
  288. />
  289. </el-form-item>
  290. <h3>项目融资信息</h3>
  291. <el-divider></el-divider>
  292. <el-form-item label="项目融资阶段" prop="financingStage">
  293. <el-select
  294. :disabled="type === '2'"
  295. v-model="form.financingStage"
  296. placeholder="请选择项目融资阶段"
  297. >
  298. <el-option
  299. v-for="dict in dict.type.financing_stage"
  300. :key="dict.value"
  301. :label="dict.label"
  302. :value="dict.value"
  303. ></el-option>
  304. </el-select>
  305. </el-form-item>
  306. <el-form-item label="预期融资金额(万元)" prop="financingMoney">
  307. <el-input
  308. :disabled="type === '2'"
  309. maxlength="20"
  310. v-model="form.financingMoney"
  311. @input="
  312. (value) =>
  313. (form.financingMoney = value.replace(/\D/g, '').replace(/-/g, ''))
  314. "
  315. placeholder="请输入预期融资金额"
  316. />
  317. </el-form-item>
  318. <el-form-item label="投后估值(万元)" prop="investValuation">
  319. <el-input
  320. :disabled="type === '2'"
  321. maxlength="20"
  322. v-model="form.investValuation"
  323. @input="
  324. (value) =>
  325. (form.investValuation = value
  326. .replace(/[^0-9.]/g, '')
  327. .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
  328. .replace(/-/g, ''))
  329. "
  330. placeholder="请输入投后估值"
  331. />
  332. </el-form-item>
  333. <el-form-item label="预计投资金额(万元)" prop="investMoney">
  334. <el-input
  335. :disabled="type === '2'"
  336. maxlength="20"
  337. v-model="form.investMoney"
  338. @input="
  339. (value) =>
  340. (form.investMoney = value.replace(/\D/g, '').replace(/-/g, ''))
  341. "
  342. placeholder="请输入预计投资金额"
  343. />
  344. </el-form-item>
  345. <!-- -->
  346. <el-form-item label="投资类型" prop="investType">
  347. <el-select
  348. v-model="form.investType"
  349. placeholder="请选择投资类型"
  350. :disabled="type === '2'"
  351. >
  352. <el-option
  353. v-for="dict in dict.type.invest_type"
  354. :key="dict.value"
  355. :label="dict.label"
  356. :value="dict.value"
  357. ></el-option>
  358. </el-select>
  359. </el-form-item>
  360. <el-form-item label="投资策略" prop="investPloy">
  361. <el-select
  362. v-model="form.investPloy"
  363. placeholder="请选择投资策略"
  364. :disabled="type === '2'"
  365. >
  366. <el-option
  367. v-for="dict in dict.type.invest_ploy"
  368. :key="dict.value"
  369. :label="dict.label"
  370. :value="dict.value"
  371. ></el-option>
  372. </el-select>
  373. </el-form-item>
  374. <el-form-item label="投资价值" prop="investWorth">
  375. <el-select
  376. v-model="form.investWorth"
  377. placeholder="请选择投资价值"
  378. :disabled="type === '2'"
  379. >
  380. <el-option
  381. v-for="dict in dict.type.invest_worth"
  382. :key="dict.value"
  383. :label="dict.label"
  384. :value="dict.value"
  385. ></el-option>
  386. </el-select>
  387. </el-form-item>
  388. <el-form-item
  389. label="历次融资"
  390. prop="previousFinancing"
  391. class="special-el-form-item"
  392. >
  393. <el-input
  394. :disabled="type === '2'"
  395. maxlength="200"
  396. rows="4"
  397. type="textarea"
  398. v-model="form.previousFinancing"
  399. placeholder="请输入历次融资"
  400. />
  401. </el-form-item>
  402. <el-form-item
  403. label="融资条件"
  404. prop="financingCondition"
  405. class="special-el-form-item"
  406. >
  407. <el-input
  408. :disabled="type === '2'"
  409. maxlength="200"
  410. rows="4"
  411. type="textarea"
  412. v-model="form.financingCondition"
  413. placeholder="请输入融资条件"
  414. />
  415. </el-form-item>
  416. <el-form-item
  417. label="投资亮点"
  418. prop="investSparkle"
  419. class="special-el-form-item"
  420. >
  421. <el-input
  422. :disabled="type === '2'"
  423. maxlength="200"
  424. rows="4"
  425. type="textarea"
  426. v-model="form.investSparkle"
  427. placeholder="请输入投资亮点"
  428. />
  429. </el-form-item>
  430. <el-form-item
  431. label="股权架构"
  432. prop="shareholding"
  433. class="special-el-form-item"
  434. >
  435. <el-input
  436. :disabled="type === '2'"
  437. maxlength="200"
  438. rows="4"
  439. type="textarea"
  440. v-model="form.shareholding"
  441. placeholder="请输入股权架构"
  442. />
  443. </el-form-item>
  444. <h3>其他</h3>
  445. <el-divider></el-divider>
  446. <el-form-item label="BP" prop="bpFile" class="special-el-form-item">
  447. <fileItem
  448. ref="bpFileItem"
  449. :id="form.id"
  450. @getFileList="getBPFileList"
  451. ></fileItem>
  452. </el-form-item>
  453. <el-form-item
  454. label="其他附件"
  455. prop="otherFile"
  456. class="special-el-form-item"
  457. >
  458. <fileItem
  459. ref="otherFileItem"
  460. :id="form.id"
  461. @getFileList="getOtherFileList"
  462. ></fileItem>
  463. </el-form-item>
  464. <el-form-item label="备注" prop="mark" class="special-el-form-item">
  465. <el-input
  466. :disabled="type === '2'"
  467. maxlength="200"
  468. :readonly="type === '2' ? true : false"
  469. rows="4"
  470. type="textarea"
  471. v-model="form.mark"
  472. placeholder="请输入备注"
  473. />
  474. </el-form-item>
  475. <el-form-item class="btnList" v-if="type === '1'">
  476. <el-button @click="goBack">返 回</el-button>
  477. <el-button type="primary" @click="submitForm(2)" v-preventReClick>提 交</el-button>
  478. <el-button type="warning" @click="submitForm(1)" v-preventReClick>关闭</el-button>
  479. </el-form-item>
  480. </el-form>
  481. </div>
  482. </template>
  483. <script>
  484. import { getInvestInfo, investmentOpportunityComplete} from "@/api/project/investOpp/pool";
  485. import { listChannel } from "@/api/invest/channel";
  486. import fileItem from "../../invest/components/fileItem";
  487. import channelItem from "../../invest/components/channelItem";
  488. import selecDept from "../../invest/components/selecDept";
  489. import { mapGetters } from "vuex";
  490. export default {
  491. props: {
  492. id: {
  493. type: String,
  494. },
  495. type: {
  496. type: String,
  497. default: "1", //1可编辑 2不可编辑
  498. },
  499. },
  500. components: { fileItem, channelItem, selecDept },
  501. dicts: [
  502. "CUSTOMER_TRADE",
  503. "project_group",
  504. "invest_type",
  505. "invest_ploy",
  506. "invest_worth",
  507. "financing_stage",
  508. ],
  509. data() {
  510. const validateLogo = (rule, value, callback) => {
  511. if (this.fileListBP.length <= 0) {
  512. callback(new Error("请上传BP"));
  513. } else {
  514. callback();
  515. }
  516. };
  517. return {
  518. deptId: process.env.VUE_APP_DEPTID,
  519. title: "新增项目",
  520. baseUrl: process.env.VUE_APP_BASE_API,
  521. pInstId:null,
  522. localId: this.id, // 初始化用 prop 的 id
  523. // 表单参数
  524. form: {
  525. id: null,
  526. procInstId:null,
  527. projectName: null,
  528. projectGroup: "",
  529. industry: null,
  530. recordDate: null,
  531. projectCode: null,
  532. channel: "",
  533. contactDate: null,
  534. projectDate: null,
  535. decisionDate: null,
  536. tProjectCompany: {
  537. companyName: null,
  538. companyCode: null,
  539. startTime: null,
  540. endTime: null,
  541. registeredCapital: null,
  542. registeredAddress: null,
  543. paidCapital: null,
  544. businessAddress: null,
  545. actualBod: null,
  546. phone: null,
  547. filingTime: null,
  548. type: null,
  549. },
  550. tProjectContacts: {
  551. name: null,
  552. position: null,
  553. contact: null,
  554. },
  555. tProjectChannel: {
  556. channelName: "",
  557. channelGroup: "",
  558. },
  559. description: null,
  560. projectContacts: null,
  561. investHead: null,
  562. previousFinancing: null,
  563. financingStage: null,
  564. financingCondition: null,
  565. financingMoney: null,
  566. financingDate: null,
  567. investSparkle: null,
  568. investValuation: null,
  569. investMoney: null,
  570. investType: null,
  571. investPloy: null,
  572. investWorth: null,
  573. shareholding: null,
  574. projectStage: null,
  575. projectState: null,
  576. mark: null,
  577. delFlag: null,
  578. createBy: null,
  579. createTime: null,
  580. updateBy: null,
  581. updateTime: null,
  582. listFile: null,
  583. bpFile: null,
  584. otherFile: null,
  585. },
  586. fileList: [],
  587. fileListBP: [],
  588. fileListOther: [],
  589. // 表单校验
  590. rules1: {},
  591. rules: {
  592. projectName: [{ required: true, trigger: "blur", message: "请输入" }],
  593. // channel: [{ required: true, trigger: "blur", message: "请输入" }],
  594. contactDate: [{ required: true, trigger: "blur", message: "请输入" }],
  595. // projectGroup: [
  596. // { required: true, trigger: "change", message: "请选择" },
  597. // ],
  598. industry: [{ required: true, trigger: "change", message: "请选择" }],
  599. investHead: [{ required: true, trigger: "blur", message: "请输入" }],
  600. bpFile: [{ required: true, validator: validateLogo }],
  601. "tProjectChannel.channelName": [
  602. { required: true, trigger: "change", message: "请选择" },
  603. ],
  604. // description: [{ required: true, trigger: "blur", message: "请输入" }],
  605. "tProjectCompany.companyName": [
  606. { required: true, trigger: "blur", message: "请输入" },
  607. ],
  608. // "tProjectCompany.companyCode": [
  609. // { required: true, trigger: "blur", message: "请输入" },
  610. // ],
  611. // "tProjectCompany.startTime": [
  612. // { required: true, trigger: "blur", message: "请选择" },
  613. // ],
  614. // "tProjectCompany.endTime": [
  615. // { required: true, trigger: "blur", message: "请选择" },
  616. // ],
  617. // "tProjectCompany.registeredCapital": [
  618. // { required: true, trigger: "blur", message: "请输入" },
  619. // ],
  620. "tProjectCompany.registeredAddress": [
  621. { required: true, trigger: "blur", message: "请输入" },
  622. ],
  623. // "tProjectCompany.paidCapital": [
  624. // { required: true, trigger: "blur", message: "请输入" },
  625. // ],
  626. "tProjectCompany.businessAddress": [
  627. { required: true, trigger: "blur", message: "请输入" },
  628. ],
  629. "tProjectCompany.actualBod": [
  630. { required: true, trigger: "blur", message: "请输入" },
  631. ],
  632. "tProjectCompany.phone": [
  633. { required: true, trigger: "blur", message: "请输入联系电话" },
  634. // {
  635. // pattern: /^1[3456789]\d{9}$/,
  636. // message: "请输入正确的手机号",
  637. // trigger: "blur",
  638. // },
  639. ],
  640. "tProjectCompany.filingTime": [
  641. { required: true, trigger: "blur", message: "请选择" },
  642. ],
  643. "tProjectCompany.type": [
  644. { required: true, trigger: "blur", message: "请输入" },
  645. ],
  646. // files: [{ required: true, trigger: "blur", message: "请输入" }],
  647. "tProjectContacts.name": [
  648. { required: true, trigger: "blur", message: "请输入" },
  649. ],
  650. "tProjectContacts.position": [
  651. { required: true, trigger: "blur", message: "请输入" },
  652. ],
  653. "tProjectContacts.contact": [
  654. { required: true, trigger: "blur", message: "请输入" },
  655. ],
  656. financingStage: [
  657. { required: true, trigger: "change", message: "请选择" },
  658. ],
  659. financingMoney: [
  660. { required: true, trigger: "blur", message: "请输入" },
  661. ],
  662. investValuation: [
  663. { required: true, trigger: "blur", message: "请输入" },
  664. ],
  665. investMoney: [{ required: true, trigger: "blur", message: "请输入" }],
  666. investType: [{ required: true, trigger: "change", message: "请选择" }],
  667. investPloy: [{ required: true, trigger: "change", message: "请选择" }],
  668. investWorth: [{ required: true, trigger: "change", message: "请选择" }],
  669. // previousFinancing: [{ required: true, trigger: "blur", message: "请输入" }],
  670. // financingCondition: [
  671. // { required: true, trigger: "blur", message: "请输入" },
  672. // ],
  673. investSparkle: [{ required: true, trigger: "blur", message: "请输入" }],
  674. shareholding: [{ required: true, trigger: "blur", message: "请输入" }],
  675. // mark: [{ required: true, trigger: "blur", message: "请输入" }]
  676. },
  677. channelList: [],
  678. };
  679. },
  680. computed: {
  681. ...mapGetters(["user"]),
  682. },
  683. mounted() {
  684. new Promise((resolve, reject) => {
  685. listChannel({
  686. pageNum: 1,
  687. pageSize: 100,
  688. }).then((response) => {
  689. this.channelList = response.rows;
  690. resolve();
  691. });
  692. }).then(() => {
  693. //this.id=this.$route.query.id;
  694. this.localId = this.$route.query.id; // 改这里!用 localId
  695. this.pInstId = this.$route.query.pInstId;
  696. //console.log(this.localId+'--------------------------');
  697. if (this.localId) {
  698. this.getPoolDetail(this.pInstId);
  699. } else {
  700. //this.reset();
  701. }
  702. });
  703. },
  704. methods: {
  705. // 选择部门人
  706. openSelectDept() {
  707. this.$refs.selecDepts.show(1, this.user.userId);
  708. },
  709. getDeptUserInfo(info) {
  710. if (info.length > 0) {
  711. this.form.investHead = info[0].nickName;
  712. this.$refs.form.clearValidate(["investHead"]);
  713. }
  714. },
  715. // 获取渠道信息
  716. getChannelInfo(info) {
  717. if (info.length > 0) {
  718. this.form.channel = info[0].id;
  719. this.form.tProjectChannel.channelName = info[0].channelName;
  720. this.form.tProjectChannel.channelGroup = info[0].channelGroup;
  721. this.$refs.form.clearValidate(["channel"]);
  722. }
  723. },
  724. // 选择渠道
  725. handleChannel(vId) {
  726. let obj = {};
  727. obj = this.channelList.find((item) => {
  728. return item.id === vId;
  729. });
  730. if (obj && obj.id) {
  731. this.form.channel = obj.id;
  732. this.form.tProjectChannel.channelName = obj.channelName;
  733. this.form.tProjectChannel.channelGroup = obj.channelGroup;
  734. } else {
  735. if (vId=="1") {
  736. this.form.channel = 1;
  737. this.form.tProjectChannel.channelName = "直接触达";
  738. }else if (vId=="2") {
  739. this.form.channel = 2;
  740. this.form.tProjectChannel.channelName = "内部推荐";
  741. }
  742. this.form.tProjectChannel.channelGroup = "";
  743. }
  744. },
  745. handleChannelItem() {
  746. this.$refs.channelItem.showChannelItem = true;
  747. },
  748. getPoolDetail(pInstId) {
  749. getInvestInfo(pInstId).then((response) => {
  750. this.form = response.data;
  751. let channeItem = this.channelList.find((item) => {
  752. if (this.form.channel == item.id) {
  753. return item;
  754. }
  755. });
  756. if (channeItem && channeItem.channelName) {
  757. this.form.tProjectChannel.channelName = channeItem.channelName;
  758. this.form.tProjectChannel.channelGroup = channeItem.channelGroup;
  759. } else {
  760. if(this.form.channel=="1") {
  761. this.form.tProjectChannel = {
  762. channelName: "直接触达",
  763. channelGroup: "",
  764. };
  765. }else if(this.form.channel=="2") {
  766. this.form.tProjectChannel = {
  767. channelName: "内部推荐",
  768. channelGroup: "",
  769. };
  770. }else {
  771. this.form.tProjectChannel = {
  772. channelName: "无",
  773. channelGroup: "",
  774. };
  775. }
  776. }
  777. setTimeout(() => {
  778. if (this.type == "2") {
  779. this.$refs.fileItem.handleButton();
  780. this.$refs.bpFileItem.handleButton();
  781. this.$refs.otherFileItem.handleButton();
  782. }
  783. this.$refs.fileItem.fileList = [];
  784. this.$refs.fileItem.getListFileBusinessId(
  785. this.form.tProjectCompany.companyId
  786. );
  787. this.$refs.bpFileItem.fileList = [];
  788. this.$refs.bpFileItem.getListFileBusinessId(this.form.id, "9");
  789. this.$refs.otherFileItem.fileList = [];
  790. this.$refs.otherFileItem.getListFileBusinessId(this.form.id, "0");
  791. }, 300);
  792. });
  793. },
  794. // 获取fileList
  795. getFileList(fileList) {
  796. if (fileList && fileList.length > 0) {
  797. this.fileList = fileList;
  798. } else {
  799. this.fileList = [];
  800. }
  801. },
  802. getBPFileList(fileList) {
  803. if (fileList && fileList.length > 0) {
  804. this.fileListBP = fileList;
  805. this.$refs.form.clearValidate(["bpFile"]);
  806. } else {
  807. this.fileList = [];
  808. }
  809. },
  810. getOtherFileList(fileList) {
  811. if (fileList && fileList.length > 0) {
  812. this.fileListOther = fileList;
  813. } else {
  814. this.fileList = [];
  815. }
  816. },
  817. /** 提交按钮 */
  818. submitForm(type) {
  819. let that = this;
  820. if (this.form.channel == "") {
  821. this.form.channel = -1;
  822. }
  823. if (type === 1) {
  824. // 暂存
  825. this.form.flag='false';
  826. if (!this.form.projectName) {
  827. this.$modal.msgError("请输入项目名称");
  828. return false;
  829. }
  830. this.form.listFile = this.fileList;
  831. this.form.bpFile = this.fileListBP;
  832. this.form.otherFile = this.fileListOther;
  833. const params={
  834. projectPool: this.form, // 拆分明确字段
  835. projectReview: this.formAssess,
  836. flowBaseInfo: this.flowBaseInfo
  837. }
  838. if (this.form.id != null) {
  839. investmentOpportunityComplete(params).then((response) => {
  840. this.$modal.msgSuccess("审批成功");
  841. this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
  842. setTimeout(() => {
  843. that.goMyTask();
  844. }, 1500);
  845. });
  846. } else {
  847. this.form.projectStage = "1";
  848. this.form.projectState = "1";
  849. this.form.projectGroup = this.form.tProjectChannel.channelGroup;
  850. /*addPool(this.form).then((response) => {
  851. this.$modal.msgSuccess("暂存成功");
  852. setTimeout(() => {
  853. that.goBack();
  854. }, 1500);
  855. });*/
  856. }
  857. } else if (type === 2) {
  858. // 提交
  859. this.form.flag='true';
  860. this.$refs["form"].validate((valid, rules) => {
  861. if (valid) {
  862. this.form.listFile = this.fileList;
  863. this.form.bpFile = this.fileListBP;
  864. this.form.otherFile = this.fileListOther;
  865. if (this.form.tProjectCompany.registeredCapital!=null) {
  866. this.form.tProjectCompany.registeredCapital =
  867. this.form.tProjectCompany.registeredCapital
  868. .replace(/[^0-9.]/g, "")
  869. .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")
  870. .replace(/-/g, "");
  871. }
  872. if (this.form.tProjectCompany.paidCapital!=null) {
  873. this.form.tProjectCompany.paidCapital =
  874. this.form.tProjectCompany.paidCapital
  875. .replace(/[^0-9.]/g, "")
  876. .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")
  877. .replace(/-/g, "");
  878. }
  879. this.form.investValuation = this.form.investValuation
  880. .replace(/[^0-9.]/g, "")
  881. .replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")
  882. .replace(/-/g, "");
  883. this.form.financingMoney = this.form.financingMoney
  884. .replace(/\D/g, "")
  885. .replace(/-/g, "");
  886. this.form.investMoney = this.form.investMoney
  887. .replace(/\D/g, "")
  888. .replace(/-/g, "");
  889. if (this.form.id != null) {
  890. if (this.form.projectState == "1") {
  891. this.form.projectState = "a";
  892. }
  893. const params={
  894. projectPool: this.form, // 拆分明确字段
  895. projectReview: this.formAssess,
  896. flowBaseInfo: this.flowBaseInfo
  897. }
  898. investmentOpportunityComplete(params).then((response) => {
  899. this.$modal.msgSuccess("提交成功");
  900. this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
  901. setTimeout(() => {
  902. that.goMyTask();
  903. }, 1500);
  904. });
  905. } else {
  906. this.form.projectStage = "1";
  907. this.form.projectState = "a";
  908. this.form.projectGroup = this.form.tProjectChannel.channelGroup;
  909. /*addPool(this.form).then((response) => {
  910. this.$modal.msgSuccess("新增成功");
  911. setTimeout(() => {
  912. that.goBack();
  913. }, 1500);
  914. });*/
  915. }
  916. } else {
  917. for (var ruleName in rules) {
  918. let _rule = rules[ruleName];
  919. let message = _rule[0].message;
  920. this.$message.warning(message, 1);
  921. break;
  922. }
  923. //验证不通过回滚到不通过的第一个位置
  924. this.$nextTick(() => {
  925. let isError = document.getElementsByClassName("is-error");
  926. isError[0].scrollIntoView({
  927. block: "center",
  928. behavior: "smooth",
  929. });
  930. });
  931. }
  932. });
  933. }
  934. },
  935. goBack() {
  936. this.$router.go(-1);
  937. },
  938. //跳转到我的任务
  939. goMyTask(){
  940. //this.$router.push({ path: "/myTask/project/investOpp/myTask"});
  941. // 关闭当前标签页并返回指定页面
  942. const obj = { path: "/myTask/project/investOpp/myTask", query: { t: Date.now()} };
  943. this.$tab.closeOpenPage(obj);
  944. },
  945. // 表单重置
  946. reset() {
  947. this.form = {
  948. id: null,
  949. projectName: null,
  950. projectGroup: "",
  951. industry: null,
  952. recordDate: null,
  953. projectCode: null,
  954. channel: "",
  955. contactDate: null,
  956. projectDate: null,
  957. decisionDate: null,
  958. tProjectCompany: {
  959. companyName: null,
  960. companyCode: null,
  961. startTime: null,
  962. endTime: null,
  963. registeredCapital: null,
  964. registeredAddress: null,
  965. paidCapital: null,
  966. businessAddress: null,
  967. actualBod: null,
  968. phone: null,
  969. filingTime: null,
  970. type: null,
  971. },
  972. tProjectContacts: {
  973. name: null,
  974. position: null,
  975. contact: null,
  976. },
  977. tProjectChannel: {
  978. channelName: "",
  979. channelGroup: "",
  980. },
  981. description: null,
  982. projectContacts: null,
  983. investHead: this.user.nickName,
  984. previousFinancing: null,
  985. financingStage: null,
  986. financingCondition: null,
  987. financingMoney: null,
  988. financingDate: null,
  989. investSparkle: null,
  990. investValuation: null,
  991. investMoney: null,
  992. investType: null,
  993. investPloy: null,
  994. investWorth: null,
  995. shareholding: null,
  996. projectStage: null,
  997. projectState: null,
  998. mark: null,
  999. delFlag: null,
  1000. createBy: null,
  1001. createTime: null,
  1002. updateBy: null,
  1003. updateTime: null,
  1004. listFile: null,
  1005. bpFile: null,
  1006. otherFile: null,
  1007. };
  1008. this.resetForm("form");
  1009. },
  1010. },
  1011. };
  1012. </script>
  1013. <style lang="scss" scoped>
  1014. .poolAdd {
  1015. h2 {
  1016. margin-left: 30px;
  1017. }
  1018. .special-el-form {
  1019. h3 {
  1020. width: 100%;
  1021. margin-bottom: -10px;
  1022. font-weight: bold;
  1023. }
  1024. .btnList {
  1025. width: 100%;
  1026. display: flex;
  1027. justify-content: center;
  1028. padding-bottom: 40px;
  1029. }
  1030. }
  1031. }
  1032. .poolDetail {
  1033. position: relative;
  1034. // cursor: not-allowed;
  1035. }
  1036. .poolDetail ::placeholder {
  1037. color: #f5f7fa !important;
  1038. }
  1039. // .poolDetail::after {
  1040. // content: "";
  1041. // display: block;
  1042. // position: absolute;
  1043. // top: 0;
  1044. // left: 0;
  1045. // width: 100%;
  1046. // height: 120%;
  1047. // }
  1048. </style>