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.

987 lines
34 KiB

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