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.

1622 lines
56 KiB

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