plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2054 lines
67 KiB

3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
3 years ago
3 years ago
3 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'项目编号'">
  5. <el-input v-model="searchData.projectId" style="width: 160px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="项目类型">
  8. <!-- <span slot="label" style="" @click="getBaseList(1010,1)"><a herf="#">项目类型</a></span>-->
  9. <!-- <el-input v-model="searchData.projectType" style="width: 120px"></el-input>-->
  10. <dict-data-select dict-type="project_info_type_db" filterable clearable :use-default-value="false" v-model="searchData.projectType"></dict-data-select>
  11. </el-form-item>
  12. <el-form-item :label="'项目负责人'">
  13. <el-input v-model="searchData.projectOwnerName" style="width: 130px"></el-input>
  14. </el-form-item>
  15. <el-form-item :label="'客户项目编码'">
  16. <el-input v-model="searchData.customerProjectNo" style="width: 130px"></el-input>
  17. </el-form-item>
  18. <el-form-item label=" ">
  19. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  20. <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>
  21. <download-excel
  22. :fields="fields()"
  23. :data="exportData"
  24. type="xls"
  25. :name="exportName"
  26. :header="exportHeader"
  27. :footer="exportFooter"
  28. :fetch="createExportData"
  29. :before-generate="startDownload"
  30. :before-finish="finishDownload"
  31. worksheet="导出信息"
  32. class="el-button el-button--primary el-button--medium">
  33. {{ '导出' }}
  34. </download-excel>
  35. </el-form-item>
  36. </el-form>
  37. <el-table
  38. :height="height"
  39. :data="dataList1"
  40. border
  41. ref="mainTable"
  42. @row-click="changeData"
  43. highlight-current-row
  44. v-loading="dataListLoading"
  45. style="width: 100%;">
  46. <el-table-column
  47. header-align="center"
  48. align="center"
  49. width="150"
  50. fixed="right"
  51. label="操作">
  52. <template slot-scope="scope">
  53. <a type="text" size="small" @click="addOrUpdateHandle(scope.row.projectId)">新增</a>
  54. <a type="text" size="small" @click="UpdateHandle(scope.row)">修改</a>
  55. <a type="text" size="small" @click="deleteProjectInfo(scope.row)">删除</a>
  56. </template>
  57. </el-table-column>
  58. <el-table-column
  59. v-for="(item,index) in columnList1" :key="index"
  60. :sortable="item.columnSortable"
  61. :prop="item.columnProp"
  62. :header-align="item.headerAlign"
  63. :show-overflow-tooltip="item.showOverflowTooltip"
  64. :align="item.align"
  65. :fixed="item.fixed==''?false:item.fixed"
  66. :min-width="item.columnWidth"
  67. :label="item.columnLabel">
  68. <template slot-scope="scope">
  69. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  70. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. <el-pagination
  75. @size-change="sizeChangeHandle"
  76. @current-change="currentChangeHandle"
  77. :current-page="pageIndex"
  78. :page-sizes="[20, 50, 100, 1000]"
  79. :page-size="pageSize"
  80. :total="totalPage"
  81. layout="total, sizes, prev, pager, next, jumper">
  82. </el-pagination>
  83. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  84. <el-tab-pane label="项目信息" name="info">
  85. <el-form label-position="top" style="margin-top: 0px; margin-left: 0px;">
  86. <el-row :gutter="20">
  87. <el-col :span="5"><div class="grid-content bg-purple">
  88. <el-form-item :label="'项目号'">
  89. <el-input v-model="projectData.projectId" readonly ></el-input>
  90. </el-form-item>
  91. </div></el-col>
  92. <el-col :span="5"><div class="grid-content bg-purple">
  93. <el-form-item :label="'项目类型'">
  94. <el-input v-model="projectData.projectType" readonly ></el-input>
  95. </el-form-item>
  96. </div></el-col>
  97. <el-col :span="5"><div class="grid-content bg-purple">
  98. <el-form-item :label="'项目来源'">
  99. <el-input v-model="projectData.projectSourceDesc" readonly ></el-input>
  100. </el-form-item>
  101. </div></el-col>
  102. <el-col :span="5"><div class="grid-content bg-purple">
  103. <el-form-item :label="'优先级'">
  104. <el-input v-model="projectData.priorityDesc" readonly></el-input>
  105. </el-form-item>
  106. </div></el-col>
  107. <el-col :span="4"><div class="grid-content bg-purple">
  108. <el-form-item :label="'需求日期'">
  109. <el-input v-model="projectData.needDate" readonly ></el-input>
  110. </el-form-item>
  111. </div></el-col>
  112. </el-row>
  113. <el-row :gutter="20">
  114. <el-col :span="5">
  115. <div class="grid-content bg-purple">
  116. <el-form-item :label="'项目名称'">
  117. <el-input v-model="projectData.projectName" readonly style="" ></el-input>
  118. </el-form-item>
  119. </div>
  120. </el-col>
  121. <el-col :span="5"><div class="grid-content bg-purple">
  122. <el-form-item :label="'项目描述'">
  123. <el-input v-model="projectData.projectDesc" readonly style="" ></el-input>
  124. </el-form-item>
  125. </div></el-col>
  126. <el-col :span="5"><div class="grid-content bg-purple">
  127. <el-form-item :label="'最终客户'">
  128. <el-input v-model="projectData.finalCustomerName" readonly style="" ></el-input>
  129. </el-form-item>
  130. </div></el-col>
  131. <el-col :span="5"><div class="grid-content bg-purple">
  132. <el-form-item :label="'客户项目编号'">
  133. <el-input v-model="projectData.customerProjectNo" readonly style="" ></el-input>
  134. </el-form-item>
  135. </div></el-col>
  136. <el-col :span="4"><div class="grid-content bg-purple">
  137. <el-form-item :label="'Product Set'">
  138. <el-input v-model="projectData.productSet" readonly style="" ></el-input>
  139. </el-form-item>
  140. </div></el-col>
  141. </el-row>
  142. <el-row :gutter="20">
  143. <el-col :span="8"><div class="grid-content bg-purple">
  144. <el-form-item :label="'项目经理'">
  145. <el-input v-model="projectData.projectManagerName" readonly style="" ></el-input>
  146. </el-form-item>
  147. </div></el-col>
  148. <el-col :span="8"><div class="grid-content bg-purple">
  149. <el-form-item :label="'项目负责人'">
  150. <el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
  151. </el-form-item>
  152. </div></el-col>
  153. <el-col :span="8"><div class="grid-content bg-purple">
  154. <el-form-item :label="'项目权限'">
  155. <el-input v-model="projectData.userRoleName" readonly style="" ></el-input>
  156. </el-form-item>
  157. </div></el-col>
  158. </el-row>
  159. <el-row :gutter="20">
  160. <el-col :span="24"><div class="grid-content bg-purple">
  161. <el-form-item :label="'客户应用/要求'">
  162. <el-input v-model="projectData.customerRemark" readonly style="" ></el-input>
  163. </el-form-item>
  164. </div></el-col>
  165. </el-row>
  166. <el-row :gutter="20">
  167. <el-col :span="24"><div class="grid-content bg-purple">
  168. <el-form-item :label="'其他特殊要求'">
  169. <el-input v-model="projectData.remark" readonly style="" ></el-input>
  170. </el-form-item>
  171. </div></el-col>
  172. </el-row>
  173. </el-form>
  174. </el-tab-pane>
  175. <el-tab-pane label="客户信息" name="customer">
  176. <customer-info :project="currentRow"></customer-info>
  177. </el-tab-pane>
  178. <el-tab-pane label="项目联系人" name="customer_contact">
  179. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  180. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  181. <el-button type="primary" @click="contactChooseModal()">编辑</el-button>
  182. <download-excel
  183. :fields="fields2()"
  184. :data="exportData2"
  185. type="xls"
  186. :name="exportName2"
  187. :header="exportHeader2"
  188. :footer="exportFooter2"
  189. :fetch="createExportData2"
  190. :before-generate="startDownload2"
  191. :before-finish="finishDownload2"
  192. worksheet="导出信息"
  193. class="el-button el-button--primary el-button--medium">
  194. {{ '导出' }}
  195. </download-excel>
  196. </el-form>
  197. </el-form>
  198. <el-table
  199. :data="contactList"
  200. height="240"
  201. border
  202. v-loading="dataListLoading"
  203. style="width: 100%; ">
  204. <el-table-column
  205. v-for="(item,index) in columnList2" :key="index"
  206. :sortable="item.columnSortable"
  207. :prop="item.columnProp"
  208. :header-align="item.headerAlign"
  209. :show-overflow-tooltip="item.showOverflowTooltip"
  210. :align="item.align"
  211. :fixed="item.fixed==''?false:item.fixed"
  212. :min-width="item.columnWidth"
  213. :label="item.columnLabel">
  214. <template slot-scope="scope">
  215. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  216. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  217. style="width: 100px; height: 80px"/></span>
  218. </template>
  219. </el-table-column>
  220. </el-table>
  221. </el-tab-pane>
  222. <el-tab-pane label="附件信息" name="down">
  223. <oss-components height="25vh" label="项目编码" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.projectId"></oss-components>
  224. </el-tab-pane>
  225. <el-tab-pane label="项目物料" name="part">
  226. <projectPart ref="projectPart"></projectPart>
  227. </el-tab-pane>
  228. <el-tab-pane label="询价信息" name="quotation">
  229. <project-quotation ref="projectQuotation" ></project-quotation>
  230. </el-tab-pane>
  231. <el-tab-pane label="报价信息" name="quotationHeader">
  232. <quote :is-menu="false" :project-no="currentRow.projectId" height="22vh"></quote>
  233. </el-tab-pane>
  234. <el-tab-pane label="打样信息" name="sample">
  235. <sample ref="sample"></sample>
  236. </el-tab-pane>
  237. <el-tab-pane label="测试记录" name="test">
  238. <test ref="test"></test>
  239. </el-tab-pane>
  240. <el-tab-pane label="刀模申请" name="toolApply">
  241. <toolApply ref="toolApply"></toolApply>
  242. </el-tab-pane>
  243. <el-tab-pane label="技术参数卡" name="technicalSpecification">
  244. <technicalSpecification ref="technicalSpecification"></technicalSpecification>
  245. </el-tab-pane>
  246. <el-tab-pane label="变更记录" name="changeRecord">
  247. <change-record :data-list="changeRecordList" :height="240" :columns="columnChangeRecord"></change-record>
  248. </el-tab-pane>
  249. </el-tabs>
  250. <!-- <el-dialog-->
  251. <!-- width="530px"-->
  252. <!-- title="项目联系人"-->
  253. <!-- :close-on-click-modal="false"-->
  254. <!-- :visible.sync="contactChooseFlag">-->
  255. <!-- <el-transfer v-model="contactChooseList1" :props="{-->
  256. <!-- key: 'contactId',-->
  257. <!-- label: 'contactName'-->
  258. <!-- }" :data="contactChooseList2" :titles="['未选择', '已选择']"></el-transfer>-->
  259. <!-- <span slot="footer" class="dialog-footer">-->
  260. <!-- <div style="margin-top: 5px">-->
  261. <!-- <el-button type="primary" @click="saveProjectContactList()">确定</el-button>-->
  262. <!-- <el-button @click="contactChooseFlag = false" type="primary">取消</el-button>-->
  263. <!-- </div>-->
  264. <!-- </span>-->
  265. <!-- </el-dialog>-->
  266. <!-- 客户联系人-> 快速新增 -->
  267. <el-dialog title="项目联系人" :close-on-click-modal="false" v-drag :visible.sync="contactChooseFlag" width="700px">
  268. <div style="font-size: 12px">
  269. <el-form :inline="true" label-position="top" :model="contactData">
  270. <el-form-item :label="'联系人名称'">
  271. <el-input v-model="contactData.contactName" clearable style="width: 150px"></el-input>
  272. </el-form-item>
  273. <el-form-item :label="' '">
  274. <el-button type="primary" @click="queryCustomerContact">查询</el-button>
  275. </el-form-item>
  276. </el-form>
  277. </div>
  278. <el-container>
  279. <el-main style="width: 200px;padding: 1px">
  280. <span style="font-size: 12px" >可选联系人</span>
  281. <el-table
  282. height="300px"
  283. :data="contactChooseList1"
  284. border
  285. ref="contactTable1"
  286. @row-click="contactClickRow1"
  287. @selection-change="selectionContact1"
  288. highlight-current-row
  289. style="width: 100%">
  290. <el-table-column
  291. type="selection"
  292. header-align="center"
  293. align="center"
  294. width="50">
  295. </el-table-column>
  296. <el-table-column
  297. prop="contactName"
  298. header-align="center"
  299. align="center"
  300. min-width="200"
  301. label="联系人名称">
  302. </el-table-column>
  303. </el-table>
  304. </el-main>
  305. <el-main style="width: 10px;padding: 1px">
  306. <div style="margin-top: 150px;margin-left: 18px">
  307. <el-button type="primary" @click="addContact">添加>></el-button>
  308. </div>
  309. <div style="margin-top: 15px;margin-left: 18px">
  310. <el-button type="primary" @click="deleteContact">删除<<</el-button>
  311. </div>
  312. </el-main>
  313. <el-main style="width: 200px;padding: 1px">
  314. <span style="font-size: 12px" >已有联系人</span>
  315. <el-table
  316. height="300px"
  317. :data="contactChooseList2"
  318. border
  319. ref="contactTable2"
  320. @row-click="contactClickRow2"
  321. @selection-change="selectionContact2"
  322. highlight-current-row
  323. style="width: 100%">
  324. <el-table-column
  325. type="selection"
  326. header-align="center"
  327. align="center"
  328. width="50">
  329. </el-table-column>
  330. <el-table-column
  331. prop="contactName"
  332. header-align="center"
  333. align="center"
  334. min-width="200"
  335. label="联系人名称">
  336. </el-table-column>
  337. </el-table>
  338. </el-main>
  339. </el-container>
  340. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  341. <el-button type="primary" @click="contactChooseFlag = false">关闭</el-button>
  342. </el-footer>
  343. </el-dialog>
  344. <!-- 上传文件的modal -->
  345. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  346. <add-or-update v-if="addOrUpdateVisible" v-model="addOrUpdate" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
  347. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  348. </div>
  349. </template>
  350. <script>
  351. import {
  352. customerInformationSearchForCheck, // 客户信息列表查询`
  353. } from '@/api/customer/customerInformation.js'
  354. import AddOrUpdate from './com_projectInfo-add-or-update'
  355. import {
  356. getTableDefaultListLanguage,
  357. getTableUserListLanguage,
  358. } from "@/api/table.js"
  359. import Chooselist from '@/views/modules/common/Chooselist'
  360. import {projectInfoSearch,
  361. deleteProjectFile,
  362. getFileContentList,
  363. downLoadProjectFile,
  364. getCustomerContactData,
  365. getContactChooseData,
  366. getContactChooseData2,
  367. saveProjectContactList,
  368. deleteProjectInfo,
  369. getProjectUserRole,
  370. addContact,
  371. deleteContact,
  372. queryCustomerContact
  373. } from "@/api/project/project.js"
  374. import {
  375. getChangeRecordByPartNo, // 查询变更记录
  376. } from '@/api/part/partInformation.js'
  377. import projectUploadFile from "./com_project_upload_file";/*上传文件的組件*/
  378. import projectPart from "./com_project_info_part.vue";/*組件*/
  379. import sample from "./com_project_sample";/*組件*/
  380. import test from "./com_project_test";/*組件*/
  381. import technicalSpecification from "./com_project_technicalSpecification";
  382. import DictDataSelect from "../../sys/dict-data-select.vue";
  383. import ChangeRecord from "./com_project_change_record.vue";
  384. import OssComponents from "../../oss/ossComponents.vue";
  385. import toolApply from "./com_project_toolApplyCation.vue";
  386. import { Divider } from 'element-ui';
  387. import CustomerInfo from "../../quotation/sellForQuotation/customerInfo.vue";
  388. import Quote from "../../quote/index.vue";
  389. import ProjectQuotation from "./com_project_puotation.vue";
  390. /*組件*/
  391. export default {
  392. components: {
  393. ProjectQuotation,
  394. Quote,
  395. CustomerInfo,
  396. OssComponents,
  397. ChangeRecord,
  398. DictDataSelect,
  399. Chooselist,
  400. AddOrUpdate,
  401. projectUploadFile,
  402. projectPart,
  403. sample,
  404. test,
  405. technicalSpecification,
  406. toolApply,
  407. ElDivider: Divider,
  408. },
  409. name: "null",
  410. data() {
  411. return {
  412. // addOrUpdate
  413. addOrUpdate:'0',
  414. //项目已选联系人
  415. contactChooseList1:[],
  416. //客户可选联系人
  417. contactChooseList2:[],
  418. contactList: [],
  419. fileContentList: [],
  420. activeName: 'info',
  421. addOrUpdateVisible:false,
  422. searchData:{
  423. page: 1,
  424. limit: 100,
  425. site:this.$store.state.user.site,
  426. projectId:'',
  427. projectType:'',
  428. projectOwnerName:'',
  429. customerProjectNo:'',
  430. userName:this.$store.state.user.name,
  431. },
  432. contactChooseFlag:false,
  433. currentRow:'',
  434. height: 200,
  435. dataList1:[],
  436. dataListLoading: false,
  437. // 导出 start
  438. exportData: [],
  439. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  440. exportHeader: ["项目清单"],
  441. exportFooter: [],
  442. exportList:[],
  443. // 导出 start
  444. exportData2: [],
  445. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  446. exportHeader2: ["项目客户联系人"],
  447. exportFooter2: [],
  448. exportList2:[],
  449. tagNo:'',
  450. tagNo2:'',
  451. pageIndex: 1,
  452. pageSize: 100,
  453. totalPage: 0,
  454. // 导出 end
  455. columnList1: [
  456. {
  457. userId: this.$store.state.user.name,
  458. functionId: 101002001,
  459. serialNumber: '101002001Table1ProjectId',
  460. tableId: "101002001Table1",
  461. tableName: "项目信息主表",
  462. columnProp: "projectId",
  463. headerAlign: "center",
  464. align: "center",
  465. columnLabel: "项目号",
  466. columnHidden: false,
  467. columnImage: false,
  468. columnSortable: false,
  469. sortLv: 0,
  470. status: true,
  471. fixed: '',
  472. columnWidth: 100
  473. },
  474. {
  475. userId: this.$store.state.user.name,
  476. functionId: 101002001,
  477. serialNumber: '101002001Table1ProjectType',
  478. tableId: "101002001Table1",
  479. tableName: "项目信息主表",
  480. columnProp: "projectType",
  481. headerAlign: "center",
  482. align: "left",
  483. columnLabel: "项目类型",
  484. columnHidden: false,
  485. columnImage: false,
  486. columnSortable: false,
  487. sortLv: 0,
  488. status: true,
  489. fixed: '',
  490. columnWidth: 100
  491. },
  492. {
  493. userId: this.$store.state.user.name,
  494. functionId: 101002001,
  495. serialNumber: '101002001Table1ProjectName',
  496. tableId: "101002001Table1",
  497. tableName: "项目信息主表",
  498. columnProp: "projectName",
  499. headerAlign: "center",
  500. align: "left",
  501. columnLabel: "项目名称",
  502. columnHidden: false,
  503. columnImage: false,
  504. columnSortable: false,
  505. sortLv: 0,
  506. status: true,
  507. fixed: '',
  508. columnWidth: 200
  509. },
  510. {
  511. userId: this.$store.state.user.name,
  512. functionId: 101002001,
  513. serialNumber: '101002001Table1CustomerProjectNo',
  514. tableId: "101002001Table1",
  515. tableName: "项目信息主表",
  516. columnProp: "customerProjectNo",
  517. headerAlign: "center",
  518. align: "left",
  519. columnLabel: "客户项目料号",
  520. columnHidden: false,
  521. columnImage: false,
  522. columnSortable: false,
  523. sortLv: 4,
  524. status: true,
  525. fixed: '',
  526. columnWidth: 120
  527. },
  528. {
  529. userId: this.$store.state.user.name,
  530. functionId: 101002001,
  531. serialNumber: '101002001Table1Priority',
  532. tableId: "101002001Table1",
  533. tableName: "项目信息主表",
  534. columnProp: "priorityDesc",
  535. headerAlign: "center",
  536. align: "left",
  537. columnLabel: "优先级",
  538. columnHidden: false,
  539. columnImage: false,
  540. columnSortable: false,
  541. sortLv: 0,
  542. status: true,
  543. fixed: '',
  544. columnWidth: 100
  545. },
  546. {
  547. userId: this.$store.state.user.name,
  548. functionId: 101002001,
  549. serialNumber: '101002001Table1BuNo',
  550. tableId: "101002001Table1",
  551. tableName: "项目信息主表",
  552. columnProp: "buNo",
  553. headerAlign: 'center',
  554. align: "left",
  555. columnLabel: "BU编码",
  556. columnHidden: false,
  557. columnImage: false,
  558. columnSortable: false,
  559. sortLv: 0,
  560. status: true,
  561. fixed: '',
  562. columnWidth: 100
  563. },
  564. {
  565. userId: this.$store.state.user.name,
  566. functionId: 101002001,
  567. serialNumber: '101002001Table1BuDesc',
  568. tableId: "101002001Table1",
  569. tableName: "项目信息主表",
  570. columnProp: "buDesc",
  571. headerAlign: "center",
  572. align: "left",
  573. columnLabel: "BU名称",
  574. columnHidden: false,
  575. columnImage: false,
  576. columnSortable: false,
  577. sortLv: 0,
  578. status: true,
  579. fixed: '',
  580. columnWidth: 100
  581. },
  582. {
  583. userId: this.$store.state.user.name,
  584. functionId: 101002001,
  585. serialNumber: '101002001Table1ProjectOwnerName',
  586. tableId: "101002001Table1",
  587. tableName: "项目信息主表",
  588. columnProp: "projectOwnerName",
  589. headerAlign: "center",
  590. align: "left",
  591. columnLabel: "项目负责人",
  592. columnHidden: false,
  593. columnImage: false,
  594. columnSortable: false,
  595. sortLv: 0,
  596. status: true,
  597. fixed: '',
  598. columnWidth: 100
  599. },
  600. {
  601. userId: this.$store.state.user.name,
  602. functionId: 101002001,
  603. serialNumber: '101002001Table1ProjectSource',
  604. tableId: "101002001Table1",
  605. tableName: "项目信息主表",
  606. columnProp: "projectSourceDesc",
  607. headerAlign: "center",
  608. align: "left",
  609. columnLabel: "项目来源",
  610. columnHidden: false,
  611. columnImage: false,
  612. columnSortable: false,
  613. sortLv: 0,
  614. status: true,
  615. fixed: '',
  616. columnWidth: 100
  617. },
  618. {
  619. userId: this.$store.state.user.name,
  620. functionId: 101002001,
  621. serialNumber: '101002001Table1CustomerId',
  622. tableId: "101002001Table1",
  623. tableName: "项目信息主表",
  624. columnProp: "customerId",
  625. headerAlign: "center",
  626. align: "left",
  627. columnLabel: "客户代码",
  628. columnHidden: false,
  629. columnImage: false,
  630. columnSortable: false,
  631. sortLv: 0,
  632. status: true,
  633. fixed: '',
  634. columnWidth: 100
  635. },
  636. {
  637. userId: this.$store.state.user.name,
  638. functionId: 101002001,
  639. serialNumber: '101002001Table1CustomerName',
  640. tableId: "101002001Table1",
  641. tableName: "项目信息主表",
  642. columnProp: "customerName",
  643. headerAlign: "center",
  644. align: "left",
  645. columnLabel: "客户名称",
  646. columnHidden: false,
  647. columnImage: false,
  648. columnSortable: false,
  649. sortLv: 0,
  650. status: true,
  651. fixed: '',
  652. columnWidth: 150
  653. },
  654. {
  655. userId: this.$store.state.user.name,
  656. functionId: 101002001,
  657. serialNumber: '101002001Table1CreateDate',
  658. tableId: "101002001Table1",
  659. tableName: "项目信息主表",
  660. columnProp: "createDate",
  661. headerAlign: "center",
  662. align: "left",
  663. columnLabel: "创建时间",
  664. columnHidden: false,
  665. columnImage: false,
  666. columnSortable: false,
  667. sortLv: 0,
  668. status: true,
  669. fixed: '',
  670. columnWidth: 120
  671. },
  672. {
  673. userId: this.$store.state.user.name,
  674. functionId: 101002001,
  675. serialNumber: '101002001Table1CreateBy',
  676. tableId: "101002001Table1",
  677. tableName: "项目信息主表",
  678. columnProp: "createBy",
  679. headerAlign: "center",
  680. align: "left",
  681. columnLabel: "创建人",
  682. columnHidden: false,
  683. columnImage: false,
  684. columnSortable: false,
  685. sortLv: 0,
  686. status: true,
  687. fixed: '',
  688. columnWidth: 80
  689. },
  690. {
  691. userId: this.$store.state.user.name,
  692. functionId: 101002001,
  693. serialNumber: '101002001Table1UpdateDate',
  694. tableId: "101002001Table1",
  695. tableName: "项目信息主表",
  696. columnProp: "updateDate",
  697. headerAlign: "center",
  698. align: "left",
  699. columnLabel: "修改时间",
  700. columnHidden: false,
  701. columnImage: false,
  702. columnSortable: false,
  703. sortLv: 0,
  704. status: true,
  705. fixed: '',
  706. columnWidth: 120
  707. },
  708. {
  709. userId: this.$store.state.user.name,
  710. functionId: 101002001,
  711. serialNumber: '101002001Table1UpdateBy',
  712. tableId: "101002001Table1",
  713. tableName: "项目信息主表",
  714. columnProp: "updateBy",
  715. headerAlign: "center",
  716. align: "left",
  717. columnLabel: "修改人",
  718. columnHidden: false,
  719. columnImage: false,
  720. columnSortable: false,
  721. sortLv: 0,
  722. status: true,
  723. fixed: '',
  724. columnWidth: 80
  725. },
  726. ],
  727. columnList2: [
  728. // {
  729. // userId: this.$store.state.user.name,
  730. // functionId: 101002001,
  731. // serialNumber: '101002001Table2ContactName',
  732. // tableId: '101002001Table2',
  733. // tableName: '项目联系人表',
  734. // columnProp: 'contactId',
  735. // headerAlign: 'center',
  736. // align: 'center',
  737. // columnLabel: '联系人编码',
  738. // columnHidden: false,
  739. // columnImage: false,
  740. // columnSortable: false,
  741. // sortLv: 0,
  742. // status: true,
  743. // fixed: '',
  744. // columnWidth: 100
  745. // },
  746. {
  747. userId: this.$store.state.user.name,
  748. functionId: 101002001,
  749. serialNumber: '101002001Table2ContactName',
  750. tableId: '101002001Table2',
  751. tableName: '项目联系人表',
  752. columnProp: 'contactName',
  753. headerAlign: 'center',
  754. align: 'left',
  755. columnLabel: '联系人',
  756. columnHidden: false,
  757. columnImage: false,
  758. columnSortable: false,
  759. sortLv: 0,
  760. status: true,
  761. fixed: '',
  762. columnWidth: 100
  763. },
  764. {
  765. userId: this.$store.state.user.name,
  766. functionId: 101002001,
  767. serialNumber: '101002001Table2ContactPhoneNumber1',
  768. tableId: '101002001Table2',
  769. tableName: '项目联系人表',
  770. columnProp: 'contactPhoneNumber1',
  771. headerAlign: 'center',
  772. align: 'left',
  773. columnLabel: '联系电话',
  774. columnHidden: false,
  775. columnImage: false,
  776. columnSortable: false,
  777. sortLv: 0,
  778. status: true,
  779. fixed: '',
  780. columnWidth: 100
  781. },
  782. {
  783. userId: this.$store.state.user.name,
  784. functionId: 101002001,
  785. serialNumber: '101002001Table2ContactLandlineNumber',
  786. tableId: '101002001Table2',
  787. tableName: '项目联系人表',
  788. columnProp: 'contactLandlineNumber',
  789. headerAlign: 'center',
  790. align: 'left',
  791. columnLabel: '座机',
  792. columnHidden: false,
  793. columnImage: false,
  794. columnSortable: false,
  795. sortLv: 0,
  796. status: true,
  797. fixed: '',
  798. columnWidth: 100
  799. },
  800. {
  801. userId: this.$store.state.user.name,
  802. functionId: 101002001,
  803. serialNumber: '101002001Table2Position',
  804. tableId: '101002001Table2',
  805. tableName: '项目联系人表',
  806. columnProp: 'position',
  807. headerAlign: 'center',
  808. align: 'left',
  809. columnLabel: '公司职务',
  810. columnHidden: false,
  811. columnImage: false,
  812. columnSortable: false,
  813. sortLv: 0,
  814. status: true,
  815. fixed: '',
  816. columnWidth: 100
  817. },
  818. {
  819. userId: this.$store.state.user.name,
  820. functionId: 101002001,
  821. serialNumber: '101002001Table2Mailbox',
  822. tableId: '101002001Table2',
  823. tableName: '项目联系人表',
  824. columnProp: 'mailbox',
  825. headerAlign: 'center',
  826. align: 'left',
  827. columnLabel: '邮箱',
  828. columnHidden: false,
  829. columnImage: false,
  830. columnSortable: false,
  831. sortLv: 0,
  832. status: true,
  833. fixed: '',
  834. columnWidth: 100
  835. },
  836. {
  837. userId: this.$store.state.user.name,
  838. functionId: 101002001,
  839. serialNumber: '101002001Table2PrimaryContact',
  840. tableId: '101002001Table2',
  841. tableName: '项目联系人表',
  842. columnProp: 'primaryContact',
  843. headerAlign: 'center',
  844. align: 'center',
  845. columnLabel: '默认联系人',
  846. columnHidden: false,
  847. columnImage: false,
  848. columnSortable: false,
  849. sortLv: 0,
  850. status: true,
  851. fixed: '',
  852. columnWidth: 100
  853. },
  854. {
  855. userId: this.$store.state.user.name,
  856. functionId: 101002001,
  857. serialNumber: '101002001Table2ContactStatus',
  858. tableId: '101002001Table2',
  859. tableName: '项目联系人表',
  860. columnProp: 'contactStatus',
  861. headerAlign: 'center',
  862. align: 'center',
  863. columnLabel: '状态',
  864. columnHidden: false,
  865. columnImage: false,
  866. columnSortable: false,
  867. sortLv: 0,
  868. status: true,
  869. fixed: '',
  870. columnWidth: 60
  871. },
  872. {
  873. userId: this.$store.state.user.name,
  874. functionId: 101002001,
  875. serialNumber: '101002001Table2CreateDate',
  876. tableId: '101002001Table2',
  877. tableName: '项目联系人表',
  878. columnProp: 'createDate',
  879. headerAlign: 'center',
  880. align: 'center',
  881. columnLabel: '创建时间',
  882. columnHidden: false,
  883. columnImage: false,
  884. columnSortable: false,
  885. sortLv: 0,
  886. status: true,
  887. fixed: '',
  888. columnWidth: 120
  889. },
  890. {
  891. userId: this.$store.state.user.name,
  892. functionId: 101002001,
  893. serialNumber: '101002001Table2CreateBy',
  894. tableId: '101002001Table2',
  895. tableName: '项目联系人表',
  896. columnProp: 'createBy',
  897. headerAlign: 'center',
  898. align: 'center',
  899. columnLabel: '创建人',
  900. columnHidden: false,
  901. columnImage: false,
  902. columnSortable: false,
  903. sortLv: 0,
  904. status: true,
  905. fixed: '',
  906. columnWidth: 80
  907. },
  908. {
  909. userId: this.$store.state.user.name,
  910. functionId: 101002001,
  911. serialNumber: '101002001Table2UpdateDate',
  912. tableId: '101002001Table2',
  913. tableName: '项目联系人表',
  914. columnProp: 'updateDate',
  915. headerAlign: 'center',
  916. align: 'center',
  917. columnLabel: '更新时间',
  918. columnHidden: false,
  919. columnImage: false,
  920. columnSortable: false,
  921. sortLv: 0,
  922. status: true,
  923. fixed: '',
  924. columnWidth: 120
  925. },
  926. {
  927. userId: this.$store.state.user.name,
  928. functionId: 101002001,
  929. serialNumber: '101002001Table2UpdateBy',
  930. tableId: '101002001Table2',
  931. tableName: '项目联系人表',
  932. columnProp: 'updateBy',
  933. headerAlign: 'center',
  934. align: 'left',
  935. columnLabel: '更新人',
  936. columnHidden: false,
  937. columnImage: false,
  938. columnSortable: false,
  939. sortLv: 0,
  940. status: true,
  941. fixed: '',
  942. columnWidth: 80
  943. }
  944. ],
  945. projectData: {
  946. id: 0,
  947. site:this.$store.state.user.site,
  948. projectLevel:'',
  949. projectId:'',
  950. projectTypeDb:'',
  951. projectType:'',
  952. customerName:'',
  953. customerId:'',
  954. projectName:'',
  955. projectDesc:'',
  956. needDate:'',
  957. priority:'',
  958. projectSource:'',
  959. priorityDesc:'',
  960. projectSourceDesc:'',
  961. projectManagerName:'',
  962. projectOwnerName:'',
  963. customerRemark:'',
  964. remark:'',
  965. userRoleName:'',
  966. customerProjectNo:'',
  967. finalCustomerName:'',
  968. productSet:'',
  969. },
  970. customerData:{
  971. site: '',
  972. customerNo: '',
  973. customerDesc: '',
  974. customerDescription: '',
  975. customerIndustry: '',
  976. customerCurrency: '',
  977. turnoverOfYear: '',
  978. potentialRevenueOfYear: '',
  979. importantCustomer: '',
  980. customerStatus: '',
  981. companyName: '',
  982. jobDescription: '',
  983. remark: '',
  984. contactName: '',
  985. contactPhoneNumber1: '',
  986. primaryContact: '',
  987. contactStatus: '',
  988. addressName: ''
  989. },
  990. finalCustomerData:{
  991. site: '',
  992. customerNo: '',
  993. customerDesc: '',
  994. customerDescription: '',
  995. customerIndustry: '',
  996. customerCurrency: '',
  997. turnoverOfYear: '',
  998. potentialRevenueOfYear: '',
  999. importantCustomer: '',
  1000. customerStatus: '',
  1001. companyName: '',
  1002. jobDescription: '',
  1003. remark: '',
  1004. contactName: '',
  1005. contactPhoneNumber1: '',
  1006. primaryContact: '',
  1007. contactStatus: '',
  1008. addressName: ''
  1009. },
  1010. columnFileContentArray: [
  1011. {
  1012. columnProp: 'fileName',
  1013. headeralign: 'left',
  1014. align: 'left',
  1015. columnLabel: '文件名称',
  1016. columnHidden: false,
  1017. columnImage: false,
  1018. columnSortable: false,
  1019. sortLv: 0,
  1020. status: true,
  1021. fixed: false
  1022. // }, {
  1023. // columnProp: 'createdBy',
  1024. // headeralign: 'left',
  1025. // align: 'left',
  1026. // columnLabel: '上传人',
  1027. // columnHidden: false,
  1028. // columnImage: false,
  1029. // columnSortable: true,
  1030. // sortLv: 0,
  1031. // status: true,
  1032. // fixed: false
  1033. }, {
  1034. columnProp: 'createDate',
  1035. headeralign: 'left',
  1036. align: 'left',
  1037. columnLabel: '上传时间',
  1038. columnHidden: false,
  1039. columnImage: false,
  1040. columnSortable: true,
  1041. sortLv: 0,
  1042. status: true,
  1043. fixed: false
  1044. }, {
  1045. columnProp: 'orderRef3',
  1046. headeralign: 'left',
  1047. align: 'left',
  1048. columnLabel: '类型',
  1049. columnHidden: false,
  1050. columnImage: false,
  1051. columnSortable: true,
  1052. sortLv: 0,
  1053. status: true,
  1054. fixed: false
  1055. },
  1056. ],
  1057. contactSelections1: [],
  1058. contactSelections2: [],
  1059. contactData: {
  1060. site: this.$store.state.user.site,
  1061. customerId: '',
  1062. projectId: '',
  1063. contactId: '',
  1064. contactName: '',
  1065. },
  1066. changeRecordList: [],
  1067. columnChangeRecord: [
  1068. {
  1069. columnProp: 'changeNo',
  1070. headerAlign: 'center',
  1071. align: 'center',
  1072. columnLabel: '申请编号',
  1073. columnHidden: false,
  1074. columnImage: false,
  1075. status: true,
  1076. fixed: '',
  1077. columnWidth: 120
  1078. },
  1079. {
  1080. columnProp: 'applicantName',
  1081. headerAlign: 'center',
  1082. align: 'center',
  1083. columnLabel: '申请人',
  1084. columnHidden: false,
  1085. columnImage: false,
  1086. status: true,
  1087. fixed: '',
  1088. columnWidth: 120
  1089. },
  1090. {
  1091. columnProp: 'applicationDepartmentName',
  1092. headerAlign: 'center',
  1093. align: 'center',
  1094. columnLabel: '申请部门',
  1095. columnHidden: false,
  1096. columnImage: false,
  1097. status: true,
  1098. fixed: '',
  1099. columnWidth: 120
  1100. },
  1101. {
  1102. columnProp: 'changeStatus',
  1103. headerAlign: 'center',
  1104. align: 'center',
  1105. columnLabel: '变更单状态',
  1106. columnHidden: false,
  1107. columnImage: false,
  1108. status: true,
  1109. fixed: '',
  1110. columnWidth: 100
  1111. },
  1112. {
  1113. columnProp: 'ecnStage',
  1114. headerAlign: 'center',
  1115. align: 'center',
  1116. columnLabel: 'ECN阶段',
  1117. columnHidden: false,
  1118. columnImage: false,
  1119. status: true,
  1120. fixed: '',
  1121. columnWidth: 100
  1122. },
  1123. {
  1124. columnProp: 'changeType',
  1125. headerAlign: 'center',
  1126. align: 'center',
  1127. columnLabel: '变更类别',
  1128. columnHidden: false,
  1129. columnImage: false,
  1130. status: true,
  1131. fixed: '',
  1132. columnWidth: 100
  1133. },
  1134. {
  1135. columnProp: 'ecnType',
  1136. headerAlign: 'center',
  1137. align: 'center',
  1138. columnLabel: 'ECN种类',
  1139. columnHidden: false,
  1140. columnImage: false,
  1141. status: true,
  1142. fixed: '',
  1143. columnWidth: 100
  1144. },
  1145. {
  1146. columnProp: 'applyDate',
  1147. headerAlign: 'center',
  1148. align: 'center',
  1149. columnLabel: '申请日期',
  1150. columnHidden: false,
  1151. columnImage: false,
  1152. status: true,
  1153. fixed: '',
  1154. columnWidth: 100
  1155. },
  1156. {
  1157. columnProp: 'changePhaseInDate',
  1158. headerAlign: 'center',
  1159. align: 'center',
  1160. columnLabel: '变更生效日期',
  1161. columnHidden: false,
  1162. columnImage: false,
  1163. status: true,
  1164. fixed: '',
  1165. columnWidth: 100
  1166. },
  1167. {
  1168. columnProp: 'xxx',
  1169. headerAlign: 'center',
  1170. align: 'center',
  1171. columnLabel: 'ECN执行日期',
  1172. columnHidden: false,
  1173. columnImage: false,
  1174. status: true,
  1175. fixed: '',
  1176. columnWidth: 100
  1177. },
  1178. {
  1179. columnProp: 'nodeName',
  1180. headerAlign: 'center',
  1181. align: 'center',
  1182. columnLabel: '当前节点',
  1183. columnHidden: false,
  1184. columnImage: false,
  1185. status: true,
  1186. fixed: '',
  1187. columnWidth: 120
  1188. },
  1189. {
  1190. columnProp: 'createBy2',
  1191. headerAlign: 'center',
  1192. align: 'center',
  1193. columnLabel: '当前节点审批人',
  1194. columnHidden: false,
  1195. columnImage: false,
  1196. status: true,
  1197. fixed: '',
  1198. columnWidth: 100
  1199. },
  1200. ],
  1201. ossColumns:[
  1202. {
  1203. userId: this.$store.state.user.name,
  1204. functionId: 103001,
  1205. serialNumber: '103001Table2FileName',
  1206. tableId: '103001Table2',
  1207. tableName: '文件信息表',
  1208. columnProp: 'fileName',
  1209. headerAlign: 'center',
  1210. align: 'center',
  1211. columnLabel: '文件名称',
  1212. columnHidden: false,
  1213. columnImage: false,
  1214. columnSortable: false,
  1215. sortLv: 0,
  1216. status: true,
  1217. fixed: '',
  1218. columnWidth: 140
  1219. },
  1220. {
  1221. userId: this.$store.state.user.name,
  1222. functionId: 103001,
  1223. serialNumber: '103001Table2FileRemark',
  1224. tableId: '103001Table2',
  1225. tableName: '文件信息表',
  1226. columnProp: 'fileRemark',
  1227. headerAlign: 'center',
  1228. align: 'center',
  1229. columnLabel: '备注',
  1230. columnHidden: false,
  1231. columnImage: false,
  1232. columnSortable: false,
  1233. sortLv: 0,
  1234. status: true,
  1235. fixed: '',
  1236. columnWidth: 240
  1237. },
  1238. // {
  1239. // userId: this.$store.state.user.name,
  1240. // functionId: 103001,
  1241. // serialNumber: '103001Table2OrderRef3',
  1242. // tableId: '103001Table2',
  1243. // tableName: '文件信息表',
  1244. // columnProp: 'orderRef3',
  1245. // headerAlign: 'center',
  1246. // align: 'center',
  1247. // columnLabel: '文件描述',
  1248. // columnHidden: false,
  1249. // columnImage: false,
  1250. // columnSortable: false,
  1251. // sortLv: 0,
  1252. // status: true,
  1253. // fixed: '',
  1254. // columnWidth: 120
  1255. // },
  1256. {
  1257. userId: this.$store.state.user.name,
  1258. functionId: 103001,
  1259. serialNumber: '103001Table2CreateDate',
  1260. tableId: '103001Table2',
  1261. tableName: '文件信息表',
  1262. columnProp: 'createDate',
  1263. headerAlign: 'center',
  1264. align: 'center',
  1265. columnLabel: '上传时间',
  1266. columnHidden: false,
  1267. columnImage: false,
  1268. columnSortable: false,
  1269. sortLv: 0,
  1270. status: true,
  1271. fixed: '',
  1272. columnWidth: 140
  1273. },
  1274. {
  1275. userId: this.$store.state.user.name,
  1276. functionId: 103001,
  1277. serialNumber: '103001Table2CreatedBy',
  1278. tableId: '103001Table2',
  1279. tableName: '文件信息表',
  1280. columnProp: 'createBy',
  1281. headerAlign: 'center',
  1282. align: 'center',
  1283. columnLabel: '上传人',
  1284. columnHidden: false,
  1285. columnImage: false,
  1286. columnSortable: false,
  1287. sortLv: 0,
  1288. status: true,
  1289. fixed: '',
  1290. columnWidth: 140
  1291. }
  1292. ],
  1293. }
  1294. },
  1295. mounted() {
  1296. this.$nextTick(() => {
  1297. this.height = window.innerHeight - 520;
  1298. })
  1299. },
  1300. methods: {
  1301. // 获取基础数据列表S
  1302. getBaseList (val, type) {
  1303. this.tagNo = val
  1304. this.tagNo2 = type
  1305. this.$nextTick(() => {
  1306. let strVal = ''
  1307. if (val === 1010) {
  1308. if(type==1) {
  1309. strVal = this.searchData.projectType
  1310. }
  1311. }
  1312. this.$refs.baseList.init(val, strVal)
  1313. })
  1314. },
  1315. /* 列表方法的回调 */
  1316. getBaseData (val) {
  1317. if (this.tagNo === 1010) {
  1318. if(this.tagNo2==1) {
  1319. this.searchData.projectType = val.Base_desc
  1320. }
  1321. }
  1322. },
  1323. // 新增 / 修改
  1324. addOrUpdateHandle (id) {
  1325. this.addOrUpdateVisible = true
  1326. this.addOrUpdate = id;
  1327. this.$nextTick(() => {
  1328. this.$refs.addOrUpdate.init();
  1329. if (id && id !== 'save' && id !== 'update'){
  1330. this.$refs.addOrUpdate.updateDataForm(id);
  1331. }
  1332. })
  1333. },
  1334. UpdateHandle (row) {
  1335. let inData={
  1336. site:row.site,
  1337. username:this.$store.state.user.name,
  1338. projectId:row.projectId
  1339. }
  1340. getProjectUserRole(inData).then(({data}) => {
  1341. if(this.$store.state.user.name=='admin'||data.row.updateFlag=='Y') {
  1342. this.addOrUpdateVisible = true
  1343. this.addOrUpdate = 'update';
  1344. this.$nextTick(() => {
  1345. this.$refs.addOrUpdate.init(row.id)
  1346. })
  1347. }else {
  1348. this.$alert('没有权限修改这个项目信息!', '错误', {
  1349. confirmButtonText: '确定'
  1350. })
  1351. }
  1352. })
  1353. },
  1354. //导出excel
  1355. async createExportData() {
  1356. this.searchData.limit = -1
  1357. this.searchData.page = 1
  1358. await projectInfoSearch(this.searchData).then(({data}) => {
  1359. this.exportList= data.page.list;
  1360. })
  1361. return this.exportList;
  1362. },
  1363. startDownload() {
  1364. // this.exportData = this.dataList
  1365. },
  1366. finishDownload() {
  1367. },
  1368. fields() {
  1369. let json = "{"
  1370. this.columnList1.forEach((item, index) => {
  1371. if (index == this.columnList1.length - 1) {
  1372. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1373. } else {
  1374. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1375. }
  1376. })
  1377. json += "}"
  1378. let s = eval("(" + json + ")")
  1379. return s
  1380. },
  1381. //导出excel
  1382. async createExportData2() {
  1383. return this.contactList;
  1384. },
  1385. startDownload2() {
  1386. // this.exportData = this.dataList
  1387. },
  1388. finishDownload2() {
  1389. },
  1390. fields2() {
  1391. let json = "{"
  1392. this.columnList2.forEach((item, index) => {
  1393. if (index == this.columnList2.length - 1) {
  1394. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1395. } else {
  1396. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1397. }
  1398. })
  1399. json += "}"
  1400. let s = eval("(" + json + ")")
  1401. return s
  1402. },
  1403. // 导出 end
  1404. // 获取数据列表
  1405. search () {
  1406. this.searchData.limit = this.pageSize
  1407. this.searchData.page = this.pageIndex
  1408. projectInfoSearch(this.searchData).then(({data}) => {
  1409. if (data.code == 0) {
  1410. this.dataList1 = data.page.list
  1411. this.pageIndex = data.page.currPage
  1412. this.pageSize = data.page.pageSize
  1413. this.totalPage = data.page.totalCount
  1414. if(this.dataList1.length>0){
  1415. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1416. this.changeData(this.dataList1[0])
  1417. }
  1418. }
  1419. this.dataListLoading = false
  1420. })
  1421. },
  1422. //单击切换订单
  1423. changeData(row) {
  1424. this.currentRow = JSON.parse(JSON.stringify(row));
  1425. this.projectData=row;
  1426. let inData= {
  1427. site:row.site,
  1428. customerNo:row.customerId,
  1429. page: 1,
  1430. limit: 10,
  1431. }
  1432. this.refreshCurrentTabTable ();
  1433. customerInformationSearchForCheck(inData).then(({data}) => {
  1434. if (data.code == 0) {
  1435. if(data.page.list.length>0){
  1436. this.customerData=data.page.list[0]
  1437. }
  1438. }
  1439. })
  1440. let inData2= {
  1441. site:row.site,
  1442. customerNo:row.finalCustomerId,
  1443. page: 1,
  1444. limit: 10,
  1445. }
  1446. customerInformationSearchForCheck(inData2).then(({data}) => {
  1447. if (data.code == 0) {
  1448. if(data.page.list.length>0){
  1449. this.finalCustomerData=data.page.list[0]
  1450. }
  1451. }
  1452. })
  1453. },
  1454. addUploadFileModal(){
  1455. let currentData = {
  1456. site: this.currentRow.site,
  1457. createBy: this.$store.state.user.name,
  1458. projectId: this.currentRow.projectId,
  1459. projectName: this.currentRow.projectName,
  1460. remark: '',
  1461. };
  1462. //打开组件 去做新增业务
  1463. this.$nextTick(() => {
  1464. this.$refs.projectUploadFile.init(currentData);
  1465. })
  1466. },
  1467. deleteFile(row){
  1468. this.$confirm('确定要删除此文件?', '提示', {
  1469. confirmButtonText: '确定',
  1470. cancelButtonText: '取消',
  1471. type: 'warning'
  1472. }).then(() => {
  1473. deleteProjectFile(row).then(({data}) => {
  1474. if (data && data.code == 0) {
  1475. this.getFileContentData();
  1476. this.$message({
  1477. message: '操作成功',
  1478. type: 'success',
  1479. duration: 1500,
  1480. onClose: () => {
  1481. }
  1482. })
  1483. } else {
  1484. this.$alert(data.msg, '错误', {
  1485. confirmButtonText: '确定'
  1486. })
  1487. }
  1488. })
  1489. }).catch(() => {
  1490. })
  1491. },
  1492. // 刷新页签的table数据
  1493. refreshCurrentTabTable () {
  1494. if (this.activeName == 'down') {
  1495. // this.getFileContentData();
  1496. }
  1497. if (this.activeName == 'customer_contact') {
  1498. this.getCustomerContactData();
  1499. }
  1500. if (this.activeName == 'part') {
  1501. this.refreshPartTable();
  1502. }
  1503. if (this.activeName == 'quotation') {
  1504. this.refreshQuotationTable();
  1505. }
  1506. if (this.activeName == 'quotationHeader') {
  1507. this.refreshQuotationHeaderTable();
  1508. }
  1509. if (this.activeName == 'sample') {
  1510. this.refreshSampleTable();
  1511. }
  1512. if (this.activeName == 'test') {
  1513. this.refreshTestTable();
  1514. }
  1515. if (this.activeName == 'toolApply') {
  1516. this.refreshToolApplyTable();
  1517. }
  1518. if (this.activeName == 'technicalSpecification') {
  1519. this.refreshTechnicalSpecificationTable();
  1520. }
  1521. if (this.activeName === 'changeRecord') {
  1522. this.getChangeRecordList()
  1523. }
  1524. },
  1525. // 获取变更记录
  1526. getChangeRecordList () {
  1527. let tempData = {
  1528. site: this.$store.state.user.site,
  1529. projectId: this.currentRow.projectId,
  1530. menuId: '108002'
  1531. }
  1532. getChangeRecordByPartNo(tempData).then(({data}) => {
  1533. if (data && data.code === 0) {
  1534. this.changeRecordList = data.rows
  1535. } else {
  1536. this.changeRecordList = []
  1537. }
  1538. })
  1539. },
  1540. refreshPartTable(){
  1541. let inData = {
  1542. site: this.currentRow.site,
  1543. projectId: this.currentRow.projectId,
  1544. username: this.$store.state.user.name,
  1545. customerId: this.currentRow.customerId
  1546. }
  1547. this.$refs.projectPart.init(inData)
  1548. },
  1549. refreshTechnicalSpecificationTable(){
  1550. let inData={
  1551. site: this.currentRow.site,
  1552. projectId: this.currentRow.projectId,
  1553. userName:this.$store.state.user.name,
  1554. page: 1,
  1555. limit: 1000
  1556. }
  1557. this.$refs.technicalSpecification.init(inData)
  1558. },
  1559. refreshQuotationHeaderTable(){
  1560. let inData={
  1561. site: this.currentRow.site,
  1562. projectId: this.currentRow.projectId,
  1563. createBy:this.$store.state.user.name,
  1564. no: 1,
  1565. size: 1000
  1566. }
  1567. this.$refs.quotationHeader.init(inData)
  1568. },
  1569. refreshQuotationTable(){
  1570. let inData={
  1571. site: this.currentRow.site,
  1572. projectId: this.currentRow.projectId,
  1573. createBy:this.$store.state.user.name,
  1574. menuId:102001,
  1575. page: 1,
  1576. limit: 1000
  1577. }
  1578. this.$refs.projectQuotation.init(inData)
  1579. },
  1580. refreshSampleTable(){
  1581. let inData={
  1582. site: this.currentRow.site,
  1583. projectId: this.currentRow.projectId,
  1584. createBy:this.$store.state.user.name,
  1585. menuId:103001,
  1586. page: 1,
  1587. limit: 1000
  1588. }
  1589. this.$refs.sample.init(inData)
  1590. },
  1591. refreshTestTable(){
  1592. let inData={
  1593. site: this.currentRow.site,
  1594. projectId: this.currentRow.projectId,
  1595. createBy:this.$store.state.user.name,
  1596. menuId:107001,
  1597. page: 1,
  1598. limit: 1000
  1599. }
  1600. this.$refs.test.init(inData)
  1601. },
  1602. refreshToolApplyTable(){
  1603. let inData={
  1604. site: this.currentRow.site,
  1605. orderRef1: this.currentRow.projectId,
  1606. username:this.$store.state.user.name,
  1607. }
  1608. this.$refs.toolApply.init(inData)
  1609. },
  1610. //刷新派设备文档的列表
  1611. getFileContentData() {
  1612. let currentData = {orderRef2: this.currentRow.projectId};
  1613. getFileContentList(currentData).then(({data}) => {
  1614. //区分请求成功和失败的状况
  1615. if (data && data.code == 200) {
  1616. this.fileContentList = data.rows;
  1617. } else {
  1618. this.fileContentList = [];
  1619. }
  1620. });
  1621. },
  1622. // 下载
  1623. downloadFile(row){
  1624. // axios.get('/proxyApi/pms/eamProject/downLoadProjectFile/' + row.id, {
  1625. // responseType: 'blob',
  1626. // headers: {
  1627. // 'Content-Type': 'application/json',
  1628. // 'token': Vue.cookie.get('token')
  1629. // }
  1630. // })
  1631. let inData={
  1632. site:this.currentRow.site,
  1633. username:this.$store.state.user.name,
  1634. projectId:this.currentRow.projectId
  1635. }
  1636. getProjectUserRole(inData).then(({data}) => {
  1637. if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1638. downLoadProjectFile(row)
  1639. .then(({data}) => {
  1640. // 不限制文件下载类型
  1641. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1642. // 下载文件名称
  1643. const fileName = row.fileName
  1644. // a标签下载
  1645. const linkNode = document.createElement('a')
  1646. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1647. linkNode.style.display = 'none'
  1648. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1649. console.log(linkNode)
  1650. // if(val == 'Y'){
  1651. // this.pdfVisible = true
  1652. // this.pdfUrl = linkNode.href
  1653. // }else {
  1654. document.body.appendChild(linkNode)
  1655. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1656. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1657. document.body.removeChild(linkNode)
  1658. // }
  1659. })
  1660. }else {
  1661. this.$alert('没有权限下载这个项目的文件!', '错误', {
  1662. confirmButtonText: '确定'
  1663. })
  1664. }
  1665. })
  1666. },
  1667. // 每页数
  1668. sizeChangeHandle (val) {
  1669. this.pageSize = val
  1670. this.pageIndex = 1
  1671. this.search()
  1672. },
  1673. // 当前页
  1674. currentChangeHandle (val) {
  1675. this.pageIndex = val
  1676. this.search()
  1677. },
  1678. // 动态列开始 获取 用户保存的 格式列
  1679. async getTableUserColumn(tableId, columnId) {
  1680. let queryTableUser = {
  1681. userId: this.$store.state.user.name,
  1682. functionId: this.$route.meta.menuId,
  1683. tableId: tableId,
  1684. status: true,
  1685. languageCode: this.$i18n.locale
  1686. }
  1687. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1688. if (data.rows.length > 0) {
  1689. //this.columnList = []
  1690. switch (columnId) {
  1691. case 1:
  1692. this.columnList1 = data.rows
  1693. this.checkField();
  1694. break;
  1695. // case 2:
  1696. // this.columnList1 = data.rows
  1697. // break;
  1698. // case 3:
  1699. // this.columnList2 = data.rows
  1700. // break;
  1701. // case 4:
  1702. // this.columnList3 = data.rows
  1703. // break;
  1704. }
  1705. } else {
  1706. this.getColumnList(tableId, columnId)
  1707. }
  1708. })
  1709. },
  1710. // 获取 tableDefault 列
  1711. async getColumnList(tableId, columnId) {
  1712. let queryTable= {
  1713. functionId: this.$route.meta.menuId,
  1714. tableId: tableId,
  1715. languageCode: this.$i18n.locale
  1716. }
  1717. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1718. if (!data.rows.length == 0) {
  1719. switch (columnId) {
  1720. case 1:
  1721. this.columnList1 = data.rows
  1722. this.checkField();
  1723. break;
  1724. // case 2:
  1725. // this.columnList1 = data.rows
  1726. // break;
  1727. // case 3:
  1728. // this.columnList2 = data.rows
  1729. // break;
  1730. // case 4:
  1731. // this.columnList3 = data.rows
  1732. // break;
  1733. }
  1734. } else {
  1735. // this.showDefault = true.
  1736. }
  1737. })
  1738. },
  1739. //动态列结束
  1740. // 列表表格选择替换
  1741. tabClick (tab, event) {
  1742. // 刷新列表数据
  1743. this.refreshCurrentTabTable()
  1744. },
  1745. getCustomerContactData () {
  1746. let inData = {
  1747. site:this.currentRow.site,
  1748. customerId:this.currentRow.customerId,
  1749. projectId:this.currentRow.projectId,
  1750. }
  1751. getCustomerContactData(inData).then(({data}) => {
  1752. //区分请求成功和失败的状况
  1753. if (data && data.code == 0) {
  1754. this.contactList = data.rows;
  1755. } else {
  1756. this.contactList = [];
  1757. }
  1758. });
  1759. },
  1760. // contactChooseModal () {
  1761. // if (this.currentRow == null || this.currentRow === '') {
  1762. // this.$alert('请选择项目!', '错误', {
  1763. // confirmButtonText: '确定'
  1764. // })
  1765. // return false
  1766. // }
  1767. // let inData = {
  1768. // site:this.currentRow.site,
  1769. // customerId:this.currentRow.customerId,
  1770. // projectId:this.currentRow.projectId,
  1771. // }
  1772. // getContactChooseData(inData).then(({data}) => {
  1773. // //区分请求成功和失败的状况
  1774. // if (data && data.code == 0) {
  1775. // this.contactChooseList1 = data.rows1;
  1776. // this.contactChooseList2 = data.rows2;
  1777. //
  1778. // } else {
  1779. // this.contactChooseList1 = [];
  1780. // this.contactChooseList2 = [];
  1781. // }
  1782. // });
  1783. // this.contactChooseFlag=true;
  1784. // },
  1785. contactChooseModal () {
  1786. if (this.currentRow == null || this.currentRow === '') {
  1787. this.$alert('请选择项目!', '错误', {
  1788. confirmButtonText: '确定'
  1789. })
  1790. return false
  1791. }
  1792. let inData = {
  1793. site: this.currentRow.site,
  1794. customerId: this.currentRow.customerId,
  1795. projectId: this.currentRow.projectId
  1796. }
  1797. this.contactSelections1 = null
  1798. this.contactSelections2 = null
  1799. this.contactData.contactName = ''
  1800. getContactChooseData2(inData).then(({data}) => {
  1801. //区分请求成功和失败的状况
  1802. if (data && data.code === 0) {
  1803. this.contactChooseList1 = data.rows1
  1804. this.contactChooseList2 = data.rows2
  1805. }
  1806. })
  1807. this.contactChooseFlag = true
  1808. },
  1809. // 查询物料项目
  1810. queryCustomerContact () {
  1811. this.contactData.projectId = this.currentRow.projectId
  1812. this.contactData.customerId = this.currentRow.customerId
  1813. queryCustomerContact(this.contactData).then(({data}) => {
  1814. if (data && data.code === 0) {
  1815. this.contactChooseList1 = data.rows
  1816. } else {
  1817. this.contactChooseList1 = []
  1818. }
  1819. })
  1820. },
  1821. // 可选联系人
  1822. contactClickRow1 (row) {
  1823. this.$refs.contactTable1.toggleRowSelection(row)
  1824. },
  1825. // 已有联系人
  1826. contactClickRow2 (row) {
  1827. this.$refs.contactTable2.toggleRowSelection(row)
  1828. },
  1829. selectionContact1 (val) {
  1830. this.contactSelections1 = val
  1831. },
  1832. selectionContact2 (val) {
  1833. this.contactSelections2 = val
  1834. },
  1835. // 客户联系人新增
  1836. addContact () {
  1837. if (this.contactSelections1 == null || this.contactSelections1.length === 0) {
  1838. this.$message.warning('请选择可选联系人!')
  1839. return
  1840. }
  1841. let inData = {
  1842. site: this.currentRow.site,
  1843. customerId: this.currentRow.customerId,
  1844. projectId: this.currentRow.projectId,
  1845. contactList2: this.contactSelections1
  1846. }
  1847. addContact(inData).then(({data}) => {
  1848. if (data && data.code === 0) {
  1849. getContactChooseData2(inData).then(({data}) => {
  1850. //区分请求成功和失败的状况
  1851. if (data && data.code === 0) {
  1852. this.contactChooseList1 = data.rows1
  1853. this.contactChooseList2 = data.rows2
  1854. }
  1855. })
  1856. this.getCustomerContactData()
  1857. this.contactSelections1 = []
  1858. } else {
  1859. this.$alert(data.msg, '错误', {
  1860. confirmButtonText: '确定'
  1861. })
  1862. }
  1863. })
  1864. },
  1865. // 客户联系人删除
  1866. deleteContact () {
  1867. if (this.contactSelections2 == null || this.contactSelections2.length === 0) {
  1868. this.$message.warning('请选择已有联系人!')
  1869. return
  1870. }
  1871. let inData = {
  1872. site: this.currentRow.site,
  1873. customerId: this.currentRow.customerId,
  1874. projectId: this.currentRow.projectId,
  1875. contactList2: this.contactSelections2
  1876. }
  1877. deleteContact(inData).then(({data}) => {
  1878. if (data && data.code === 0) {
  1879. getContactChooseData2(inData).then(({data}) => {
  1880. //区分请求成功和失败的状况
  1881. if (data && data.code === 0) {
  1882. this.contactChooseList1 = data.rows1
  1883. this.contactChooseList2 = data.rows2
  1884. }
  1885. })
  1886. this.getCustomerContactData()
  1887. this.contactSelections2 = []
  1888. } else {
  1889. this.$alert(data.msg, '错误', {
  1890. confirmButtonText: '确定'
  1891. })
  1892. }
  1893. })
  1894. },
  1895. saveProjectContactList(){
  1896. let data={
  1897. site:this.currentRow.site,
  1898. customerId:this.currentRow.customerId,
  1899. projectId:this.currentRow.projectId,
  1900. contactList:this.contactChooseList1
  1901. }
  1902. saveProjectContactList(data).then(({data}) => {
  1903. if (data && data.code === 0) {
  1904. this.$message.success( '操作成功')
  1905. this.contactChooseFlag = false
  1906. this.refreshCurrentTabTable()
  1907. } else {
  1908. this.$message.error(data.msg)
  1909. }
  1910. })
  1911. },
  1912. deleteProjectInfo(row){
  1913. let inData={
  1914. site:row.site,
  1915. username:this.$store.state.user.name,
  1916. projectId:row.projectId
  1917. }
  1918. getProjectUserRole(inData).then(({data}) => {
  1919. if(this.$store.state.user.name=='admin'||data.row.deleteFlag=='Y') {
  1920. this.$confirm(`确定删除当前记录?`, '提示', {
  1921. confirmButtonText: '确定',
  1922. cancelButtonText: '取消',
  1923. type: 'warning'
  1924. }).then(() => {
  1925. deleteProjectInfo(row).then(({data}) => {
  1926. if (data && data.code === 0) {
  1927. this.$message.success( '操作成功')
  1928. this.contactChooseFlag = false
  1929. this.search()
  1930. } else {
  1931. this.$message.error(data.msg)
  1932. }
  1933. })
  1934. }).catch(() => {})
  1935. }else {
  1936. this.$alert('没有权限删除这个项目信息!', '错误', {
  1937. confirmButtonText: '确定'
  1938. })
  1939. }
  1940. })
  1941. },
  1942. checkField(){
  1943. if(!this.accessField('10202001')){
  1944. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerId');
  1945. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerName');
  1946. }
  1947. if(!this.accessField('10202002')){
  1948. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'projectSource');
  1949. }
  1950. },
  1951. toChangeMenu(changeNo){
  1952. if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404'){
  1953. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  1954. }else {
  1955. this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo:changeNo},})
  1956. }
  1957. }
  1958. },
  1959. activated() {
  1960. if (this.$route.params.projectId){
  1961. this.searchData.projectId = this.$route.params.projectId
  1962. this.search();
  1963. }
  1964. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  1965. },
  1966. }
  1967. </script>
  1968. <style scoped lang="scss">
  1969. /deep/ .customer-tab .el-tabs__content {
  1970. padding: 5px !important;
  1971. }
  1972. .el-transfer-panel {
  1973. border: 2px solid #17b3a3;
  1974. border-radius: 4px;
  1975. overflow: hidden;
  1976. background: #fff;
  1977. display: inline-block;
  1978. vertical-align: middle;
  1979. width: 200px;
  1980. max-height: 100%;
  1981. -webkit-box-sizing: border-box;
  1982. box-sizing: border-box;
  1983. position: relative;
  1984. }
  1985. .el-transfer-panel .el-transfer-panel__header {
  1986. height: 40px;
  1987. line-height: 40px;
  1988. background: #17b3a3;
  1989. margin: 0;
  1990. padding-left: 15px;
  1991. border-bottom: 1px solid #17b3a3;
  1992. -webkit-box-sizing: border-box;
  1993. box-sizing: border-box;
  1994. color: #000;
  1995. }
  1996. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1997. font-size: 14px;
  1998. color: #303133;
  1999. font-weight: 400;
  2000. }
  2001. </style>