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.

946 lines
32 KiB

3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'参数卡编码'">
  5. <el-input v-model="searchData.oriCodeNo" style="width: 130px"></el-input>
  6. </el-form-item>
  7. <el-form-item >
  8. <span slot="label" style="" @click="getBaseList(105,1)"><a herf="#">测试料号</a></span>
  9. <el-input v-model="searchData.testPartNo" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'状态'">
  12. <el-input v-model="searchData.statusDesc" style="width: 130px"></el-input>
  13. </el-form-item>
  14. <el-form-item label=" ">
  15. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  16. <el-button @click="addOrUpdateHandle()" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>
  17. <download-excel
  18. :fields="fields()"
  19. :data="exportData"
  20. type="xls"
  21. :name="exportName"
  22. :header="exportHeader"
  23. :footer="exportFooter"
  24. :fetch="createExportData"
  25. :before-generate="startDownload"
  26. :before-finish="finishDownload"
  27. worksheet="导出信息"
  28. class="el-button el-button--primary el-button--medium">
  29. {{ '导出' }}
  30. </download-excel>
  31. </el-form-item>
  32. </el-form>
  33. <el-table
  34. :data="dataList1"
  35. :height="height"
  36. border
  37. ref="mainTable"
  38. @row-click="changeData"
  39. highlight-current-row
  40. v-loading="dataListLoading"
  41. style="width: 100%; ">
  42. <el-table-column
  43. v-for="(item,index) in columnList1" :key="index"
  44. :sortable="item.columnSortable"
  45. :prop="item.columnProp"
  46. :header-align="item.headerAlign"
  47. :show-overflow-tooltip="item.showOverflowTooltip"
  48. :align="item.align"
  49. :fixed="item.fixed==''?false:item.fixed"
  50. :min-width="item.columnWidth"
  51. :label="item.columnLabel">
  52. <template slot-scope="scope">
  53. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  54. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column
  58. header-align="center"
  59. align="center"
  60. width="150"
  61. fixed="right"
  62. label="操作">
  63. <template slot-scope="scope">
  64. <a type="text" size="small" @click="addRevModel(scope.row)" v-if="scope.row.statusDesc!=='已完成'">升版</a>
  65. <a type="text" size="small" @click="jumpDetail(scope.row)">详情</a>
  66. <a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)" v-if="scope.row.statusDesc!=='已完成'">修改</a>
  67. <a type="text" size="small" @click="deleteData(scope.row)" v-if="scope.row.statusDesc!=='已完成'">删除</a>
  68. <a type="text" size="small" v-if="scope.row.status === 'cg'" @click="issueModal(scope.row)">下达</a>
  69. </template>
  70. </el-table-column>
  71. </el-table>
  72. <el-pagination
  73. @size-change="sizeChangeHandle"
  74. @current-change="currentChangeHandle"
  75. :current-page="pageIndex"
  76. :page-sizes="[20, 50, 100, 1000]"
  77. :page-size="pageSize"
  78. :total="totalPage"
  79. layout="total, sizes, prev, pager, next, jumper">
  80. </el-pagination>
  81. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="refreshCurrentTabTable">
  82. <el-tab-pane label="基本信息" name="info">
  83. <el-form label-position="top" label-width="100px" >
  84. <el-row :gutter="20">
  85. <el-col :span="6"><div class="grid-content bg-purple">
  86. <el-form-item :label="'物料编码'">
  87. <el-input v-model="infoData.testPartNo" readonly ></el-input>
  88. </el-form-item>
  89. </div></el-col>
  90. <el-col :span="6"><div class="grid-content bg-purple">
  91. <el-form-item :label="'物料类型'">
  92. <el-input v-model="infoData.partTypeDesc" readonly ></el-input>
  93. </el-form-item>
  94. </div></el-col>
  95. <el-col :span="6"><div class="grid-content bg-purple">
  96. <el-form-item :label="'版本号'">
  97. <el-input v-model="infoData.revNo" readonly ></el-input>
  98. </el-form-item>
  99. </div></el-col>
  100. <el-col :span="6"><div class="grid-content bg-purple">
  101. <el-form-item :label="'项目号'">
  102. <el-input v-model="infoData.projectId" readonly ></el-input>
  103. </el-form-item>
  104. </div></el-col>
  105. </el-row>
  106. <el-row :gutter="20">
  107. <el-col :span="8"><div class="grid-content bg-purple">
  108. <el-form-item :label="'ECN变更'">
  109. <el-input v-model="infoData.ecnFlag" readonly ></el-input>
  110. </el-form-item>
  111. </div></el-col>
  112. <el-col :span="8"><div class="grid-content bg-purple">
  113. <el-form-item :label="'ECN单据号'">
  114. <el-input v-model="infoData.ecnNo" readonly ></el-input>
  115. </el-form-item>
  116. </div></el-col>
  117. <el-col :span="8"><div class="grid-content bg-purple">
  118. <el-form-item :label="'ECN文档链接'">
  119. <el-input v-model="infoData.ecnAddress" readonly ></el-input>
  120. </el-form-item>
  121. </div></el-col>
  122. </el-row>
  123. <el-row :gutter="20">
  124. <el-col :span="8"><div class="grid-content bg-purple">
  125. <el-form-item :label="'报价员'">
  126. <el-input v-model="infoData.quotationOfficer" readonly ></el-input>
  127. </el-form-item>
  128. </div></el-col>
  129. <el-col :span="8"><div class="grid-content bg-purple">
  130. <el-form-item :label="'工程师'">
  131. <el-input v-model="infoData.engineer" readonly ></el-input>
  132. </el-form-item>
  133. </div></el-col>
  134. <el-col :span="8"><div class="grid-content bg-purple">
  135. <el-form-item :label="'技术员'">
  136. <el-input v-model="infoData.technician" readonly ></el-input>
  137. </el-form-item>
  138. </div></el-col>
  139. </el-row>
  140. <el-row :gutter="20">
  141. <el-col :span="24"><div class="grid-content bg-purple">
  142. <el-form-item :label="'备注信息'" style="height: 70px">
  143. <el-input
  144. type="textarea"
  145. v-model="infoData.remark "
  146. :rows="3"
  147. resize='none'
  148. maxlength="120"
  149. show-word-limit
  150. readonly
  151. style="height: 60px">
  152. </el-input>
  153. </el-form-item>
  154. </div></el-col>
  155. </el-row>
  156. </el-form>
  157. </el-tab-pane>
  158. <el-tab-pane label="客户信息" name="customerInfo">
  159. <el-form label-position="top" label-width="100px" >
  160. <el-row :gutter="20">
  161. <el-col :span="6"><div class="grid-content bg-purple">
  162. <el-form-item :label="'客户代码'">
  163. <el-input v-model="customerData.customerId" readonly ></el-input>
  164. </el-form-item>
  165. </div></el-col>
  166. <el-col :span="6"><div class="grid-content bg-purple">
  167. <el-form-item :label="'客户名称'">
  168. <el-input v-model="customerData.customerName" readonly ></el-input>
  169. </el-form-item>
  170. </div></el-col>
  171. <el-col :span="12"><div class="grid-content bg-purple">
  172. <el-form-item :label="'客户描述'">
  173. <el-input v-model="customerData.customerDesc" readonly ></el-input>
  174. </el-form-item>
  175. </div></el-col>
  176. </el-row>
  177. <el-row :gutter="20">
  178. <el-col :span="6"><div class="grid-content bg-purple">
  179. <el-form-item :label="'终端客户'">
  180. <el-input v-model="customerData.finalCustomer" readonly ></el-input>
  181. </el-form-item>
  182. </div></el-col>
  183. <el-col :span="6"><div class="grid-content bg-purple">
  184. <el-form-item :label="'直接客户'">
  185. <el-input v-model="customerData.finalCustomer" readonly ></el-input>
  186. </el-form-item>
  187. </div></el-col>
  188. <el-col :span="6"><div class="grid-content bg-purple">
  189. <el-form-item :label="'客户版本'">
  190. <el-input v-model="customerData.finalCustomer" readonly ></el-input>
  191. </el-form-item>
  192. </div></el-col>
  193. <el-col :span="6"><div class="grid-content bg-purple">
  194. <el-form-item :label="'需要的认证'">
  195. <el-input v-model="customerData.finalCustomer" readonly ></el-input>
  196. </el-form-item>
  197. </div></el-col>
  198. </el-row>
  199. <el-row :gutter="20">
  200. <el-col :span="24"><div class="grid-content bg-purple">
  201. <el-form-item :label="'客户要求'" style="height: 70px">
  202. <el-input
  203. type="textarea"
  204. v-model="customerData.customerRemark "
  205. :rows="3"
  206. resize='none'
  207. maxlength="120"
  208. show-word-limit
  209. readonly
  210. style=";height: 60px">
  211. </el-input>
  212. </el-form-item>
  213. </div></el-col>
  214. </el-row>
  215. <el-row :gutter="20">
  216. <el-col :span="24"><div class="grid-content bg-purple">
  217. <el-form-item :label="'客户图纸'" style="margin-top: 15px">
  218. <el-input v-model="customerData.pictureAddess" readonly ></el-input>
  219. </el-form-item>
  220. </div></el-col>
  221. </el-row>
  222. <el-row :gutter="20">
  223. <el-col :span="24"><div class="grid-content bg-purple">
  224. <el-form-item :label="'客户图纸变更说明'">
  225. <el-input v-model="customerData.customerPictureChangeRemark" readonly ></el-input>
  226. </el-form-item>
  227. </div></el-col>
  228. </el-row>
  229. <el-row :gutter="20">
  230. <el-col :span="24"><div class="grid-content bg-purple" >
  231. <el-form-item :label="'转量产附档说明'" style="height: 70px">
  232. <el-input
  233. type="textarea"
  234. v-model="customerData.productionFileComments "
  235. :rows="3"
  236. resize='none'
  237. maxlength="120"
  238. show-word-limit
  239. readonly
  240. style="height: 60px">
  241. </el-input>
  242. </el-form-item>
  243. </div></el-col>
  244. </el-row>
  245. <el-row :gutter="20">
  246. <el-col :span="24"><div class="grid-content bg-purple" >
  247. <el-form-item :label="'其他特殊要求'" style="height: 70px;margin-top: 15px">
  248. <el-input
  249. type="textarea"
  250. v-model="customerData.remark "
  251. :rows="3"
  252. resize='none'
  253. maxlength="120"
  254. show-word-limit
  255. readonly
  256. style="height: 60px">
  257. </el-input>
  258. </el-form-item>
  259. </div></el-col>
  260. </el-row>
  261. </el-form>
  262. <!-- <el-form :inline="true" label-position="top" label-width="100px" style="height: 70px;margin-top: 15px">-->
  263. <!-- <el-form-item :label="'客户应用/要求'">-->
  264. <!-- <el-input-->
  265. <!-- type="textarea"-->
  266. <!-- v-model="customerData.remark "-->
  267. <!-- :rows="3"-->
  268. <!-- resize='none'-->
  269. <!-- maxlength="120"-->
  270. <!-- show-word-limit-->
  271. <!-- readonly-->
  272. <!-- style="width: 926px;height: 60px">-->
  273. <!-- </el-input>-->
  274. <!-- </el-form-item>-->
  275. <!-- </el-form>-->
  276. </el-tab-pane>
  277. </el-tabs>
  278. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
  279. <el-dialog width="500px"
  280. :title="'升版'"
  281. :close-on-click-modal="false"
  282. :visible.sync="revNoFlag">
  283. <el-form :inline="true" label-position="top" label-width="100px" >
  284. <el-form-item :label="'参数卡编码'">
  285. <el-input v-model="revNoData.oriCodeNo" style="width: 130px" disabled></el-input>
  286. </el-form-item>
  287. <el-form-item :label="'版本号'">
  288. <el-input v-model="revNoData.oldRevNo" style="width: 130px" disabled></el-input>
  289. </el-form-item>
  290. <el-form-item :label="'项目物料'">
  291. <el-input v-model="revNoData.testPartNo" style="width: 130px" disabled></el-input>
  292. </el-form-item>
  293. </el-form>
  294. <el-form :inline="true" label-position="top" label-width="100px" >
  295. <el-form-item :label="'版本号'">
  296. <el-input v-model="revNoData.revNo" style="width: 130px" ></el-input>
  297. </el-form-item>
  298. </el-form>
  299. <el-form label-position="top" style="margin-top: 60px; margin-left: 0px;text-align:center">
  300. <el-button type="primary" @click="upBMRevNo()">{{'确定'}}</el-button>
  301. <el-button type="primary" @click="revNoFlag = false">{{'关闭'}}</el-button>
  302. </el-form>
  303. </el-dialog>
  304. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  305. </div>
  306. </template>
  307. <script>
  308. import {
  309. getTechnicalCustomerInfoData,
  310. technicalSpecificationListSearch,
  311. deleteTechnicalSpecificationList,
  312. upBMRevNo,
  313. issueChange, // 下达
  314. } from "@/api/sampleManagement/technicalSpecificationList.js"
  315. import Chooselist from '@/views/modules/common/Chooselist'
  316. import AddOrUpdate from './com_technical-add-or-update'
  317. export default {
  318. components: {
  319. Chooselist,
  320. AddOrUpdate,
  321. },
  322. data() {
  323. return {
  324. activeName:'info',
  325. addOrUpdateVisible:false,
  326. height:200,
  327. dataList1: [],
  328. searchData: {
  329. page: 1,
  330. limit: 100,
  331. site: this.$store.state.user.site,
  332. username: this.$store.state.user.name,
  333. testPartNo: '',
  334. oriCodeNo: '',
  335. statusDesc: '',
  336. codeNo:'',
  337. },
  338. pageIndex: 1,
  339. pageSize: 100,
  340. totalPage: 0,
  341. dataListLoading: false,
  342. currentRow:'',
  343. exportList:[],
  344. columnList1:[
  345. {
  346. userId: this.$store.state.user.name,
  347. functionId: 103002,
  348. serialNumber: '103002Table1BuNo',
  349. tableId: "103002Table1",
  350. tableName: "技术参数卡列表",
  351. columnProp: "buNo",
  352. headerAlign: "center",
  353. align: "center",
  354. columnLabel: "BU",
  355. columnHidden: false,
  356. columnImage: false,
  357. columnSortable: false,
  358. sortLv: 0,
  359. status: true,
  360. fixed: '',
  361. columnWidth: 80
  362. },{
  363. userId: this.$store.state.user.name,
  364. functionId: 103002,
  365. serialNumber: '103002Table1OriCodeNo',
  366. tableId: "103002Table1",
  367. tableName: "技术参数卡列表",
  368. columnProp: "oriCodeNo",
  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: 100
  379. },{
  380. userId: this.$store.state.user.name,
  381. functionId: 103002,
  382. serialNumber: '103002Table1RevNo',
  383. tableId: "103002Table1",
  384. tableName: "技术参数卡列表",
  385. columnProp: "revNo",
  386. headerAlign: "center",
  387. align: "left",
  388. columnLabel: "版本号",
  389. columnHidden: false,
  390. columnImage: false,
  391. columnSortable: false,
  392. sortLv: 0,
  393. status: true,
  394. fixed: '',
  395. columnWidth: 80
  396. },{
  397. userId: this.$store.state.user.name,
  398. functionId: 103002,
  399. serialNumber: '103002Table1ProofingNo',
  400. tableId: "103002Table1",
  401. tableName: "技术参数卡列表",
  402. columnProp: "proofingNo",
  403. headerAlign: "center",
  404. align: "center",
  405. columnLabel: "打样单号",
  406. columnHidden: false,
  407. columnImage: false,
  408. columnSortable: false,
  409. sortLv: 0,
  410. status: true,
  411. fixed: '',
  412. columnWidth: 100
  413. },{
  414. userId: this.$store.state.user.name,
  415. functionId: 103002,
  416. serialNumber: '103002Table1Status',
  417. tableId: "103002Table1",
  418. tableName: "技术参数卡列表",
  419. columnProp: "statusDesc",
  420. headerAlign: "center",
  421. align: "left",
  422. columnLabel: "状态",
  423. columnHidden: false,
  424. columnImage: false,
  425. columnSortable: false,
  426. sortLv: 0,
  427. status: true,
  428. fixed: '',
  429. columnWidth: 80
  430. },{
  431. userId: this.$store.state.user.name,
  432. functionId: 103002,
  433. serialNumber: '103002Table1FinalPartNo',
  434. tableId: "103002Table1",
  435. tableName: "技术参数卡列表",
  436. columnProp: "finalPartNo",
  437. headerAlign: "center",
  438. align: "center",
  439. columnLabel: "最终产品编码",
  440. columnHidden: false,
  441. columnImage: false,
  442. columnSortable: false,
  443. sortLv: 0,
  444. status: true,
  445. fixed: '',
  446. columnWidth: 100
  447. },{
  448. userId: this.$store.state.user.name,
  449. functionId: 103002,
  450. serialNumber: '103002Table1TestPartNo',
  451. tableId: "103002Table1",
  452. tableName: "技术参数卡列表",
  453. columnProp: "testPartNo",
  454. headerAlign: "center",
  455. align: "center",
  456. columnLabel: "项目料号",
  457. columnHidden: false,
  458. columnImage: false,
  459. columnSortable: false,
  460. sortLv: 0,
  461. status: true,
  462. fixed: '',
  463. columnWidth: 140
  464. },{
  465. userId: this.$store.state.user.name,
  466. functionId: 103002,
  467. serialNumber: '103002Table1TestPartNo',
  468. tableId: "103002Table1",
  469. tableName: "技术参数卡列表",
  470. columnProp: "projectId",
  471. headerAlign: "center",
  472. align: "center",
  473. columnLabel: "项目号",
  474. columnHidden: false,
  475. columnImage: false,
  476. columnSortable: false,
  477. sortLv: 0,
  478. status: true,
  479. fixed: '',
  480. columnWidth: 100
  481. // },{
  482. // userId: this.$store.state.user.name,
  483. // functionId: 103002,
  484. // serialNumber: '103002Table1TestPartNo',
  485. // tableId: "103002Table1",
  486. // tableName: "技术参数卡列表",
  487. // columnProp: "buNo",
  488. // headerAlign: "center",
  489. // align: "center",
  490. // columnLabel: "BU",
  491. // columnHidden: false,
  492. // columnImage: false,
  493. // columnSortable: false,
  494. // sortLv: 0,
  495. // status: true,
  496. // fixed: '',
  497. // columnWidth: 80
  498. // },{
  499. // userId: this.$store.state.user.name,
  500. // functionId: 103002,
  501. // serialNumber: '103002Table1TestPartNo',
  502. // tableId: "103002Table1",
  503. // tableName: "技术参数卡列表",
  504. // columnProp: "buDesc",
  505. // headerAlign: "center",
  506. // align: "left",
  507. // columnLabel: "BU名称",
  508. // columnHidden: false,
  509. // columnImage: false,
  510. // columnSortable: false,
  511. // sortLv: 0,
  512. // status: true,
  513. // fixed: '',
  514. // columnWidth: 80
  515. },{
  516. userId: this.$store.state.user.name,
  517. functionId: 103002,
  518. serialNumber: '103002Table1PartName',
  519. tableId: "103002Table1",
  520. tableName: "技术参数卡列表",
  521. columnProp: "partDesc",
  522. headerAlign: "center",
  523. align: "left",
  524. columnLabel: "物料描述",
  525. columnHidden: false,
  526. columnImage: false,
  527. columnSortable: false,
  528. sortLv: 0,
  529. status: true,
  530. fixed: '',
  531. columnWidth: 150
  532. },{
  533. userId: this.$store.state.user.name,
  534. functionId: 103002,
  535. serialNumber: '103002Table1ECNFlag',
  536. tableId: "103002Table1",
  537. tableName: "技术参数卡列表",
  538. columnProp: "ecnFlag",
  539. headerAlign: "center",
  540. align: "center",
  541. columnLabel: "ECN变更",
  542. columnHidden: false,
  543. columnImage: false,
  544. columnSortable: false,
  545. sortLv: 0,
  546. status: true,
  547. fixed: '',
  548. columnWidth: 50
  549. },{
  550. userId: this.$store.state.user.name,
  551. functionId: 103002,
  552. serialNumber: '103002Table1EcnNo',
  553. tableId: "103002Table1",
  554. tableName: "技术参数卡列表",
  555. columnProp: "ecnNo",
  556. headerAlign: "center",
  557. align: "center",
  558. columnLabel: "ECN单据号",
  559. columnHidden: false,
  560. columnImage: false,
  561. columnSortable: false,
  562. sortLv: 0,
  563. status: true,
  564. fixed: '',
  565. columnWidth: 100
  566. },{
  567. userId: this.$store.state.user.name,
  568. functionId: 103002,
  569. serialNumber: '103002Table1CreateDate',
  570. tableId: "103002Table1",
  571. tableName: "技术参数卡列表",
  572. columnProp: "createDate",
  573. headerAlign: "center",
  574. align: "center",
  575. columnLabel: "创建时间",
  576. columnHidden: false,
  577. columnImage: false,
  578. columnSortable: false,
  579. sortLv: 0,
  580. status: true,
  581. fixed: '',
  582. columnWidth: 120
  583. },{
  584. userId: this.$store.state.user.name,
  585. functionId: 103002,
  586. serialNumber: '103002Table1CreateBy',
  587. tableId: "103002Table1",
  588. tableName: "技术参数卡列表",
  589. columnProp: "createBy",
  590. headerAlign: "center",
  591. align: "left",
  592. columnLabel: "创建人",
  593. columnHidden: false,
  594. columnImage: false,
  595. columnSortable: false,
  596. sortLv: 0,
  597. status: true,
  598. fixed: '',
  599. columnWidth: 80
  600. },{
  601. userId: this.$store.state.user.name,
  602. functionId: 103002,
  603. serialNumber: '103002Table1UpdateDate',
  604. tableId: "103002Table1",
  605. tableName: "技术参数卡列表",
  606. columnProp: "updateDate",
  607. headerAlign: "center",
  608. align: "center",
  609. columnLabel: "上次修改日期",
  610. columnHidden: false,
  611. columnImage: false,
  612. columnSortable: false,
  613. sortLv: 0,
  614. status: true,
  615. fixed: '',
  616. columnWidth: 120
  617. },{
  618. userId: this.$store.state.user.name,
  619. functionId: 103002,
  620. serialNumber: '103002Table1UpdateBy',
  621. tableId: "103002Table1",
  622. tableName: "技术参数卡列表",
  623. columnProp: "updateBy",
  624. headerAlign: "center",
  625. align: "left",
  626. columnLabel: "修改人",
  627. columnHidden: false,
  628. columnImage: false,
  629. columnSortable: false,
  630. sortLv: 0,
  631. status: true,
  632. fixed: '',
  633. columnWidth: 80
  634. },{
  635. userId: this.$store.state.user.name,
  636. functionId: 103002,
  637. serialNumber: '103002Table1ecnAddress',
  638. tableId: "103002Table1",
  639. tableName: "技术参数卡列表",
  640. columnProp: "ecnAddress",
  641. headerAlign: "center",
  642. align: "left",
  643. columnLabel: "ECN文档链接",
  644. columnHidden: false,
  645. columnImage: false,
  646. columnSortable: false,
  647. sortLv: 0,
  648. status: true,
  649. fixed: '',
  650. columnWidth: 200
  651. },
  652. ],
  653. infoData:{
  654. testPartNo:'',
  655. partTypeDesc:'',
  656. revNo:'',
  657. projectId:'',
  658. ecnFlag:'',
  659. ecnNo:'',
  660. ecnAddress:'',
  661. quotationOfficer:'',
  662. engineer:'',
  663. technician:'',
  664. remark:'',
  665. },
  666. customerData:{
  667. customerId:'',
  668. customerName:'',
  669. customerDesc:'',
  670. finalCustomer:'',
  671. customerRemark:'',
  672. remark:'',
  673. },
  674. dataRole: {
  675. partTypeDesc: [
  676. {
  677. required: true,
  678. message: ' ',
  679. trigger: 'change'
  680. }
  681. ],
  682. partName: [
  683. {
  684. required: true,
  685. message: ' ',
  686. trigger: 'change'
  687. }
  688. ],
  689. },
  690. revNoFlag:false,
  691. revNoData: {
  692. site:'',
  693. oriCodeNo:'',
  694. oldCodeNo:'',
  695. oldRevNo:'',
  696. revNo:'',
  697. testPartNo:'',
  698. },
  699. // 导出 start
  700. exportData: [],
  701. exportName: '技术参数卡清单'+this.dayjs().format('YYYYMMDDHHmmss'),
  702. exportHeader: ["技术参数卡清单"],
  703. exportFooter: [],
  704. // 导出 end
  705. }
  706. },
  707. mounted() {
  708. this.$nextTick(() => {
  709. this.height = window.innerHeight - 520;
  710. })
  711. },
  712. activated() {
  713. if (this.$route.params.codeNo){
  714. this.searchData.oriCodeNo = this.$route.params.codeNo;
  715. this.search();
  716. setTimeout(() => {
  717. this.searchData.oriCodeNo = '';
  718. }, 200)
  719. }
  720. if (this.$route.params.nowCodeNo){
  721. this.searchData.codeNo = this.$route.params.nowCodeNo;
  722. this.search();
  723. setTimeout(() => {
  724. this.searchData.codeNo = '';
  725. }, 200)
  726. }
  727. },
  728. methods: {
  729. // 下达
  730. issueModal (row) {
  731. this.$confirm(`是否确认下达?`, '提示', {
  732. confirmButtonText: '确定',
  733. cancelButtonText: '取消',
  734. type: 'warning'
  735. }).then(() => {
  736. let tempData = {
  737. site: row.site,
  738. userName: this.$store.state.user.name,
  739. codeNo: row.codeNo,
  740. menuId: this.$route.meta.menuId
  741. }
  742. issueChange(tempData).then(({data}) => {
  743. if (data && data.code === 0) {
  744. this.search()
  745. this.$message({message: '操作成功', type: 'success'})
  746. } else {
  747. this.$alert(data.msg, '错误', {
  748. confirmButtonText: '确定'
  749. })
  750. }
  751. })
  752. })
  753. },
  754. // 每页数
  755. sizeChangeHandle (val) {
  756. this.pageSize = val
  757. this.pageIndex = 1
  758. this.search()
  759. },
  760. // 当前页
  761. currentChangeHandle (val) {
  762. this.pageIndex = val
  763. this.search()
  764. },
  765. search(){
  766. this.searchData.limit = this.pageSize
  767. this.searchData.page = this.pageIndex
  768. technicalSpecificationListSearch(this.searchData).then(({data}) => {
  769. if (data.code == 0) {
  770. this.dataList1 = data.page.list
  771. this.pageIndex = data.page.currPage
  772. this.pageSize = data.page.pageSize
  773. this.totalPage = data.page.totalCount
  774. if(this.dataList1.length>0){
  775. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  776. this.changeData(this.dataList1[0])
  777. }
  778. }
  779. this.dataListLoading = false
  780. })
  781. },
  782. changeData(row) {
  783. this.currentRow = JSON.parse(JSON.stringify(row));
  784. this.infoData=row;
  785. this.refreshCurrentTabTable ();
  786. },
  787. // 获取基础数据列表S
  788. getBaseList (val, type) {
  789. this.tagNo = val
  790. this.tagNo1 = type
  791. this.$nextTick(() => {
  792. let strVal = ''
  793. if (val === 1013) {
  794. if(type==1) {
  795. strVal = this.dataForm.partType
  796. }
  797. }
  798. if (val === 105) {
  799. if(type==1) {
  800. strVal = this.searchData.testPartNo
  801. }
  802. }
  803. this.$refs.baseList.init(val, strVal)
  804. })
  805. },
  806. refreshCurrentTabTable () {
  807. if (this.activeName == 'customerInfo') {
  808. this.getTechnicalCustomerInfoData();
  809. }
  810. },
  811. getTechnicalCustomerInfoData(){
  812. let inData={
  813. id:this.currentRow.id
  814. }
  815. getTechnicalCustomerInfoData(inData).then(({data}) => {
  816. //区分请求成功和失败的状况
  817. if (data && data.code == 0) {
  818. this.customerData = data.row;
  819. } else {
  820. this.customerData = [];
  821. }
  822. });
  823. },
  824. /* 列表方法的回调 */
  825. getBaseData (val) {
  826. if (this.tagNo === 1013) {
  827. if(this.tagNo1==1) {
  828. this.dataForm.partType = val.Base_id
  829. this.dataForm.partTypeDesc = val.Base_desc
  830. }
  831. }
  832. if (this.tagNo === 105) {
  833. if(this.tagNo1==1) {
  834. this.searchData.testPartNo = val.Test_part_no
  835. }
  836. }
  837. },
  838. // 新增 / 修改
  839. addOrUpdateHandle (id) {
  840. this.addOrUpdateVisible = true
  841. this.$nextTick(() => {
  842. this.$refs.addOrUpdate.init(id)
  843. })
  844. },
  845. jumpDetail(row){
  846. let inData={
  847. site:this.$store.state.user.site,
  848. codeNo:row.codeNo,
  849. buNo:row.buNo,
  850. username:this.$store.state.user.name};
  851. localStorage.setItem('tsfData', JSON.stringify(inData))
  852. window.open('#/BMPage');
  853. // this.$router.replace('sampleManagement-technicalSpecificationDetail/technicalSpecificationDetail')
  854. },
  855. deleteData(row){
  856. this.$confirm('确定要删除这条数据?', '提示', {
  857. confirmButtonText: '确定',
  858. cancelButtonText: '取消',
  859. type: 'warning'
  860. }).then(() => {
  861. deleteTechnicalSpecificationList(row).then(({data}) => {
  862. if (data && data.code === 0) {
  863. this.$message.success( '操作成功')
  864. this.search();
  865. } else {
  866. this.$message.error(data.msg)
  867. }
  868. })
  869. }).catch(() => {
  870. })
  871. },
  872. addRevModel(row){
  873. this.revNoData={
  874. site:row.site,
  875. oriCodeNo:row.oriCodeNo,
  876. oldCodeNo:row.codeNo,
  877. oldRevNo:row.revNo,
  878. revNo:'',
  879. testPartNo:row.testPartNo,
  880. }
  881. this.revNoFlag=true;
  882. },
  883. upBMRevNo(){
  884. this.$confirm('确定要升版?', '提示', {
  885. confirmButtonText: '确定',
  886. cancelButtonText: '取消',
  887. type: 'warning'
  888. }).then(() => {
  889. upBMRevNo(this.revNoData).then(({data}) => {
  890. if (data && data.code === 0) {
  891. this.$message.success( '操作成功')
  892. this.revNoFlag=false;
  893. this.search();
  894. } else {
  895. this.$message.error(data.msg)
  896. }
  897. })
  898. }).catch(() => {
  899. })
  900. },
  901. //导出excel
  902. async createExportData() {
  903. this.searchData.limit = -1
  904. this.searchData.page = 1
  905. await technicalSpecificationListSearch(this.searchData).then(({data}) => {
  906. this.exportList= data.page.list;
  907. })
  908. return this.exportList;
  909. },
  910. startDownload() {
  911. // this.exportData = this.dataList
  912. },
  913. finishDownload() {
  914. },
  915. fields() {
  916. let json = "{"
  917. this.columnList1.forEach((item, index) => {
  918. if (index == this.columnList1.length - 1) {
  919. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  920. } else {
  921. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  922. }
  923. })
  924. json += "}"
  925. let s = eval("(" + json + ")")
  926. return s
  927. },
  928. },
  929. }
  930. </script>
  931. <style scoped>
  932. </style>