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.

1027 lines
36 KiB

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