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.

850 lines
28 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
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
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. <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. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  65. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  66. style="width: 100px; height: 80px"/></span>
  67. </template>
  68. </el-table-column>
  69. </el-table>
  70. <el-pagination
  71. @size-change="sizeChangeHandle"
  72. @current-change="currentChangeHandle"
  73. :current-page="pageIndex"
  74. :page-sizes="[20, 50, 100, 1000]"
  75. :page-size="pageSize"
  76. :total="totalPage"
  77. layout="total, sizes, prev, pager, next, jumper">
  78. </el-pagination>
  79. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  80. <el-tab-pane label="项目信息" name="project">
  81. <el-form label-position="top" style="margin-top: 0px; margin-left: 0px;">
  82. <el-row :gutter="20">
  83. <el-col :span="5"><div class="grid-content bg-purple">
  84. <el-form-item :label="'项目号'">
  85. <el-input v-model="projectData.projectId" readonly ></el-input>
  86. </el-form-item>
  87. </div></el-col>
  88. <el-col :span="5"><div class="grid-content bg-purple">
  89. <el-form-item :label="'项目类型'">
  90. <el-input v-model="projectData.projectType" readonly ></el-input>
  91. </el-form-item>
  92. </div></el-col>
  93. <el-col :span="5"><div class="grid-content bg-purple">
  94. <el-form-item :label="'项目来源'">
  95. <el-input v-model="projectData.projectSourceDesc" readonly ></el-input>
  96. </el-form-item>
  97. </div></el-col>
  98. <el-col :span="5"><div class="grid-content bg-purple">
  99. <el-form-item :label="'优先级'">
  100. <el-input v-model="projectData.priorityDesc" readonly></el-input>
  101. </el-form-item>
  102. </div></el-col>
  103. <el-col :span="4"><div class="grid-content bg-purple">
  104. <el-form-item :label="'需求日期'">
  105. <el-input v-model="projectData.needDate" readonly ></el-input>
  106. </el-form-item>
  107. </div></el-col>
  108. </el-row>
  109. <el-row :gutter="20">
  110. <el-col :span="5"><div class="grid-content bg-purple">
  111. <el-form-item :label="'BU'">
  112. <el-input v-model="projectData.buDesc" readonly style="" ></el-input>
  113. </el-form-item>
  114. </div></el-col>
  115. <el-col :span="5"><div class="grid-content bg-purple">
  116. <el-form-item :label="'项目名称'">
  117. <el-input v-model="projectData.projectName" readonly style="" ></el-input>
  118. </el-form-item>
  119. </div></el-col>
  120. <el-col :span="14"><div class="grid-content bg-purple">
  121. <el-form-item :label="'项目描述'">
  122. <el-input v-model="projectData.projectDesc" readonly style="" ></el-input>
  123. </el-form-item>
  124. </div></el-col>
  125. </el-row>
  126. <el-row :gutter="20">
  127. <el-col :span="8"><div class="grid-content bg-purple">
  128. <el-form-item :label="'项目经理'">
  129. <el-input v-model="projectData.projectManagerName" readonly style="" ></el-input>
  130. </el-form-item>
  131. </div></el-col>
  132. <el-col :span="8"><div class="grid-content bg-purple">
  133. <el-form-item :label="'项目负责人'">
  134. <el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
  135. </el-form-item>
  136. </div></el-col>
  137. <el-col :span="8"><div class="grid-content bg-purple">
  138. <el-form-item :label="'项目权限'">
  139. <el-input v-model="projectData.userRoleName" readonly style="" ></el-input>
  140. </el-form-item>
  141. </div></el-col>
  142. </el-row>
  143. <el-row :gutter="20">
  144. <el-col :span="24"><div class="grid-content bg-purple">
  145. <el-form-item :label="'客户应用/要求'">
  146. <el-input v-model="projectData.customerRemark" readonly style="" ></el-input>
  147. </el-form-item>
  148. </div></el-col>
  149. </el-row>
  150. <el-row :gutter="20">
  151. <el-col :span="24"><div class="grid-content bg-purple">
  152. <el-form-item :label="'其他特殊要求'">
  153. <el-input v-model="projectData.remark" readonly style="" ></el-input>
  154. </el-form-item>
  155. </div></el-col>
  156. </el-row>
  157. </el-form>
  158. </el-tab-pane>
  159. <el-tab-pane label="客户信息" name="customer">
  160. <customer-info :project="currentRow"></customer-info>
  161. </el-tab-pane>
  162. <el-tab-pane label="询价信息" name="projectQuotation">
  163. <projectQuotation ref="projectQuotation"></projectQuotation>
  164. </el-tab-pane>
  165. <el-tab-pane label="报价信息" name="quotationHeader">
  166. <project-part-quote :part="currentRow"></project-part-quote>
  167. </el-tab-pane>
  168. <el-tab-pane label="打样信息" name="sample">
  169. <sample ref="sample"></sample>
  170. </el-tab-pane>
  171. <el-tab-pane label="测试记录" name="test">
  172. <test ref="test"></test>
  173. </el-tab-pane>
  174. <el-tab-pane label="刀模申请" name="toolApply">
  175. <toolApply ref="toolApply"></toolApply>
  176. </el-tab-pane>
  177. <el-tab-pane label="技术参数卡" name="technicalSpecification">
  178. <technicalSpecification ref="technicalSpecification" ></technicalSpecification>
  179. </el-tab-pane>
  180. </el-tabs>
  181. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  182. </div>
  183. </template>
  184. <script>
  185. import {
  186. projectInfoPartSearch,
  187. projectInfoSearch,
  188. } from "@/api/project/project.js"
  189. import {
  190. customerInformationSearchForCheck, // 客户信息列表查询`
  191. } from '@/api/customer/customerInformation.js'
  192. import {getBuBySite} from "@/api/changeManagement/changeManagement.js"
  193. import Chooselist from '@/views/modules/common/Chooselist'
  194. import projectQuotation from "../projectInfo/com_project_puotation.vue";/*組件*/
  195. import technicalSpecification from "./com_projectPart_technicalSpecification";
  196. import sample from "../projectInfo/com_project_sample";
  197. import test from "../projectInfo/com_project_test";
  198. import quotationHeader from "../projectInfo/com_project_info_quotation";
  199. import ProjectPartQuote from "./projectPartQuote.vue";
  200. import toolApply from "../projectInfo/com_project_toolApplyCation.vue";
  201. import CustomerInfo from "../../quotation/sellForQuotation/customerInfo.vue";
  202. export default {
  203. components: {
  204. CustomerInfo,
  205. toolApply,
  206. ProjectPartQuote,
  207. Chooselist,
  208. technicalSpecification,
  209. projectQuotation,
  210. sample,
  211. test,
  212. quotationHeader,
  213. },
  214. name: "searchProjectPart",
  215. data() {
  216. return{
  217. buList: [],
  218. currentRow:{},
  219. activeName: 'project',
  220. tagNo:'',
  221. tagNo2:'',
  222. pageIndex: 1,
  223. pageSize: 100,
  224. totalPage: 0,
  225. height: 200,
  226. dataListLoading: false,
  227. // 导出 start
  228. exportData: [],
  229. exportName: "项目物料清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  230. exportHeader: ["项目物料清单"],
  231. exportFooter: [],
  232. exportList: [],
  233. // 导出 start
  234. dataList1: [],
  235. columnList1: [
  236. {
  237. userId: this.$store.state.user.name,
  238. functionId: 101002002,
  239. serialNumber: '101002002Table1BuNo',
  240. tableId: "101002002Table1",
  241. tableName: "项目物料",
  242. columnProp: "buNo",
  243. headerAlign: "center",
  244. align: "left",
  245. columnLabel: "BU",
  246. columnHidden: false,
  247. columnImage: false,
  248. columnSortable: false,
  249. sortLv: 0,
  250. status: true,
  251. fixed: '',
  252. columnWidth: 100
  253. },
  254. {
  255. userId: this.$store.state.user.name,
  256. functionId: 101002002,
  257. serialNumber: '101002002Table1TestPartNo',
  258. tableId: "101002002Table1",
  259. tableName: "项目物料",
  260. columnProp: "testPartNo",
  261. headerAlign: "center",
  262. align: "left",
  263. columnLabel: "物料编码",
  264. columnHidden: false,
  265. columnImage: false,
  266. columnSortable: false,
  267. sortLv: 0,
  268. status: true,
  269. fixed: '',
  270. columnWidth: 120
  271. },
  272. {
  273. userId: this.$store.state.user.name,
  274. functionId: 101002002,
  275. serialNumber: '101002002Table1CustomerPartNo',
  276. tableId: "101002002Table1",
  277. tableName: "项目物料",
  278. columnProp: "customerPartNo",
  279. headerAlign: "center",
  280. align: "left",
  281. columnLabel: "客户料号",
  282. columnHidden: false,
  283. columnImage: false,
  284. columnSortable: false,
  285. sortLv: 0,
  286. status: true,
  287. fixed: '',
  288. columnWidth: 120
  289. },
  290. {
  291. userId: this.$store.state.user.name,
  292. functionId: 101002002,
  293. serialNumber: '101002002Table1FinalPartNo',
  294. tableId: "101002002Table1",
  295. tableName: "项目物料",
  296. columnProp: "finalPartNo",
  297. headerAlign: "center",
  298. align: "left",
  299. columnLabel: "IFS物料编码",
  300. columnHidden: false,
  301. columnImage: false,
  302. columnSortable: false,
  303. sortLv: 0,
  304. status: true,
  305. fixed: '',
  306. columnWidth: 120
  307. },
  308. {
  309. userId: this.$store.state.user.name,
  310. functionId: 101002002,
  311. serialNumber: '101002002Table1PartDesc',
  312. tableId: "101002002Table1",
  313. tableName: "项目物料",
  314. columnProp: "partDesc",
  315. headerAlign: "center",
  316. align: "left",
  317. columnLabel: "物料描述",
  318. columnHidden: false,
  319. columnImage: false,
  320. columnSortable: false,
  321. sortLv: 0,
  322. status: true,
  323. fixed: '',
  324. columnWidth: 200
  325. },
  326. {
  327. userId: this.$store.state.user.name,
  328. functionId: 101002002,
  329. serialNumber: '101002002Table1PartType',
  330. tableId: "101002002Table1",
  331. tableName: "项目物料",
  332. columnProp: "projectId",
  333. headerAlign: "center",
  334. align: "center",
  335. columnLabel: "项目编码",
  336. columnHidden: false,
  337. columnImage: false,
  338. columnSortable: false,
  339. sortLv: 0,
  340. status: true,
  341. fixed: '',
  342. columnWidth: 120
  343. },
  344. {
  345. userId: this.$store.state.user.name,
  346. functionId: 101002002,
  347. serialNumber: '101002002Table1PartType',
  348. tableId: "101002002Table1",
  349. tableName: "项目物料",
  350. columnProp: "partType",
  351. headerAlign: "center",
  352. align: "center",
  353. columnLabel: "产品大类编码",
  354. columnHidden: false,
  355. columnImage: false,
  356. columnSortable: false,
  357. sortLv: 0,
  358. status: true,
  359. fixed: '',
  360. columnWidth: 100
  361. },
  362. {
  363. userId: this.$store.state.user.name,
  364. functionId: 101002002,
  365. serialNumber: '101002002Table1PartTypeDesc',
  366. tableId: "101002002Table1",
  367. tableName: "项目物料",
  368. columnProp: "partTypeDesc",
  369. headerAlign: "center",
  370. align: "left",
  371. columnLabel: "产品大类名称",
  372. columnHidden: false,
  373. columnImage: false,
  374. columnSortable: false,
  375. sortLv: 0,
  376. status: true,
  377. fixed: '',
  378. columnWidth: 200
  379. },
  380. {
  381. userId: this.$store.state.user.name,
  382. functionId: 101002002,
  383. serialNumber: '101002002Table1CodeNo',
  384. tableId: "101002002Table1",
  385. tableName: "项目物料",
  386. columnProp: "codeNo",
  387. headerAlign: "center",
  388. align: "center",
  389. columnLabel: "属性模板编码",
  390. columnHidden: false,
  391. columnImage: false,
  392. columnSortable: false,
  393. sortLv: 0,
  394. status: true,
  395. fixed: '',
  396. columnWidth: 100
  397. },
  398. {
  399. userId: this.$store.state.user.name,
  400. functionId: 101002002,
  401. serialNumber: '101002002Table1CodeDesc',
  402. tableId: "101002002Table1",
  403. tableName: "项目物料",
  404. columnProp: "codeDesc",
  405. headerAlign: "center",
  406. align: "left",
  407. columnLabel: "属性模板名称",
  408. columnHidden: false,
  409. columnImage: false,
  410. columnSortable: false,
  411. sortLv: 0,
  412. status: true,
  413. fixed: '',
  414. columnWidth: 150
  415. },{
  416. userId: this.$store.state.user.name,
  417. functionId: 101002002,
  418. serialNumber: '101002002Table1Remark',
  419. tableId: "101002002Table1",
  420. tableName: "项目物料",
  421. columnProp: "remark",
  422. headerAlign: "center",
  423. align: "left",
  424. columnLabel: "备注",
  425. columnHidden: false,
  426. columnImage: false,
  427. columnSortable: false,
  428. sortLv: 0,
  429. status: true,
  430. fixed: '',
  431. columnWidth: 200
  432. },{
  433. userId: this.$store.state.user.name,
  434. functionId: 101002002,
  435. serialNumber: '101002002Table1CreateDate',
  436. tableId: "101002002Table1",
  437. tableName: "项目物料",
  438. columnProp: "createDate",
  439. headerAlign: "center",
  440. align: "center",
  441. columnLabel: "创建时间",
  442. columnHidden: false,
  443. columnImage: false,
  444. columnSortable: false,
  445. sortLv: 0,
  446. status: true,
  447. fixed: '',
  448. columnWidth: 140
  449. },{
  450. userId: this.$store.state.user.name,
  451. functionId: 101002002,
  452. serialNumber: '101002002Table1CreateBy',
  453. tableId: "101002002Table1",
  454. tableName: "项目物料",
  455. columnProp: "createBy",
  456. headerAlign: "center",
  457. align: "left",
  458. columnLabel: "创建人",
  459. columnHidden: false,
  460. columnImage: false,
  461. columnSortable: false,
  462. sortLv: 0,
  463. status: true,
  464. fixed: '',
  465. columnWidth: 80
  466. },{
  467. userId: this.$store.state.user.name,
  468. functionId: 101002002,
  469. serialNumber: '101002002Table1UpdateDate',
  470. tableId: "101002002Table1",
  471. tableName: "项目物料",
  472. columnProp: "updateDate",
  473. headerAlign: "center",
  474. align: "center",
  475. columnLabel: "上次修改日期",
  476. columnHidden: false,
  477. columnImage: false,
  478. columnSortable: false,
  479. sortLv: 0,
  480. status: true,
  481. fixed: '',
  482. columnWidth: 140
  483. },{
  484. userId: this.$store.state.user.name,
  485. functionId: 101002002,
  486. serialNumber: '101002002Table1UpdateBy',
  487. tableId: "101002002Table1",
  488. tableName: "项目物料",
  489. columnProp: "updateBy",
  490. headerAlign: "center",
  491. align: "left",
  492. columnLabel: "修改人",
  493. columnHidden: false,
  494. columnImage: false,
  495. columnSortable: false,
  496. sortLv: 0,
  497. status: true,
  498. fixed: '',
  499. columnWidth: 80
  500. },
  501. ],
  502. searchData:{
  503. page: 1,
  504. limit: 100,
  505. site: this.$store.state.user.site,
  506. buNo: '',
  507. projectId: '',
  508. testPartNo: '',
  509. userName: this.$store.state.user.name,
  510. finalPartNo: '',
  511. customerPartNo: ''
  512. },
  513. projectData: {
  514. id: 0,
  515. site:this.$store.state.user.site,
  516. projectLevel:'',
  517. projectId:'',
  518. projectTypeDb:'',
  519. projectType:'',
  520. customerName:'',
  521. customerId:'',
  522. projectName:'',
  523. projectDesc:'',
  524. needDate:'',
  525. priority:'',
  526. projectSource:'',
  527. priorityDesc:'',
  528. projectSourceDesc:'',
  529. projectManagerName:'',
  530. projectOwnerName:'',
  531. customerRemark:'',
  532. remark:'',
  533. userRoleName:'',
  534. buDesc:'',
  535. buNo:'',
  536. },
  537. customerData: {
  538. site: '',
  539. customerNo: '',
  540. customerDesc: '',
  541. customerDescription: '',
  542. customerIndustry: '',
  543. customerCurrency: '',
  544. turnoverOfYear: '',
  545. potentialRevenueOfYear: '',
  546. importantCustomer: '',
  547. customerStatus: '',
  548. companyName: '',
  549. jobDescription: '',
  550. remark: '',
  551. contactName: '',
  552. contactPhoneNumber1: '',
  553. primaryContact: '',
  554. contactStatus: '',
  555. addressName: ''
  556. },
  557. finalCustomerData: {
  558. site: '',
  559. customerNo: '',
  560. customerDesc: '',
  561. customerDescription: '',
  562. customerIndustry: '',
  563. customerCurrency: '',
  564. turnoverOfYear: '',
  565. potentialRevenueOfYear: '',
  566. importantCustomer: '',
  567. customerStatus: '',
  568. companyName: '',
  569. jobDescription: '',
  570. remark: '',
  571. contactName: '',
  572. contactPhoneNumber1: '',
  573. primaryContact: '',
  574. contactStatus: '',
  575. addressName: ''
  576. },
  577. }
  578. },
  579. mounted() {
  580. this.$nextTick(() => {
  581. this.height = window.innerHeight - 520;
  582. })
  583. },
  584. created() {
  585. this.getBuBySite()
  586. },
  587. methods: {
  588. // 获取用户的bu
  589. getBuBySite () {
  590. let tempData = {
  591. site: this.$store.state.user.site,
  592. }
  593. getBuBySite(tempData).then(({data}) => {
  594. if (data.code === 0) {
  595. this.buList = data.rows
  596. }
  597. })
  598. },
  599. // 获取基础数据列表S
  600. getBaseList(val, type) {
  601. this.tagNo = val
  602. this.tagNo2 = type
  603. this.$nextTick(() => {
  604. let strVal = ''
  605. if (val === 1010) {
  606. if (type == 1) {
  607. strVal = this.searchData.projectType
  608. }
  609. }
  610. this.$refs.baseList.init(val, strVal)
  611. })
  612. },
  613. /* 列表方法的回调 */
  614. getBaseData(val) {
  615. if (this.tagNo === 1010) {
  616. if (this.tagNo2 == 1) {
  617. this.searchData.projectType = val.Base_desc
  618. }
  619. }
  620. },
  621. //导出excel
  622. async createExportData() {
  623. this.searchData.limit = -1
  624. this.searchData.page = 1
  625. await projectInfoSearch(this.searchData).then(({data}) => {
  626. this.exportList= data.page.list;
  627. })
  628. return this.exportList;
  629. },
  630. startDownload() {
  631. // this.exportData = this.dataList
  632. },
  633. finishDownload() {
  634. },
  635. fields() {
  636. let json = "{"
  637. this.columnList1.forEach((item, index) => {
  638. if (index == this.columnList1.length - 1) {
  639. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  640. } else {
  641. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  642. }
  643. })
  644. json += "}"
  645. let s = eval("(" + json + ")")
  646. return s
  647. },
  648. //导出excel
  649. async createExportData2() {
  650. return this.contactList;
  651. },
  652. startDownload2() {
  653. // this.exportData = this.dataList
  654. },
  655. finishDownload2() {
  656. },
  657. fields2 () {
  658. let json = "{"
  659. this.columnList2.forEach((item, index) => {
  660. if (index == this.columnList2.length - 1) {
  661. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  662. } else {
  663. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  664. }
  665. })
  666. json += "}"
  667. let s = eval("(" + json + ")")
  668. return s
  669. },
  670. // 导出 end
  671. // 每页数
  672. sizeChangeHandle (val) {
  673. this.pageSize = val
  674. this.pageIndex = 1
  675. this.search()
  676. },
  677. // 当前页
  678. currentChangeHandle (val) {
  679. this.pageIndex = val
  680. this.search()
  681. },
  682. //单击切换订单
  683. changeData (row) {
  684. this.currentRow = JSON.parse(JSON.stringify(row))
  685. let inData = {
  686. site: row.site,
  687. projectId: row.projectId,
  688. page: 1,
  689. limit: 10,
  690. }
  691. projectInfoSearch(inData).then(({data}) => {
  692. if (data.code === 0) {
  693. if (data.page.list.length > 0) {
  694. this.projectData = data.page.list[0]
  695. }
  696. }
  697. this.dataListLoading = false
  698. })
  699. let inData2 = {
  700. site: row.site,
  701. customerNo: row.customerId,
  702. page: 1,
  703. limit: 10,
  704. }
  705. customerInformationSearchForCheck(inData2).then(({data}) => {
  706. if (data.code === 0) {
  707. if (data.page.list.length > 0) {
  708. this.customerData = data.page.list[0]
  709. }
  710. }
  711. })
  712. let inData3 = {
  713. site: row.site,
  714. customerNo: row.finalCustomerId,
  715. page: 1,
  716. limit: 10,
  717. }
  718. customerInformationSearchForCheck(inData3).then(({data}) => {
  719. if (data.code === 0) {
  720. if (data.page.list.length > 0) {
  721. this.finalCustomerData = data.page.list[0]
  722. }
  723. }
  724. })
  725. this.refreshCurrentTabTable()
  726. },
  727. search () {
  728. this.searchData.limit = this.pageSize
  729. this.searchData.page = this.pageIndex
  730. projectInfoPartSearch(this.searchData).then(({data}) => {
  731. if (data.code === 0) {
  732. this.dataList1 = data.page.list
  733. this.pageIndex = data.page.currPage
  734. this.pageSize = data.page.pageSize
  735. this.totalPage = data.page.totalCount
  736. if(this.dataList1.length>0){
  737. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  738. this.changeData(this.dataList1[0])
  739. }
  740. }
  741. this.dataListLoading = false
  742. })
  743. },
  744. tabClick (tab, event) {
  745. // 刷新列表数据
  746. this.refreshCurrentTabTable()
  747. },
  748. // 刷新页签的table数据
  749. refreshCurrentTabTable () {
  750. if (this.activeName === 'technicalSpecification') {
  751. this.refreshTable('technicalSpecification');
  752. }
  753. if (this.activeName === 'projectQuotation') {
  754. this.refreshTable('projectQuotation');
  755. }
  756. if (this.activeName === 'quotationHeader') {
  757. this.refreshTable('quotationHeader');
  758. }
  759. if (this.activeName === 'sample') {
  760. this.refreshTable('sample');
  761. }
  762. if (this.activeName === 'test') {
  763. this.refreshTable('test');
  764. }
  765. if (this.activeName === 'toolApply') {
  766. this.refreshTable('toolApply');
  767. }
  768. },
  769. refreshTable (type) {
  770. let inData = {
  771. site: this.currentRow.site,
  772. testPartNo: this.currentRow.testPartNo,
  773. userName: this.$store.state.user.name,
  774. projectId:this.currentRow.projectId,
  775. page: 1,
  776. limit: 1000
  777. }
  778. if (type==='technicalSpecification') {
  779. this.$refs.technicalSpecification.init(inData)
  780. }
  781. if (type==='projectQuotation') {
  782. this.$refs.projectQuotation.init(inData)
  783. }
  784. // if(type==='quotationHeader'){
  785. // this.$refs.quotationHeader.init(inData)
  786. // }
  787. if (type==='sample') {
  788. this.$refs.sample.init(inData)
  789. }
  790. if (type==='test') {
  791. this.$refs.test.init(inData)
  792. }
  793. if (type==='toolApply') {
  794. let inData = {
  795. site: this.currentRow.site,
  796. orderRef1: this.currentRow.projectId,
  797. username: this.$store.state.user.name,
  798. }
  799. this.$refs.toolApply.init(inData)
  800. }
  801. },
  802. //单击切换订单
  803. searchCustomer (row) {
  804. },
  805. }
  806. }
  807. </script>
  808. <style scoped>
  809. </style>