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.

1562 lines
54 KiB

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