|
|
@@ -1,32 +1,5 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <!-- <el-descriptions :column="4" size="medium" border>-->
|
|
|
- <!-- <el-descriptions-item label="项目名称" span="2">{{ form.name }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目类型">{{ form.type }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目编码">{{ form.code }}</el-descriptions-item>-->
|
|
|
-
|
|
|
- <!-- <el-descriptions-item label="从属项目">{{ form.parentId }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="负责部门">{{ form.responsibleDeptName }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目经理">{{ form.responsibleUserName }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目团队">{{ form.teamName }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目预算">{{ form.number }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目周期">{{ form.cycle }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="计划开始日期">{{ form.cycle }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="计划完成日期">{{ form.planEndDate }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="关联合同">{{ form.contractName }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="客户名称">{{ form.contactName }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="客户联系电话">{{ form.contactRelationPhone }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="项目简介" :span="3">{{ form.content }}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="附件">-->
|
|
|
- <!-- <el-link-->
|
|
|
- <!-- v-for="item in form.files"-->
|
|
|
- <!-- type="primary"-->
|
|
|
- <!-- :underline="false"-->
|
|
|
- <!-- @click="downloadFile(item)">-->
|
|
|
- <!-- {{ item.name }}-->
|
|
|
- <!-- </el-link>-->
|
|
|
- <!-- </el-descriptions-item>-->
|
|
|
- <!-- </el-descriptions>-->
|
|
|
<el-form
|
|
|
ref="form"
|
|
|
:model="form"
|
|
|
@@ -37,8 +10,6 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item prop="type" label="项目类型">
|
|
|
- <!-- <dict-selection dict-name="项目类型" v-model="form.type" :disabled="dialogType=='view'"-->
|
|
|
- <!-- @change="changeType"></dict-selection>-->
|
|
|
<ele-tree-select
|
|
|
filterable
|
|
|
:disabled="dialogType == 'view'"
|
|
|
@@ -70,8 +41,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="从属项目">
|
|
|
<ele-tree-select
|
|
|
@@ -115,8 +85,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+
|
|
|
<el-col :span="8">
|
|
|
<el-form-item prop="teamId" label="项目团队">
|
|
|
<el-select
|
|
|
@@ -168,8 +137,7 @@
|
|
|
></dict-selection>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+
|
|
|
<el-col :span="8">
|
|
|
<el-form-item prop="planStartDate" label="计划开始日期">
|
|
|
<el-date-picker
|
|
|
@@ -224,19 +192,27 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <!-- <el-col :span="8">-->
|
|
|
- <!-- <el-form-item label="权重占比">-->
|
|
|
- <!-- <el-input type="number" :min="0" :max="100" v-model="form.proportion" :disabled="dialogType=='view'">-->
|
|
|
- <!-- <template slot="append">-->
|
|
|
- <!-- %-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </el-input>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-col :span="8">
|
|
|
+ <el-form-item prop="relationType" label="关联类型">
|
|
|
+ <el-select
|
|
|
+ v-model="form.relationType"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="typeChange"
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="dialogType == 'view'"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8" v-if="form.relationType == 3">
|
|
|
<el-form-item label="关联合同" prop="contractName">
|
|
|
<el-input
|
|
|
:disabled="dialogType == 'view'"
|
|
|
@@ -246,46 +222,32 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8" v-if="form.relationType == 1">
|
|
|
+ <el-form-item label="关联订单" prop="relationCode">
|
|
|
+ <el-input
|
|
|
+ :disabled="dialogType == 'view'"
|
|
|
+ clearable
|
|
|
+ v-model="form.relationCode"
|
|
|
+ @click.native="handleOrder"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="客户名称">
|
|
|
<el-input
|
|
|
v-model="form.contactName"
|
|
|
@click.native="handleGetCus"
|
|
|
readonly
|
|
|
- :disabled="dialogType == 'view' || !!form.contractName"
|
|
|
+ :disabled="dialogType == 'view' || !!form.relationId"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="联系人">
|
|
|
- <el-input v-model="form.contactRelationUserName"></el-input>
|
|
|
- <!-- <el-select
|
|
|
- v-model="form.contactRelationUserId"
|
|
|
- placeholder="请选择"
|
|
|
- @change="onchangeLink"
|
|
|
- style="width: 100%"
|
|
|
- :disabled="dialogType == 'view'"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in linkNameOptions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.linkName"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select> -->
|
|
|
+ <el-input v-model="form.contactRelationUserName" :disabled="dialogType == 'view'"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <!-- <el-col :span="8">-->
|
|
|
- <!-- <el-form-item-->
|
|
|
- <!-- prop="stage"-->
|
|
|
- <!-- label="项目阶段">-->
|
|
|
- <!-- <el-input v-model="form.stage" :disabled="dialogType=='view'"></el-input>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item prop="contactRelationPhone" label="客户联系电话">
|
|
|
<el-input
|
|
|
@@ -312,8 +274,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label="项目简介">
|
|
|
<el-input
|
|
|
@@ -327,32 +288,9 @@
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="附件">
|
|
|
<fileUpload v-model="form.files" :type="dialogType"></fileUpload>
|
|
|
- <!-- <el-button type="primary" @click="handleUpload"> 上传</el-button>-->
|
|
|
- <!-- <fileUpload-->
|
|
|
- <!-- v-if="dialogType!='view'"-->
|
|
|
- <!-- style="position: absolute"-->
|
|
|
- <!-- v-model="form.files"-->
|
|
|
- <!-- module="main"-->
|
|
|
- <!-- :showLib="false"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- <el-link-->
|
|
|
- <!-- v-else-->
|
|
|
- <!-- v-for="item in form.files"-->
|
|
|
- <!-- type="primary"-->
|
|
|
- <!-- :underline="false"-->
|
|
|
- <!-- @click="downloadFile(item)">-->
|
|
|
- <!-- {{ item.name }}-->
|
|
|
- <!-- </el-link>-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <!-- <el-row>-->
|
|
|
- <!-- <el-col :span="24">-->
|
|
|
- <!-- <el-form-item label="备注">-->
|
|
|
- <!-- <el-input type="textarea" :rows="2" v-model="form.remark" :disabled="dialogType=='view'"></el-input>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- </el-row>-->
|
|
|
</el-form>
|
|
|
<custom-dialog
|
|
|
v-if="customDialogFlag"
|
|
|
@@ -366,6 +304,10 @@
|
|
|
:contractDialogFlag.sync="contractDialogFlag"
|
|
|
@changeParent="getContractInfo"
|
|
|
></contractListDialog>
|
|
|
+ <orderListDialog
|
|
|
+ ref="orderListRef"
|
|
|
+ @changeParent="getOrderDialog"
|
|
|
+ ></orderListDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -376,14 +318,21 @@
|
|
|
import fileUpload from '@/BIZComponents/addDoc/index.vue';
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
import contractListDialog from '@/views/project-manage/components/contractListDialog.vue';
|
|
|
+ import orderListDialog from '@/BIZComponents/orderListDialog/orderListDialog.vue';
|
|
|
import { getProduceTreeByCode } from '@/api/custom';
|
|
|
import moment from 'moment';
|
|
|
import { cityData } from 'ele-admin/packages/utils/regions';
|
|
|
- import { Link } from 'element-ui';
|
|
|
+
|
|
|
import { contactDetail } from '@/api/eos';
|
|
|
export default {
|
|
|
name: 'project-form',
|
|
|
- components: { fileUpload, PersonSelect, customDialog, contractListDialog },
|
|
|
+ components: {
|
|
|
+ fileUpload,
|
|
|
+ PersonSelect,
|
|
|
+ customDialog,
|
|
|
+ contractListDialog,
|
|
|
+ orderListDialog
|
|
|
+ },
|
|
|
props: {
|
|
|
dialogType: {
|
|
|
type: String,
|
|
|
@@ -409,7 +358,7 @@
|
|
|
return [];
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
deptTreeList: {
|
|
|
type: Array,
|
|
|
default: () => {
|
|
|
@@ -438,7 +387,16 @@
|
|
|
data() {
|
|
|
return {
|
|
|
cityData,
|
|
|
- linkNameOptions: [],
|
|
|
+ typeOptions: [
|
|
|
+ {
|
|
|
+ value: 1,
|
|
|
+ label: '订单'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 3,
|
|
|
+ label: '合同'
|
|
|
+ }
|
|
|
+ ],
|
|
|
form: {
|
|
|
budget: '',
|
|
|
unit: '1',
|
|
|
@@ -471,7 +429,8 @@
|
|
|
type: '',
|
|
|
contractId: '',
|
|
|
contractName: '',
|
|
|
- files: []
|
|
|
+ files: [],
|
|
|
+ relationType: 1
|
|
|
},
|
|
|
typeTreeList: [],
|
|
|
projectList: [],
|
|
|
@@ -484,27 +443,27 @@
|
|
|
trigger: 'change'
|
|
|
},
|
|
|
name: { required: true, message: '请输入项目名称', trigger: 'blur' },
|
|
|
- budget: {
|
|
|
- required: true,
|
|
|
- message: '请输入项目预算',
|
|
|
- trigger: 'blur'
|
|
|
- },
|
|
|
- contactName: {
|
|
|
- required: true,
|
|
|
- message: '请选择客户',
|
|
|
- trigger: 'blur'
|
|
|
- },
|
|
|
-
|
|
|
+ // budget: {
|
|
|
+ // required: true,
|
|
|
+ // message: '请输入项目预算',
|
|
|
+ // trigger: 'blur'
|
|
|
+ // },
|
|
|
+ // contactId: {
|
|
|
+ // required: true,
|
|
|
+ // message: '请选择客户',
|
|
|
+ // trigger: 'blur'
|
|
|
+ // },
|
|
|
+
|
|
|
teamId: {
|
|
|
required: true,
|
|
|
message: '请选择项目团队',
|
|
|
trigger: 'change'
|
|
|
},
|
|
|
- responsibleDeptId: {
|
|
|
- required: true,
|
|
|
- message: '请选择负责部门',
|
|
|
- trigger: 'change'
|
|
|
- },
|
|
|
+ // responsibleDeptId: {
|
|
|
+ // required: true,
|
|
|
+ // message: '请选择负责部门',
|
|
|
+ // trigger: 'change'
|
|
|
+ // },
|
|
|
responsibleUserId: {
|
|
|
required: true,
|
|
|
message: '请选择项目经理',
|
|
|
@@ -567,21 +526,43 @@
|
|
|
},
|
|
|
handleContractBtn(e) {
|
|
|
if (e.target.nodeName == 'I') {
|
|
|
- this.form = Object.assign({}, this.form, {
|
|
|
- contractName: '',
|
|
|
- contractId: '',
|
|
|
- contactId: '',
|
|
|
- contactName: '',
|
|
|
- contactRelationPhone: ''
|
|
|
- });
|
|
|
+ this.clearInfo();
|
|
|
return;
|
|
|
}
|
|
|
this.contractDialogFlag = true;
|
|
|
},
|
|
|
+ handleOrder() {
|
|
|
+ this.$refs.orderListRef.open();
|
|
|
+ },
|
|
|
+
|
|
|
+ clearInfo() {
|
|
|
+ this.form = Object.assign({}, this.form, {
|
|
|
+ contractName: '',
|
|
|
+ contractId: '',
|
|
|
+ contactId: '',
|
|
|
+ contactName: '',
|
|
|
+ contactRelationPhone: '',
|
|
|
+ contactRelationUserName: '',
|
|
|
+ contactAddressId: '',
|
|
|
+ contactAddress: '',
|
|
|
+ relationId: '',
|
|
|
+ relationId: '',
|
|
|
+ relationName: '',
|
|
|
+ relationCode: ''
|
|
|
+ });
|
|
|
+ },
|
|
|
+ typeChange() {
|
|
|
+ this.clearInfo();
|
|
|
+ },
|
|
|
+
|
|
|
//选择合同信息回调
|
|
|
getContractInfo(obj) {
|
|
|
this.form.contractId = obj.id;
|
|
|
this.form.contractName = obj.contractName;
|
|
|
+ this.form.relationId = obj.id;
|
|
|
+ this.form.relationName = obj.contractName;
|
|
|
+ this.form.relationCode = obj.contractNo;
|
|
|
+
|
|
|
if (obj.type == 1) {
|
|
|
this.form.contactId = obj.partaId;
|
|
|
this.form.contactName = obj.partaName;
|
|
|
@@ -592,6 +573,12 @@
|
|
|
this.getCusInfo({ id: obj.partbId });
|
|
|
}
|
|
|
},
|
|
|
+ //选择订单信息回调
|
|
|
+ getOrderDialog(obj){
|
|
|
+ this.form.relationId = obj.id;
|
|
|
+ this.form.relationCode = obj.orderNo;
|
|
|
+ this.getCusInfo({ id: obj.partaId });
|
|
|
+ },
|
|
|
//获取客户信息
|
|
|
handleGetCus() {
|
|
|
this.customDialogFlag = true;
|
|
|
@@ -606,7 +593,7 @@
|
|
|
this.form = Object.assign({}, this.form, {
|
|
|
contactId: base.id,
|
|
|
contactName: base.name,
|
|
|
- contactRelationPhone:obj.linkPhone|| obj.phone,
|
|
|
+ contactRelationPhone: obj.linkPhone || obj.phone,
|
|
|
contactRelationUserName: obj.linkName
|
|
|
});
|
|
|
if (other.addressId) {
|