|
|
|
@ -21,6 +21,9 @@ |
|
|
|
:height="height" |
|
|
|
:data="dataList1" |
|
|
|
border |
|
|
|
ref="mainTable" |
|
|
|
@row-click="changeData" |
|
|
|
highlight-current-row |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
@ -31,7 +34,7 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a> |
|
|
|
<a type="text" size="small" @click="deleteHandle(scope.row.id)">删除</a> |
|
|
|
<a type="text" size="small" @click="deleteProjectInfo(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -61,26 +64,218 @@ |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
<el-tabs style="font-size: 12px;height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick"> |
|
|
|
<el-tab-pane label="项目信息" name="info"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'项目号'"> |
|
|
|
<el-input v-model="projectData.projectId" readonly style="width: 200px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'项目类型'"> |
|
|
|
<el-input v-model="projectData.projectType" readonly style="width: 174px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'项目来源'"> |
|
|
|
<el-input v-model="projectData.projectSourceDesc" readonly style="width: 200px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'优先级'"> |
|
|
|
<el-input v-model="projectData.priorityDesc" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'需求日期'"> |
|
|
|
<el-input v-model="projectData.needDate" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'项目名称'"> |
|
|
|
<el-input v-model="projectData.projectName" readonly style="width: 350px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'项目描述'"> |
|
|
|
<el-input v-model="projectData.projectDesc" readonly style="width: 564px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'项目经理'"> |
|
|
|
<el-input v-model="projectData.projectManagerName" readonly style="width: 300px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'项目责任人'"> |
|
|
|
<el-input v-model="projectData.projectOwnerName" readonly style="width: 300px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'项目权限'"> |
|
|
|
<el-input v-model="projectData.userRoleName" readonly style="width: 300px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'客户应用/要求'"> |
|
|
|
<el-input v-model="projectData.customerRemark" readonly style="width: 926px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'其他特殊要求'"> |
|
|
|
<el-input v-model="projectData.remark" readonly style="width: 926px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="客户信息" name="customer"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'客户代码'"> |
|
|
|
<el-input v-model="customerData.customerNo" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'客户名称'"> |
|
|
|
<el-input v-model="customerData.customerDesc" readonly style="width: 254px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'客户币种'"> |
|
|
|
<el-input v-model="customerData.customerCurrency" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'年营业额'"> |
|
|
|
<el-input v-model="customerData.turnoverOfYear" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'年度潜在收入'"> |
|
|
|
<el-input v-model="customerData.potentialRevenueOfYear" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'关键客户'"> |
|
|
|
<el-input v-model="customerData.importantCustomer" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'客户状态'"> |
|
|
|
<el-input v-model="customerData.customerStatus" readonly style="width: 150px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'备注信息'"> |
|
|
|
<el-input v-model="customerData.remark" readonly style="width: 580px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="客户联系人" name="customer_contact"> |
|
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|
|
|
<el-button type="primary" @click="contactChooseModal()">编辑</el-button> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:data="contactList" |
|
|
|
height="240" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%; "> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList2" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="文档管理" name="down"> |
|
|
|
<!--文件上传--> |
|
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|
|
|
<el-button type="primary" @click="addUploadFileModal()">上传文件</el-button> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:data="fileContentList" |
|
|
|
height="240" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%; "> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnFileContentArray" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>--> |
|
|
|
<a @click="downloadFile(scope.row)" >下载</a> |
|
|
|
<a type="text" size="small" @click="deleteFile(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<el-dialog |
|
|
|
width="530px" |
|
|
|
title="项目联系人" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="contactChooseFlag"> |
|
|
|
<el-transfer v-model="contactChooseList1" :props="{ |
|
|
|
key: 'contactName', |
|
|
|
label: 'contactName' |
|
|
|
}" :data="contactChooseList2" :titles="['未选择', '已选择']"></el-transfer> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" @click="saveProjectContactList()">确定</el-button> |
|
|
|
<el-button @click="contactChooseFlag = false" type="primary">取消</el-button> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 上传文件的modal --> |
|
|
|
<projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile> |
|
|
|
|
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
customerInformationSearch, // 客户信息列表查询` |
|
|
|
} from '@/api/customer/customerInformation.js' |
|
|
|
import AddOrUpdate from './projectInfo-add-or-update' |
|
|
|
import { |
|
|
|
getTableDefaultListLanguage, |
|
|
|
getTableUserListLanguage, |
|
|
|
} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import {projectInfoSearch } from "@/api/project/project.js" |
|
|
|
import {projectInfoSearch, |
|
|
|
deleteProjectFile, |
|
|
|
getFileContentList, |
|
|
|
downLoadProjectFile, |
|
|
|
getCustomerContactData, |
|
|
|
getContactChooseData, |
|
|
|
saveProjectContactList, |
|
|
|
deleteProjectInfo, |
|
|
|
} from "@/api/project/project.js" |
|
|
|
import projectUploadFile from "./project_upload_file";/*上传文件的組件*/ |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Chooselist,AddOrUpdate |
|
|
|
Chooselist,AddOrUpdate, |
|
|
|
projectUploadFile, |
|
|
|
}, |
|
|
|
name: "null", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
//项目已选联系人 |
|
|
|
contactChooseList1:[], |
|
|
|
//客户可选联系人 |
|
|
|
contactChooseList2:[], |
|
|
|
contactList: [], |
|
|
|
fileContentList: [], |
|
|
|
activeName: 'info', |
|
|
|
addOrUpdateVisible:false, |
|
|
|
searchData:{ |
|
|
|
page: 1, |
|
|
|
@ -90,6 +285,8 @@ |
|
|
|
projectType:'', |
|
|
|
projectOwnerName:'', |
|
|
|
}, |
|
|
|
contactChooseFlag:false, |
|
|
|
currentRow:'', |
|
|
|
height: 200, |
|
|
|
dataList1:[], |
|
|
|
dataListLoading: false, |
|
|
|
@ -122,7 +319,7 @@ |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -341,7 +538,295 @@ |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
columnList2: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2ContactName', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'contactName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '联系人', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2ContactPhoneNumber1', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'contactPhoneNumber1', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '联系电话', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2ContactLandlineNumber', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'contactLandlineNumber', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '座机', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2Position', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'position', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '公司职务', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2Mailbox', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'mailbox', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '邮箱', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2PrimaryContact', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'primaryContact', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '主联系人', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2ContactStatus', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'contactStatus', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '状态', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2CreateDate', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'createDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '创建时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2CreateBy', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'createBy', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '创建人', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2UpdateDate', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'updateDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '更新时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 101002001, |
|
|
|
serialNumber: '101002001Table2UpdateBy', |
|
|
|
tableId: '101002001Table2', |
|
|
|
tableName: '项目联系人表', |
|
|
|
columnProp: 'updateBy', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '更新人', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
} |
|
|
|
], |
|
|
|
projectData: { |
|
|
|
id: 0, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
projectLevel:'', |
|
|
|
projectId:'', |
|
|
|
projectTypeDb:'', |
|
|
|
projectType:'', |
|
|
|
customerName:'', |
|
|
|
customerId:'', |
|
|
|
projectName:'', |
|
|
|
projectDesc:'', |
|
|
|
needDate:'', |
|
|
|
priority:'', |
|
|
|
projectSource:'', |
|
|
|
priorityDesc:'', |
|
|
|
projectSourceDesc:'', |
|
|
|
projectManagerName:'', |
|
|
|
projectOwnerName:'', |
|
|
|
customerRemark:'', |
|
|
|
remark:'', |
|
|
|
userRoleName:'', |
|
|
|
}, |
|
|
|
customerData:{ |
|
|
|
site: '', |
|
|
|
customerNo: '', |
|
|
|
customerDesc: '', |
|
|
|
customerDescription: '', |
|
|
|
customerIndustry: '', |
|
|
|
customerCurrency: '', |
|
|
|
turnoverOfYear: '', |
|
|
|
potentialRevenueOfYear: '', |
|
|
|
importantCustomer: '', |
|
|
|
customerStatus: '', |
|
|
|
companyName: '', |
|
|
|
jobDescription: '', |
|
|
|
remark: '', |
|
|
|
contactName: '', |
|
|
|
contactPhoneNumber1: '', |
|
|
|
primaryContact: '', |
|
|
|
contactStatus: '', |
|
|
|
addressName: '' |
|
|
|
}, |
|
|
|
columnFileContentArray: [ |
|
|
|
{ |
|
|
|
columnProp: 'fileName', |
|
|
|
headeralign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '文件名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, { |
|
|
|
columnProp: 'createdBy', |
|
|
|
headeralign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '上传人', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, { |
|
|
|
columnProp: 'createDate', |
|
|
|
headeralign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '上传时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, { |
|
|
|
columnProp: 'orderRef3', |
|
|
|
headeralign: 'left', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
], |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
@ -373,7 +858,7 @@ |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 540; |
|
|
|
this.height = window.innerHeight - 520; |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -386,10 +871,6 @@ |
|
|
|
if (val === 1010) { |
|
|
|
if(type==1) { |
|
|
|
strVal = this.searchData.projectType |
|
|
|
}else if(type==2){ |
|
|
|
strVal = this.searchData.projectType |
|
|
|
}else { |
|
|
|
strVal = this.searchData.projectType |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
@ -398,12 +879,8 @@ |
|
|
|
/* 列表方法的回调 */ |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 1010) { |
|
|
|
if(this.tagNo1==1) { |
|
|
|
this.searchData.projectType = val.Base_id |
|
|
|
}else if(this.tagNo2==2){ |
|
|
|
this.searchData.projectType = val.Base_id |
|
|
|
}else { |
|
|
|
this.searchData.projectType = val.Base_id |
|
|
|
if(this.tagNo2==1) { |
|
|
|
this.searchData.projectType = val.Base_desc |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -456,10 +933,123 @@ |
|
|
|
this.pageIndex = data.page.currPage |
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
if(this.dataList1.length>0){ |
|
|
|
this.changeData(this.dataList1[0]) |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
//单击切换订单 |
|
|
|
changeData(row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
this.projectData=row; |
|
|
|
let inData= { |
|
|
|
site:row.site, |
|
|
|
customerNo:row.customerId, |
|
|
|
page: 1, |
|
|
|
limit: 10, |
|
|
|
} |
|
|
|
this.refreshCurrentTabTable (); |
|
|
|
customerInformationSearch(inData).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
if(data.page.list.length>0){ |
|
|
|
this.customerData=data.page.list[0] |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
addUploadFileModal(){ |
|
|
|
let currentData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
projectId: this.currentRow.projectId, |
|
|
|
projectName: this.currentRow.projectName, |
|
|
|
remark: '', |
|
|
|
}; |
|
|
|
//打开组件 去做新增业务 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.projectUploadFile.init(currentData); |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteFile(row){ |
|
|
|
this.$confirm('确定要删除此文件?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteProjectFile(row).then(({data}) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.getFileContentData(); |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 刷新页签的table数据 |
|
|
|
refreshCurrentTabTable () { |
|
|
|
if (this.activeName == 'down') { |
|
|
|
this.getFileContentData(); |
|
|
|
} |
|
|
|
if (this.activeName == 'customer_contact') { |
|
|
|
this.getCustomerContactData(); |
|
|
|
} |
|
|
|
}, |
|
|
|
//刷新派设备文档的列表 |
|
|
|
getFileContentData() { |
|
|
|
let currentData = {orderRef2: this.currentRow.projectId}; |
|
|
|
getFileContentList(currentData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.fileContentList = data.rows; |
|
|
|
} else { |
|
|
|
this.fileContentList = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 下载 |
|
|
|
downloadFile(row){ |
|
|
|
// axios.get('/proxyApi/pms/eamProject/downLoadProjectFile/' + row.id, { |
|
|
|
// responseType: 'blob', |
|
|
|
// headers: { |
|
|
|
// 'Content-Type': 'application/json', |
|
|
|
// 'token': Vue.cookie.get('token') |
|
|
|
// } |
|
|
|
// }) |
|
|
|
downLoadProjectFile(row) |
|
|
|
.then(({data}) => { |
|
|
|
// 不限制文件下载类型 |
|
|
|
const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'}) |
|
|
|
// 下载文件名称 |
|
|
|
const fileName = row.fileName |
|
|
|
// a标签下载 |
|
|
|
const linkNode = document.createElement('a') |
|
|
|
linkNode.download = fileName // a标签的download属性规定下载文件的名称 |
|
|
|
linkNode.style.display = 'none' |
|
|
|
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL |
|
|
|
console.log(linkNode) |
|
|
|
// if(val == 'Y'){ |
|
|
|
// this.pdfVisible = true |
|
|
|
// this.pdfUrl = linkNode.href |
|
|
|
// }else { |
|
|
|
document.body.appendChild(linkNode) |
|
|
|
linkNode.click() // 模拟在按钮上的一次鼠标单击 |
|
|
|
URL.revokeObjectURL(linkNode.href) // 释放URL 对象 |
|
|
|
document.body.removeChild(linkNode) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle (val) { |
|
|
|
this.pageSize = val |
|
|
|
@ -536,16 +1126,120 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
//动态列结束 |
|
|
|
// 列表表格选择替换 |
|
|
|
tabClick (tab, event) { |
|
|
|
// 刷新列表数据 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
}, |
|
|
|
getCustomerContactData(){ |
|
|
|
let inData={ |
|
|
|
site:this.currentRow.site, |
|
|
|
customerId:this.currentRow.customerId, |
|
|
|
projectId:this.currentRow.projectId, |
|
|
|
} |
|
|
|
getCustomerContactData(inData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.contactList = data.rows; |
|
|
|
} else { |
|
|
|
this.contactList = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
contactChooseModal(){ |
|
|
|
let inData={ |
|
|
|
site:this.currentRow.site, |
|
|
|
customerId:this.currentRow.customerId, |
|
|
|
projectId:this.currentRow.projectId, |
|
|
|
} |
|
|
|
getContactChooseData(inData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.contactChooseList1 = data.rows1; |
|
|
|
this.contactChooseList2 = data.rows2; |
|
|
|
|
|
|
|
} else { |
|
|
|
this.contactChooseList1 = []; |
|
|
|
this.contactChooseList2 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
this.contactChooseFlag=true; |
|
|
|
}, |
|
|
|
saveProjectContactList(){ |
|
|
|
let data={ |
|
|
|
site:this.currentRow.site, |
|
|
|
customerId:this.currentRow.customerId, |
|
|
|
projectId:this.currentRow.projectId, |
|
|
|
contactList:this.contactChooseList1 |
|
|
|
} |
|
|
|
saveProjectContactList(data).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.contactChooseFlag = false |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
deleteProjectInfo(row){ |
|
|
|
this.$confirm(`确定删除当前记录?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteProjectInfo(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.contactChooseFlag = false |
|
|
|
this.search() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style > |
|
|
|
.el-transfer-panel { |
|
|
|
border: 2px solid #17b3a3; |
|
|
|
border-radius: 4px; |
|
|
|
overflow: hidden; |
|
|
|
background: #fff; |
|
|
|
display: inline-block; |
|
|
|
vertical-align: middle; |
|
|
|
width: 200px; |
|
|
|
max-height: 100%; |
|
|
|
-webkit-box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
|
|
|
|
.el-transfer-panel .el-transfer-panel__header { |
|
|
|
height: 40px; |
|
|
|
line-height: 40px; |
|
|
|
background: #17b3a3; |
|
|
|
margin: 0; |
|
|
|
padding-left: 15px; |
|
|
|
border-bottom: 1px solid #17b3a3; |
|
|
|
-webkit-box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
color: #000; |
|
|
|
} |
|
|
|
|
|
|
|
.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label { |
|
|
|
font-size: 14px; |
|
|
|
color: #303133; |
|
|
|
font-weight: 400; |
|
|
|
} |
|
|
|
</style> |