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.

1592 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} 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. // 获取用户的bu
  914. getSiteAndBuByUserName () {
  915. let tempData = {
  916. username: this.$store.state.user.name,
  917. }
  918. getSiteAndBuByUserName(tempData).then(({data}) => {
  919. if (data.code === 0) {
  920. this.userBuList = data.rows
  921. }
  922. })
  923. },
  924. //导出excel
  925. async createExportData() {
  926. this.searchData.limit = -1
  927. this.searchData.page = 1
  928. await searchAllProofing(this.searchData).then(({data}) => {
  929. this.exportList = data.page.list
  930. this.exportList.forEach((item) => {
  931. item.projectManagerName = item.projectManager.split('-')[1];
  932. item.projectOwnerName = item.projectOwner.split('-')[1];
  933. item.engineerName = item.engineer.split('-')[1];
  934. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  935. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  936. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  937. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  938. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== ''){
  939. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  940. }
  941. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== ''){
  942. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  943. }
  944. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== ''){
  945. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  946. }
  947. if (item.docEngineer !== null && item.docEngineer !== ''){
  948. item.docEngineerName = item.docEngineer.split('-')[1];
  949. }
  950. });
  951. for (let i = 0; i < this.exportList.length; i++) {
  952. if (this.exportList[i].responsibleDepartment === 'R001') {
  953. this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
  954. } else if (this.exportList[i].responsibleDepartment === 'R002') {
  955. this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
  956. } else if (this.exportList[i].responsibleDepartment === 'R004') {
  957. this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
  958. } else if (this.exportList[i].responsibleDepartment === 'R005') {
  959. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
  960. } else if (this.exportList[i].responsibleDepartment === 'R007') {
  961. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
  962. } else if (this.exportList[i].responsibleDepartment === 'R008') {
  963. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
  964. } else if (this.exportList[i].responsibleDepartment === 'R009') {
  965. this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
  966. } else if (this.exportList[i].responsibleDepartment === 'R011') {
  967. if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
  968. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
  969. }
  970. } else if (this.exportList[i].responsibleDepartment === 'R012') {
  971. if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
  972. this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
  973. }
  974. } else if (this.exportList[i].responsibleDepartment === 'R013') {
  975. if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
  976. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
  977. }
  978. } else if (this.exportList[i].responsibleDepartment === 'R014') {
  979. if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
  980. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
  981. }
  982. }
  983. }
  984. })
  985. return this.exportList
  986. },
  987. startDownload() {
  988. },
  989. finishDownload() {
  990. },
  991. fields () {
  992. let json = "{"
  993. this.columnProjectAllProofList.forEach((item, index) => {
  994. if (index == this.columnProjectAllProofList.length - 1) {
  995. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  996. } else {
  997. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  998. }
  999. })
  1000. json += "}"
  1001. let s = eval("(" + json + ")")
  1002. return s
  1003. },
  1004. // 获取数据列表
  1005. getDataList(params) {
  1006. this.selectTypeFlag = params
  1007. this.searchData.limit = this.pageSize;
  1008. this.searchData.page = this.pageIndex;
  1009. searchAllProofing(this.searchData).then(({ data }) => {
  1010. if (data.code === 0) {
  1011. this.dataList = data.page.list;
  1012. this.allPersonnelInfoList = data.rows;
  1013. this.pageIndex = data.page.currPage;
  1014. this.pageSize = data.page.pageSize;
  1015. this.totalPage = data.page.totalCount;
  1016. this.dataList.forEach((item) => {
  1017. item.projectManagerName = item.projectManager.split('-')[1];
  1018. item.projectOwnerName = item.projectOwner.split('-')[1];
  1019. item.engineerName = item.engineer.split('-')[1];
  1020. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  1021. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  1022. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  1023. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  1024. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== ''){
  1025. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  1026. }
  1027. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== ''){
  1028. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  1029. }
  1030. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== ''){
  1031. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  1032. }
  1033. if (item.docEngineer !== null && item.docEngineer !== ''){
  1034. item.docEngineerName = item.docEngineer.split('-')[1];
  1035. }
  1036. });
  1037. for (let i = 0; i < this.dataList.length; i++) {
  1038. if (this.dataList[i].responsibleDepartment === 'R001') {
  1039. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1];
  1040. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1041. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1];
  1042. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1043. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1];
  1044. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1045. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1];
  1046. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1047. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1];
  1048. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1049. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1];
  1050. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1051. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1];
  1052. } else if (this.dataList[i].responsibleDepartment === 'R011') {
  1053. if (this.dataList[i].cQualityEngineer4 !== null && this.dataList[i].cQualityEngineer4 !== '') {
  1054. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1];
  1055. }
  1056. } else if (this.dataList[i].responsibleDepartment === 'R012') {
  1057. if (this.dataList[i].docEngineer !== null && this.dataList[i].docEngineer !== '') {
  1058. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1];
  1059. }
  1060. } else if (this.dataList[i].responsibleDepartment === 'R013') {
  1061. if (this.dataList[i].cQualityEngineer5 !== null && this.dataList[i].cQualityEngineer5 !== '') {
  1062. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1];
  1063. }
  1064. } else if (this.dataList[i].responsibleDepartment === 'R014') {
  1065. if (this.dataList[i].cQualityEngineer6 !== null && this.dataList[i].cQualityEngineer6 !== '') {
  1066. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1];
  1067. }
  1068. }
  1069. }
  1070. this.getAllPersonnelList();
  1071. } else {
  1072. this.$alert(data.msg, '提示', {
  1073. confirmButtonText: '确定',
  1074. callback: action => {
  1075. }
  1076. });
  1077. }
  1078. })
  1079. // else if(this.$route.query.flag === '1') {
  1080. // searchProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1081. // if (data.code === 0) {
  1082. // this.dataList = data.page.list
  1083. // this.pageIndex = data.page.currPage
  1084. // this.pageSize = data.page.pageSize
  1085. // this.totalPage = data.page.totalCount
  1086. // this.dataList.forEach((item) => {
  1087. // item.projectManagerName = item.projectManager.split('-')[1]
  1088. // item.projectOwnerName = item.projectOwner.split('-')[1]
  1089. // item.engineerName = item.engineer.split('-')[1]
  1090. // item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1091. // item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1092. // item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1093. // item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1094. // })
  1095. // for (let i = 0; i < this.dataList.length; i++) {
  1096. // if (this.dataList[i].responsibleDepartment === 'R001'){
  1097. // this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1098. // } else if(this.dataList[i].responsibleDepartment === 'R002'){
  1099. // this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1100. // } else if(this.dataList[i].responsibleDepartment === 'R004'){
  1101. // this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1102. // } else if(this.dataList[i].responsibleDepartment === 'R005'){
  1103. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1104. // } else if(this.dataList[i].responsibleDepartment === 'R007'){
  1105. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1106. // } else if(this.dataList[i].responsibleDepartment === 'R008'){
  1107. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1108. // } else if(this.dataList[i].responsibleDepartment === 'R009'){
  1109. // this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1110. // }
  1111. // }
  1112. // }
  1113. // })
  1114. // }else {
  1115. // searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
  1116. // if (data.code === 0) {
  1117. // this.allDataList = data.list
  1118. // let pjmList = []
  1119. // // 遍历data.page.list
  1120. // data.list.forEach((item) => {
  1121. // if (!pjmList.includes(item.projectOwner.split('-')[0])) {
  1122. // pjmList.push(item.projectOwner.split('-')[0])
  1123. // }
  1124. // })
  1125. // if (pjmList.includes(this.$store.state.user.name)){
  1126. // this.warnFlag = true
  1127. // this.dataList = data.page.list
  1128. // this.pageIndex = data.page.currPage
  1129. // this.pageSize = data.page.pageSize
  1130. // this.totalPage = data.page.totalCount
  1131. // this.dataList.forEach((item) => {
  1132. // item.projectManagerName = item.projectManager.split('-')[1]
  1133. // item.projectOwnerName = item.projectOwner.split('-')[1]
  1134. // item.engineerName = item.engineer.split('-')[1]
  1135. // item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  1136. // item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  1137. // item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  1138. // item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  1139. // })
  1140. // for (let i = 0; i < this.dataList.length; i++) {
  1141. // if (this.dataList[i].responsibleDepartment === 'R001') {
  1142. // this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1]
  1143. // } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1144. // this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1]
  1145. // } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1146. // this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1]
  1147. // } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1148. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1]
  1149. // } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1150. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1]
  1151. // } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1152. // this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1]
  1153. // } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1154. // this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1]
  1155. // }
  1156. // }
  1157. // } else {
  1158. // this.$route.query.flag = '1'
  1159. // }
  1160. // }
  1161. // })
  1162. // }
  1163. },
  1164. queryAllProofing(params) {
  1165. this.selectTypeFlag = params
  1166. this.searchData.limit = this.pageSize
  1167. this.searchData.page = this.pageIndex
  1168. if (params !== null && params !== undefined) {
  1169. params.limit = this.pageSize
  1170. params.page = this.pageIndex
  1171. params.site = this.$store.state.user.site
  1172. params.userName = this.$store.state.user.name
  1173. } else {
  1174. params = this.searchData
  1175. }
  1176. queryAllProofing(params).then(({data}) => {
  1177. if (data.code === 0) {
  1178. this.dataList = data.page.list;
  1179. this.pageIndex = data.page.currPage;
  1180. this.pageSize = data.page.pageSize;
  1181. this.totalPage = data.page.totalCount;
  1182. this.dataList.forEach((item) => {
  1183. item.projectManagerName = item.projectManager.split('-')[1];
  1184. item.projectOwnerName = item.projectOwner.split('-')[1];
  1185. item.engineerName = item.engineer.split('-')[1];
  1186. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  1187. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  1188. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  1189. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  1190. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
  1191. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  1192. }
  1193. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
  1194. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  1195. }
  1196. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
  1197. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  1198. }
  1199. if (item.docEngineer !== null && item.docEngineer !== '') {
  1200. item.docEngineerName = item.docEngineer.split('-')[1];
  1201. }
  1202. });
  1203. for (let i = 0; i < this.dataList.length; i++) {
  1204. if (this.dataList[i].responsibleDepartment === 'R001') {
  1205. this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1];
  1206. } else if (this.dataList[i].responsibleDepartment === 'R002') {
  1207. this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1];
  1208. } else if (this.dataList[i].responsibleDepartment === 'R004') {
  1209. this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1];
  1210. } else if (this.dataList[i].responsibleDepartment === 'R005') {
  1211. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1];
  1212. } else if (this.dataList[i].responsibleDepartment === 'R007') {
  1213. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1];
  1214. } else if (this.dataList[i].responsibleDepartment === 'R008') {
  1215. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1];
  1216. } else if (this.dataList[i].responsibleDepartment === 'R009') {
  1217. this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1];
  1218. } else if (this.dataList[i].responsibleDepartment === 'R011') {
  1219. if (this.dataList[i].cQualityEngineer4 !== null && this.dataList[i].cQualityEngineer4 !== '') {
  1220. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1];
  1221. }
  1222. } else if (this.dataList[i].responsibleDepartment === 'R012') {
  1223. if (this.dataList[i].docEngineer !== null && this.dataList[i].docEngineer !== '') {
  1224. this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1];
  1225. }
  1226. } else if (this.dataList[i].responsibleDepartment === 'R013') {
  1227. if (this.dataList[i].cQualityEngineer5 !== null && this.dataList[i].cQualityEngineer5 !== '') {
  1228. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1];
  1229. }
  1230. } else if (this.dataList[i].responsibleDepartment === 'R014') {
  1231. if (this.dataList[i].cQualityEngineer6 !== null && this.dataList[i].cQualityEngineer6 !== '') {
  1232. this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1];
  1233. }
  1234. }
  1235. }
  1236. this.getAllPersonnelList();
  1237. } else {
  1238. this.$alert(data.msg, '提示', {
  1239. confirmButtonText: '确定',
  1240. callback: action => {
  1241. }
  1242. });
  1243. }
  1244. })
  1245. },
  1246. getAllPersonnelList() {
  1247. let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
  1248. // 找出所有的同时过滤出唯一的 project owners, managers, and engineers
  1249. const allPersonnelList = [];
  1250. const projectOwnersMap = new Map();
  1251. const projectManagersMap = new Map();
  1252. const engineersMap = new Map();
  1253. allPersonnelInfoDataList.forEach((item) => {
  1254. // Handle project owners
  1255. if (!projectOwnersMap.has(item.projectOwner)) {
  1256. const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
  1257. projectOwnersMap.set(item.projectOwner, {
  1258. projectOwnerId,
  1259. projectOwner: item.projectOwner,
  1260. projectOwnerName: item.projectOwner.split('-')[1]
  1261. });
  1262. allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
  1263. }
  1264. // Handle project managers
  1265. if (!projectManagersMap.has(item.projectManager)) {
  1266. const projectManagerId = projectManagersMap.size + 1;
  1267. projectManagersMap.set(item.projectManager, {
  1268. projectManagerId,
  1269. projectManager: item.projectManager,
  1270. projectManagerName: item.projectManager.split('-')[1]
  1271. });
  1272. allPersonnelList.push(projectManagersMap.get(item.projectManager));
  1273. }
  1274. // Handle engineers
  1275. if (!engineersMap.has(item.engineer)) {
  1276. const engineerId = engineersMap.size + 1;
  1277. engineersMap.set(item.engineer, {
  1278. engineerId,
  1279. engineer: item.engineer,
  1280. engineerName: item.engineer.split('-')[1]
  1281. });
  1282. allPersonnelList.push(engineersMap.get(item.engineer));
  1283. }
  1284. });
  1285. this.allPersonnelInfoList = allPersonnelList;
  1286. },
  1287. warnSendMail(row) {
  1288. this.$confirm('确认发送提醒?', '提示', {
  1289. confirmButtonText: '确定',
  1290. cancelButtonText: '取消',
  1291. type: 'warning'
  1292. }).then(() => {
  1293. warnSendMailHandle(row).then(({data}) => {
  1294. if (data && data.code === 0) {
  1295. this.$message({
  1296. message: '发送成功',
  1297. type: 'success'
  1298. })
  1299. } else {
  1300. this.$alert(data.msg, '错误', {
  1301. confirmButtonText: '确定'
  1302. })
  1303. }
  1304. })
  1305. }).catch(() => {
  1306. this.$message({
  1307. type: 'info',
  1308. message: '已取消发送'
  1309. });
  1310. });
  1311. },
  1312. // 每页数
  1313. sizeChangeHandle (val) {
  1314. this.pageSize = val
  1315. this.pageIndex = 1
  1316. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  1317. this.queryAllProofing(this.selectTypeFlag)
  1318. } else {
  1319. this.getDataList()
  1320. }
  1321. },
  1322. // 当前页
  1323. currentChangeHandle (val) {
  1324. this.pageIndex = val
  1325. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  1326. this.queryAllProofing(this.selectTypeFlag)
  1327. } else {
  1328. this.getDataList()
  1329. }
  1330. },
  1331. projectAllProofClickRow (row) {
  1332. this.projectAllProofCurrentRow = JSON.parse(JSON.stringify(row))
  1333. },
  1334. toMes (row) {
  1335. this.$router.push({ path: 'eam-eamProjectPartInfo', query: { projectNo: row.projectNo , testPartNo:row.testPartNo}})
  1336. },
  1337. /**
  1338. * 上传文件
  1339. */
  1340. uploadFile (row) {
  1341. this.isEditable = false;
  1342. this.fileList = []
  1343. if (row.documentId === null || row.documentId === undefined || row.documentId === '') {
  1344. this.projectAllProofClickRow.proofingId= -1
  1345. this.projectAllProofClickRow.proofingNo = '*'
  1346. this.isMassProductionStage = true
  1347. this.folder = 'projectPMPDocumentFiles'
  1348. } else {
  1349. this.isMassProductionStage = false
  1350. this.folder = 'projectPPDocumentFiles'
  1351. }
  1352. this.getProofDocument(row)
  1353. this.uploadDialog = true
  1354. //打开组件 去做新增业务
  1355. // this.$nextTick(() => {
  1356. // this.$refs.partUploadFile.init(currentData);
  1357. // })
  1358. },
  1359. getProofDocument (row) {
  1360. let tempData = {
  1361. site: this.$store.state.user.site,
  1362. buNo: row.buNo,
  1363. projectId: row.projectId,
  1364. projectPartId: row.projectPartId,
  1365. proofingId: row.proofingId,
  1366. userId: this.$store.state.user.id,
  1367. languageCode: this.$i18n.locale
  1368. }
  1369. getProofDocument(tempData).then(({data}) => {
  1370. if (data && data.code === 0) {
  1371. this.projectPartDocumentList = data.page.list
  1372. for (let i = 0; i < this.projectPartDocumentList.length; i++) {
  1373. this.projectPartDocumentList[i].buNo = this.tempData.buNo
  1374. }
  1375. }
  1376. })
  1377. },
  1378. formatDate(row, column) {
  1379. // row 是当前行的数据对象
  1380. // column 是当前列的属性信息对象
  1381. const date = row[column.property];
  1382. if (date) {
  1383. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  1384. return s.replace(/\//g, '-')
  1385. } else {
  1386. return '';
  1387. }
  1388. },
  1389. rowStyle ({row}) {
  1390. },
  1391. getCombinedDocumentType(row) {
  1392. // 根据您的需求,组合或拼接需要显示的字段
  1393. if (row.documentType === null || row.documentType === undefined) {
  1394. return row.documentDesc
  1395. }else {
  1396. return row.documentType
  1397. }
  1398. },
  1399. // 校验用户是否收藏
  1400. favoriteIsOk () {
  1401. let userFavorite = {
  1402. userId: this.$store.state.user.id,
  1403. languageCode: this.$i18n.locale
  1404. }
  1405. userFavoriteList(userFavorite).then(({data}) => {
  1406. for (let i = 0; i < data.list.length; i++) {
  1407. if (this.$route.meta.menuId === data.list[i].menuId) {
  1408. this.favorite = true
  1409. }
  1410. }
  1411. })
  1412. },
  1413. // 收藏 OR 取消收藏
  1414. favoriteFunction () {
  1415. let userFavorite = {
  1416. userId: this.$store.state.user.id,
  1417. functionId: this.$route.meta.menuId,
  1418. }
  1419. if (this.favorite) {
  1420. removeUserFavorite(userFavorite).then(({data}) => {
  1421. this.$message.success(data.msg)
  1422. this.favorite = false
  1423. })
  1424. } else {
  1425. // 收藏
  1426. saveUserFavorite(userFavorite).then(({data}) => {
  1427. this.$message.success(data.msg)
  1428. this.favorite = true
  1429. })
  1430. }
  1431. },
  1432. // 动态列开始 获取 用户保存的 格式列
  1433. async getTableUserColumn(tableId, columnId) {
  1434. let queryTableUser = {
  1435. userId: this.$store.state.user.name,
  1436. functionId: this.$route.meta.menuId,
  1437. tableId: tableId,
  1438. status: true,
  1439. languageCode: this.$i18n.locale
  1440. }
  1441. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1442. if (data.rows.length > 0) {
  1443. //this.columnList1 = []
  1444. switch (columnId) {
  1445. case 1:
  1446. this.columnProjectAllProofList = data.rows
  1447. break;
  1448. // case 2:
  1449. // this.detailColumnList = data.rows
  1450. // break;
  1451. // case 3:
  1452. // this.columnList2 = data.rows
  1453. // break;
  1454. // case 4:
  1455. // this.columnList3 = data.rows
  1456. // break;
  1457. }
  1458. } else {
  1459. this.getColumnList(tableId, columnId)
  1460. }
  1461. })
  1462. },
  1463. // 获取 tableDefault 列
  1464. async getColumnList (tableId, columnId) {
  1465. let queryTable= {
  1466. functionId: this.$route.meta.menuId,
  1467. tableId: tableId,
  1468. languageCode: this.$i18n.locale
  1469. }
  1470. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1471. if (!data.rows.length == 0) {
  1472. switch (columnId) {
  1473. case 1:
  1474. this.columnProjectAllProofList = data.rows
  1475. break;
  1476. // case 2:
  1477. // this.detailColumnList = data.rows
  1478. // break;
  1479. // case 3:
  1480. // this.columnList2 = data.rows
  1481. // break;
  1482. // case 4:
  1483. // this.columnList3 = data.rows
  1484. // break;
  1485. }
  1486. } else {
  1487. // this.showDefault = true.
  1488. }
  1489. })
  1490. },
  1491. //获取按钮的权限数据
  1492. getButtonAuthData () {
  1493. let searchFlag = this.isAuth(this.menuId+":search")
  1494. let saveFlag = this.isAuth(this.menuId+":save")
  1495. let updateFlag = this.isAuth(this.menuId+":update")
  1496. let deleteFlag = this.isAuth(this.menuId+":delete")
  1497. //处理页面的权限数据
  1498. this.authSearch = !searchFlag
  1499. this.authSave = !saveFlag
  1500. this.authUpdate = !updateFlag
  1501. this.authDelete = !deleteFlag
  1502. },
  1503. },
  1504. };
  1505. </script>
  1506. <style scoped>
  1507. .card-item {
  1508. cursor: pointer;
  1509. margin-bottom: 20px;
  1510. transition: transform 0.3s, box-shadow 0.3s;
  1511. overflow: hidden;
  1512. //padding: 10px;
  1513. display: flex;
  1514. flex-direction: column;
  1515. justify-content: space-between;
  1516. align-items: center;
  1517. height: 208px;
  1518. width: 230px;
  1519. margin-left: 40px;
  1520. margin-top: 10px;
  1521. }
  1522. .card-item:hover {
  1523. transform: translateY(-5px);
  1524. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  1525. }
  1526. .card-title {
  1527. font-size: 18px;
  1528. font-weight: bold;
  1529. margin-bottom: 10px;
  1530. margin-top: 20px;
  1531. }
  1532. .card-count {
  1533. font-size: 55px;
  1534. color: #17B3A3;
  1535. text-align: center;
  1536. font-weight: bold;
  1537. margin-top: 50px;
  1538. }
  1539. .project-list {
  1540. font-size: 12px;
  1541. color: #333;
  1542. line-height: 1.5;
  1543. margin-bottom: 5px;
  1544. }
  1545. .el-divider {
  1546. margin: 10px 0;
  1547. }
  1548. </style>