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.

1357 lines
48 KiB

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