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

1002 lines
33 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'BU'">
  5. <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 100px">
  6. <el-option
  7. v-for = "i in buList"
  8. :key = "i.buNo"
  9. :label = "i.buNo"
  10. :value = "i.buNo">
  11. </el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item :label="'项目编号'">
  15. <el-input v-model="searchData.projectId" clearable style="width: 160px"></el-input>
  16. </el-form-item>
  17. <el-form-item label="物料编码">
  18. <el-input v-model="searchData.testPartNo" clearable style="width: 160px"></el-input>
  19. </el-form-item>
  20. <el-form-item label="客户料号">
  21. <el-input v-model="searchData.customerPartNo" clearable style="width: 160px"></el-input>
  22. </el-form-item>
  23. <el-form-item label="IFS物料编码">
  24. <el-input v-model="searchData.finalPartNo" clearable style="width: 160px"></el-input>
  25. </el-form-item>
  26. <el-form-item label=" ">
  27. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :fetch="createExportData"
  36. :before-generate="startDownload"
  37. :before-finish="finishDownload"
  38. worksheet="导出信息"
  39. class="el-button el-button--primary el-button--medium">
  40. {{ '导出' }}
  41. </download-excel>
  42. </el-form-item>
  43. </el-form>
  44. <el-table
  45. :height="height"
  46. :data="dataList1"
  47. border
  48. ref="mainTable"
  49. @row-click="changeData"
  50. highlight-current-row
  51. v-loading="dataListLoading"
  52. style="width: 100%;">
  53. <el-table-column
  54. v-for="(item,index) in columnList1" :key="index"
  55. :sortable="item.columnSortable"
  56. :prop="item.columnProp"
  57. :header-align="item.headerAlign"
  58. :show-overflow-tooltip="item.showOverflowTooltip"
  59. :align="item.align"
  60. :fixed="item.fixed==''?false:item.fixed"
  61. :min-width="item.columnWidth"
  62. :label="item.columnLabel">
  63. <template slot-scope="scope">
  64. <div v-if="item.columnProp === 'testPartNo'">
  65. <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toPartMenu(scope.row.testPartNo)"> {{ scope.row[item.columnProp] }}</el-link>
  66. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  67. </div>
  68. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  69. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <el-pagination
  74. @size-change="sizeChangeHandle"
  75. @current-change="currentChangeHandle"
  76. :current-page="pageIndex"
  77. :page-sizes="[20, 50, 100, 1000]"
  78. :page-size="pageSize"
  79. :total="totalPage"
  80. layout="total, sizes, prev, pager, next, jumper">
  81. </el-pagination>
  82. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  83. <el-tab-pane label="项目信息" name="project">
  84. <el-form label-position="top" style="margin-top: 0px; margin-left: 0px;">
  85. <el-row :gutter="20">
  86. <el-col :span="5"><div class="grid-content bg-purple">
  87. <el-form-item :label="'项目号'">
  88. <el-input v-model="projectData.projectId" readonly ></el-input>
  89. </el-form-item>
  90. </div></el-col>
  91. <el-col :span="5"><div class="grid-content bg-purple">
  92. <el-form-item :label="'项目类型'">
  93. <el-input v-model="projectData.projectType" readonly ></el-input>
  94. </el-form-item>
  95. </div></el-col>
  96. <el-col :span="5"><div class="grid-content bg-purple">
  97. <el-form-item :label="'项目来源'">
  98. <el-input v-model="projectData.projectSourceDesc" readonly ></el-input>
  99. </el-form-item>
  100. </div></el-col>
  101. <el-col :span="5"><div class="grid-content bg-purple">
  102. <el-form-item :label="'优先级'">
  103. <el-input v-model="projectData.priorityDesc" readonly></el-input>
  104. </el-form-item>
  105. </div></el-col>
  106. <el-col :span="4"><div class="grid-content bg-purple">
  107. <el-form-item :label="'需求日期'">
  108. <el-input v-model="projectData.needDate" readonly ></el-input>
  109. </el-form-item>
  110. </div></el-col>
  111. </el-row>
  112. <el-row :gutter="20">
  113. <el-col :span="5"><div class="grid-content bg-purple">
  114. <el-form-item :label="'BU'">
  115. <el-input v-model="projectData.buDesc" readonly style="" ></el-input>
  116. </el-form-item>
  117. </div></el-col>
  118. <el-col :span="5"><div class="grid-content bg-purple">
  119. <el-form-item :label="'项目名称'">
  120. <el-input v-model="projectData.projectName" readonly style="" ></el-input>
  121. </el-form-item>
  122. </div></el-col>
  123. <el-col :span="14"><div class="grid-content bg-purple">
  124. <el-form-item :label="'项目描述'">
  125. <el-input v-model="projectData.projectDesc" readonly style="" ></el-input>
  126. </el-form-item>
  127. </div></el-col>
  128. </el-row>
  129. <el-row :gutter="20">
  130. <el-col :span="8"><div class="grid-content bg-purple">
  131. <el-form-item :label="'项目经理'">
  132. <el-input v-model="projectData.projectManagerName" readonly style="" ></el-input>
  133. </el-form-item>
  134. </div></el-col>
  135. <el-col :span="8"><div class="grid-content bg-purple">
  136. <el-form-item :label="'项目负责人'">
  137. <el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
  138. </el-form-item>
  139. </div></el-col>
  140. <el-col :span="8"><div class="grid-content bg-purple">
  141. <el-form-item :label="'项目权限'">
  142. <el-input v-model="projectData.userRoleName" readonly style="" ></el-input>
  143. </el-form-item>
  144. </div></el-col>
  145. </el-row>
  146. <el-row :gutter="20">
  147. <el-col :span="24"><div class="grid-content bg-purple">
  148. <el-form-item :label="'客户应用/要求'">
  149. <el-input v-model="projectData.customerRemark" readonly style="" ></el-input>
  150. </el-form-item>
  151. </div></el-col>
  152. </el-row>
  153. <el-row :gutter="20">
  154. <el-col :span="24"><div class="grid-content bg-purple">
  155. <el-form-item :label="'其他特殊要求'">
  156. <el-input v-model="projectData.remark" readonly style="" ></el-input>
  157. </el-form-item>
  158. </div></el-col>
  159. </el-row>
  160. </el-form>
  161. </el-tab-pane>
  162. <el-tab-pane label="客户信息" name="customer">
  163. <customer-info :project="currentRow"></customer-info>
  164. </el-tab-pane>
  165. <el-tab-pane label="询价信息" name="projectQuotation">
  166. <projectQuotation ref="projectQuotation"></projectQuotation>
  167. </el-tab-pane>
  168. <el-tab-pane label="报价信息" name="quotationHeader">
  169. <project-part-quote :part="currentRow"></project-part-quote>
  170. </el-tab-pane>
  171. <el-tab-pane label="打样信息" name="sample">
  172. <sample ref="sample"></sample>
  173. </el-tab-pane>
  174. <el-tab-pane label="测试记录" name="test">
  175. <test ref="test"></test>
  176. </el-tab-pane>
  177. <el-tab-pane label="刀模申请" name="toolApply">
  178. <toolApply ref="toolApply"></toolApply>
  179. </el-tab-pane>
  180. <el-tab-pane label="技术参数卡" name="technicalSpecification">
  181. <technicalSpecification ref="technicalSpecification" ></technicalSpecification>
  182. </el-tab-pane>
  183. <el-tab-pane label="变更记录" name="changeRecord">
  184. <change-record :data-list="changeRecordList" :height="240" :columns="columnChangeRecord"></change-record>
  185. </el-tab-pane>
  186. </el-tabs>
  187. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  188. </div>
  189. </template>
  190. <script>
  191. import {
  192. projectInfoPartSearch,
  193. projectInfoSearch,
  194. } from "@/api/project/project.js"
  195. import {
  196. customerInformationSearchForCheck, // 客户信息列表查询`
  197. } from '@/api/customer/customerInformation.js'
  198. import {
  199. getChangeRecordByPartNo2, // 查询变更记录
  200. } from '@/api/part/partInformation.js'
  201. import {getBuBySite} from "@/api/changeManagement/changeManagement.js"
  202. import Chooselist from '@/views/modules/common/Chooselist'
  203. import projectQuotation from "../projectInfo/com_project_puotation.vue";/*組件*/
  204. import technicalSpecification from "./com_projectPart_technicalSpecification";
  205. import sample from "../projectInfo/com_project_sample";
  206. import test from "../projectInfo/com_project_test";
  207. import quotationHeader from "../projectInfo/com_project_info_quotation";
  208. import ProjectPartQuote from "./projectPartQuote.vue";
  209. import toolApply from "../projectInfo/com_project_toolApplyCation.vue";
  210. import CustomerInfo from "../../quotation/sellForQuotation/customerInfo.vue";
  211. import ChangeRecord from "../projectInfo/com_project_change_record.vue";
  212. export default {
  213. components: {
  214. ChangeRecord,
  215. CustomerInfo,
  216. toolApply,
  217. ProjectPartQuote,
  218. Chooselist,
  219. technicalSpecification,
  220. projectQuotation,
  221. sample,
  222. test,
  223. quotationHeader,
  224. },
  225. name: "searchProjectPart",
  226. data() {
  227. return{
  228. buList: [],
  229. currentRow:{},
  230. activeName: 'project',
  231. tagNo:'',
  232. tagNo2:'',
  233. pageIndex: 1,
  234. pageSize: 100,
  235. totalPage: 0,
  236. height: 200,
  237. dataListLoading: false,
  238. // 导出 start
  239. exportData: [],
  240. exportName: "项目物料清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  241. exportHeader: ["项目物料清单"],
  242. exportFooter: [],
  243. exportList: [],
  244. // 导出 start
  245. dataList1: [],
  246. columnList1: [
  247. {
  248. userId: this.$store.state.user.name,
  249. functionId: 101002002,
  250. serialNumber: '101002002Table1BuNo',
  251. tableId: "101002002Table1",
  252. tableName: "项目物料",
  253. columnProp: "buNo",
  254. headerAlign: "center",
  255. align: "left",
  256. columnLabel: "BU",
  257. columnHidden: false,
  258. columnImage: false,
  259. columnSortable: false,
  260. sortLv: 0,
  261. status: true,
  262. fixed: '',
  263. columnWidth: 100
  264. },
  265. {
  266. userId: this.$store.state.user.name,
  267. functionId: 101002002,
  268. serialNumber: '101002002Table1TestPartNo',
  269. tableId: "101002002Table1",
  270. tableName: "项目物料",
  271. columnProp: "testPartNo",
  272. headerAlign: "center",
  273. align: "left",
  274. columnLabel: "物料编码",
  275. columnHidden: false,
  276. columnImage: false,
  277. columnSortable: false,
  278. sortLv: 0,
  279. status: true,
  280. fixed: '',
  281. columnWidth: 120
  282. },
  283. {
  284. userId: this.$store.state.user.name,
  285. functionId: 101002002,
  286. serialNumber: '101002002Table1CustomerPartNo',
  287. tableId: "101002002Table1",
  288. tableName: "项目物料",
  289. columnProp: "customerPartNo",
  290. headerAlign: "center",
  291. align: "left",
  292. columnLabel: "客户料号",
  293. columnHidden: false,
  294. columnImage: false,
  295. columnSortable: false,
  296. sortLv: 0,
  297. status: true,
  298. fixed: '',
  299. columnWidth: 120
  300. },
  301. {
  302. userId: this.$store.state.user.name,
  303. functionId: 101002002,
  304. serialNumber: '101002002Table1FinalPartNo',
  305. tableId: "101002002Table1",
  306. tableName: "项目物料",
  307. columnProp: "finalPartNo",
  308. headerAlign: "center",
  309. align: "left",
  310. columnLabel: "IFS物料编码",
  311. columnHidden: false,
  312. columnImage: false,
  313. columnSortable: false,
  314. sortLv: 0,
  315. status: true,
  316. fixed: '',
  317. columnWidth: 120
  318. },
  319. {
  320. userId: this.$store.state.user.name,
  321. functionId: 101002002,
  322. serialNumber: '101002002Table1PartDesc',
  323. tableId: "101002002Table1",
  324. tableName: "项目物料",
  325. columnProp: "partDesc",
  326. headerAlign: "center",
  327. align: "left",
  328. columnLabel: "物料描述",
  329. columnHidden: false,
  330. columnImage: false,
  331. columnSortable: false,
  332. sortLv: 0,
  333. status: true,
  334. fixed: '',
  335. columnWidth: 200
  336. },
  337. {
  338. userId: this.$store.state.user.name,
  339. functionId: 101002002,
  340. serialNumber: '101002002Table1PartType',
  341. tableId: "101002002Table1",
  342. tableName: "项目物料",
  343. columnProp: "projectId",
  344. headerAlign: "center",
  345. align: "center",
  346. columnLabel: "项目编码",
  347. columnHidden: false,
  348. columnImage: false,
  349. columnSortable: false,
  350. sortLv: 0,
  351. status: true,
  352. fixed: '',
  353. columnWidth: 120
  354. },
  355. {
  356. userId: this.$store.state.user.name,
  357. functionId: 101002002,
  358. serialNumber: '101002002Table1PartType',
  359. tableId: "101002002Table1",
  360. tableName: "项目物料",
  361. columnProp: "partType",
  362. headerAlign: "center",
  363. align: "center",
  364. columnLabel: "产品大类编码",
  365. columnHidden: false,
  366. columnImage: false,
  367. columnSortable: false,
  368. sortLv: 0,
  369. status: true,
  370. fixed: '',
  371. columnWidth: 100
  372. },
  373. {
  374. userId: this.$store.state.user.name,
  375. functionId: 101002002,
  376. serialNumber: '101002002Table1PartTypeDesc',
  377. tableId: "101002002Table1",
  378. tableName: "项目物料",
  379. columnProp: "partTypeDesc",
  380. headerAlign: "center",
  381. align: "left",
  382. columnLabel: "产品大类名称",
  383. columnHidden: false,
  384. columnImage: false,
  385. columnSortable: false,
  386. sortLv: 0,
  387. status: true,
  388. fixed: '',
  389. columnWidth: 200
  390. },
  391. {
  392. userId: this.$store.state.user.name,
  393. functionId: 101002002,
  394. serialNumber: '101002002Table1CodeNo',
  395. tableId: "101002002Table1",
  396. tableName: "项目物料",
  397. columnProp: "codeNo",
  398. headerAlign: "center",
  399. align: "center",
  400. columnLabel: "属性模板编码",
  401. columnHidden: false,
  402. columnImage: false,
  403. columnSortable: false,
  404. sortLv: 0,
  405. status: true,
  406. fixed: '',
  407. columnWidth: 100
  408. },
  409. {
  410. userId: this.$store.state.user.name,
  411. functionId: 101002002,
  412. serialNumber: '101002002Table1CodeDesc',
  413. tableId: "101002002Table1",
  414. tableName: "项目物料",
  415. columnProp: "codeDesc",
  416. headerAlign: "center",
  417. align: "left",
  418. columnLabel: "属性模板名称",
  419. columnHidden: false,
  420. columnImage: false,
  421. columnSortable: false,
  422. sortLv: 0,
  423. status: true,
  424. fixed: '',
  425. columnWidth: 150
  426. },{
  427. userId: this.$store.state.user.name,
  428. functionId: 101002002,
  429. serialNumber: '101002002Table1Remark',
  430. tableId: "101002002Table1",
  431. tableName: "项目物料",
  432. columnProp: "remark",
  433. headerAlign: "center",
  434. align: "left",
  435. columnLabel: "备注",
  436. columnHidden: false,
  437. columnImage: false,
  438. columnSortable: false,
  439. sortLv: 0,
  440. status: true,
  441. fixed: '',
  442. columnWidth: 200
  443. },{
  444. userId: this.$store.state.user.name,
  445. functionId: 101002002,
  446. serialNumber: '101002002Table1CreateDate',
  447. tableId: "101002002Table1",
  448. tableName: "项目物料",
  449. columnProp: "createDate",
  450. headerAlign: "center",
  451. align: "center",
  452. columnLabel: "创建时间",
  453. columnHidden: false,
  454. columnImage: false,
  455. columnSortable: false,
  456. sortLv: 0,
  457. status: true,
  458. fixed: '',
  459. columnWidth: 140
  460. },{
  461. userId: this.$store.state.user.name,
  462. functionId: 101002002,
  463. serialNumber: '101002002Table1CreateBy',
  464. tableId: "101002002Table1",
  465. tableName: "项目物料",
  466. columnProp: "createBy",
  467. headerAlign: "center",
  468. align: "left",
  469. columnLabel: "创建人",
  470. columnHidden: false,
  471. columnImage: false,
  472. columnSortable: false,
  473. sortLv: 0,
  474. status: true,
  475. fixed: '',
  476. columnWidth: 80
  477. },{
  478. userId: this.$store.state.user.name,
  479. functionId: 101002002,
  480. serialNumber: '101002002Table1UpdateDate',
  481. tableId: "101002002Table1",
  482. tableName: "项目物料",
  483. columnProp: "updateDate",
  484. headerAlign: "center",
  485. align: "center",
  486. columnLabel: "上次修改日期",
  487. columnHidden: false,
  488. columnImage: false,
  489. columnSortable: false,
  490. sortLv: 0,
  491. status: true,
  492. fixed: '',
  493. columnWidth: 140
  494. },{
  495. userId: this.$store.state.user.name,
  496. functionId: 101002002,
  497. serialNumber: '101002002Table1UpdateBy',
  498. tableId: "101002002Table1",
  499. tableName: "项目物料",
  500. columnProp: "updateBy",
  501. headerAlign: "center",
  502. align: "left",
  503. columnLabel: "修改人",
  504. columnHidden: false,
  505. columnImage: false,
  506. columnSortable: false,
  507. sortLv: 0,
  508. status: true,
  509. fixed: '',
  510. columnWidth: 80
  511. },
  512. ],
  513. searchData:{
  514. page: 1,
  515. limit: 100,
  516. site: this.$store.state.user.site,
  517. buNo: '',
  518. projectId: '',
  519. testPartNo: '',
  520. userName: this.$store.state.user.name,
  521. finalPartNo: '',
  522. customerPartNo: ''
  523. },
  524. projectData: {
  525. id: 0,
  526. site:this.$store.state.user.site,
  527. projectLevel:'',
  528. projectId:'',
  529. projectTypeDb:'',
  530. projectType:'',
  531. customerName:'',
  532. customerId:'',
  533. projectName:'',
  534. projectDesc:'',
  535. needDate:'',
  536. priority:'',
  537. projectSource:'',
  538. priorityDesc:'',
  539. projectSourceDesc:'',
  540. projectManagerName:'',
  541. projectOwnerName:'',
  542. customerRemark:'',
  543. remark:'',
  544. userRoleName:'',
  545. buDesc:'',
  546. buNo:'',
  547. },
  548. customerData: {
  549. site: '',
  550. customerNo: '',
  551. customerDesc: '',
  552. customerDescription: '',
  553. customerIndustry: '',
  554. customerCurrency: '',
  555. turnoverOfYear: '',
  556. potentialRevenueOfYear: '',
  557. importantCustomer: '',
  558. customerStatus: '',
  559. companyName: '',
  560. jobDescription: '',
  561. remark: '',
  562. contactName: '',
  563. contactPhoneNumber1: '',
  564. primaryContact: '',
  565. contactStatus: '',
  566. addressName: ''
  567. },
  568. finalCustomerData: {
  569. site: '',
  570. customerNo: '',
  571. customerDesc: '',
  572. customerDescription: '',
  573. customerIndustry: '',
  574. customerCurrency: '',
  575. turnoverOfYear: '',
  576. potentialRevenueOfYear: '',
  577. importantCustomer: '',
  578. customerStatus: '',
  579. companyName: '',
  580. jobDescription: '',
  581. remark: '',
  582. contactName: '',
  583. contactPhoneNumber1: '',
  584. primaryContact: '',
  585. contactStatus: '',
  586. addressName: ''
  587. },
  588. changeRecordList: [],
  589. columnChangeRecord: [
  590. {
  591. columnProp: 'changeNo',
  592. headerAlign: 'center',
  593. align: 'center',
  594. columnLabel: '申请编号',
  595. columnHidden: false,
  596. columnImage: false,
  597. status: true,
  598. fixed: '',
  599. columnWidth: 120
  600. },
  601. {
  602. columnProp: 'applicantName',
  603. headerAlign: 'center',
  604. align: 'center',
  605. columnLabel: '申请人',
  606. columnHidden: false,
  607. columnImage: false,
  608. status: true,
  609. fixed: '',
  610. columnWidth: 120
  611. },
  612. {
  613. columnProp: 'applicationDepartmentName',
  614. headerAlign: 'center',
  615. align: 'center',
  616. columnLabel: '申请部门',
  617. columnHidden: false,
  618. columnImage: false,
  619. status: true,
  620. fixed: '',
  621. columnWidth: 120
  622. },
  623. {
  624. columnProp: 'changeStatus',
  625. headerAlign: 'center',
  626. align: 'center',
  627. columnLabel: '变更单状态',
  628. columnHidden: false,
  629. columnImage: false,
  630. status: true,
  631. fixed: '',
  632. columnWidth: 100
  633. },
  634. {
  635. columnProp: 'ecnStage',
  636. headerAlign: 'center',
  637. align: 'center',
  638. columnLabel: 'ECN阶段',
  639. columnHidden: false,
  640. columnImage: false,
  641. status: true,
  642. fixed: '',
  643. columnWidth: 100
  644. },
  645. {
  646. columnProp: 'changeType',
  647. headerAlign: 'center',
  648. align: 'center',
  649. columnLabel: '变更类别',
  650. columnHidden: false,
  651. columnImage: false,
  652. status: true,
  653. fixed: '',
  654. columnWidth: 100
  655. },
  656. {
  657. columnProp: 'ecnType',
  658. headerAlign: 'center',
  659. align: 'center',
  660. columnLabel: 'ECN种类',
  661. columnHidden: false,
  662. columnImage: false,
  663. status: true,
  664. fixed: '',
  665. columnWidth: 100
  666. },
  667. {
  668. columnProp: 'applyDate',
  669. headerAlign: 'center',
  670. align: 'center',
  671. columnLabel: '申请日期',
  672. columnHidden: false,
  673. columnImage: false,
  674. status: true,
  675. fixed: '',
  676. columnWidth: 100
  677. },
  678. {
  679. columnProp: 'changePhaseInDate',
  680. headerAlign: 'center',
  681. align: 'center',
  682. columnLabel: '变更生效日期',
  683. columnHidden: false,
  684. columnImage: false,
  685. status: true,
  686. fixed: '',
  687. columnWidth: 100
  688. },
  689. {
  690. columnProp: 'xxx',
  691. headerAlign: 'center',
  692. align: 'center',
  693. columnLabel: 'ECN执行日期',
  694. columnHidden: false,
  695. columnImage: false,
  696. status: true,
  697. fixed: '',
  698. columnWidth: 100
  699. }
  700. ],
  701. }
  702. },
  703. mounted() {
  704. this.$nextTick(() => {
  705. this.height = window.innerHeight - 520;
  706. })
  707. },
  708. created() {
  709. this.getBuBySite()
  710. },
  711. methods: {
  712. // 获取用户的bu
  713. getBuBySite () {
  714. let tempData = {
  715. site: this.$store.state.user.site,
  716. }
  717. getBuBySite(tempData).then(({data}) => {
  718. if (data.code === 0) {
  719. this.buList = data.rows
  720. }
  721. })
  722. },
  723. // 获取基础数据列表S
  724. getBaseList(val, type) {
  725. this.tagNo = val
  726. this.tagNo2 = type
  727. this.$nextTick(() => {
  728. let strVal = ''
  729. if (val === 1010) {
  730. if (type == 1) {
  731. strVal = this.searchData.projectType
  732. }
  733. }
  734. this.$refs.baseList.init(val, strVal)
  735. })
  736. },
  737. /* 列表方法的回调 */
  738. getBaseData(val) {
  739. if (this.tagNo === 1010) {
  740. if (this.tagNo2 == 1) {
  741. this.searchData.projectType = val.Base_desc
  742. }
  743. }
  744. },
  745. //导出excel
  746. async createExportData() {
  747. this.searchData.limit = -1
  748. this.searchData.page = 1
  749. await projectInfoSearch(this.searchData).then(({data}) => {
  750. this.exportList= data.page.list;
  751. })
  752. return this.exportList;
  753. },
  754. startDownload() {
  755. // this.exportData = this.dataList
  756. },
  757. finishDownload() {
  758. },
  759. fields() {
  760. let json = "{"
  761. this.columnList1.forEach((item, index) => {
  762. if (index == this.columnList1.length - 1) {
  763. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  764. } else {
  765. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  766. }
  767. })
  768. json += "}"
  769. let s = eval("(" + json + ")")
  770. return s
  771. },
  772. //导出excel
  773. async createExportData2() {
  774. return this.contactList;
  775. },
  776. startDownload2() {
  777. // this.exportData = this.dataList
  778. },
  779. finishDownload2() {
  780. },
  781. fields2 () {
  782. let json = "{"
  783. this.columnList2.forEach((item, index) => {
  784. if (index == this.columnList2.length - 1) {
  785. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  786. } else {
  787. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  788. }
  789. })
  790. json += "}"
  791. let s = eval("(" + json + ")")
  792. return s
  793. },
  794. // 导出 end
  795. // 每页数
  796. sizeChangeHandle (val) {
  797. this.pageSize = val
  798. this.pageIndex = 1
  799. this.search()
  800. },
  801. // 当前页
  802. currentChangeHandle (val) {
  803. this.pageIndex = val
  804. this.search()
  805. },
  806. //单击切换订单
  807. changeData (row) {
  808. this.currentRow = JSON.parse(JSON.stringify(row))
  809. let inData = {
  810. site: row.site,
  811. projectId: row.projectId,
  812. page: 1,
  813. limit: 10,
  814. }
  815. projectInfoSearch(inData).then(({data}) => {
  816. if (data.code === 0) {
  817. if (data.page.list.length > 0) {
  818. this.projectData = data.page.list[0]
  819. }
  820. }
  821. this.dataListLoading = false
  822. })
  823. let inData2 = {
  824. site: row.site,
  825. customerNo: row.customerId,
  826. page: 1,
  827. limit: 10,
  828. }
  829. customerInformationSearchForCheck(inData2).then(({data}) => {
  830. if (data.code === 0) {
  831. if (data.page.list.length > 0) {
  832. this.customerData = data.page.list[0]
  833. }
  834. }
  835. })
  836. let inData3 = {
  837. site: row.site,
  838. customerNo: row.finalCustomerId,
  839. page: 1,
  840. limit: 10,
  841. }
  842. customerInformationSearchForCheck(inData3).then(({data}) => {
  843. if (data.code === 0) {
  844. if (data.page.list.length > 0) {
  845. this.finalCustomerData = data.page.list[0]
  846. }
  847. }
  848. })
  849. this.refreshCurrentTabTable()
  850. },
  851. search () {
  852. this.searchData.limit = this.pageSize
  853. this.searchData.page = this.pageIndex
  854. projectInfoPartSearch(this.searchData).then(({data}) => {
  855. if (data.code === 0) {
  856. this.dataList1 = data.page.list
  857. this.pageIndex = data.page.currPage
  858. this.pageSize = data.page.pageSize
  859. this.totalPage = data.page.totalCount
  860. if(this.dataList1.length>0){
  861. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  862. this.changeData(this.dataList1[0])
  863. }
  864. }
  865. this.dataListLoading = false
  866. })
  867. },
  868. tabClick (tab, event) {
  869. // 刷新列表数据
  870. this.refreshCurrentTabTable()
  871. },
  872. // 刷新页签的table数据
  873. refreshCurrentTabTable () {
  874. if (this.activeName === 'technicalSpecification') {
  875. this.refreshTable('technicalSpecification');
  876. }
  877. if (this.activeName === 'projectQuotation') {
  878. this.refreshTable('projectQuotation');
  879. }
  880. if (this.activeName === 'quotationHeader') {
  881. this.refreshTable('quotationHeader');
  882. }
  883. if (this.activeName === 'sample') {
  884. this.refreshTable('sample');
  885. }
  886. if (this.activeName === 'test') {
  887. this.refreshTable('test');
  888. }
  889. if (this.activeName === 'toolApply') {
  890. this.refreshTable('toolApply');
  891. }
  892. if (this.activeName === 'changeRecord') {
  893. this.getChangeRecordList()
  894. }
  895. },
  896. refreshTable (type) {
  897. let inData = {
  898. site: this.currentRow.site,
  899. testPartNo: this.currentRow.testPartNo,
  900. userName: this.$store.state.user.name,
  901. projectId:this.currentRow.projectId,
  902. page: 1,
  903. limit: 1000
  904. }
  905. if (type==='technicalSpecification') {
  906. this.$refs.technicalSpecification.init(inData)
  907. }
  908. if (type==='projectQuotation') {
  909. inData.menuId = 102001
  910. this.$refs.projectQuotation.init(inData)
  911. }
  912. // if(type==='quotationHeader'){
  913. // this.$refs.quotationHeader.init(inData)
  914. // }
  915. if (type==='sample') {
  916. inData.menuId = 103001
  917. this.$refs.sample.init(inData)
  918. }
  919. if (type==='test') {
  920. inData.menuId = 107001
  921. this.$refs.test.init(inData)
  922. }
  923. if (type==='toolApply') {
  924. let inData = {
  925. site: this.currentRow.site,
  926. orderRef1: this.currentRow.projectId,
  927. username: this.$store.state.user.name,
  928. }
  929. this.$refs.toolApply.init(inData)
  930. }
  931. },
  932. // 获取变更记录
  933. getChangeRecordList () {
  934. let tempData = {
  935. site: this.$store.state.user.site,
  936. projectId: this.currentRow.projectId,
  937. finalPartNo: this.currentRow.finalPartNo
  938. }
  939. getChangeRecordByPartNo2(tempData).then(({data}) => {
  940. if (data && data.code === 0) {
  941. this.changeRecordList = data.rows
  942. } else {
  943. this.changeRecordList = []
  944. }
  945. })
  946. },
  947. toPartMenu(partNo){
  948. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404'){
  949. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  950. }else {
  951. this.$router.push({name:`part-partInformation`,params:{partNo:partNo},})
  952. }
  953. },
  954. //单击切换订单
  955. searchCustomer (row) {
  956. },
  957. }
  958. }
  959. </script>
  960. <style scoped>
  961. </style>