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.

1601 lines
57 KiB

  1. <template>
  2. <div>
  3. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  4. <el-form-item :label="'BU'">
  5. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
  6. <el-option
  7. v-for = "i in userBuList"
  8. :key = "i.buNo"
  9. :label = "i.buDesc"
  10. :value = "i.buDesc">
  11. </el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item :label="'项目编码'">
  15. <el-input v-model="searchData.projectNo" style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'项目名称'">
  18. <el-input v-model="searchData.projectDesc" style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'项目料号'">
  21. <el-input v-model="searchData.testPartNo" style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'料号描述'">
  24. <el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
  25. </el-form-item>
  26. <el-form-item :label="'客户编码'">
  27. <el-input v-model="searchData.customerNo" style="width: 120px"></el-input>
  28. </el-form-item>
  29. <el-form-item :label="'客户名称'">
  30. <el-input v-model="searchData.customerDesc" style="width: 120px"></el-input>
  31. </el-form-item>
  32. <el-form-item :label="'打样单号'">
  33. <el-input v-model="searchData.proofingNo" style="width: 120px"></el-input>
  34. </el-form-item>
  35. <el-form-item :label="'项目分类'">
  36. <el-select v-model="searchData.cProjectTypeDb" placeholder="请选择" clearable style="width: 130px">
  37. <el-option
  38. v-for = "i in projectCategoryList"
  39. :key = "i.projectCategory"
  40. :label = "i.projectCategory"
  41. :value = "i.projectCategory">
  42. </el-option>
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item :label="'项目状态'">
  46. <el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">
  47. <el-option
  48. v-for = "i in statusList"
  49. :key = "i.status"
  50. :label = "i.status"
  51. :value = "i.status">
  52. </el-option>
  53. </el-select>
  54. </el-form-item>
  55. <el-form-item :label="'PM/Sales'">
  56. <el-select v-model="searchData.projectManager" placeholder="请选择" clearable style="width: 130px">
  57. <el-option
  58. v-for = "i in projectManagersList"
  59. :key = "i.projectManagerId"
  60. :label = "i.projectManagerName"
  61. :value = "i.projectManager">
  62. </el-option>
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item :label="'PjM'">
  66. <el-select v-model="searchData.projectOwner" placeholder="请选择" clearable style="width: 130px">
  67. <el-option
  68. v-for = "i in projectOwnersList"
  69. :key = "i.projectOwnerId"
  70. :label = "i.projectOwnerName"
  71. :value = "i.projectOwner">
  72. </el-option>
  73. </el-select>
  74. </el-form-item>
  75. <el-form-item :label="'Engineer'">
  76. <el-select v-model="searchData.engineer" placeholder="请选择" clearable style="width: 130px">
  77. <el-option
  78. v-for = "i in engineersList"
  79. :key = "i.engineerId"
  80. :label = "i.engineerName"
  81. :value = "i.engineer">
  82. </el-option>
  83. </el-select>
  84. </el-form-item>
  85. <el-form-item :label="'立项日期:'">
  86. <el-date-picker
  87. style="width: 120px"
  88. v-model="searchData.startDate"
  89. type="date"
  90. value-format="yyyy-MM-dd"
  91. placeholder="选择日期">
  92. </el-date-picker>
  93. -
  94. <el-date-picker
  95. style="width: 120px"
  96. v-model="searchData.endDate"
  97. type="date"
  98. value-format="yyyy-MM-dd"
  99. placeholder="选择日期">
  100. </el-date-picker>
  101. </el-form-item>
  102. <!-- <el-form-item :label="'在用'">-->
  103. <!-- <el-select filterable v-model="searchData.active" style="width: 130px">-->
  104. <!-- <el-option label="全部" value=""></el-option>-->
  105. <!-- <el-option label="是" value="Y"></el-option>-->
  106. <!-- <el-option label="否" value="N"></el-option>-->
  107. <!-- </el-select>-->
  108. <!-- </el-form-item>-->
  109. <el-form-item :label="' '">
  110. <el-button @click="getDataList()">查询</el-button>
  111. <download-excel
  112. :fields="fields()"
  113. :data="exportData"
  114. type="xls"
  115. :name="exportName"
  116. :header="exportHeader"
  117. :footer="exportFooter"
  118. :fetch="createExportData"
  119. :before-generate="startDownload"
  120. :before-finish="finishDownload"
  121. worksheet="导出信息"
  122. class="el-button el-button--primary el-button--medium">
  123. {{ "导出" }}
  124. </download-excel>
  125. </el-form-item>
  126. </el-form>
  127. <el-table
  128. :data="dataList"
  129. border
  130. :height="height"
  131. style="width: 100%;margin-top: 0px;"
  132. ref="projectAllDocumentDocumentTable"
  133. @row-click="projectAllProofClickRow"
  134. :row-style="rowStyle"
  135. v-loading="dataListLoading">
  136. <el-table-column
  137. v-for="(item,index) in columnProjectAllProofList" :key="index"
  138. :sortable="item.columnSortable"
  139. :prop="item.columnProp"
  140. :header-align="item.headerAlign"
  141. :show-overflow-tooltip="item.showOverflowTooltip"
  142. :align="item.align"
  143. :fixed="item.fixed==''?false:item.fixed"
  144. :min-width="item.columnWidth"
  145. :label="item.columnLabel">
  146. <template slot-scope="scope">
  147. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  148. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  149. style="width: 100px; height: 80px"/></span>
  150. </template>
  151. </el-table-column>
  152. <el-table-column
  153. label="操作"
  154. align="center"
  155. fixed="left"
  156. width="70">
  157. <template slot-scope="scope">
  158. <a type="text" size="small" @click="toMes(scope.row)">项目信息</a>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. <el-pagination
  163. @size-change="sizeChangeHandle"
  164. @current-change="currentChangeHandle"
  165. :current-page="pageIndex"
  166. :page-sizes="[20, 50, 100, 200, 500]"
  167. :page-size="pageSize"
  168. :total="totalPage"
  169. layout="total, sizes, prev, pager, next, jumper">
  170. </el-pagination>
  171. </div>
  172. </template>
  173. <script>
  174. import {
  175. searchProjectUploadsDocumentList,
  176. searchProjectOverUploadsDocumentList,
  177. searchConfirmProgressList, searchOverConfirmProgressList, getProofDocument, searchAllProjectUploadsDocumentList,
  178. searchAllProofing, searchAllConfirmProgressList, queryAllProofing
  179. } from "../../../api/eam/eamProofing";
  180. import {searchConfirmProgressPusherList, warnSendMailHandle} from "../../../api/eam/eamProject";
  181. import {getSiteAndBuByUserName} from "../../../api/qc/qc";
  182. import {removeUserFavorite, saveUserFavorite, userFavoriteList} from "../../../api/userFavorite";
  183. import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
  184. import {EventBus} from "../../../main";
  185. import UploadFileList1 from "../common/uploadFileList1.vue";
  186. export default {
  187. components: {UploadFileList1},
  188. computed: {
  189. projectOwnersList() {
  190. return this.allPersonnelInfoList.filter(item => item.projectOwnerId !== undefined);
  191. },
  192. projectManagersList() {
  193. return this.allPersonnelInfoList.filter(item => item.projectManagerId !== undefined);
  194. },
  195. engineersList() {
  196. return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined);
  197. }
  198. },
  199. data() {
  200. return {
  201. // 导出
  202. exportData: [],
  203. exportName: '项目打样记录' + this.dayjs().format('YYYYMMDDHHmmss'),
  204. exportHeader: ['项目打样记录'],
  205. exportFooter: [],
  206. folder: '',
  207. dataList: [],
  208. allDataList: [],
  209. allPersonnelInfoList: [],
  210. fileList: [],
  211. height: 200,
  212. pageIndex: 1,
  213. pageSize: 20,
  214. totalPage: 0,
  215. dataListLoading: false,
  216. uploadDialog:false,
  217. isEditable: true,
  218. isMassProductionStage: true,
  219. warnFlag: false,
  220. projectAllProofClickRow: {},
  221. selectTypeFlag: [],
  222. searchData: {
  223. site: this.$store.state.user.site,
  224. userId: this.$store.state.user.id,
  225. projectId: '',
  226. projectNo: '',
  227. projectDesc: '',
  228. projectPartId: '',
  229. testPartNo: '',
  230. partDesc: '',
  231. customerNo: '',
  232. customerDesc: '',
  233. buDesc: '',
  234. projectCategory: '',
  235. status: '',
  236. startDate:'',
  237. endDate:'',
  238. projectCreationDate: new Date(),
  239. projectCloseDate:'',
  240. needDate:'',
  241. projectManager: '',
  242. projectOwner: '',
  243. engineer: '',
  244. page: 1,
  245. limit: 10,
  246. },
  247. columnProjectAllProofList: [
  248. {
  249. userId: this.$store.state.user.name,
  250. functionId: 401008,
  251. serialNumber: '401008Table1BuDesc',
  252. tableId: "401008Table1",
  253. tableName: "项目打样记录表",
  254. columnProp: 'buDesc',
  255. headerAlign: "center",
  256. align: "center",
  257. columnLabel: 'BU',
  258. columnHidden: false,
  259. columnImage: false,
  260. columnSortable: false,
  261. sortLv: 0,
  262. status: true,
  263. fixed: '',
  264. columnWidth: 100,
  265. },
  266. {
  267. userId: this.$store.state.user.name,
  268. functionId: 401008,
  269. serialNumber: '401008Table1ProjectNo',
  270. tableId: "401008Table1",
  271. tableName: "项目打样记录表",
  272. columnProp: 'projectNo',
  273. headerAlign: "center",
  274. align: "center",
  275. columnLabel: '项目编码',
  276. columnHidden: false,
  277. columnImage: false,
  278. columnSortable: false,
  279. sortLv: 0,
  280. status: true,
  281. fixed: '',
  282. columnWidth: 100,
  283. },
  284. {
  285. userId: this.$store.state.user.name,
  286. functionId: 401008,
  287. serialNumber: '401008Table1ProjectDesc',
  288. tableId: "401008Table1",
  289. tableName: "项目打样记录表",
  290. columnProp: 'projectDesc',
  291. headerAlign: "center",
  292. align: "center",
  293. columnLabel: '项目名称',
  294. columnHidden: false,
  295. columnImage: false,
  296. columnSortable: false,
  297. sortLv: 0,
  298. status: true,
  299. fixed: '',
  300. columnWidth: 100,
  301. },
  302. {
  303. userId: this.$store.state.user.name,
  304. functionId: 401008,
  305. serialNumber: '401008Table1TestPartNo',
  306. tableId: "401008Table1",
  307. tableName: "项目打样记录表",
  308. columnProp: 'testPartNo',
  309. headerAlign: "center",
  310. align: "center",
  311. columnLabel: '项目料号',
  312. columnHidden: false,
  313. columnImage: false,
  314. columnSortable: false,
  315. sortLv: 0,
  316. status: true,
  317. fixed: '',
  318. columnWidth: 100,
  319. },
  320. {
  321. userId: this.$store.state.user.name,
  322. functionId: 401008,
  323. serialNumber: '401008Table1PartDesc',
  324. tableId: "401008Table1",
  325. tableName: "项目打样记录表",
  326. columnProp: 'partDesc',
  327. headerAlign: "center",
  328. align: "center",
  329. columnLabel: '料号描述',
  330. columnHidden: false,
  331. columnImage: false,
  332. columnSortable: false,
  333. sortLv: 0,
  334. status: true,
  335. fixed: '',
  336. columnWidth: 100,
  337. },
  338. {
  339. userId: this.$store.state.user.name,
  340. functionId: 401008,
  341. serialNumber: '401008Table1customerNo',
  342. tableId: "401008Table1",
  343. tableName: "项目打样记录表",
  344. columnProp: "customerNo",
  345. headerAlign: "center",
  346. align: "left",
  347. columnLabel: "客户编码",
  348. columnHidden: false,
  349. columnImage: false,
  350. columnSortable: false,
  351. sortLv: 0,
  352. status: true,
  353. fixed: '',
  354. columnWidth: 100
  355. },
  356. {
  357. userId: this.$store.state.user.name,
  358. functionId: 401008,
  359. serialNumber: '401008Table1customerDesc',
  360. tableId: "401008Table1",
  361. tableName: "项目打样记录表",
  362. columnProp: "customerDesc",
  363. headerAlign: "center",
  364. align: "left",
  365. columnLabel: "客户名称",
  366. columnHidden: false,
  367. columnImage: false,
  368. columnSortable: false,
  369. sortLv: 0,
  370. status: true,
  371. fixed: '',
  372. columnWidth: 150
  373. },
  374. {
  375. userId: this.$store.state.user.name,
  376. functionId: 401008,
  377. serialNumber: '401008Table1ProjectCreationDate',
  378. tableId: "401008Table1",
  379. tableName: "项目打样记录表",
  380. columnProp: "buildDate",
  381. headerAlign: "center",
  382. align: "center",
  383. columnLabel: "立项日期",
  384. columnHidden: false,
  385. columnImage: false,
  386. columnSortable: false,
  387. sortLv: 0,
  388. status: true,
  389. fixed: '',
  390. columnWidth: 120
  391. },
  392. {
  393. userId: this.$store.state.user.name,
  394. functionId: 401008,
  395. serialNumber: '401008Table1Priority',
  396. tableId: "401008Table1",
  397. tableName: "项目打样记录表",
  398. columnProp: 'priority',
  399. headerAlign: "center",
  400. align: "left",
  401. columnLabel: '优先级',
  402. columnHidden: false,
  403. columnImage: false,
  404. columnSortable: false,
  405. sortLv: 0,
  406. status: true,
  407. fixed: '',
  408. columnWidth: 80,
  409. },
  410. {
  411. userId: this.$store.state.user.name,
  412. functionId: 401008,
  413. serialNumber: '401008Table1CProjectRegion',
  414. tableId: "401008Table1",
  415. tableName: "项目打样记录表",
  416. columnProp: 'cProjectRegion',
  417. headerAlign: "center",
  418. align: "left",
  419. columnLabel: '区域',
  420. columnHidden: false,
  421. columnImage: false,
  422. columnSortable: false,
  423. sortLv: 0,
  424. status: true,
  425. fixed: '',
  426. columnWidth: 120,
  427. },
  428. {
  429. userId: this.$store.state.user.name,
  430. functionId: 401008,
  431. serialNumber: '401008Table1ProjectManager',
  432. tableId: "401008Table1",
  433. tableName: "项目打样记录表",
  434. columnProp: 'projectManagerName',
  435. headerAlign: "center",
  436. align: "left",
  437. columnLabel: 'PM/Sales',
  438. columnHidden: false,
  439. columnImage: false,
  440. columnSortable: false,
  441. sortLv: 0,
  442. status: true,
  443. fixed: '',
  444. columnWidth: 120,
  445. },
  446. {
  447. userId: this.$store.state.user.name,
  448. functionId: 401008,
  449. serialNumber: '401008Table1ProjectOwner',
  450. tableId: "401008Table1",
  451. tableName: "项目打样记录表",
  452. columnProp: 'projectOwnerName',
  453. headerAlign: "center",
  454. align: "left",
  455. columnLabel: 'PjM',
  456. columnHidden: false,
  457. columnImage: false,
  458. columnSortable: false,
  459. sortLv: 0,
  460. status: true,
  461. fixed: '',
  462. columnWidth: 120,
  463. },
  464. {
  465. userId: this.$store.state.user.name,
  466. functionId: 401008,
  467. serialNumber: '401008Table1Engineer',
  468. tableId: "401008Table1",
  469. tableName: "项目打样记录表",
  470. columnProp: 'engineerName',
  471. headerAlign: "center",
  472. align: "left",
  473. columnLabel: 'Engineer',
  474. columnHidden: false,
  475. columnImage: false,
  476. columnSortable: false,
  477. sortLv: 0,
  478. status: true,
  479. fixed: '',
  480. columnWidth: 120,
  481. },
  482. {
  483. userId: this.$store.state.user.name,
  484. functionId: 401008,
  485. serialNumber: '401008Table1CQualityEngineer1',
  486. tableId: "401008Table1",
  487. tableName: "项目打样记录表",
  488. columnProp: 'cQualityEngineer1Name',
  489. headerAlign: "center",
  490. align: "left",
  491. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  492. columnHidden: false,
  493. columnImage: false,
  494. columnSortable: false,
  495. sortLv: 0,
  496. status: true,
  497. fixed: '',
  498. columnWidth: 120,
  499. },
  500. {
  501. userId: this.$store.state.user.name,
  502. functionId: 401008,
  503. serialNumber: '401008Table1CQualityEngineer2',
  504. tableId: "401008Table1",
  505. tableName: "项目打样记录表",
  506. columnProp: 'cQualityEngineer2Name',
  507. headerAlign: "center",
  508. align: "left",
  509. columnLabel: 'IPQC-Converting',
  510. columnHidden: false,
  511. columnImage: false,
  512. columnSortable: false,
  513. sortLv: 0,
  514. status: true,
  515. fixed: '',
  516. columnWidth: 120,
  517. },
  518. {
  519. userId: this.$store.state.user.name,
  520. functionId: 401008,
  521. serialNumber: '401008Table1CQualityEngineer3',
  522. tableId: "401008Table1",
  523. tableName: "项目打样记录表",
  524. columnProp: 'cQualityEngineer3Name',
  525. headerAlign: "center",
  526. align: "left",
  527. columnLabel: 'FQC1',
  528. columnHidden: false,
  529. columnImage: false,
  530. columnSortable: false,
  531. sortLv: 0,
  532. status: true,
  533. fixed: '',
  534. columnWidth: 120,
  535. },
  536. {
  537. userId: this.$store.state.user.name,
  538. functionId: 401008,
  539. serialNumber: '401008Table1CQualityEngineer5',
  540. tableId: "401008Table1",
  541. tableName: "项目打样记录表",
  542. columnProp: 'cQualityEngineer5Name',
  543. headerAlign: "center",
  544. align: "left",
  545. columnLabel: 'FQC2',
  546. columnHidden: false,
  547. columnImage: false,
  548. columnSortable: false,
  549. sortLv: 0,
  550. status: true,
  551. fixed: '',
  552. columnWidth: 120,
  553. },
  554. {
  555. userId: this.$store.state.user.name,
  556. functionId: 401008,
  557. serialNumber: '401008Table1CQualityEngineer6',
  558. tableId: "401008Table1",
  559. tableName: "项目打样记录表",
  560. columnProp: 'cQualityEngineer6Name',
  561. headerAlign: "center",
  562. align: "left",
  563. columnLabel: 'IQC',
  564. columnHidden: false,
  565. columnImage: false,
  566. columnSortable: false,
  567. sortLv: 0,
  568. status: true,
  569. fixed: '',
  570. columnWidth: 120,
  571. },
  572. {
  573. userId: this.$store.state.user.name,
  574. functionId: 401008,
  575. serialNumber: '401008Table1CManufactureEngineer',
  576. tableId: "401008Table1",
  577. tableName: "项目打样记录表",
  578. columnProp: 'cManufactureEngineerName',
  579. headerAlign: "center",
  580. align: "left",
  581. columnLabel: 'MFG',
  582. columnHidden: false,
  583. columnImage: false,
  584. columnSortable: false,
  585. sortLv: 0,
  586. status: true,
  587. fixed: '',
  588. columnWidth: 120,
  589. },
  590. {
  591. userId: this.$store.state.user.name,
  592. functionId: 401008,
  593. serialNumber: '401008Table1CQualityEngineer4',
  594. tableId: "401008Table1",
  595. tableName: "项目打样记录表",
  596. columnProp: 'cQualityEngineer4Name',
  597. headerAlign: "center",
  598. align: "left",
  599. columnLabel: 'SQE',
  600. columnHidden: false,
  601. columnImage: false,
  602. columnSortable: false,
  603. sortLv: 0,
  604. status: true,
  605. fixed: '',
  606. columnWidth: 120,
  607. },
  608. {
  609. userId: this.$store.state.user.name,
  610. functionId: 401008,
  611. serialNumber: '401008Table1DocEngineer',
  612. tableId: "401008Table1",
  613. tableName: "项目打样记录表",
  614. columnProp: 'docEngineerName',
  615. headerAlign: "center",
  616. align: "left",
  617. columnLabel: '文档工程师',
  618. columnHidden: false,
  619. columnImage: false,
  620. columnSortable: false,
  621. sortLv: 0,
  622. status: true,
  623. fixed: '',
  624. columnWidth: 120,
  625. },
  626. {
  627. userId: this.$store.state.user.name,
  628. functionId: 401008,
  629. serialNumber: '401008Table1Status',
  630. tableId: "401008Table1",
  631. tableName: "项目打样记录表",
  632. columnProp: 'status',
  633. headerAlign: "center",
  634. align: "left",
  635. columnLabel: '物料状态' ,
  636. columnHidden: false,
  637. columnImage: false,
  638. columnSortable: false,
  639. sortLv: 0,
  640. status: true,
  641. fixed: '',
  642. columnWidth: 100,
  643. },
  644. {
  645. userId: this.$store.state.user.name,
  646. functionId: 401008,
  647. serialNumber: '401008Table1ProofingStatus',
  648. tableId: "401008Table1",
  649. tableName: "项目打样记录表",
  650. columnProp: 'proofingStatus',
  651. headerAlign: "center",
  652. align: "left",
  653. columnLabel: '打样状态' ,
  654. columnHidden: false,
  655. columnImage: false,
  656. columnSortable: false,
  657. sortLv: 0,
  658. status: true,
  659. fixed: '',
  660. columnWidth: 100,
  661. },
  662. {
  663. userId: this.$store.state.user.name,
  664. functionId: 401008,
  665. serialNumber: '401008Table1NeedDate',
  666. tableId: "401008Table1",
  667. tableName: "项目打样记录表",
  668. columnProp: 'needDate',
  669. headerAlign: "center",
  670. align: "center",
  671. columnLabel: '项目物料预计完成日期',
  672. columnHidden: false,
  673. columnImage: false,
  674. columnSortable: false,
  675. sortLv: 0,
  676. status: true,
  677. fixed: '',
  678. columnWidth: 130,
  679. },
  680. {
  681. userId: this.$store.state.user.name,
  682. functionId: 401008,
  683. serialNumber: '401008Table1CloseDate',
  684. tableId: "401008Table1",
  685. tableName: "项目打样记录表",
  686. columnProp: 'closeDate',
  687. headerAlign: "center",
  688. align: "center",
  689. columnLabel: '转量产日期',
  690. columnHidden: false,
  691. columnImage: false,
  692. columnSortable: false,
  693. sortLv: 0,
  694. status: true,
  695. fixed: '',
  696. columnWidth: 120,
  697. },
  698. {
  699. userId: this.$store.state.user.name,
  700. functionId: 401008,
  701. serialNumber: '401008Table1FinalPartNo',
  702. tableId: "401008Table1",
  703. tableName: "项目打样记录表",
  704. columnProp: 'finalPartNo',
  705. headerAlign: "center",
  706. align: "left",
  707. columnLabel: 'ERP正式料号',
  708. columnHidden: false,
  709. columnImage: false,
  710. columnSortable: false,
  711. sortLv: 0,
  712. status: true,
  713. fixed: '',
  714. columnWidth: 120,
  715. },
  716. {
  717. userId: this.$store.state.user.name,
  718. functionId: 103001,
  719. serialNumber: '103001Table1RequiredDeliveryDate',
  720. tableId: '103001Table1',
  721. tableName: '打样记录表',
  722. columnProp: 'planStartDate',
  723. headerAlign: 'center',
  724. align: 'center',
  725. columnLabel: '打样开始日期',
  726. columnHidden: false,
  727. columnImage: false,
  728. columnSortable: false,
  729. sortLv: 0,
  730. status: true,
  731. fixed: '',
  732. columnWidth: 90
  733. },
  734. {
  735. userId: this.$store.state.user.name,
  736. functionId: 103001,
  737. serialNumber: '103001Table1ProofingNo',
  738. tableId: '103001Table1',
  739. tableName: '打样记录表',
  740. columnProp: 'proofingNo',
  741. headerAlign: 'center',
  742. align: 'center',
  743. columnLabel: '打样单号',
  744. columnHidden: false,
  745. columnImage: false,
  746. columnSortable: false,
  747. sortLv: 0,
  748. status: true,
  749. fixed: '',
  750. columnWidth: 80
  751. },
  752. {
  753. userId: this.$store.state.user.name,
  754. functionId: 103001,
  755. serialNumber: '103001Table1ProofingNumber',
  756. tableId: '103001Table1',
  757. tableName: '打样记录表',
  758. columnProp: 'proofingNumber',
  759. headerAlign: 'center',
  760. align: 'center',
  761. columnLabel: '数量',
  762. columnHidden: false,
  763. columnImage: false,
  764. columnSortable: false,
  765. sortLv: 0,
  766. status: true,
  767. fixed: '',
  768. columnWidth: 80
  769. },
  770. {
  771. userId: this.$store.state.user.name,
  772. functionId: 401008,
  773. serialNumber: '401008Table1CProjectTypeDb',
  774. tableId: "401008Table1",
  775. tableName: "项目打样记录表",
  776. columnProp: 'cProjectTypeDb',
  777. headerAlign: "center",
  778. align: "left",
  779. columnLabel: '项目分类',
  780. columnHidden: false,
  781. columnImage: false,
  782. columnSortable: false,
  783. sortLv: 0,
  784. status: true,
  785. fixed: '',
  786. columnWidth: 80,
  787. },
  788. {
  789. userId: this.$store.state.user.name,
  790. functionId: 103001,
  791. serialNumber: '103001Table1RequiredDeliveryDate',
  792. tableId: '103001Table1',
  793. tableName: '打样记录表',
  794. columnProp: 'requiredDeliveryDate',
  795. headerAlign: 'center',
  796. align: 'center',
  797. columnLabel: '打样预计完成日期',
  798. columnHidden: false,
  799. columnImage: false,
  800. columnSortable: false,
  801. sortLv: 0,
  802. status: true,
  803. fixed: '',
  804. columnWidth: 120
  805. },
  806. {
  807. userId: this.$store.state.user.name,
  808. functionId: 103001,
  809. serialNumber: '103001Table1ActualityDeliveryDate',
  810. tableId: '103001Table1',
  811. tableName: '打样记录表',
  812. columnProp: 'actualityDeliveryDate',
  813. headerAlign: 'center',
  814. align: 'center',
  815. columnLabel: '实际完成日期',
  816. columnHidden: false,
  817. columnImage: false,
  818. columnSortable: false,
  819. sortLv: 0,
  820. status: true,
  821. fixed: '',
  822. columnWidth: 80
  823. },
  824. {
  825. userId: this.$store.state.user.name,
  826. functionId: 103001,
  827. serialNumber: '103001Table1CreateDate',
  828. tableId: '103001Table1',
  829. tableName: '打样文档表',
  830. columnProp: 'createDate',
  831. headerAlign: 'center',
  832. align: 'center',
  833. columnLabel: '打样单创建时间',
  834. columnHidden: false,
  835. columnImage: false,
  836. columnSortable: false,
  837. sortLv: 0,
  838. status: true,
  839. fixed: '',
  840. columnWidth: 130
  841. },
  842. {
  843. userId: this.$store.state.user.name,
  844. functionId: 103001,
  845. serialNumber: '103001Table1CreateBy',
  846. tableId: '103001Table1',
  847. tableName: '打样文档表',
  848. columnProp: 'createBy',
  849. headerAlign: 'center',
  850. align: 'center',
  851. columnLabel: '打样单创建人',
  852. columnHidden: false,
  853. columnImage: false,
  854. columnSortable: false,
  855. sortLv: 0,
  856. status: true,
  857. fixed: '',
  858. columnWidth: 90
  859. }
  860. ],
  861. userBuList: [],
  862. projectCategoryList: [
  863. {
  864. projectCategory: 'Low Risk',
  865. },
  866. {
  867. projectCategory: 'High Risk',
  868. },
  869. {
  870. projectCategory: 'Sustaining',
  871. }
  872. ],
  873. statusList: [
  874. {
  875. status: '草稿',
  876. },
  877. {
  878. status: '进行中',
  879. },
  880. {
  881. status: '已量产',
  882. },
  883. {
  884. status: '正式量产',
  885. }
  886. ],
  887. };
  888. },
  889. created() {
  890. // 获取用户的 site 和 bu
  891. this.getSiteAndBuByUserName()
  892. // 校验用户是否收藏
  893. this.favoriteIsOk()
  894. // 动态列
  895. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  896. this.getDataList()
  897. },
  898. activated() {
  899. if (this.$route.query.flag) {
  900. this.getDataList()
  901. }
  902. this.$store.commit("sift/commitSearchFunction",this.queryAllProofing)
  903. },
  904. mounted () {
  905. this.$nextTick(() => {
  906. this.height = window.innerHeight - 200
  907. })
  908. EventBus.$on('updateAllProof', () => {
  909. this.getDataList();
  910. });
  911. },
  912. methods: {
  913. handleColumnResize(newWidth, oldWidth, column, event){
  914. let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
  915. inData.columnWidth=newWidth
  916. updateColumnSize(inData).then(({data}) => {
  917. if (data.code === 0) {
  918. console.log("栏位宽度保存成功!")
  919. }
  920. })
  921. },
  922. // 获取用户的bu
  923. getSiteAndBuByUserName () {
  924. let tempData = {
  925. username: this.$store.state.user.name,
  926. }
  927. getSiteAndBuByUserName(tempData).then(({data}) => {
  928. if (data.code === 0) {
  929. this.userBuList = data.rows
  930. }
  931. })
  932. },
  933. //导出excel
  934. async createExportData() {
  935. this.searchData.limit = -1
  936. this.searchData.page = 1
  937. await searchAllProofing(this.searchData).then(({data}) => {
  938. this.exportList = data.page.list
  939. this.exportList.forEach((item) => {
  940. item.projectManagerName = item.projectManager.split('-')[1];
  941. item.projectOwnerName = item.projectOwner.split('-')[1];
  942. item.engineerName = item.engineer.split('-')[1];
  943. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  944. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  945. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  946. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  947. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== ''){
  948. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  949. }
  950. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== ''){
  951. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  952. }
  953. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== ''){
  954. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  955. }
  956. if (item.docEngineer !== null && item.docEngineer !== ''){
  957. item.docEngineerName = item.docEngineer.split('-')[1];
  958. }
  959. });
  960. for (let i = 0; i < this.exportList.length; i++) {
  961. if (this.exportList[i].responsibleDepartment === 'R001') {
  962. this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
  963. } else if (this.exportList[i].responsibleDepartment === 'R002') {
  964. this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
  965. } else if (this.exportList[i].responsibleDepartment === 'R004') {
  966. this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
  967. } else if (this.exportList[i].responsibleDepartment === 'R005') {
  968. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
  969. } else if (this.exportList[i].responsibleDepartment === 'R007') {
  970. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
  971. } else if (this.exportList[i].responsibleDepartment === 'R008') {
  972. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
  973. } else if (this.exportList[i].responsibleDepartment === 'R009') {
  974. this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
  975. } else if (this.exportList[i].responsibleDepartment === 'R011') {
  976. if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
  977. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
  978. }
  979. } else if (this.exportList[i].responsibleDepartment === 'R012') {
  980. if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
  981. this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
  982. }
  983. } else if (this.exportList[i].responsibleDepartment === 'R013') {
  984. if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
  985. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
  986. }
  987. } else if (this.exportList[i].responsibleDepartment === 'R014') {
  988. if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
  989. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
  990. }
  991. }
  992. }
  993. })
  994. return this.exportList
  995. },
  996. startDownload() {
  997. },
  998. finishDownload() {
  999. },
  1000. fields () {
  1001. let json = "{"
  1002. this.columnProjectAllProofList.forEach((item, index) => {
  1003. if (index == this.columnProjectAllProofList.length - 1) {
  1004. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1005. } else {
  1006. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1007. }
  1008. })
  1009. json += "}"
  1010. let s = eval("(" + json + ")")
  1011. return s
  1012. },
  1013. // 获取数据列表
  1014. getDataList(params) {
  1015. this.selectTypeFlag = params
  1016. this.searchData.limit = this.pageSize;
  1017. this.searchData.page = this.pageIndex;
  1018. searchAllProofing(this.searchData).then(({ data }) => {
  1019. if (data.code === 0) {
  1020. this.dataList = data.page.list;
  1021. this.allPersonnelInfoList = data.rows;
  1022. this.pageIndex = data.page.currPage;
  1023. this.pageSize = data.page.pageSize;
  1024. this.totalPage = data.page.totalCount;
  1025. this.dataList.forEach((item) => {
  1026. item.projectManagerName = item.projectManager.split('-')[1];
  1027. item.projectOwnerName = item.projectOwner.split('-')[1];
  1028. item.engineerName = item.engineer.split('-')[1];
  1029. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  1030. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  1031. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  1032. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  1033. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== ''){
  1034. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  1035. }
  1036. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== ''){
  1037. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  1038. }
  1039. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== ''){
  1040. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  1041. }
  1042. if (item.docEngineer !== null && item.docEngineer !== ''){
  1043. item.docEngineerName = item.docEngineer.split('-')[1];
  1044. }
  1045. });
  1046. for (let i = 0; i < this.dataList.length; i++) {
  1047. if (this.dataList[i].responsibleDepartment === 'R001') {
  1048. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1];
  1049. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1050. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1];
  1051. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1052. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1];
  1053. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1054. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1];
  1055. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1056. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1];
  1057. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1058. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1];
  1059. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1060. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1];
  1061. } else if (this.dataList[i].responsibleDepartment === 'R011') {
  1062. if (this.dataList[i].cQualityEngineer4 !== null && this.dataList[i].cQualityEngineer4 !== '') {
  1063. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1];
  1064. }
  1065. } else if (this.dataList[i].responsibleDepartment === 'R012') {
  1066. if (this.dataList[i].docEngineer !== null && this.dataList[i].docEngineer !== '') {
  1067. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1];
  1068. }
  1069. } else if (this.dataList[i].responsibleDepartment === 'R013') {
  1070. if (this.dataList[i].cQualityEngineer5 !== null && this.dataList[i].cQualityEngineer5 !== '') {
  1071. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1];
  1072. }
  1073. } else if (this.dataList[i].responsibleDepartment === 'R014') {
  1074. if (this.dataList[i].cQualityEngineer6 !== null && this.dataList[i].cQualityEngineer6 !== '') {
  1075. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1];
  1076. }
  1077. }
  1078. }
  1079. this.getAllPersonnelList();
  1080. } else {
  1081. this.$alert(data.msg, '提示', {
  1082. confirmButtonText: '确定',
  1083. callback: action => {
  1084. }
  1085. });
  1086. }
  1087. })
  1088. // else if(this.$route.query.flag === '1') {
  1089. // searchProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1090. // if (data.code === 0) {
  1091. // this.dataList = data.page.list
  1092. // this.pageIndex = data.page.currPage
  1093. // this.pageSize = data.page.pageSize
  1094. // this.totalPage = data.page.totalCount
  1095. // this.dataList.forEach((item) => {
  1096. // item.projectManagerName = item.projectManager.split('-')[1]
  1097. // item.projectOwnerName = item.projectOwner.split('-')[1]
  1098. // item.engineerName = item.engineer.split('-')[1]
  1099. // item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1100. // item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1101. // item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1102. // item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1103. // })
  1104. // for (let i = 0; i < this.dataList.length; i++) {
  1105. // if (this.dataList[i].responsibleDepartment === 'R001'){
  1106. // this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1107. // } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1108. // this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1109. // } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1110. // this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1111. // } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1112. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1113. // } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1114. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1115. // } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1116. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1117. // } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1118. // this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1119. // }
  1120. // }
  1121. // }
  1122. // })
  1123. // }else {
  1124. // searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1125. // if (data.code === 0) {
  1126. // this.allDataList = data.list
  1127. // let pjmList = []
  1128. // // 遍历data.page.list
  1129. // data.list.forEach((item) => {
  1130. // if (!pjmList.includes(item.projectOwner.split('-')[0])) {
  1131. // pjmList.push(item.projectOwner.split('-')[0])
  1132. // }
  1133. // })
  1134. // if (pjmList.includes(this.$store.state.user.name)){
  1135. // this.warnFlag = true
  1136. // this.dataList = data.page.list
  1137. // this.pageIndex = data.page.currPage
  1138. // this.pageSize = data.page.pageSize
  1139. // this.totalPage = data.page.totalCount
  1140. // this.dataList.forEach((item) => {
  1141. // item.projectManagerName = item.projectManager.split('-')[1]
  1142. // item.projectOwnerName = item.projectOwner.split('-')[1]
  1143. // item.engineerName = item.engineer.split('-')[1]
  1144. // item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1145. // item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1146. // item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1147. // item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1148. // })
  1149. // for (let i = 0; i < this.dataList.length; i++) {
  1150. // if (this.dataList[i].responsibleDepartment === 'R001') {
  1151. // this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1152. // } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1153. // this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1154. // } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1155. // this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1156. // } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1157. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1158. // } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1159. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1160. // } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1161. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1162. // } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1163. // this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1164. // }
  1165. // }
  1166. // } else {
  1167. // this.$route.query.flag = '1'
  1168. // }
  1169. // }
  1170. // })
  1171. // }
  1172. },
  1173. queryAllProofing(params) {
  1174. this.selectTypeFlag = params
  1175. this.searchData.limit = this.pageSize
  1176. this.searchData.page = this.pageIndex
  1177. if (params !== null && params !== undefined) {
  1178. params.limit = this.pageSize
  1179. params.page = this.pageIndex
  1180. params.site = this.$store.state.user.site
  1181. params.userName = this.$store.state.user.name
  1182. } else {
  1183. params = this.searchData
  1184. }
  1185. queryAllProofing(params).then(({data}) => {
  1186. if (data.code === 0) {
  1187. this.dataList = data.page.list;
  1188. this.pageIndex = data.page.currPage;
  1189. this.pageSize = data.page.pageSize;
  1190. this.totalPage = data.page.totalCount;
  1191. this.dataList.forEach((item) => {
  1192. item.projectManagerName = item.projectManager.split('-')[1];
  1193. item.projectOwnerName = item.projectOwner.split('-')[1];
  1194. item.engineerName = item.engineer.split('-')[1];
  1195. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  1196. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  1197. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  1198. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  1199. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
  1200. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  1201. }
  1202. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
  1203. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  1204. }
  1205. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
  1206. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  1207. }
  1208. if (item.docEngineer !== null && item.docEngineer !== '') {
  1209. item.docEngineerName = item.docEngineer.split('-')[1];
  1210. }
  1211. });
  1212. for (let i = 0; i < this.dataList.length; i++) {
  1213. if (this.dataList[i].responsibleDepartment === 'R001') {
  1214. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1];
  1215. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1216. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1];
  1217. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1218. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1];
  1219. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1220. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1];
  1221. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1222. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1];
  1223. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1224. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1];
  1225. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1226. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1];
  1227. } else if (this.dataList[i].responsibleDepartment === 'R011') {
  1228. if (this.dataList[i].cQualityEngineer4 !== null && this.dataList[i].cQualityEngineer4 !== '') {
  1229. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1];
  1230. }
  1231. } else if (this.dataList[i].responsibleDepartment === 'R012') {
  1232. if (this.dataList[i].docEngineer !== null && this.dataList[i].docEngineer !== '') {
  1233. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1];
  1234. }
  1235. } else if (this.dataList[i].responsibleDepartment === 'R013') {
  1236. if (this.dataList[i].cQualityEngineer5 !== null && this.dataList[i].cQualityEngineer5 !== '') {
  1237. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1];
  1238. }
  1239. } else if (this.dataList[i].responsibleDepartment === 'R014') {
  1240. if (this.dataList[i].cQualityEngineer6 !== null && this.dataList[i].cQualityEngineer6 !== '') {
  1241. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1];
  1242. }
  1243. }
  1244. }
  1245. this.getAllPersonnelList();
  1246. } else {
  1247. this.$alert(data.msg, '提示', {
  1248. confirmButtonText: '确定',
  1249. callback: action => {
  1250. }
  1251. });
  1252. }
  1253. })
  1254. },
  1255. getAllPersonnelList() {
  1256. let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
  1257. // 找出所有的同时过滤出唯一的 project owners, managers, and engineers
  1258. const allPersonnelList = [];
  1259. const projectOwnersMap = new Map();
  1260. const projectManagersMap = new Map();
  1261. const engineersMap = new Map();
  1262. allPersonnelInfoDataList.forEach((item) => {
  1263. // Handle project owners
  1264. if (!projectOwnersMap.has(item.projectOwner)) {
  1265. const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
  1266. projectOwnersMap.set(item.projectOwner, {
  1267. projectOwnerId,
  1268. projectOwner: item.projectOwner,
  1269. projectOwnerName: item.projectOwner.split('-')[1]
  1270. });
  1271. allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
  1272. }
  1273. // Handle project managers
  1274. if (!projectManagersMap.has(item.projectManager)) {
  1275. const projectManagerId = projectManagersMap.size + 1;
  1276. projectManagersMap.set(item.projectManager, {
  1277. projectManagerId,
  1278. projectManager: item.projectManager,
  1279. projectManagerName: item.projectManager.split('-')[1]
  1280. });
  1281. allPersonnelList.push(projectManagersMap.get(item.projectManager));
  1282. }
  1283. // Handle engineers
  1284. if (!engineersMap.has(item.engineer)) {
  1285. const engineerId = engineersMap.size + 1;
  1286. engineersMap.set(item.engineer, {
  1287. engineerId,
  1288. engineer: item.engineer,
  1289. engineerName: item.engineer.split('-')[1]
  1290. });
  1291. allPersonnelList.push(engineersMap.get(item.engineer));
  1292. }
  1293. });
  1294. this.allPersonnelInfoList = allPersonnelList;
  1295. },
  1296. warnSendMail(row) {
  1297. this.$confirm('确认发送提醒?', '提示', {
  1298. confirmButtonText: '确定',
  1299. cancelButtonText: '取消',
  1300. type: 'warning'
  1301. }).then(() => {
  1302. warnSendMailHandle(row).then(({data}) => {
  1303. if (data && data.code === 0) {
  1304. this.$message({
  1305. message: '发送成功',
  1306. type: 'success'
  1307. })
  1308. } else {
  1309. this.$alert(data.msg, '错误', {
  1310. confirmButtonText: '确定'
  1311. })
  1312. }
  1313. })
  1314. }).catch(() => {
  1315. this.$message({
  1316. type: 'info',
  1317. message: '已取消发送'
  1318. });
  1319. });
  1320. },
  1321. // 每页数
  1322. sizeChangeHandle (val) {
  1323. this.pageSize = val
  1324. this.pageIndex = 1
  1325. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  1326. this.queryAllProofing(this.selectTypeFlag)
  1327. } else {
  1328. this.getDataList()
  1329. }
  1330. },
  1331. // 当前页
  1332. currentChangeHandle (val) {
  1333. this.pageIndex = val
  1334. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  1335. this.queryAllProofing(this.selectTypeFlag)
  1336. } else {
  1337. this.getDataList()
  1338. }
  1339. },
  1340. projectAllProofClickRow (row) {
  1341. this.projectAllProofCurrentRow = JSON.parse(JSON.stringify(row))
  1342. },
  1343. toMes (row) {
  1344. this.$router.push({ path: 'eam-eamProjectPartInfo', query: { projectNo: row.projectNo , testPartNo:row.testPartNo}})
  1345. },
  1346. /**
  1347. * 上传文件
  1348. */
  1349. uploadFile (row) {
  1350. this.isEditable = false;
  1351. this.fileList = []
  1352. if (row.documentId === null || row.documentId === undefined || row.documentId === '') {
  1353. this.projectAllProofClickRow.proofingId= -1
  1354. this.projectAllProofClickRow.proofingNo = '*'
  1355. this.isMassProductionStage = true
  1356. this.folder = 'projectPMPDocumentFiles'
  1357. } else {
  1358. this.isMassProductionStage = false
  1359. this.folder = 'projectPPDocumentFiles'
  1360. }
  1361. this.getProofDocument(row)
  1362. this.uploadDialog = true
  1363. //打开组件 去做新增业务
  1364. // this.$nextTick(() => {
  1365. // this.$refs.partUploadFile.init(currentData);
  1366. // })
  1367. },
  1368. getProofDocument (row) {
  1369. let tempData = {
  1370. site: this.$store.state.user.site,
  1371. buNo: row.buNo,
  1372. projectId: row.projectId,
  1373. projectPartId: row.projectPartId,
  1374. proofingId: row.proofingId,
  1375. userId: this.$store.state.user.id,
  1376. languageCode: this.$i18n.locale
  1377. }
  1378. getProofDocument(tempData).then(({data}) => {
  1379. if (data && data.code === 0) {
  1380. this.projectPartDocumentList = data.page.list
  1381. for (let i = 0; i < this.projectPartDocumentList.length; i++) {
  1382. this.projectPartDocumentList[i].buNo = this.tempData.buNo
  1383. }
  1384. }
  1385. })
  1386. },
  1387. formatDate(row, column) {
  1388. // row 是当前行的数据对象
  1389. // column 是当前列的属性信息对象
  1390. const date = row[column.property];
  1391. if (date) {
  1392. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  1393. return s.replace(/\//g, '-')
  1394. } else {
  1395. return '';
  1396. }
  1397. },
  1398. rowStyle ({row}) {
  1399. },
  1400. getCombinedDocumentType(row) {
  1401. // 根据您的需求,组合或拼接需要显示的字段
  1402. if (row.documentType === null || row.documentType === undefined) {
  1403. return row.documentDesc
  1404. }else {
  1405. return row.documentType
  1406. }
  1407. },
  1408. // 校验用户是否收藏
  1409. favoriteIsOk () {
  1410. let userFavorite = {
  1411. userId: this.$store.state.user.id,
  1412. languageCode: this.$i18n.locale
  1413. }
  1414. userFavoriteList(userFavorite).then(({data}) => {
  1415. for (let i = 0; i < data.list.length; i++) {
  1416. if (this.$route.meta.menuId === data.list[i].menuId) {
  1417. this.favorite = true
  1418. }
  1419. }
  1420. })
  1421. },
  1422. // 收藏 OR 取消收藏
  1423. favoriteFunction () {
  1424. let userFavorite = {
  1425. userId: this.$store.state.user.id,
  1426. functionId: this.$route.meta.menuId,
  1427. }
  1428. if (this.favorite) {
  1429. removeUserFavorite(userFavorite).then(({data}) => {
  1430. this.$message.success(data.msg)
  1431. this.favorite = false
  1432. })
  1433. } else {
  1434. // 收藏
  1435. saveUserFavorite(userFavorite).then(({data}) => {
  1436. this.$message.success(data.msg)
  1437. this.favorite = true
  1438. })
  1439. }
  1440. },
  1441. // 动态列开始 获取 用户保存的 格式列
  1442. async getTableUserColumn(tableId, columnId) {
  1443. let queryTableUser = {
  1444. userId: this.$store.state.user.name,
  1445. functionId: this.$route.meta.menuId,
  1446. tableId: tableId,
  1447. status: true,
  1448. languageCode: this.$i18n.locale
  1449. }
  1450. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1451. if (data.rows.length > 0) {
  1452. //this.columnList1 = []
  1453. switch (columnId) {
  1454. case 1:
  1455. this.columnProjectAllProofList = data.rows
  1456. break;
  1457. // case 2:
  1458. // this.detailColumnList = data.rows
  1459. // break;
  1460. // case 3:
  1461. // this.columnList2 = data.rows
  1462. // break;
  1463. // case 4:
  1464. // this.columnList3 = data.rows
  1465. // break;
  1466. }
  1467. } else {
  1468. this.getColumnList(tableId, columnId)
  1469. }
  1470. })
  1471. },
  1472. // 获取 tableDefault 列
  1473. async getColumnList (tableId, columnId) {
  1474. let queryTable= {
  1475. functionId: this.$route.meta.menuId,
  1476. tableId: tableId,
  1477. languageCode: this.$i18n.locale
  1478. }
  1479. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1480. if (!data.rows.length == 0) {
  1481. switch (columnId) {
  1482. case 1:
  1483. this.columnProjectAllProofList = data.rows
  1484. break;
  1485. // case 2:
  1486. // this.detailColumnList = data.rows
  1487. // break;
  1488. // case 3:
  1489. // this.columnList2 = data.rows
  1490. // break;
  1491. // case 4:
  1492. // this.columnList3 = data.rows
  1493. // break;
  1494. }
  1495. } else {
  1496. // this.showDefault = true.
  1497. }
  1498. })
  1499. },
  1500. //获取按钮的权限数据
  1501. getButtonAuthData () {
  1502. let searchFlag = this.isAuth(this.menuId+":search")
  1503. let saveFlag = this.isAuth(this.menuId+":save")
  1504. let updateFlag = this.isAuth(this.menuId+":update")
  1505. let deleteFlag = this.isAuth(this.menuId+":delete")
  1506. //处理页面的权限数据
  1507. this.authSearch = !searchFlag
  1508. this.authSave = !saveFlag
  1509. this.authUpdate = !updateFlag
  1510. this.authDelete = !deleteFlag
  1511. },
  1512. },
  1513. };
  1514. </script>
  1515. <style scoped>
  1516. .card-item {
  1517. cursor: pointer;
  1518. margin-bottom: 20px;
  1519. transition: transform 0.3s, box-shadow 0.3s;
  1520. overflow: hidden;
  1521. //padding: 10px;
  1522. display: flex;
  1523. flex-direction: column;
  1524. justify-content: space-between;
  1525. align-items: center;
  1526. height: 208px;
  1527. width: 230px;
  1528. margin-left: 40px;
  1529. margin-top: 10px;
  1530. }
  1531. .card-item:hover {
  1532. transform: translateY(-5px);
  1533. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  1534. }
  1535. .card-title {
  1536. font-size: 18px;
  1537. font-weight: bold;
  1538. margin-bottom: 10px;
  1539. margin-top: 20px;
  1540. }
  1541. .card-count {
  1542. font-size: 55px;
  1543. color: #17B3A3;
  1544. text-align: center;
  1545. font-weight: bold;
  1546. margin-top: 50px;
  1547. }
  1548. .project-list {
  1549. font-size: 12px;
  1550. color: #333;
  1551. line-height: 1.5;
  1552. margin-bottom: 5px;
  1553. }
  1554. .el-divider {
  1555. margin: 10px 0;
  1556. }
  1557. </style>