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.

1251 lines
44 KiB

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