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.

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