apply.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  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="warning" @click="submitForm(1)" v-preventReClick>暂 存</el-button>
  478. <el-button type="primary" @click="submitForm(2)" v-preventReClick>提 交</el-button>
  479. </el-form-item>
  480. </el-form>
  481. </div>
  482. </template>
  483. <script>
  484. import {getPool,investmentOpportunityStart} 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. // 表单参数
  522. form: {
  523. id: null,
  524. projectName: null,
  525. projectGroup: "",
  526. industry: null,
  527. recordDate: null,
  528. projectCode: null,
  529. channel: "",
  530. contactDate: null,
  531. projectDate: null,
  532. decisionDate: null,
  533. tProjectCompany: {
  534. companyName: null,
  535. companyCode: null,
  536. startTime: null,
  537. endTime: null,
  538. registeredCapital: null,
  539. registeredAddress: null,
  540. paidCapital: null,
  541. businessAddress: null,
  542. actualBod: null,
  543. phone: null,
  544. filingTime: null,
  545. type: null,
  546. },
  547. tProjectContacts: {
  548. name: null,
  549. position: null,
  550. contact: null,
  551. },
  552. tProjectChannel: {
  553. channelName: "",
  554. channelGroup: "",
  555. },
  556. description: null,
  557. projectContacts: null,
  558. investHead: null,
  559. previousFinancing: null,
  560. financingStage: null,
  561. financingCondition: null,
  562. financingMoney: null,
  563. financingDate: null,
  564. investSparkle: null,
  565. investValuation: null,
  566. investMoney: null,
  567. investType: null,
  568. investPloy: null,
  569. investWorth: null,
  570. shareholding: null,
  571. projectStage: null,
  572. projectState: null,
  573. mark: null,
  574. delFlag: null,
  575. createBy: null,
  576. createTime: null,
  577. updateBy: null,
  578. updateTime: null,
  579. listFile: null,
  580. bpFile: null,
  581. otherFile: null,
  582. },
  583. fileList: [],
  584. fileListBP: [],
  585. fileListOther: [],
  586. // 表单校验
  587. rules1: {},
  588. rules: {
  589. projectName: [{ required: true, trigger: "blur", message: "请输入" }],
  590. // channel: [{ required: true, trigger: "blur", message: "请输入" }],
  591. contactDate: [{ required: true, trigger: "blur", message: "请输入" }],
  592. // projectGroup: [
  593. // { required: true, trigger: "change", message: "请选择" },
  594. // ],
  595. industry: [{ required: true, trigger: "change", message: "请选择" }],
  596. investHead: [{ required: true, trigger: "blur", message: "请输入" }],
  597. bpFile: [{ required: true, validator: validateLogo }],
  598. "tProjectChannel.channelName": [
  599. { required: true, trigger: "change", message: "请选择" },
  600. ],
  601. // description: [{ required: true, trigger: "blur", message: "请输入" }],
  602. "tProjectCompany.companyName": [
  603. { required: true, trigger: "blur", message: "请输入" },
  604. ],
  605. // "tProjectCompany.companyCode": [
  606. // { required: true, trigger: "blur", message: "请输入" },
  607. // ],
  608. // "tProjectCompany.startTime": [
  609. // { required: true, trigger: "blur", message: "请选择" },
  610. // ],
  611. // "tProjectCompany.endTime": [
  612. // { required: true, trigger: "blur", message: "请选择" },
  613. // ],
  614. // "tProjectCompany.registeredCapital": [
  615. // { required: true, trigger: "blur", message: "请输入" },
  616. // ],
  617. "tProjectCompany.registeredAddress": [
  618. { required: true, trigger: "blur", message: "请输入" },
  619. ],
  620. // "tProjectCompany.paidCapital": [
  621. // { required: true, trigger: "blur", message: "请输入" },
  622. // ],
  623. "tProjectCompany.businessAddress": [
  624. { required: true, trigger: "blur", message: "请输入" },
  625. ],
  626. "tProjectCompany.actualBod": [
  627. { required: true, trigger: "blur", message: "请输入" },
  628. ],
  629. "tProjectCompany.phone": [
  630. { required: true, trigger: "blur", message: "请输入联系电话" },
  631. // {
  632. // pattern: /^1[3456789]\d{9}$/,
  633. // message: "请输入正确的手机号",
  634. // trigger: "blur",
  635. // },
  636. ],
  637. "tProjectCompany.filingTime": [
  638. { required: true, trigger: "blur", message: "请选择" },
  639. ],
  640. "tProjectCompany.type": [
  641. { required: true, trigger: "blur", message: "请输入" },
  642. ],
  643. // files: [{ required: true, trigger: "blur", message: "请输入" }],
  644. "tProjectContacts.name": [
  645. { required: true, trigger: "blur", message: "请输入" },
  646. ],
  647. "tProjectContacts.position": [
  648. { required: true, trigger: "blur", message: "请输入" },
  649. ],
  650. "tProjectContacts.contact": [
  651. { required: true, trigger: "blur", message: "请输入" },
  652. ],
  653. financingStage: [
  654. { required: true, trigger: "change", message: "请选择" },
  655. ],
  656. financingMoney: [
  657. { required: true, trigger: "blur", message: "请输入" },
  658. ],
  659. investValuation: [
  660. { required: true, trigger: "blur", message: "请输入" },
  661. ],
  662. investMoney: [{ required: true, trigger: "blur", message: "请输入" }],
  663. investType: [{ required: true, trigger: "change", message: "请选择" }],
  664. investPloy: [{ required: true, trigger: "change", message: "请选择" }],
  665. investWorth: [{ required: true, trigger: "change", message: "请选择" }],
  666. // previousFinancing: [{ required: true, trigger: "blur", message: "请输入" }],
  667. // financingCondition: [
  668. // { required: true, trigger: "blur", message: "请输入" },
  669. // ],
  670. investSparkle: [{ required: true, trigger: "blur", message: "请输入" }],
  671. shareholding: [{ required: true, trigger: "blur", message: "请输入" }],
  672. // mark: [{ required: true, trigger: "blur", message: "请输入" }]
  673. },
  674. channelList: [],
  675. };
  676. },
  677. computed: {
  678. ...mapGetters(["user"]),
  679. },
  680. mounted() {
  681. new Promise((resolve, reject) => {
  682. listChannel({
  683. pageNum: 1,
  684. pageSize: 100,
  685. }).then((response) => {
  686. this.channelList = response.rows;
  687. resolve();
  688. });
  689. }).then(() => {
  690. if (this.id) {
  691. this.getPoolDetail(this.id);
  692. } else {
  693. this.reset();
  694. }
  695. });
  696. },
  697. methods: {
  698. // getListChannel() {
  699. // // 渠道
  700. // listChannel({
  701. // pageNum: 1,
  702. // pageSize: 100,
  703. // }).then((response) => {
  704. // this.channelList = response.rows;
  705. // });
  706. // },
  707. // 选择部门人
  708. openSelectDept() {
  709. this.$refs.selecDepts.show(1, this.user.userId);
  710. },
  711. getDeptUserInfo(info) {
  712. if (info.length > 0) {
  713. this.form.investHead = info[0].nickName;
  714. this.$refs.form.clearValidate(["investHead"]);
  715. }
  716. },
  717. // 获取渠道信息
  718. getChannelInfo(info) {
  719. if (info.length > 0) {
  720. this.form.channel = info[0].id;
  721. this.form.tProjectChannel.channelName = info[0].channelName;
  722. this.form.tProjectChannel.channelGroup = info[0].channelGroup;
  723. this.$refs.form.clearValidate(["channel"]);
  724. }
  725. },
  726. // 选择渠道
  727. handleChannel(vId) {
  728. let obj = {};
  729. obj = this.channelList.find((item) => {
  730. return item.id === vId;
  731. });
  732. if (obj && obj.id) {
  733. this.form.channel = obj.id;
  734. this.form.tProjectChannel.channelName = obj.channelName;
  735. this.form.tProjectChannel.channelGroup = obj.channelGroup;
  736. } else {
  737. if (vId=="1") {
  738. this.form.channel = 1;
  739. this.form.tProjectChannel.channelName = "直接触达";
  740. }else if(vId=="2"){
  741. this.form.channel = 2;
  742. this.form.tProjectChannel.channelName = "内部推荐";
  743. }
  744. this.form.tProjectChannel.channelGroup = "";
  745. }
  746. },
  747. handleChannelItem() {
  748. this.$refs.channelItem.showChannelItem = true;
  749. },
  750. getPoolDetail(id) {
  751. getPool(id).then((response) => {
  752. this.form = response.data;
  753. let channeItem = this.channelList.find((item) => {
  754. if (this.form.channel == item.id) {
  755. return item;
  756. }
  757. });
  758. if (channeItem && channeItem.channelName) {
  759. this.form.tProjectChannel.channelName = channeItem.channelName;
  760. this.form.tProjectChannel.channelGroup = channeItem.channelGroup;
  761. } else {
  762. if(this.form.channel=="1") {
  763. this.form.tProjectChannel = {
  764. channelName: "直接触达",
  765. channelGroup: "",
  766. };
  767. }else if(this.form.channel=="2") {
  768. this.form.tProjectChannel = {
  769. channelName: "内部推荐",
  770. channelGroup: "",
  771. };
  772. }else {
  773. this.form.tProjectChannel = {
  774. channelName: "无",
  775. channelGroup: "",
  776. };
  777. }
  778. }
  779. setTimeout(() => {
  780. if (this.type == "2") {
  781. this.$refs.fileItem.handleButton();
  782. this.$refs.bpFileItem.handleButton();
  783. this.$refs.otherFileItem.handleButton();
  784. }
  785. this.$refs.fileItem.fileList = [];
  786. this.$refs.fileItem.getListFileBusinessId(
  787. this.form.tProjectCompany.companyId
  788. );
  789. this.$refs.bpFileItem.fileList = [];
  790. this.$refs.bpFileItem.getListFileBusinessId(this.form.id, "9");
  791. this.$refs.otherFileItem.fileList = [];
  792. this.$refs.otherFileItem.getListFileBusinessId(this.form.id, "0");
  793. }, 300);
  794. });
  795. },
  796. // 获取fileList
  797. getFileList(fileList) {
  798. if (fileList && fileList.length > 0) {
  799. this.fileList = fileList;
  800. } else {
  801. this.fileList = [];
  802. }
  803. },
  804. getBPFileList(fileList) {
  805. if (fileList && fileList.length > 0) {
  806. this.fileListBP = fileList;
  807. this.$refs.form.clearValidate(["bpFile"]);
  808. } else {
  809. this.fileList = [];
  810. }
  811. },
  812. getOtherFileList(fileList) {
  813. if (fileList && fileList.length > 0) {
  814. this.fileListOther = fileList;
  815. } else {
  816. this.fileList = [];
  817. }
  818. },
  819. /** 提交按钮 */
  820. submitForm(flag) {
  821. let that = this;
  822. if (this.form.channel == "") {
  823. this.form.channel = -1;
  824. }
  825. if (flag === 1) {
  826. // 暂存
  827. this.form.flag='false';
  828. if (!this.form.projectName) {
  829. this.$modal.msgError("请输入项目名称");
  830. return false;
  831. }
  832. this.form.listFile = this.fileList;
  833. this.form.bpFile = this.fileListBP;
  834. this.form.otherFile = this.fileListOther;
  835. //console.log(this.form.id+"id----------------------");
  836. if (this.form.id != null) {
  837. /*updatePool(this.form).then((response) => {
  838. this.$modal.msgSuccess("暂存成功");
  839. setTimeout(() => {
  840. that.goBack();
  841. }, 1500);
  842. });*/
  843. } else {
  844. this.form.projectStage = "1";
  845. this.form.projectState = "a";
  846. this.form.projectGroup = this.form.tProjectChannel.channelGroup;
  847. investmentOpportunityStart(this.form).then((response) => {
  848. this.$modal.msgSuccess("暂存成功");
  849. this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
  850. setTimeout(() => {
  851. //that.goBack();
  852. that.goMyTask();
  853. }, 1500);
  854. });
  855. }
  856. } else if (flag=== 2) {
  857. // 提交
  858. this.form.flag='true';
  859. this.$refs["form"].validate((valid, rules) => {
  860. if (valid) {
  861. this.form.listFile = this.fileList;
  862. this.form.bpFile = this.fileListBP;
  863. this.form.otherFile = this.fileListOther;
  864. if (this.form.tProjectCompany.registeredCapital!=null) {
  865. this.form.tProjectCompany.registeredCapital =
  866. this.form.tProjectCompany.registeredCapital
  867. .replace(/[^0-9.]/g, "")
  868. .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")
  869. .replace(/-/g, "");
  870. }
  871. if (this.form.tProjectCompany.paidCapital!=null) {
  872. this.form.tProjectCompany.paidCapital =
  873. this.form.tProjectCompany.paidCapital
  874. .replace(/[^0-9.]/g, "")
  875. .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")
  876. .replace(/-/g, "");
  877. }
  878. this.form.investValuation = this.form.investValuation
  879. .replace(/[^0-9.]/g, "")
  880. .replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")
  881. .replace(/-/g, "");
  882. this.form.financingMoney = this.form.financingMoney
  883. .replace(/\D/g, "")
  884. .replace(/-/g, "");
  885. this.form.investMoney = this.form.investMoney
  886. .replace(/\D/g, "")
  887. .replace(/-/g, "");
  888. if (this.form.id != null) {
  889. if (this.form.projectState == "1") {
  890. this.form.projectState = "a";
  891. }
  892. /*updatePool(this.form).then((response) => {
  893. this.$modal.msgSuccess("修改成功");
  894. setTimeout(() => {
  895. that.goBack();
  896. }, 1500);
  897. });*/
  898. } else {
  899. this.form.projectStage = "1";
  900. this.form.projectState = "a";
  901. this.form.projectGroup = this.form.tProjectChannel.channelGroup;
  902. investmentOpportunityStart(this.form).then((response) => {
  903. this.$modal.msgSuccess("新增成功");
  904. this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
  905. setTimeout(() => {
  906. //that.goBack();
  907. that.goMyTask();
  908. }, 1500);
  909. });
  910. }
  911. } else {
  912. for (var ruleName in rules) {
  913. let _rule = rules[ruleName];
  914. let message = _rule[0].message;
  915. this.$message.warning(message, 1);
  916. break;
  917. }
  918. //验证不通过回滚到不通过的第一个位置
  919. this.$nextTick(() => {
  920. let isError = document.getElementsByClassName("is-error");
  921. isError[0].scrollIntoView({
  922. block: "center",
  923. behavior: "smooth",
  924. });
  925. });
  926. }
  927. });
  928. }
  929. },
  930. //返回
  931. goBack() {
  932. this.$router.go(-1);
  933. },
  934. //跳转到我的任务-项目机会
  935. goMyTask(){
  936. //this.$router.push({ path: "/myTask/project/investOpp/myTask"});
  937. // 关闭当前标签页并返回指定页面
  938. const obj = { path: "/myTask/project/investOpp/myTask", query: { t: Date.now()} };
  939. this.$tab.closeOpenPage(obj);
  940. },
  941. // 表单重置
  942. reset() {
  943. this.form = {
  944. id: null,
  945. projectName: null,
  946. projectGroup: "",
  947. industry: null,
  948. recordDate: null,
  949. projectCode: null,
  950. channel: "",
  951. contactDate: null,
  952. projectDate: null,
  953. decisionDate: null,
  954. tProjectCompany: {
  955. companyName: null,
  956. companyCode: null,
  957. startTime: null,
  958. endTime: null,
  959. registeredCapital: null,
  960. registeredAddress: null,
  961. paidCapital: null,
  962. businessAddress: null,
  963. actualBod: null,
  964. phone: null,
  965. filingTime: null,
  966. type: null,
  967. },
  968. tProjectContacts: {
  969. name: null,
  970. position: null,
  971. contact: null,
  972. },
  973. tProjectChannel: {
  974. channelName: "",
  975. channelGroup: "",
  976. },
  977. description: null,
  978. projectContacts: null,
  979. investHead: this.user.nickName,
  980. previousFinancing: null,
  981. financingStage: null,
  982. financingCondition: null,
  983. financingMoney: null,
  984. financingDate: null,
  985. investSparkle: null,
  986. investValuation: null,
  987. investMoney: null,
  988. investType: null,
  989. investPloy: null,
  990. investWorth: null,
  991. shareholding: null,
  992. projectStage: null,
  993. projectState: null,
  994. mark: null,
  995. delFlag: null,
  996. createBy: null,
  997. createTime: null,
  998. updateBy: null,
  999. updateTime: null,
  1000. listFile: null,
  1001. bpFile: null,
  1002. otherFile: null,
  1003. };
  1004. this.resetForm("form");
  1005. },
  1006. },
  1007. };
  1008. </script>
  1009. <style lang="scss" scoped>
  1010. .poolAdd {
  1011. h2 {
  1012. margin-left: 30px;
  1013. }
  1014. .special-el-form {
  1015. h3 {
  1016. width: 100%;
  1017. margin-bottom: -10px;
  1018. font-weight: bold;
  1019. }
  1020. .btnList {
  1021. width: 100%;
  1022. display: flex;
  1023. justify-content: center;
  1024. padding-bottom: 40px;
  1025. }
  1026. }
  1027. }
  1028. .poolDetail {
  1029. position: relative;
  1030. // cursor: not-allowed;
  1031. }
  1032. .poolDetail ::placeholder {
  1033. color: #f5f7fa !important;
  1034. }
  1035. // .poolDetail::after {
  1036. // content: "";
  1037. // display: block;
  1038. // position: absolute;
  1039. // top: 0;
  1040. // left: 0;
  1041. // width: 100%;
  1042. // height: 120%;
  1043. // }
  1044. </style>