| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984 |
- <template>
- <div :class="type === '2' ? 'poolAdd poolDetail' : 'poolAdd'">
- <el-form
- ref="form"
- :model="form"
- :rules="type === '2' ? rules1 : rules"
- label-width="160px"
- class="special-el-form"
- >
- <h3>项目基础信息</h3>
- <el-divider></el-divider>
- <el-form-item label="项目名称" prop="projectName">
- <el-input
- maxlength="100"
- v-model="form.projectName"
- placeholder="请输入项目名称"
- :disabled="type === '2'"
- />
- </el-form-item>
- <el-form-item label="渠道" prop="tProjectChannel.channelName">
- <el-select
- :disabled="type === '2'"
- v-model="form.tProjectChannel.channelName"
- placeholder="请选择"
- clearable
- @change="handleChannel"
- >
- <el-option
- v-for="item in channelList"
- :key="item.id"
- :label="item.channelName"
- :value="item.id"
- />
- <el-option label="直接触达" value="1" />
- <el-option label="内部推荐" value="2" />
- </el-select>
- <!-- <channelItem
- ref="channelItem"
- @getChannelInfo="getChannelInfo"
- ></channelItem> -->
- <!-- <el-input v-model="form.channel" placeholder="请输入渠道" /> -->
- </el-form-item>
- <el-form-item label="初次接触日期" prop="contactDate">
- <el-date-picker
- :disabled="type === '2'"
- clearable
- v-model="form.contactDate"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择初次接触日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="所属组别">
- <el-select
- v-model="form.tProjectChannel.channelGroup"
- disabled
- placeholder="请选择所属组别"
- >
- <el-option
- v-for="dict in dict.type.project_group"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="所属行业" prop="industry">
- <el-select
- v-model="form.industry"
- placeholder="请选择所属行业"
- :disabled="type === '2'"
- >
- <el-option
- v-for="dict in dict.type.CUSTOMER_TRADE"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="项目负责人" prop="investHead">
- <el-input
- v-if="type === '2'"
- maxlength="30"
- v-model="form.investHead"
- :disabled="type === '2'"
- />
- <div
- class="el-input__inner inputSimulation"
- @click="openSelectDept"
- v-else
- >
- {{ form.investHead ? form.investHead : "请选择项目负责人" }}
- </div>
- <selecDept
- ref="selecDepts"
- @getDeptUserInfo="getDeptUserInfo"
- :deptId="deptId"
- ></selecDept>
- </el-form-item>
- <el-form-item
- label="项目情况描述"
- prop="description"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- maxlength="200"
- rows="4"
- type="textarea"
- v-model="form.description"
- placeholder="请输入项目情况描述"
- />
- </el-form-item>
- <h3>项目公司信息</h3>
- <el-divider></el-divider>
- <el-form-item label="公司名称" prop="tProjectCompany.companyName">
- <el-input
- :disabled="type === '2'"
- maxlength="100"
- v-model="form.tProjectCompany.companyName"
- placeholder="请输入公司名称"
- />
- </el-form-item>
- <el-form-item label="统一社会信用代码" prop="tProjectCompany.companyCode">
- <el-input
- :disabled="type === '2'"
- maxlength="35"
- v-model="form.tProjectCompany.companyCode"
- placeholder="请输入企业统一社会信用代码"
- />
- </el-form-item>
- <el-form-item label="营业开始时间" prop="tProjectCompany.startTime">
- <el-date-picker
- :disabled="type === '2'"
- clearable
- v-model="form.tProjectCompany.startTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择营业开始时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="营业结束时间" prop="tProjectCompany.endTime">
- <el-date-picker
- :disabled="type === '2'"
- clearable
- v-model="form.tProjectCompany.endTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择营业结束时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item
- label="注册资本(万元)"
- prop="tProjectCompany.registeredCapital"
- >
- <el-input
- :disabled="type === '2'"
- maxlength="20"
- v-model="form.tProjectCompany.registeredCapital"
- @input="
- (value) =>
- (form.tProjectCompany.registeredCapital = value
- .replace(/[^0-9.]/g, '')
- .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
- .replace(/-/g, ''))
- "
- placeholder="请输入注册资本"
- />
- </el-form-item>
- <el-form-item label="实缴资本(万元)" prop="tProjectCompany.paidCapital">
- <el-input
- :disabled="type === '2'"
- maxlength="20"
- v-model="form.tProjectCompany.paidCapital"
- @input="
- (value) =>
- (form.tProjectCompany.paidCapital = value
- .replace(/[^0-9.]/g, '')
- .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, '$1$2.$3')
- .replace(/-/g, ''))
- "
- placeholder="请输入实缴资本"
- />
- </el-form-item>
- <el-form-item label="实控人" prop="tProjectCompany.actualBod">
- <el-input
- :disabled="type === '2'"
- maxlength="25"
- v-model="form.tProjectCompany.actualBod"
- placeholder="请输入实控人"
- />
- </el-form-item>
- <el-form-item label="联系电话" prop="tProjectCompany.phone">
- <el-input
- :disabled="type === '2'"
- maxlength="20"
- v-model="form.tProjectCompany.phone"
- placeholder="请输入联系电话"
- />
- </el-form-item>
- <el-form-item label="所属类型" prop="tProjectCompany.type">
- <el-input
- :disabled="type === '2'"
- maxlength="25"
- v-model="form.tProjectCompany.type"
- placeholder="请输入所属类型"
- />
- </el-form-item>
- <el-form-item label="备案时间" prop="tProjectCompany.filingTime">
- <el-date-picker
- :disabled="type === '2'"
- clearable
- v-model="form.tProjectCompany.filingTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择备案时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item
- label="注册地址"
- prop="tProjectCompany.registeredAddress"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- type="textarea"
- rows="4"
- maxlength="100"
- v-model="form.tProjectCompany.registeredAddress"
- placeholder="请输入注册地址"
- />
- </el-form-item>
- <el-form-item
- label="办公地址"
- prop="tProjectCompany.businessAddress"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- type="textarea"
- rows="4"
- maxlength="100"
- v-model="form.tProjectCompany.businessAddress"
- placeholder="请输入办公地址"
- />
- </el-form-item>
- <el-form-item
- label="公司附件"
- prop="listFile"
- class="special-el-form-item"
- >
- <fileItem
- ref="fileItem"
- :id="form.id"
- @getFileList="getFileList"
- ></fileItem>
- </el-form-item>
- <h3>项目公司联系人信息</h3>
- <el-divider></el-divider>
- <el-form-item label="联系人姓名" prop="tProjectContacts.name">
- <el-input
- :disabled="type === '2'"
- maxlength="25"
- v-model="form.tProjectContacts.name"
- placeholder="请输入联系人姓名"
- />
- </el-form-item>
- <el-form-item label="职位" prop="tProjectContacts.position">
- <el-input
- :disabled="type === '2'"
- maxlength="25"
- v-model="form.tProjectContacts.position"
- placeholder="请输入职位"
- />
- </el-form-item>
- <el-form-item label="联系电话/微信" prop="tProjectContacts.contact">
- <el-input
- :disabled="type === '2'"
- maxlength="25"
- v-model="form.tProjectContacts.contact"
- placeholder="请输入联系电话/微信"
- />
- </el-form-item>
- <h3>项目融资信息</h3>
- <el-divider></el-divider>
- <el-form-item label="项目融资阶段" prop="financingStage">
- <el-select
- :disabled="type === '2'"
- v-model="form.financingStage"
- placeholder="请选择项目融资阶段"
- >
- <el-option
- v-for="dict in dict.type.financing_stage"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="预期融资金额(万元)" prop="financingMoney">
- <el-input
- :disabled="type === '2'"
- maxlength="20"
- v-model="form.financingMoney"
- @input="
- (value) =>
- (form.financingMoney = value.replace(/\D/g, '').replace(/-/g, ''))
- "
- placeholder="请输入预期融资金额"
- />
- </el-form-item>
- <el-form-item label="投后估值(万元)" prop="investValuation">
- <el-input
- :disabled="type === '2'"
- maxlength="20"
- v-model="form.investValuation"
- @input="
- (value) =>
- (form.investValuation = value
- .replace(/[^0-9.]/g, '')
- .replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
- .replace(/-/g, ''))
- "
- placeholder="请输入投后估值"
- />
- </el-form-item>
- <el-form-item label="预计投资金额(万元)" prop="investMoney">
- <el-input
- :disabled="type === '2'"
- maxlength="20"
- v-model="form.investMoney"
- @input="
- (value) =>
- (form.investMoney = value.replace(/\D/g, '').replace(/-/g, ''))
- "
- placeholder="请输入预计投资金额"
- />
- </el-form-item>
- <!-- -->
- <el-form-item label="投资类型" prop="investType">
- <el-select
- v-model="form.investType"
- placeholder="请选择投资类型"
- :disabled="type === '2'"
- >
- <el-option
- v-for="dict in dict.type.invest_type"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="投资策略" prop="investPloy">
- <el-select
- v-model="form.investPloy"
- placeholder="请选择投资策略"
- :disabled="type === '2'"
- >
- <el-option
- v-for="dict in dict.type.invest_ploy"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="投资价值" prop="investWorth">
- <el-select
- v-model="form.investWorth"
- placeholder="请选择投资价值"
- :disabled="type === '2'"
- >
- <el-option
- v-for="dict in dict.type.invest_worth"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- label="历次融资"
- prop="previousFinancing"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- maxlength="200"
- rows="4"
- type="textarea"
- v-model="form.previousFinancing"
- placeholder="请输入历次融资"
- />
- </el-form-item>
- <el-form-item
- label="融资条件"
- prop="financingCondition"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- maxlength="200"
- rows="4"
- type="textarea"
- v-model="form.financingCondition"
- placeholder="请输入融资条件"
- />
- </el-form-item>
- <el-form-item
- label="投资亮点"
- prop="investSparkle"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- maxlength="200"
- rows="4"
- type="textarea"
- v-model="form.investSparkle"
- placeholder="请输入投资亮点"
- />
- </el-form-item>
- <el-form-item
- label="股权架构"
- prop="shareholding"
- class="special-el-form-item"
- >
- <el-input
- :disabled="type === '2'"
- maxlength="200"
- rows="4"
- type="textarea"
- v-model="form.shareholding"
- placeholder="请输入股权架构"
- />
- </el-form-item>
- <h3>其他</h3>
- <el-divider></el-divider>
- <el-form-item label="BP" prop="bpFile" class="special-el-form-item">
- <fileItem
- ref="bpFileItem"
- :id="form.id"
- @getFileList="getBPFileList"
- ></fileItem>
- </el-form-item>
- <el-form-item
- label="其他附件"
- prop="otherFile"
- class="special-el-form-item"
- >
- <fileItem
- ref="otherFileItem"
- :id="form.id"
- @getFileList="getOtherFileList"
- ></fileItem>
- </el-form-item>
- <el-form-item label="备注" prop="mark" class="special-el-form-item">
- <el-input
- :disabled="type === '2'"
- maxlength="200"
- :readonly="type === '2' ? true : false"
- rows="4"
- type="textarea"
- v-model="form.mark"
- placeholder="请输入备注"
- />
- </el-form-item>
- <el-form-item class="btnList" v-if="type === '1'">
- <el-button @click="goBack">返 回</el-button>
- <el-button type="primary" @click="submitForm(2)" v-preventReClick>保 存</el-button>
- </el-form-item>
- </el-form>
- </div>
- </template>
- <script>
- import { getInvestInfo, investmentOpportunityEdit} from "@/api/project/investOpp/pool";
- import { listChannel } from "@/api/invest/channel";
- import fileItem from "../invest/components/fileItem";
- import channelItem from "../invest/components/channelItem";
- import selecDept from "../invest/components/selecDept";
- import { mapGetters } from "vuex";
- export default {
- props: {
- id: {
- type: String,
- },
- type: {
- type: String,
- default: "1", //1可修改 2不可修改
- },
- },
- components: { fileItem, channelItem, selecDept },
- dicts: [
- "CUSTOMER_TRADE",
- "project_group",
- "invest_type",
- "invest_ploy",
- "invest_worth",
- "financing_stage",
- ],
- data() {
- const validateLogo = (rule, value, callback) => {
- if (this.fileListBP.length <= 0) {
- callback(new Error("请上传BP"));
- } else {
- callback();
- }
- };
- return {
- deptId: process.env.VUE_APP_DEPTID,
- title: "新增项目",
- baseUrl: process.env.VUE_APP_BASE_API,
- pInstId:null,
- localId: this.id, // 初始化用 prop 的 id
- // 表单参数
- form: {
- id: null,
- procInstId:null,
- projectName: null,
- projectGroup: "",
- industry: null,
- recordDate: null,
- projectCode: null,
- channel: "",
- contactDate: null,
- projectDate: null,
- decisionDate: null,
- tProjectCompany: {
- companyName: null,
- companyCode: null,
- startTime: null,
- endTime: null,
- registeredCapital: null,
- registeredAddress: null,
- paidCapital: null,
- businessAddress: null,
- actualBod: null,
- phone: null,
- filingTime: null,
- type: null,
- },
- tProjectContacts: {
- name: null,
- position: null,
- contact: null,
- },
- tProjectChannel: {
- channelName: "",
- channelGroup: "",
- },
- description: null,
- projectContacts: null,
- investHead: null,
- previousFinancing: null,
- financingStage: null,
- financingCondition: null,
- financingMoney: null,
- financingDate: null,
- investSparkle: null,
- investValuation: null,
- investMoney: null,
- investType: null,
- investPloy: null,
- investWorth: null,
- shareholding: null,
- projectStage: null,
- projectState: null,
- mark: null,
- delFlag: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null,
- listFile: null,
- bpFile: null,
- otherFile: null,
- },
- fileList: [],
- fileListBP: [],
- fileListOther: [],
- // 表单校验
- rules1: {},
- rules: {
- projectName: [{ required: true, trigger: "blur", message: "请输入" }],
- // channel: [{ required: true, trigger: "blur", message: "请输入" }],
- contactDate: [{ required: true, trigger: "blur", message: "请输入" }],
- // projectGroup: [
- // { required: true, trigger: "change", message: "请选择" },
- // ],
- industry: [{ required: true, trigger: "change", message: "请选择" }],
- investHead: [{ required: true, trigger: "blur", message: "请输入" }],
- bpFile: [{ required: true, validator: validateLogo }],
- "tProjectChannel.channelName": [
- { required: true, trigger: "change", message: "请选择" },
- ],
- // description: [{ required: true, trigger: "blur", message: "请输入" }],
- "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: "请输入" },
- ],
- "tProjectCompany.registeredAddress": [
- { required: true, trigger: "blur", message: "请输入" },
- ],
- "tProjectCompany.paidCapital": [
- { required: true, trigger: "blur", message: "请输入" },
- ],
- "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}$/,
- // message: "请输入正确的手机号",
- // trigger: "blur",
- // },
- ],
- "tProjectCompany.filingTime": [
- { 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: "change", message: "请选择" },
- ],
- financingMoney: [
- { required: true, trigger: "blur", message: "请输入" },
- ],
- investValuation: [
- { required: true, trigger: "blur", message: "请输入" },
- ],
- investMoney: [{ required: true, trigger: "blur", message: "请输入" }],
- investType: [{ required: true, trigger: "change", message: "请选择" }],
- investPloy: [{ required: true, trigger: "change", message: "请选择" }],
- investWorth: [{ required: true, trigger: "change", message: "请选择" }],
- // previousFinancing: [{ required: true, trigger: "blur", message: "请输入" }],
- // financingCondition: [
- // { required: true, trigger: "blur", message: "请输入" },
- // ],
- investSparkle: [{ required: true, trigger: "blur", message: "请输入" }],
- shareholding: [{ required: true, trigger: "blur", message: "请输入" }],
- // mark: [{ required: true, trigger: "blur", message: "请输入" }]
- },
- channelList: [],
- };
- },
- computed: {
- ...mapGetters(["user"]),
- },
- mounted() {
- new Promise((resolve, reject) => {
- listChannel({
- pageNum: 1,
- pageSize: 100,
- }).then((response) => {
- this.channelList = response.rows;
- resolve();
- });
- }).then(() => {
- //this.id=this.$route.query.id;
- this.localId = this.$route.query.id; // 改这里!用 localId
- this.pInstId = this.$route.query.pInstId;
- //console.log(this.localId+'--------------------------');
- if (this.localId) {
- this.getPoolDetail(this.pInstId);
- } else {
- //this.reset();
- }
- });
- },
- methods: {
- // 选择部门人
- openSelectDept() {
- this.$refs.selecDepts.show(1, this.user.userId);
- },
- getDeptUserInfo(info) {
- if (info.length > 0) {
- this.form.investHead = info[0].nickName;
- this.$refs.form.clearValidate(["investHead"]);
- }
- },
- // 获取渠道信息
- getChannelInfo(info) {
- if (info.length > 0) {
- this.form.channel = info[0].id;
- this.form.tProjectChannel.channelName = info[0].channelName;
- this.form.tProjectChannel.channelGroup = info[0].channelGroup;
- this.$refs.form.clearValidate(["channel"]);
- }
- },
- // 选择渠道
- handleChannel(vId) {
- let obj = {};
- obj = this.channelList.find((item) => {
- return item.id === vId;
- });
- if (obj && obj.id) {
- this.form.channel = obj.id;
- this.form.tProjectChannel.channelName = obj.channelName;
- this.form.tProjectChannel.channelGroup = obj.channelGroup;
- } else {
- if (vId=="1") {
- this.form.channel = 1;
- this.form.tProjectChannel.channelName = "直接触达";
- }else if (vId=="2"){
- this.form.channel = 2;
- this.form.tProjectChannel.channelName = "内部推荐";
- }else {
- this.form.channel = -1;
- this.form.tProjectChannel.channelName = "无";
- }
- }
- },
- handleChannelItem() {
- this.$refs.channelItem.showChannelItem = true;
- },
- getPoolDetail(pInstId) {
- getInvestInfo(pInstId).then((response) => {
- this.form = response.data;
- let channeItem = this.channelList.find((item) => {
- if (this.form.channel == item.id) {
- return item;
- }
- });
- if (channeItem && channeItem.channelName) {
- this.form.tProjectChannel.channelName = channeItem.channelName;
- this.form.tProjectChannel.channelGroup = channeItem.channelGroup;
- } else {
- if(this.form.channel=="1") {
- this.form.tProjectChannel = {
- channelName: "直接触达",
- channelGroup: "",
- };
- }else if(this.form.channel=="2") {
- this.form.tProjectChannel = {
- channelName: "内部推荐",
- channelGroup: "",
- };
- }else {
- this.form.tProjectChannel = {
- channelName: "无",
- channelGroup: "",
- };
- }
- }
- setTimeout(() => {
- if (this.type == "2") {
- this.$refs.fileItem.handleButton();
- this.$refs.bpFileItem.handleButton();
- this.$refs.otherFileItem.handleButton();
- }
- this.$refs.fileItem.fileList = [];
- this.$refs.fileItem.getListFileBusinessId(
- this.form.tProjectCompany.companyId
- );
- this.$refs.bpFileItem.fileList = [];
- this.$refs.bpFileItem.getListFileBusinessId(this.form.id, "9");
- this.$refs.otherFileItem.fileList = [];
- this.$refs.otherFileItem.getListFileBusinessId(this.form.id, "0");
- }, 300);
- });
- },
- // 获取fileList
- getFileList(fileList) {
- if (fileList && fileList.length > 0) {
- this.fileList = fileList;
- } else {
- this.fileList = [];
- }
- },
- getBPFileList(fileList) {
- if (fileList && fileList.length > 0) {
- this.fileListBP = fileList;
- this.$refs.form.clearValidate(["bpFile"]);
- } else {
- this.fileList = [];
- }
- },
- getOtherFileList(fileList) {
- if (fileList && fileList.length > 0) {
- this.fileListOther = fileList;
- } else {
- this.fileList = [];
- }
- },
- /** 提交按钮 */
- submitForm(type) {
- let that = this;
- if (this.form.channel == "") {
- this.form.channel = -1;
- }
- if (type === 2) {
- // 提交
- this.form.flag='true';
- this.$refs["form"].validate((valid, rules) => {
- if (valid) {
- this.form.listFile = this.fileList;
- this.form.bpFile = this.fileListBP;
- this.form.otherFile = this.fileListOther;
- this.form.tProjectCompany.registeredCapital =
- this.form.tProjectCompany.registeredCapital
- .replace(/[^0-9.]/g, "")
- .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")
- .replace(/-/g, "");
- this.form.tProjectCompany.paidCapital =
- this.form.tProjectCompany.paidCapital
- .replace(/[^0-9.]/g, "")
- .replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")
- .replace(/-/g, "");
- this.form.investValuation = this.form.investValuation
- .replace(/[^0-9.]/g, "")
- .replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")
- .replace(/-/g, "");
- this.form.financingMoney = this.form.financingMoney
- .replace(/\D/g, "")
- .replace(/-/g, "");
- this.form.investMoney = this.form.investMoney
- .replace(/\D/g, "")
- .replace(/-/g, "");
- investmentOpportunityEdit(this.form).then((response) => {
- this.$modal.msgSuccess("保存成功");
- //this.$store.dispatch("getMyTaskInvestOppNumber"); //更新代办数量
- setTimeout(() => {
- that.goBack();
- }, 1500);
- });
- } else {
- for (var ruleName in rules) {
- let _rule = rules[ruleName];
- let message = _rule[0].message;
- this.$message.warning(message, 1);
- break;
- }
- //验证不通过回滚到不通过的第一个位置
- this.$nextTick(() => {
- let isError = document.getElementsByClassName("is-error");
- isError[0].scrollIntoView({
- block: "center",
- behavior: "smooth",
- });
- });
- }
- });
- }
- },
- goBack() {
- this.$router.go(-1);
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- projectName: null,
- projectGroup: "",
- industry: null,
- recordDate: null,
- projectCode: null,
- channel: "",
- contactDate: null,
- projectDate: null,
- decisionDate: null,
- tProjectCompany: {
- companyName: null,
- companyCode: null,
- startTime: null,
- endTime: null,
- registeredCapital: null,
- registeredAddress: null,
- paidCapital: null,
- businessAddress: null,
- actualBod: null,
- phone: null,
- filingTime: null,
- type: null,
- },
- tProjectContacts: {
- name: null,
- position: null,
- contact: null,
- },
- tProjectChannel: {
- channelName: "",
- channelGroup: "",
- },
- description: null,
- projectContacts: null,
- investHead: this.user.nickName,
- previousFinancing: null,
- financingStage: null,
- financingCondition: null,
- financingMoney: null,
- financingDate: null,
- investSparkle: null,
- investValuation: null,
- investMoney: null,
- investType: null,
- investPloy: null,
- investWorth: null,
- shareholding: null,
- projectStage: null,
- projectState: null,
- mark: null,
- delFlag: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null,
- listFile: null,
- bpFile: null,
- otherFile: null,
- };
- this.resetForm("form");
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .poolAdd {
- h2 {
- margin-left: 30px;
- }
- .special-el-form {
- h3 {
- width: 100%;
- margin-bottom: -10px;
- font-weight: bold;
- }
- .btnList {
- width: 100%;
- display: flex;
- justify-content: center;
- padding-bottom: 40px;
- }
- }
- }
- .poolDetail {
- position: relative;
- // cursor: not-allowed;
- }
- .poolDetail ::placeholder {
- color: #f5f7fa !important;
- }
- </style>
|