edit.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <template>
  2. <div class="detailWrapper">
  3. <section class="section1 public-flex">
  4. <div class="public-margin-r-20">
  5. <h4>
  6. 投资项目
  7. <span class="alreadyStop" v-if="detailInfo.delFlag === '1'"
  8. >已终止</span
  9. >
  10. </h4>
  11. <p class="projectNameTit">{{ detailInfo.projectName }}</p>
  12. </div>
  13. </section>
  14. <el-divider></el-divider>
  15. <section>
  16. <!-- :space="200" -->
  17. <el-divider></el-divider>
  18. <div
  19. class="public-flex-between basicsInfo"
  20. v-if="detailInfo.projectState != '1'"
  21. >
  22. <div class="public-flex-center-column">
  23. <div>项目公司名称</div>
  24. <p
  25. style="width: 250px; text-align: center"
  26. class="yichu1"
  27. v-if="
  28. detailInfo.tProjectCompany &&
  29. detailInfo.tProjectCompany.companyName
  30. "
  31. >
  32. {{ detailInfo.tProjectCompany.companyName }}
  33. </p>
  34. </div>
  35. <div class="public-flex-center-column">
  36. <div>渠道</div>
  37. <p
  38. v-if="
  39. detailInfo.tProjectChannel &&
  40. detailInfo.tProjectChannel.channelName
  41. "
  42. >
  43. {{ detailInfo.tProjectChannel.channelName }}
  44. </p>
  45. <p v-else>无</p>
  46. </div>
  47. <div class="public-flex-center-column">
  48. <div>项目负责人</div>
  49. <p>{{ detailInfo.investHead }}</p>
  50. </div>
  51. <div class="public-flex-center-column" v-if="detailInfo.projectDate">
  52. <div>立项通过日期</div>
  53. <p>{{ detailInfo.projectDate }}</p>
  54. </div>
  55. <div class="public-flex-center-column" v-if="detailInfo.decisionDate">
  56. <div>投决通过日期</div>
  57. <p>{{ detailInfo.decisionDate }}</p>
  58. </div>
  59. <div class="public-flex-center-column">
  60. <div>投前估值(万元)</div>
  61. <p>{{ detailInfo.investValuation }}</p>
  62. </div>
  63. <div class="public-flex-center-column">
  64. <div>预计投资金额(万元)</div>
  65. <p>{{ detailInfo.investMoney }}</p>
  66. </div>
  67. </div>
  68. </section>
  69. <section class="section3">
  70. <el-tabs v-model="activeName" @tab-click="handleClick">
  71. <el-tab-pane label="投决信息" name="0"></el-tab-pane>
  72. <el-tab-pane label="项目基本信息" name="1"></el-tab-pane>
  73. </el-tabs>
  74. <section>
  75. <div v-if="activeName === '0'" class="public-padded-20 detail-meeting">
  76. <el-tabs type="border-card">
  77. <el-tab-pane label="项目投决申请表">
  78. <el-form
  79. v-if="formTJApply.id"
  80. class="special-el-form public-padded-t-20"
  81. ref="formTJApply"
  82. :model="formTJApply"
  83. :rules="rulesTJApply"
  84. label-width="120px"
  85. >
  86. <el-form-item
  87. label="股权/其他合作商务条款"
  88. prop="provision"
  89. class="special-el-form-item"
  90. >
  91. <el-input
  92. rows="4"
  93. type="textarea"
  94. maxlength="200"
  95. v-model="formTJApply.provision"
  96. />
  97. </el-form-item>
  98. <el-form-item
  99. label="投决资料"
  100. prop="listFile"
  101. class="special-el-form-item"
  102. >
  103. <fileItem
  104. ref="fileItemTJApply"
  105. :id="formTJApply.id"
  106. @getFileList="getFileListTJApply"
  107. ></fileItem>
  108. </el-form-item>
  109. <!-- <el-form-item
  110. label="通知名单"
  111. prop="participants"
  112. class="special-el-form-item"
  113. >
  114. <el-input
  115. rows="4"
  116. type="textarea"
  117. v-model="formTJApply.participants"
  118. disabled
  119. />
  120. </el-form-item>-->
  121. </el-form>
  122. <div
  123. v-else
  124. class="public-flex-center public-padded-20"
  125. style="color: #909399"
  126. >
  127. 暂无数据
  128. </div>
  129. </el-tab-pane>
  130. <!-- <el-tab-pane label="项目投决评估评审汇总表">
  131. <tableForm
  132. :formType="4"
  133. ref="voteTableForm"
  134. :readonly="true"
  135. :showBack="false"
  136. ></tableForm>
  137. </el-tab-pane>-->
  138. </el-tabs>
  139. </div>
  140. <div v-show="activeName === '1'">
  141. <poolForm :type="type" :id="id"></poolForm>
  142. </div>
  143. </section>
  144. </section>
  145. <section class="approveBtn">
  146. <el-form
  147. ref="flowBaseInfo"
  148. :model="flowBaseInfo"
  149. :rules="rulesFlow"
  150. label-width="120px"
  151. >
  152. <el-form-item class="btnList">
  153. <el-button @click="goBack">返 回</el-button>
  154. <el-button type="primary" @click="handleComplete(true)">提交</el-button>
  155. <el-button type="warning" @click="handleComplete(false)">关闭</el-button>
  156. </el-form-item>
  157. </el-form>
  158. </section>
  159. </div>
  160. </template>
  161. <script>
  162. import poolForm from "../../invest/components/poolForm";
  163. import fileItem from "../../invest/components/fileItem";
  164. import {
  165. getPool
  166. } from "@/api/invest/pool";
  167. import {
  168. listMeeting,
  169. listProjectPoolIdNewDecision,
  170. } from "@/api/invest/meeting";
  171. import{
  172. decisionComplete
  173. } from "@/api/project/decision/pool"
  174. import { mapGetters } from "vuex";
  175. export default {
  176. name: "investPoolDetail",
  177. components: {
  178. poolForm,
  179. fileItem,
  180. },
  181. data() {
  182. const validateLogo = (rule, value, callback) => {
  183. if (this.fileListTJApply.length <= 0) {
  184. callback(new Error("请上传文件"));
  185. } else {
  186. callback();
  187. }
  188. };
  189. return {
  190. showDueApply: false,
  191. meetingId: "0",
  192. type: "2",
  193. id: "",
  194. active: 0,
  195. detailInfo: {
  196. projectName: "",
  197. },
  198. activeName: "0",
  199. formTJApply: {
  200. id: null,
  201. projectPoolId: null,
  202. projectName: null,
  203. provision: null,
  204. listFile: null,
  205. participants: null,
  206. participantsId: null,
  207. flag:null,
  208. },
  209. fileListTJApply: [],
  210. rulesTJApply: {
  211. provision: [{ required: true, trigger: "blur", message: "请输入" }],
  212. listFile: [{ required: true, validator: validateLogo }],
  213. },
  214. flowBaseInfo:{
  215. comment:null,
  216. taskId:null
  217. },
  218. rulesFlow:{
  219. comment: [{ required: true, trigger: "blur", message: "请输入" }],
  220. }
  221. };
  222. },
  223. computed: {
  224. ...mapGetters(["user"]),
  225. },
  226. created() {
  227. this.id = this.$route.query.id;
  228. this.flowBaseInfo.taskId=this.$route.query.taskId;
  229. this.getlistProjectPoolIdNewDecision();
  230. this.getDetail();
  231. if (this.$route.query.activeName) {
  232. this.activeName = this.$route.query.activeName;
  233. }
  234. },
  235. methods: {
  236. getMettingId(type) {
  237. let queryParams = {
  238. pageNum: 1,
  239. pageSize: 10,
  240. meetingType: type,
  241. orderByColumn: "createTime",
  242. isAsc: "desc",
  243. projectPoolId: this.id,
  244. };
  245. listMeeting(queryParams).then((response) => {
  246. let meetingList = response.rows;
  247. if (meetingList.length > 0) {
  248. let meetingId = meetingList[0].id;
  249. if (type === "LX") {
  250. this.$refs.approvalTableForm.initialize(meetingId);
  251. } else if (type === "TJ") {
  252. this.$refs.voteTableForm.initialize(meetingId);
  253. }
  254. } else {
  255. if (type === "LX") {
  256. this.$refs.approvalTableForm.showNodata();
  257. } else if (type === "TJ") {
  258. this.$refs.voteTableForm.showNodata();
  259. }
  260. }
  261. });
  262. },
  263. handleClick(tab, event) {
  264. let that = this;
  265. if (this.activeName === "0") {
  266. // 项目投决
  267. this.getMettingId("TJ");
  268. this.getlistProjectPoolIdNewDecision();
  269. } else if (this.activeName === "1") {
  270. // 项目报备
  271. this.getDetail();
  272. }
  273. },
  274. // 获取投决申请
  275. getlistProjectPoolIdNewDecision() {
  276. let that = this;
  277. listProjectPoolIdNewDecision(this.id).then((response) => {
  278. if (response && response.data) {
  279. that.formTJApply = response.data;
  280. setTimeout(() => {
  281. //that.$refs.fileItemTJApply.handleButton();
  282. that.$refs.fileItemTJApply.fileList = [];
  283. that.$refs.fileItemTJApply.getListFileBusinessId(
  284. that.formTJApply.id
  285. );
  286. }, 300);
  287. }
  288. });
  289. },
  290. // 投决申请附件回显
  291. getFileListTJApply(fileList) {
  292. this.fileListTJApply = fileList;
  293. if (fileList && fileList.length > 0) {
  294. this.$refs.formTJApply.clearValidate(["listFile"]);
  295. } else {
  296. this.fileListTJApply = [];
  297. }
  298. },
  299. //项目报备
  300. getDetail() {
  301. getPool(this.id).then((response) => {
  302. this.detailInfo = response.data;
  303. // 项目退出完成n
  304. if (response.data.projectState === "n") {
  305. this.active = parseInt(response.data.projectStage);
  306. } else {
  307. this.active = parseInt(response.data.projectStage) - 1;
  308. }
  309. });
  310. },
  311. /** 加载审批任务弹框 */
  312. handleComplete(flag) {
  313. this.taskComplete(flag);
  314. },
  315. /** 用户审批任务 */
  316. taskComplete(flag) {
  317. this.formTJApply.flag=flag;
  318. this.formTJApply.listFile = this.fileListTJApply;
  319. const params={
  320. projectDecision:this.formTJApply,
  321. flowBaseInfo: this.flowBaseInfo
  322. }
  323. this.$refs["formTJApply"].validate((valid) => {
  324. if (valid) {
  325. try{
  326. decisionComplete(params).then(response => {
  327. this.$modal.msgSuccess(response.msg);
  328. this.$store.dispatch("getMyTaskDecisionNumber"); //更新代办数量
  329. this.goMyTask();
  330. });
  331. } catch (err) {
  332. // 捕获重复提交错误
  333. this.$message.error(err.message);
  334. }
  335. }
  336. })
  337. },
  338. /*返回*/
  339. goBack() {
  340. this.$router.go(-1);
  341. },
  342. //跳转到我的任务
  343. goMyTask(){
  344. //this.$router.push({ path: "/myTask/project/decision/myTask"});
  345. // 关闭当前标签页并返回指定页面
  346. const obj = { path: "/myTask/project/decision/myTask", query: { t: Date.now()} };
  347. this.$tab.closeOpenPage(obj);
  348. },
  349. },
  350. };
  351. </script>
  352. <style lang="scss" scoped>
  353. .detailWrapper {
  354. padding: 20px 0;
  355. width: 92%;
  356. margin: 0 auto;
  357. .section1 {
  358. p {
  359. font-size: 24px;
  360. font-weight: bold;
  361. margin: 0;
  362. }
  363. > div:first-child {
  364. // width: calc(100% - 700px);
  365. width: 100%;
  366. }
  367. .btnList {
  368. width: 700px;
  369. display: flex;
  370. justify-content: flex-end;
  371. }
  372. }
  373. .basicsInfo {
  374. font-size: 14px;
  375. background: #f1f1f1;
  376. margin-top: -24px;
  377. width: 100%;
  378. padding: 30px 20px 10px;
  379. div {
  380. color: #7e7d7d;
  381. }
  382. p {
  383. font-size: 16px;
  384. color: #333;
  385. font-weight: bold;
  386. }
  387. }
  388. .section3 {
  389. margin-top: 40px;
  390. }
  391. .approveBtn {
  392. margin-top: 30px;
  393. .btnList {
  394. display: flex;
  395. justify-content: flex-end;
  396. /* 让内部元素(按钮)整体靠右 */
  397. gap: 10px; /* 替代 margin,给按钮之间加间距,可选 */
  398. padding-right: 50px;
  399. }
  400. }
  401. }
  402. .projectNameTit {
  403. }
  404. .alreadyStop {
  405. font-weight: normal;
  406. font-size: 12px;
  407. background: #ff0000;
  408. color: #fff;
  409. border-radius: 5px;
  410. padding: 5px 10px;
  411. margin-left: 10px;
  412. }
  413. </style>