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.

1583 lines
55 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
8 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
7 months 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
12 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
8 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
8 months ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
8 months ago
8 months ago
7 months ago
2 years ago
8 months ago
8 months ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
8 months ago
8 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
8 months ago
2 years ago
8 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
8 months 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
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
8 months ago
7 months ago
7 months ago
7 months ago
8 months ago
2 years 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.status === 'cg'">删除</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. import {siteList} from "../../../api/base/site";
  533. import {technicalSpecificationListSearchByAnyField} from "../../../api/sampleManagement/technicalSpecificationList";
  534. export default {
  535. components: {
  536. OssComponents,
  537. FilterSearch,
  538. ChangeLog,
  539. CustomerInfo,
  540. ApprovalInformation,
  541. Chooselist,
  542. AddOrUpdate,
  543. BuSelect,
  544. },
  545. data() {
  546. return {
  547. approvalList: [],
  548. fileContentList: [],
  549. activeName: 'info',
  550. addOrUpdateVisible: false,
  551. filterVisible: false,
  552. height: 200,
  553. dataList1: [],
  554. partList: [],
  555. copyData: {
  556. site: '',
  557. buNo: '',
  558. codeNo: '',
  559. oriCodeNo: '',
  560. testPartNo: '',
  561. projectId: '',
  562. revNo: '',
  563. newPartNo: '',
  564. page: 1,
  565. limit: 20
  566. },
  567. partModelFlag: false,
  568. searchData: {
  569. page: 1,
  570. limit: 20,
  571. site: this.$store.state.user.site,
  572. userName: this.$store.state.user.name,
  573. testPartNo: '',
  574. oriCodeNo: '',
  575. statusDesc: '',
  576. codeNo: '',
  577. ecnFlag: '',
  578. buNo: '',
  579. customerDesc: '',
  580. sp: '',
  581. nodeId: '',
  582. documentSource: '',
  583. },
  584. nodeOptions: [],
  585. pageIndex: 1,
  586. pageSize: 20,
  587. totalPage: 0,
  588. pageIndex2: 1,
  589. pageSize2: 20,
  590. totalPage2: 0,
  591. dataListLoading: false,
  592. currentRow:'',
  593. exportList:[],
  594. columnList1:[
  595. {
  596. userId: this.$store.state.user.name,
  597. functionId: 103002,
  598. serialNumber: '103002Table1BuNo',
  599. tableId: "103002Table1",
  600. tableName: "技术参数卡列表",
  601. columnProp: "buNo",
  602. headerAlign: "center",
  603. align: "center",
  604. columnLabel: "工艺",
  605. columnHidden: false,
  606. columnImage: false,
  607. columnSortable: false,
  608. sortLv: 0,
  609. status: true,
  610. fixed: '',
  611. columnWidth: 80
  612. },{
  613. userId: this.$store.state.user.name,
  614. functionId: 103002,
  615. serialNumber: '103002Table1OriCodeNo',
  616. tableId: "103002Table1",
  617. tableName: "技术参数卡列表",
  618. columnProp: "oriCodeNo",
  619. headerAlign: "center",
  620. align: "left",
  621. columnLabel: "参数卡编码",
  622. columnHidden: false,
  623. columnImage: false,
  624. columnSortable: false,
  625. sortLv: 0,
  626. status: true,
  627. fixed: '',
  628. columnWidth: 100
  629. },{
  630. userId: this.$store.state.user.name,
  631. functionId: 103002,
  632. serialNumber: '103002Table1RevNo',
  633. tableId: "103002Table1",
  634. tableName: "技术参数卡列表",
  635. columnProp: "revNo",
  636. headerAlign: "center",
  637. align: "left",
  638. columnLabel: "版本号",
  639. columnHidden: false,
  640. columnImage: false,
  641. columnSortable: false,
  642. sortLv: 0,
  643. status: true,
  644. fixed: '',
  645. columnWidth: 80
  646. },{
  647. userId: this.$store.state.user.name,
  648. functionId: 103002,
  649. serialNumber: '103002Table1ProofingNo',
  650. tableId: "103002Table1",
  651. tableName: "技术参数卡列表",
  652. columnProp: "proofingNo",
  653. headerAlign: "center",
  654. align: "center",
  655. columnLabel: "打样单号",
  656. columnHidden: false,
  657. columnImage: false,
  658. columnSortable: false,
  659. sortLv: 0,
  660. status: true,
  661. fixed: '',
  662. columnWidth: 100
  663. },{
  664. userId: this.$store.state.user.name,
  665. functionId: 103002,
  666. serialNumber: '103002Table1Status',
  667. tableId: "103002Table1",
  668. tableName: "技术参数卡列表",
  669. columnProp: "statusDesc",
  670. headerAlign: "center",
  671. align: "left",
  672. columnLabel: "状态",
  673. columnHidden: false,
  674. columnImage: false,
  675. columnSortable: false,
  676. sortLv: 0,
  677. status: true,
  678. fixed: '',
  679. columnWidth: 80
  680. },
  681. {
  682. userId: this.$store.state.user.name,
  683. functionId: 103002,
  684. serialNumber: '103002Table1NodeId',
  685. tableId: "103002Table1",
  686. tableName: "技术参数卡列表",
  687. columnProp: "nodeId",
  688. headerAlign: "center",
  689. align: "left",
  690. columnLabel: "当前节点",
  691. columnHidden: false,
  692. columnImage: false,
  693. columnSortable: false,
  694. sortLv: 0,
  695. status: true,
  696. fixed: '',
  697. columnWidth: 70
  698. },
  699. {
  700. userId: this.$store.state.user.name,
  701. functionId: 103002,
  702. serialNumber: '103002Table1NodeName',
  703. tableId: "103002Table1",
  704. tableName: "技术参数卡列表",
  705. columnProp: "nodeName",
  706. headerAlign: "center",
  707. align: "left",
  708. columnLabel: "节点名称",
  709. columnHidden: false,
  710. columnImage: false,
  711. columnSortable: false,
  712. sortLv: 0,
  713. status: true,
  714. fixed: '',
  715. columnWidth: 150
  716. },{
  717. userId: this.$store.state.user.name,
  718. functionId: 103002,
  719. serialNumber: '103002Table1SP',
  720. tableId: "103002Table1",
  721. tableName: "技术参数卡列表",
  722. columnProp: "sp",
  723. headerAlign: "center",
  724. align: "left",
  725. columnLabel: "当前审批人",
  726. columnHidden: false,
  727. columnImage: false,
  728. columnSortable: false,
  729. sortLv: 0,
  730. status: true,
  731. fixed: '',
  732. columnWidth: 80
  733. },
  734. {
  735. userId: this.$store.state.user.name,
  736. functionId: 103002,
  737. serialNumber: '103002Table1TestPartNo',
  738. tableId: "103002Table1",
  739. tableName: "技术参数卡列表",
  740. columnProp: "testPartNo",
  741. headerAlign: "center",
  742. align: "center",
  743. columnLabel: "PLM物料编码",
  744. columnHidden: false,
  745. columnImage: false,
  746. columnSortable: false,
  747. sortLv: 0,
  748. status: true,
  749. fixed: '',
  750. columnWidth: 140
  751. },
  752. {
  753. userId: this.$store.state.user.name,
  754. functionId: 103002,
  755. serialNumber: '103002Table1FinalPartNo',
  756. tableId: "103002Table1",
  757. tableName: "技术参数卡列表",
  758. columnProp: "finalPartNo",
  759. headerAlign: "center",
  760. align: "center",
  761. columnLabel: "IFS物料编码",
  762. columnHidden: false,
  763. columnImage: false,
  764. columnSortable: false,
  765. sortLv: 0,
  766. status: true,
  767. fixed: '',
  768. columnWidth: 100
  769. },
  770. {
  771. userId: this.$store.state.user.name,
  772. functionId: 103002,
  773. serialNumber: '103002Table1TestPartNo',
  774. tableId: "103002Table1",
  775. tableName: "技术参数卡列表",
  776. columnProp: "projectId",
  777. headerAlign: "center",
  778. align: "center",
  779. columnLabel: "项目号",
  780. columnHidden: false,
  781. columnImage: false,
  782. columnSortable: false,
  783. sortLv: 0,
  784. status: true,
  785. fixed: '',
  786. columnWidth: 100
  787. // },{
  788. // userId: this.$store.state.user.name,
  789. // functionId: 103002,
  790. // serialNumber: '103002Table1TestPartNo',
  791. // tableId: "103002Table1",
  792. // tableName: "技术参数卡列表",
  793. // columnProp: "buNo",
  794. // headerAlign: "center",
  795. // align: "center",
  796. // columnLabel: "BU",
  797. // columnHidden: false,
  798. // columnImage: false,
  799. // columnSortable: false,
  800. // sortLv: 0,
  801. // status: true,
  802. // fixed: '',
  803. // columnWidth: 80
  804. // },{
  805. // userId: this.$store.state.user.name,
  806. // functionId: 103002,
  807. // serialNumber: '103002Table1TestPartNo',
  808. // tableId: "103002Table1",
  809. // tableName: "技术参数卡列表",
  810. // columnProp: "buDesc",
  811. // headerAlign: "center",
  812. // align: "left",
  813. // columnLabel: "BU名称",
  814. // columnHidden: false,
  815. // columnImage: false,
  816. // columnSortable: false,
  817. // sortLv: 0,
  818. // status: true,
  819. // fixed: '',
  820. // columnWidth: 80
  821. },{
  822. userId: this.$store.state.user.name,
  823. functionId: 103002,
  824. serialNumber: '103002Table1PartName',
  825. tableId: "103002Table1",
  826. tableName: "技术参数卡列表",
  827. columnProp: "partDesc",
  828. headerAlign: "center",
  829. align: "left",
  830. columnLabel: "物料名称",
  831. columnHidden: false,
  832. columnImage: false,
  833. columnSortable: false,
  834. sortLv: 0,
  835. status: true,
  836. fixed: '',
  837. columnWidth: 150
  838. },{
  839. userId: this.$store.state.user.name,
  840. functionId: 103002,
  841. serialNumber: '103002Table1ECNFlag',
  842. tableId: "103002Table1",
  843. tableName: "技术参数卡列表",
  844. columnProp: "ecnFlag",
  845. headerAlign: "center",
  846. align: "center",
  847. columnLabel: "ECN变更",
  848. columnHidden: false,
  849. columnImage: false,
  850. columnSortable: false,
  851. sortLv: 0,
  852. status: true,
  853. fixed: '',
  854. columnWidth: 65
  855. },{
  856. userId: this.$store.state.user.name,
  857. functionId: 103002,
  858. serialNumber: '103002Table1EcnNo',
  859. tableId: "103002Table1",
  860. tableName: "技术参数卡列表",
  861. columnProp: "ecnNo",
  862. headerAlign: "center",
  863. align: "center",
  864. columnLabel: "ECN单据号",
  865. columnHidden: false,
  866. columnImage: false,
  867. columnSortable: false,
  868. sortLv: 0,
  869. status: true,
  870. fixed: '',
  871. columnWidth: 100
  872. },{
  873. userId: this.$store.state.user.name,
  874. functionId: 103002,
  875. serialNumber: '103002Table1CreateDate',
  876. tableId: "103002Table1",
  877. tableName: "技术参数卡列表",
  878. columnProp: "createDate",
  879. headerAlign: "center",
  880. align: "center",
  881. columnLabel: "创建时间",
  882. columnHidden: false,
  883. columnImage: false,
  884. columnSortable: false,
  885. sortLv: 0,
  886. status: true,
  887. fixed: '',
  888. columnWidth: 120
  889. },{
  890. userId: this.$store.state.user.name,
  891. functionId: 103002,
  892. serialNumber: '103002Table1CreateBy',
  893. tableId: "103002Table1",
  894. tableName: "技术参数卡列表",
  895. columnProp: "createBy",
  896. headerAlign: "center",
  897. align: "left",
  898. columnLabel: "创建人",
  899. columnHidden: false,
  900. columnImage: false,
  901. columnSortable: false,
  902. sortLv: 0,
  903. status: true,
  904. fixed: '',
  905. columnWidth: 80
  906. },{
  907. userId: this.$store.state.user.name,
  908. functionId: 103002,
  909. serialNumber: '103002Table1UpdateDate',
  910. tableId: "103002Table1",
  911. tableName: "技术参数卡列表",
  912. columnProp: "updateDate",
  913. headerAlign: "center",
  914. align: "center",
  915. columnLabel: "上次修改日期",
  916. columnHidden: false,
  917. columnImage: false,
  918. columnSortable: false,
  919. sortLv: 0,
  920. status: true,
  921. fixed: '',
  922. columnWidth: 120
  923. },{
  924. userId: this.$store.state.user.name,
  925. functionId: 103002,
  926. serialNumber: '103002Table1UpdateBy',
  927. tableId: "103002Table1",
  928. tableName: "技术参数卡列表",
  929. columnProp: "updateBy",
  930. headerAlign: "center",
  931. align: "left",
  932. columnLabel: "修改人",
  933. columnHidden: false,
  934. columnImage: false,
  935. columnSortable: false,
  936. sortLv: 0,
  937. status: true,
  938. fixed: '',
  939. columnWidth: 80
  940. },{
  941. userId: this.$store.state.user.name,
  942. functionId: 103002,
  943. serialNumber: '103002Table1ecnAddress',
  944. tableId: "103002Table1",
  945. tableName: "技术参数卡列表",
  946. columnProp: "ecnAddress",
  947. headerAlign: "center",
  948. align: "left",
  949. columnLabel: "ECN文档链接",
  950. columnHidden: false,
  951. columnImage: false,
  952. columnSortable: false,
  953. sortLv: 0,
  954. status: true,
  955. fixed: '',
  956. columnWidth: 200
  957. },
  958. ],
  959. fileColumnList: [
  960. {
  961. userId: this.$store.state.user.name,
  962. functionId: 103001,
  963. serialNumber: '103001Table2FileName',
  964. tableId: '103001Table2',
  965. tableName: '文件信息表',
  966. columnProp: 'fileName',
  967. headerAlign: 'center',
  968. align: 'center',
  969. columnLabel: '文件名称',
  970. columnHidden: false,
  971. columnImage: false,
  972. columnSortable: false,
  973. sortLv: 0,
  974. status: true,
  975. fixed: '',
  976. columnWidth: 140
  977. },
  978. {
  979. userId: this.$store.state.user.name,
  980. functionId: 103001,
  981. serialNumber: '103001Table2FileRemark',
  982. tableId: '103001Table2',
  983. tableName: '文件信息表',
  984. columnProp: 'fileRemark',
  985. headerAlign: 'center',
  986. align: 'center',
  987. columnLabel: '备注',
  988. columnHidden: false,
  989. columnImage: false,
  990. columnSortable: false,
  991. sortLv: 0,
  992. status: true,
  993. fixed: '',
  994. columnWidth: 240
  995. },
  996. {
  997. userId: this.$store.state.user.name,
  998. functionId: 103001,
  999. serialNumber: '103001Table2CreateDate',
  1000. tableId: '103001Table2',
  1001. tableName: '文件信息表',
  1002. columnProp: 'createDate',
  1003. headerAlign: 'center',
  1004. align: 'center',
  1005. columnLabel: '上传时间',
  1006. columnHidden: false,
  1007. columnImage: false,
  1008. columnSortable: false,
  1009. sortLv: 0,
  1010. status: true,
  1011. fixed: '',
  1012. columnWidth: 140
  1013. },
  1014. {
  1015. userId: this.$store.state.user.name,
  1016. functionId: 103001,
  1017. serialNumber: '103001Table2CreatedBy',
  1018. tableId: '103001Table2',
  1019. tableName: '文件信息表',
  1020. columnProp: 'createBy',
  1021. headerAlign: 'center',
  1022. align: 'center',
  1023. columnLabel: '上传人',
  1024. columnHidden: false,
  1025. columnImage: false,
  1026. columnSortable: false,
  1027. sortLv: 0,
  1028. status: true,
  1029. fixed: '',
  1030. columnWidth: 140
  1031. }
  1032. ],
  1033. infoData:{
  1034. testPartNo:'',
  1035. partTypeDesc:'',
  1036. revNo:'',
  1037. projectId:'',
  1038. ecnFlag:'',
  1039. ecnNo:'',
  1040. ecnAddress:'',
  1041. quotationOfficer:'',
  1042. engineer:'',
  1043. technician:'',
  1044. remark:'',
  1045. },
  1046. customerData:{
  1047. customerId:'',
  1048. customerName:'',
  1049. customerDesc:'',
  1050. finalCustomer:'',
  1051. customerRemark:'',
  1052. remark:'',
  1053. },
  1054. dataRole: {
  1055. partTypeDesc: [
  1056. {
  1057. required: true,
  1058. message: ' ',
  1059. trigger: 'change'
  1060. }
  1061. ],
  1062. partName: [
  1063. {
  1064. required: true,
  1065. message: ' ',
  1066. trigger: 'change'
  1067. }
  1068. ],
  1069. },
  1070. revNoFlag:false,
  1071. revNoData: {
  1072. site:'',
  1073. oriCodeNo:'',
  1074. oldCodeNo:'',
  1075. oldRevNo:'',
  1076. revNo:'',
  1077. testPartNo:'',
  1078. },
  1079. // 导出 start
  1080. exportData: [],
  1081. exportName: '技术参数卡清单'+this.dayjs().format('YYYYMMDDHHmmss'),
  1082. exportHeader: ["技术参数卡清单"],
  1083. exportFooter: [],
  1084. // 导出 end
  1085. }
  1086. },
  1087. mounted() {
  1088. this.$nextTick(() => {
  1089. this.height = window.innerHeight - 520;
  1090. this.fetchNodeOptions()
  1091. })
  1092. },
  1093. activated() {
  1094. if (this.$route.params.type === 'tokenLogin') {
  1095. if (this.$route.params.docNo) {
  1096. // this.searchData.applyNo = this.$route.params.docNo
  1097. let inData={
  1098. page: 1,
  1099. limit: this.pageSize,
  1100. site: this.$store.state.user.site,
  1101. userName: this.$store.state.user.name,
  1102. codeNo:this.$route.params.docNo,
  1103. }
  1104. technicalSpecificationListSearch(inData).then(({data}) => {
  1105. if (data.code == 0) {
  1106. this.dataList1 = data.page.list
  1107. this.totalPage = data.page.totalCount
  1108. if(this.dataList1.length>0){
  1109. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1110. this.changeData(this.dataList1[0])
  1111. this.jumpDetail(this.dataList1[0])
  1112. }
  1113. }
  1114. this.dataListLoading = false
  1115. })
  1116. }
  1117. } else if (this.$route.params.type === 'test') {
  1118. this.searchData.buNo = this.$route.params.buNo
  1119. this.searchData.testPartNo = this.$route.params.testPartNo
  1120. this.search();
  1121. setTimeout(() => {
  1122. this.searchData.buNo = '';
  1123. this.searchData.testPartNo = '';
  1124. }, 200)
  1125. } else if (this.$route.params.codeNo) {
  1126. this.searchData.oriCodeNo = this.$route.params.codeNo;
  1127. this.search();
  1128. setTimeout(() => {
  1129. this.searchData.oriCodeNo = '';
  1130. }, 200)
  1131. } else if (this.$route.params.nowCodeNo) {
  1132. this.searchData.oriCodeNo = this.$route.params.nowCodeNo;
  1133. this.search();
  1134. setTimeout(() => {
  1135. this.searchData.oriCodeNo = '';
  1136. }, 200)
  1137. }
  1138. },
  1139. methods: {
  1140. // 下达
  1141. issueModal (row) {
  1142. this.$confirm(`是否确认下达?`, '提示', {
  1143. confirmButtonText: '确定',
  1144. cancelButtonText: '取消',
  1145. type: 'warning'
  1146. }).then(() => {
  1147. let tempData = {
  1148. site: row.site,
  1149. userName: this.$store.state.user.name,
  1150. codeNo: row.codeNo,
  1151. menuId: this.$route.meta.menuId
  1152. }
  1153. issueChange(tempData).then(({data}) => {
  1154. if (data && data.code === 0) {
  1155. this.search()
  1156. this.$message({message: '操作成功', type: 'success'})
  1157. } else {
  1158. this.$alert(data.msg, '错误', {
  1159. confirmButtonText: '确定'
  1160. })
  1161. }
  1162. })
  1163. })
  1164. },
  1165. // 每页数
  1166. sizeChangeHandle (val) {
  1167. this.pageSize = val
  1168. this.pageIndex = 1
  1169. this.search()
  1170. },
  1171. // 当前页
  1172. currentChangeHandle (val) {
  1173. this.pageIndex = val
  1174. this.search()
  1175. },
  1176. // 每页数
  1177. sizeChangeHandle2 (val) {
  1178. this.pageSize2 = val
  1179. this.pageIndex2 = 1
  1180. this.searchCopyPart()
  1181. },
  1182. // 当前页
  1183. currentChangeHandle2 (val) {
  1184. this.pageIndex2 = val
  1185. this.searchCopyPart()
  1186. },
  1187. search () {
  1188. this.searchData.limit = this.pageSize
  1189. this.searchData.page = this.pageIndex
  1190. this.dataListLoading = true;
  1191. technicalSpecificationListSearch(this.searchData).then(({data}) => {
  1192. if (data && data.code === 0) {
  1193. this.dataList1 = data.page.list
  1194. // this.pageIndex = data.page.currPage
  1195. // this.pageSize = data.page.pageSize
  1196. this.totalPage = data.page.totalCount
  1197. if(this.dataList1.length>0){
  1198. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1199. this.changeData(this.dataList1[0])
  1200. }
  1201. }
  1202. this.dataListLoading = false
  1203. }).catch((error)=>{
  1204. this.$message.error(error)
  1205. this.dataListLoading = false
  1206. })
  1207. },
  1208. changeData (row) {
  1209. this.currentRow = JSON.parse(JSON.stringify(row))
  1210. this.infoData = row
  1211. this.refreshCurrentTabTable()
  1212. },
  1213. // 获取基础数据列表S
  1214. getBaseList (val, type) {
  1215. this.tagNo = val
  1216. this.tagNo1 = type
  1217. this.$nextTick(() => {
  1218. let strVal = ''
  1219. if (val === 1013) {
  1220. if(type==1) {
  1221. strVal = this.dataForm.partType
  1222. }
  1223. }
  1224. if (val === 105) {
  1225. if(type==1) {
  1226. strVal = this.searchData.testPartNo
  1227. }
  1228. }
  1229. if (val === 102) {
  1230. if(type==1) {
  1231. strVal = this.searchData.customerDesc
  1232. }
  1233. }
  1234. this.$refs.baseList.init(val, strVal)
  1235. })
  1236. },
  1237. refreshCurrentTabTable () {
  1238. if (this.activeName == 'customerInfo') {
  1239. this.getTechnicalCustomerInfoData();
  1240. }
  1241. if (this.activeName === 'approvalInformation') {
  1242. this.getApprovalList()
  1243. }
  1244. },
  1245. getTechnicalCustomerInfoData () {
  1246. let inData = {
  1247. id: this.currentRow.id
  1248. }
  1249. getTechnicalCustomerInfoData(inData).then(({data}) => {
  1250. //区分请求成功和失败的状况
  1251. if (data && data.code == 0) {
  1252. this.customerData = data.row
  1253. } else {
  1254. this.customerData = []
  1255. }
  1256. })
  1257. },
  1258. /* 列表方法的回调 */
  1259. getBaseData (val) {
  1260. if (this.tagNo === 1013) {
  1261. if(this.tagNo1==1) {
  1262. this.dataForm.partType = val.Base_id
  1263. this.dataForm.partTypeDesc = val.Base_desc
  1264. }
  1265. }
  1266. if (this.tagNo === 105) {
  1267. if(this.tagNo1==1) {
  1268. this.searchData.testPartNo = val.Test_part_no
  1269. }
  1270. }
  1271. if (this.tagNo === 102) {
  1272. if(this.tagNo1==1) {
  1273. this.searchData.customerDesc = val.Customer_desc
  1274. }
  1275. }
  1276. },
  1277. // 新增 / 修改
  1278. addOrUpdateHandle (id) {
  1279. this.addOrUpdateVisible = true
  1280. this.$nextTick(() => {
  1281. this.$refs.addOrUpdate.init(id)
  1282. })
  1283. },
  1284. jumpDetail(row){
  1285. let now = Date.now();
  1286. let inData = {
  1287. site: this.$store.state.user.site,
  1288. codeNo: row.codeNo,
  1289. buNo: row.buNo,
  1290. username: this.$store.state.user.name,
  1291. uuid:now+'',
  1292. activeName:'baseInfo'
  1293. };
  1294. localStorage.setItem('tsfData', JSON.stringify(inData))
  1295. window.open('#/BMPage/'+now);
  1296. // this.$router.replace('sampleManagement-technicalSpecificationDetail/technicalSpecificationDetail')
  1297. },
  1298. deleteData(row){
  1299. this.$confirm('确定要删除这条数据?', '提示', {
  1300. confirmButtonText: '确定',
  1301. cancelButtonText: '取消',
  1302. type: 'warning'
  1303. }).then(() => {
  1304. deleteTechnicalSpecificationList(row).then(({data}) => {
  1305. if (data && data.code === 0) {
  1306. this.$message.success( '操作成功')
  1307. this.search();
  1308. } else {
  1309. this.$message.error(data.msg)
  1310. }
  1311. })
  1312. }).catch(() => {
  1313. })
  1314. },
  1315. addRevModel(row){
  1316. this.revNoData={
  1317. site:row.site,
  1318. oriCodeNo:row.oriCodeNo,
  1319. oldCodeNo:row.codeNo,
  1320. oldRevNo:row.revNo,
  1321. revNo:'',
  1322. testPartNo:row.testPartNo,
  1323. }
  1324. this.revNoFlag=true;
  1325. },
  1326. upBMRevNo(){
  1327. this.$confirm('确定要升版?', '提示', {
  1328. confirmButtonText: '确定',
  1329. cancelButtonText: '取消',
  1330. type: 'warning'
  1331. }).then(() => {
  1332. upBMRevNo(this.revNoData).then(({data}) => {
  1333. if (data && data.code === 0) {
  1334. this.$message.success( '操作成功')
  1335. this.revNoFlag=false;
  1336. this.search();
  1337. } else {
  1338. this.$message.error(data.msg)
  1339. }
  1340. })
  1341. }).catch(() => {
  1342. })
  1343. },
  1344. //导出excel
  1345. async createExportData() {
  1346. this.searchData.limit = -1
  1347. this.searchData.page = 1
  1348. await technicalSpecificationListSearch(this.searchData).then(({data}) => {
  1349. this.exportList= data.page.list;
  1350. })
  1351. return this.exportList;
  1352. },
  1353. startDownload() {
  1354. // this.exportData = this.dataList
  1355. },
  1356. finishDownload() {
  1357. },
  1358. fields() {
  1359. let json = "{"
  1360. this.columnList1.forEach((item, index) => {
  1361. if (index == this.columnList1.length - 1) {
  1362. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1363. } else {
  1364. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1365. }
  1366. })
  1367. json += "}"
  1368. let s = eval("(" + json + ")")
  1369. return s
  1370. },
  1371. // test() {
  1372. // this.$router.push('quotation-sellForQuotation-quoteDetail')
  1373. // },
  1374. getApprovalList () {
  1375. if (Object.keys(this.currentRow).length !== 0) {
  1376. let tempData = {
  1377. site: this.$store.state.user.site,
  1378. menuId: this.$route.meta.menuId,
  1379. documentNo:this.currentRow.codeNo
  1380. }
  1381. getApprovalList(tempData).then(({data}) => {
  1382. if (data && data.code === 0) {
  1383. this.approvalList = data.rows
  1384. } else {
  1385. this.approvalList = []
  1386. }
  1387. })
  1388. }
  1389. },
  1390. copyBM (row) {
  1391. this.copyData = {
  1392. site: row.site,
  1393. buNo: '',
  1394. codeNo: row.codeNo,
  1395. oriCodeNo: row.oriCodeNo,
  1396. testPartNo: '',
  1397. projectId: row.projectId,
  1398. revNo: row.revNo,
  1399. newPartNo: '',
  1400. limit: this.pageSize2,
  1401. page: this.pageIndex2
  1402. }
  1403. searchCopyPart(this.copyData).then(({data}) => {
  1404. if (data.code === 0) {
  1405. this.partList = data.page.list
  1406. this.pageIndex2 = data.page.currPage
  1407. this.pageSize2 = data.page.pageSize
  1408. this.totalPage2 = data.page.totalCount
  1409. }
  1410. this.dataListLoading = false
  1411. })
  1412. this.partModelFlag = true
  1413. },
  1414. // copy part 列表查询
  1415. searchCopyPart () {
  1416. this.copyData.limit = this.pageSize2
  1417. this.copyData.page = this.pageIndex2
  1418. searchCopyPart(this.copyData).then(({data}) => {
  1419. if (data.code === 0) {
  1420. this.partList = data.page.list
  1421. this.pageIndex2 = data.page.currPage
  1422. this.pageSize2 = data.page.pageSize
  1423. this.totalPage2 = data.page.totalCount
  1424. } else {
  1425. this.partList = []
  1426. }
  1427. })
  1428. },
  1429. // 双击选择
  1430. choosePartNo (row) {
  1431. let tempData = {
  1432. site: this.copyData.site,
  1433. codeNo: this.copyData.codeNo,
  1434. testPartNo: this.copyData.testPartNo,
  1435. projectId: this.copyData.projectId,
  1436. revNo: this.copyData.revNo,
  1437. newPartNo: row.testPartNo,
  1438. username: this.$store.state.user.name
  1439. }
  1440. this.$confirm('确定要拷贝?', '提示', {
  1441. confirmButtonText: '确定',
  1442. cancelButtonText: '取消',
  1443. type: 'warning'
  1444. }).then(() => {
  1445. copyBm(tempData).then(({data}) => {
  1446. if (data && data.code === 0) {
  1447. this.$message.success( '操作成功')
  1448. this.partModelFlag = false
  1449. this.search()
  1450. } else {
  1451. this.$message.error(data.msg)
  1452. }
  1453. })
  1454. })
  1455. },
  1456. // Dead
  1457. bmStatusToDead (row) {
  1458. this.$confirm('确定将技术参数卡设置为【Dead】?', '提示', {
  1459. confirmButtonText: '确定',
  1460. cancelButtonText: '取消',
  1461. type: 'warning'
  1462. }).then(() => {
  1463. row.username = this.$store.state.user.name
  1464. bmStatusToDead(row).then(({data}) => {
  1465. if (data && data.code === 0) {
  1466. this.$message.success( '操作成功')
  1467. this.search()
  1468. } else {
  1469. this.$message.error(data.msg)
  1470. }
  1471. })
  1472. })
  1473. },
  1474. // Re-Sample
  1475. bmStatusToCg (row) {
  1476. this.$confirm('确定将技术参数卡设置为【草稿】?', '提示', {
  1477. confirmButtonText: '确定',
  1478. cancelButtonText: '取消',
  1479. type: 'warning'
  1480. }).then(() => {
  1481. row.username = this.$store.state.user.name
  1482. bmStatusToCg(row).then(({data}) => {
  1483. if (data && data.code === 0) {
  1484. this.$message.success( '操作成功')
  1485. this.search()
  1486. } else {
  1487. this.$message.error(data.msg)
  1488. }
  1489. })
  1490. })
  1491. },
  1492. // 归档
  1493. bmStatusToFinish (row) {
  1494. this.$confirm('确定将技术参数卡归档?', '提示', {
  1495. confirmButtonText: '确定',
  1496. cancelButtonText: '取消',
  1497. type: 'warning'
  1498. }).then(() => {
  1499. row.username = this.$store.state.user.name
  1500. bmStatusToFinish(row).then(({data}) => {
  1501. if (data && data.code === 0) {
  1502. this.$message.success( '操作成功')
  1503. this.search()
  1504. } else {
  1505. this.$message.error(data.msg)
  1506. }
  1507. })
  1508. })
  1509. },
  1510. fetchNodeOptions() {
  1511. getNodeList(this.searchData).then(({ data }) => {
  1512. if (data && data.code === 0) {
  1513. this.nodeOptions = data.rows.map(item => ({
  1514. id: item.nodeId,
  1515. name: item.nodeName
  1516. }));
  1517. } else {
  1518. this.$message.error('获取节点列表失败');
  1519. }
  1520. }).catch(error => {
  1521. this.$message.error('请求失败:' + error);
  1522. });
  1523. },
  1524. queryByAnyField(params){
  1525. params.no = this.pageIndex
  1526. params.size = this.pageSize
  1527. params.site = this.$store.state.user.site
  1528. technicalSpecificationListSearchByAnyField(params).then(({data})=>{
  1529. if (data && data.code === 0){
  1530. this.dataList1 = data.page.list
  1531. }else {
  1532. this.$message.warning(data.msg)
  1533. }
  1534. }).catch((error)=>{
  1535. this.$message.error(error)
  1536. })
  1537. this.filterVisible = false
  1538. },
  1539. },
  1540. }
  1541. </script>
  1542. <style scoped>
  1543. input[readonly] {
  1544. cursor: text;
  1545. }
  1546. </style>