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.

1930 lines
71 KiB

2 years ago
1 year ago
2 years ago
1 year ago
6 months ago
1 year ago
6 months ago
1 year ago
6 months ago
6 months ago
7 months ago
6 months ago
1 year ago
6 months ago
1 year ago
6 months ago
1 year ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
6 months ago
2 years ago
6 months ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
6 months ago
2 years ago
6 months ago
6 months ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
2 years ago
6 months ago
2 years ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
2 years ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
7 months ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
7 months ago
2 years ago
2 years ago
10 months ago
2 years ago
2 years ago
7 months ago
7 months ago
7 months ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year 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
1 year ago
2 years ago
2 years ago
9 months ago
9 months ago
9 months ago
2 years ago
2 years ago
1 year 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
2 years ago
2 years ago
2 years ago
11 months 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
11 months ago
10 months ago
11 months ago
2 years ago
2 years ago
1 year 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
6 months ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
10 months ago
2 years ago
7 months ago
2 years ago
  1. <template>
  2. <div class="mod-config" v-highlight-container>
  3. <el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;" >
  4. <el-row :gutter="20">
  5. <el-col :span="18">
  6. <el-form-item label="工艺/Process">
  7. <dict-data-select
  8. v-if="searchData.site"
  9. :site="searchData.site"
  10. v-model="sheetData.process"
  11. :use-default-value="false"
  12. dict-type="bm_process"
  13. style="width: 120px"
  14. :disabled="plmTechnicalSpecificationSheetFlag('process') === 'N'||readonly">
  15. </dict-data-select>
  16. </el-form-item>
  17. <!-- <el-form-item>
  18. <span slot="label" v-if="plmTechnicalSpecificationSheetFlag('overPrintOperator') === 'N'">热转移打印人员/Technician</span>
  19. <span slot="label" v-else @click="getBaseList(1)"><a herf="#">热转移打印人员/Technician</a></span>
  20. <el-input v-model="sheetData.overPrintOperatorName" ref="overPrintOperatorName" placeholder="请选择人员" readonly style="width: 160px"></el-input>
  21. </el-form-item>
  22. <el-form-item>
  23. <span slot="label" v-if="plmTechnicalSpecificationSheetFlag('printOperator') === 'N'">印刷人员/Technician</span>
  24. <span slot="label" v-else @click="getBaseList(2)"><a herf="#">印刷人员/Technician</a></span>
  25. <el-input v-model="sheetData.printOperatorName" ref="printOperatorName" placeholder="请选择人员" readonly style="width: 160px"></el-input>
  26. </el-form-item>-->
  27. <el-form-item label=" " v-if="!readonly">
  28. <el-button type="primary" @click="searchTable(true)">刷新</el-button>
  29. <el-button type="primary" @click="changeRouteRev()" v-if="((!ifDisableFlag && spForm.sp.includes(searchData.username) && baseForm.status === 'spz') || baseForm.status === 'cg' || superAdmin)">变更</el-button>
  30. <el-button type="primary" @click="jumpRoute()">跳转至Routing</el-button>
  31. </el-form-item>
  32. <el-form-item label=" " v-if="!readonly">
  33. <template v-if="isAuth('103002:bmSave')">
  34. <template v-if="baseForm.status === 'cg' || (baseForm.status === 'spz' && ((spForm.sp && spForm.sp.includes(searchData.username)) || superAdmin))">
  35. <el-button type="primary" @click="updateBMProcess()">保存数据</el-button>
  36. </template>
  37. </template>
  38. <template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
  39. <el-button v-if="baseForm.status === 'spz'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
  40. </template>
  41. <template v-if="superAdmin || (spForm.sp && spForm.sp.includes(searchData.username))">
  42. <el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
  43. </template>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :span="3">
  47. <div class="grid-content bg-purple">
  48. <el-form-item label="当前节点/Status" style="width: 100%">
  49. <el-input :readonly="readonly" v-model="spForm.nodeName" disabled></el-input>
  50. </el-form-item>
  51. </div>
  52. </el-col>
  53. <el-col :span="3">
  54. <div class="grid-content bg-purple">
  55. <el-form-item label="当前节点审批人/Authorizer" style="width: 100%">
  56. <el-input :readonly="readonly" v-model="spForm.sp" disabled></el-input>
  57. </el-form-item>
  58. </div>
  59. </el-col>
  60. </el-row>
  61. </el-form>
  62. <el-form label-position="top" style="margin-top: 1px" v-if="searchData.buNo === 'RDC'">
  63. <el-row :gutter="20" >
  64. <el-col :span="24">
  65. <div class="grid-content bg-purple">
  66. <el-form-item :label="'过程及过程控制/Process and Production Control'">
  67. <el-input
  68. type="textarea"
  69. :readonly="readonly"
  70. v-model="dataForm.processDetail"
  71. :rows="3"
  72. resize='none'
  73. maxlength="255"
  74. show-word-limit
  75. :disabled="ifDisableFlag"
  76. style="height: 60px" >
  77. </el-input>
  78. </el-form-item>
  79. </div>
  80. </el-col>
  81. </el-row>
  82. <el-row :gutter="20" style="margin-top: 60px">
  83. <el-col :span="6">
  84. <div class="grid-content bg-purple">
  85. <el-form-item :label="'是否提供胶条/Supply Adhesive Tape'">
  86. <el-select clearable v-model="dataForm.supplyAdhesiveTape" :disabled="ifDisableFlag||readonly">
  87. <el-option label="Yes" value="Y"></el-option>
  88. <el-option label="No" value="N"></el-option>
  89. </el-select>
  90. </el-form-item>
  91. </div>
  92. </el-col>
  93. <el-col :span="18">
  94. <div class="grid-content bg-purple">
  95. <el-form-item :label="'图稿/Drawing'">
  96. <el-input :readonly="readonly" v-model="dataForm.routingDrawing" :disabled="ifDisableFlag"></el-input>
  97. </el-form-item>
  98. </div>
  99. </el-col>
  100. </el-row>
  101. <el-row :gutter="20" >
  102. <el-col :span="6">
  103. <div class="grid-content bg-purple">
  104. <el-form-item :label="'图稿版本/Drawing Revison'">
  105. <el-input :readonly="readonly" v-model="dataForm.drawingRevison" :disabled="ifDisableFlag"></el-input>
  106. </el-form-item>
  107. </div>
  108. </el-col>
  109. <el-col :span="6">
  110. <div class="grid-content bg-purple">
  111. <el-form-item :label="'图稿日期/Drawing Date'">
  112. <el-date-picker
  113. v-model="searchData.drawingDate"
  114. type="date"
  115. value-format="yyyy-MM-dd"
  116. :disabled="ifDisableFlag||readonly"
  117. placeholder="选择日期">
  118. </el-date-picker>
  119. </el-form-item>
  120. </div>
  121. </el-col>
  122. </el-row>
  123. <el-row :gutter="20">
  124. <el-col :span="24">
  125. <div class="grid-content bg-purple">
  126. <el-form-item :label="'作业说明/WI'">
  127. <el-input
  128. type="textarea"
  129. :readonly="readonly"
  130. v-model="dataForm.workInfo"
  131. :rows="3"
  132. resize='none'
  133. maxlength="255"
  134. show-word-limit
  135. :disabled="ifDisableFlag"
  136. style="height: 60px" >
  137. </el-input>
  138. </el-form-item>
  139. </div>
  140. </el-col>
  141. </el-row>
  142. <el-row :gutter="20" style="margin-top: 60px">
  143. <el-col :span="6">
  144. <div class="grid-content bg-purple">
  145. <el-form-item :label="'作业说明版本/WI Revision'">
  146. <el-input :readonly="readonly" v-model="dataForm.wiRevison" :disabled="ifDisableFlag"></el-input>
  147. </el-form-item>
  148. </div>
  149. </el-col>
  150. <el-col :span="6">
  151. <div class="grid-content bg-purple">
  152. <el-form-item :label="'作业说明日期/WI Date'">
  153. <el-date-picker
  154. v-model="searchData.wiDate"
  155. type="date"
  156. value-format="yyyy-MM-dd"
  157. :disabled="ifDisableFlag||readonly"
  158. placeholder="选择日期">
  159. </el-date-picker>
  160. </el-form-item>
  161. </div>
  162. </el-col>
  163. </el-row>
  164. <el-row :gutter="20">
  165. <el-col :span="6">
  166. <div class="grid-content bg-purple">
  167. <el-form-item>
  168. <span slot="label" v-if="readonly" @click="reviewEngineerChooseModal()">选择审查工程师/Select ME Review Engineer</span>
  169. <span slot="label" v-else @click="reviewEngineerChooseModal()"><a herf="#">选择审查工程师/Select ME Review Engineer</a></span>
  170. <el-input v-model="dataForm.reviewEngineer" readonly @focus="reviewEngineerChooseModal()"></el-input>
  171. </el-form-item>
  172. </div>
  173. </el-col>
  174. <el-col :span="6">
  175. <div class="grid-content bg-purple">
  176. <el-form-item >
  177. <span slot="label" v-if="readonly" @click="peEngineerChooseModal()">选择PE工程师/Select PE Engineer</span>
  178. <span slot="label" v-else @click="peEngineerChooseModal()"><a herf="#">选择PE工程师/Select PE Engineer</a></span>
  179. <el-input v-model="dataForm.peEngineer" readonly @focus="peEngineerChooseModal()"></el-input>
  180. </el-form-item>
  181. </div>
  182. </el-col>
  183. <el-col :span="6">
  184. <div class="grid-content bg-purple">
  185. <el-form-item >
  186. <span slot="label" v-if="readonly" @click="cqeModal()">选择CQE/Select CQE</span>
  187. <span slot="label" v-else @click="cqeModal()"><a herf="#">选择CQE/Select CQE</a></span>
  188. <el-input v-model="dataForm.cqe" readonly @focus="cqeModal()"></el-input>
  189. </el-form-item>
  190. </div>
  191. </el-col>
  192. </el-row>
  193. <el-row :gutter="20">
  194. <el-col :span="24">
  195. <div class="grid-content bg-purple">
  196. <el-form-item :label="'备注/Remark'">
  197. <el-input
  198. type="textarea"
  199. :readonly="readonly"
  200. v-model="dataForm.routingRemark"
  201. :rows="3"
  202. resize='none'
  203. maxlength="255"
  204. show-word-limit
  205. :disabled="ifDisableFlag"
  206. style="height: 60px" >
  207. </el-input>
  208. </el-form-item>
  209. </div>
  210. </el-col>
  211. </el-row>
  212. <el-row :gutter="20" style="margin-top: 60px">
  213. <el-col :span="24">
  214. <div class="grid-content bg-purple">
  215. <el-form-item :label="'措施/Action'">
  216. <el-input
  217. type="textarea"
  218. :readonly="readonly"
  219. v-model="dataForm.routingAction"
  220. :rows="3"
  221. resize='none'
  222. maxlength="255"
  223. show-word-limit
  224. :disabled="ifDisableFlag"
  225. style="height: 60px" >
  226. </el-input>
  227. </el-form-item>
  228. </div>
  229. </el-col>
  230. </el-row>
  231. <el-form-item style="margin-top: 60px;text-align:center">
  232. <el-button type="primary" @click="saveData()" v-if="!ifDisableFlag&&!readonly">保存</el-button>
  233. </el-form-item>
  234. </el-form>
  235. <el-form label-position="top" style="margin-top: 1px" v-else>
  236. <el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;">
  237. <el-form-item label="物料信息/Material">
  238. <el-input :readonly="readonly" v-model="routeData.partNo" disabled style="width: 160px"></el-input>
  239. </el-form-item>
  240. <el-form-item label="工艺路线类型/Routing Type">
  241. <el-input :readonly="readonly" v-model="routeData.routingType" disabled style="width: 160px"></el-input>
  242. </el-form-item>
  243. <el-form-item label="工艺路线版本/Routing Rev.">
  244. <el-input :readonly="readonly" v-model="routeData.routingRevision" disabled style="width: 160px"></el-input>
  245. </el-form-item>
  246. <el-form-item label="替代编码/Alternative No.">
  247. <el-input :readonly="readonly" v-model="routeData.alternativeNo" disabled style="width: 160px"></el-input>
  248. </el-form-item>
  249. <el-form-item label="单双面印刷/Simplex/Duplex">
  250. <dict-data-select
  251. :site="searchData.site"
  252. v-if="searchData.site"
  253. clearable
  254. v-model="sheetData.simplexDuplex"
  255. :use-default-value="false"
  256. dict-type="bm_simplex_duplex"
  257. style="width: 160px"
  258. :disabled="plmTechnicalSpecificationSheetFlag('simplexDuplex') === 'N'||readonly">
  259. </dict-data-select>
  260. </el-form-item>
  261. <el-form-item label="周长/Repeat">
  262. <dict-data-select
  263. :site="searchData.site"
  264. v-if="searchData.site"
  265. clearable
  266. v-model="sheetData.repeat"
  267. dict-type="bm_repeat"
  268. style="width: 160px"
  269. :disabled="plmTechnicalSpecificationSheetFlag('repeat') === 'N'||readonly">
  270. </dict-data-select>
  271. </el-form-item>
  272. </el-form>
  273. <el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;" >
  274. <el-row :gutter="20">
  275. <el-col :span="24">
  276. <!-- <el-form-item label="标签尺寸/Label Size">-->
  277. <!-- <el-input v-model="sheetData.labelSize" style="width: 120px" ></el-input>-->
  278. <!-- </el-form-item>-->
  279. <el-form-item label="标签长度/Label Length">
  280. <el-input :readonly="readonly" v-model="sheetData.labelLength" :disabled="plmTechnicalSpecificationSheetFlag('labelLength') === 'N'" style="width: 160px"></el-input>
  281. </el-form-item>
  282. <el-form-item label="标签宽度/Label Width">
  283. <el-input :readonly="readonly" v-model="sheetData.labelWidth" :disabled="plmTechnicalSpecificationSheetFlag('labelWidth') === 'N'" style="width: 160px"></el-input>
  284. </el-form-item>
  285. <el-form-item label="圆角/Radius">
  286. <el-input :readonly="readonly" v-model="sheetData.radius" :disabled="plmTechnicalSpecificationSheetFlag('radius') === 'N'" style="width: 160px"></el-input>
  287. </el-form-item>
  288. <el-form-item label="横向跳距/HP">
  289. <el-input :readonly="readonly" v-model="sheetData.hp" :disabled="plmTechnicalSpecificationSheetFlag('hp') === 'N'" style="width: 160px"></el-input>
  290. </el-form-item>
  291. <el-form-item label="竖向跳距/VP">
  292. <el-input :readonly="readonly" v-model="sheetData.vp" :disabled="plmTechnicalSpecificationSheetFlag('vp') === 'N'" style="width: 160px"></el-input>
  293. </el-form-item>
  294. <el-form-item label="横排数/Across">
  295. <el-input :readonly="readonly" v-model="sheetData.across" :disabled="plmTechnicalSpecificationSheetFlag('across') === 'N'" style="width: 160px"></el-input>
  296. </el-form-item>
  297. <el-form-item label="竖排数/Down">
  298. <el-input :readonly="readonly" v-model="sheetData.down" :disabled="plmTechnicalSpecificationSheetFlag('down') === 'N'" style="width: 160px" ></el-input>
  299. </el-form-item>
  300. </el-col>
  301. </el-row>
  302. </el-form>
  303. <div style="width: 100%;">
  304. <el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;">
  305. <el-row :gutter="20">
  306. <el-col :span="24">
  307. <!-- <el-form-item label="实际数目/Actual Number">-->
  308. <!-- <el-input v-model="sheetData.actualNumber" style="width: 160px"></el-input>-->
  309. <!-- </el-form-item>-->
  310. <el-form-item label="印刷出纸方向/Feeding Direction">
  311. <dict-data-select
  312. :site="searchData.site"
  313. v-if="searchData.site"
  314. clearable
  315. v-model="sheetData.printCopyPosition"
  316. dict-type="bm_print_copy_position"
  317. style="width: 160px; margin-right: -10px"
  318. :disabled="plmTechnicalSpecificationSheetFlag('printCopyPosition') === 'N'||readonly">
  319. </dict-data-select>
  320. </el-form-item>
  321. <el-form-item label="片状PCS/Sheet">
  322. <el-input :readonly="readonly" v-model="sheetData.sheet" :disabled="plmTechnicalSpecificationSheetFlag('sheet') === 'N'" style="width: 160px; margin-left: -9px"></el-input>
  323. </el-form-item>
  324. <el-form-item label="成品卷边宽度/FG Roll Width">
  325. <el-input :readonly="readonly" v-model="sheetData.goodsRollWidth" :disabled="plmTechnicalSpecificationSheetFlag('goodsRollWidth') === 'N'" style="width: 160px"></el-input>
  326. </el-form-item>
  327. <el-form-item label="新刀具(是/否)/New Cutter(Y/N)">
  328. <dict-data-select
  329. :site="searchData.site"
  330. v-if="searchData.site"
  331. clearable
  332. v-model="sheetData.newCutter"
  333. dict-type="bm_new_cutter"
  334. style="width: 160px"
  335. :disabled="plmTechnicalSpecificationSheetFlag('newCutter') === 'N'||readonly">
  336. </dict-data-select>
  337. </el-form-item>
  338. <el-form-item label="印刷刀模公差/P2C Tolerance">
  339. <el-input :readonly="readonly" v-model="sheetData.p2cTolerance" :disabled="plmTechnicalSpecificationSheetFlag('p2cTolerance') === 'N'" style="width: 160px; margin-left: -2px"></el-input>
  340. </el-form-item>
  341. <el-form-item label="尺寸公差/Dimension Tolerance">
  342. <el-input :readonly="readonly" v-model="sheetData.dimensionTolerance" :disabled="plmTechnicalSpecificationSheetFlag('dimensionTolerance') === 'N'" style="width: 160px; margin-left: -1px"></el-input>
  343. </el-form-item>
  344. <el-form-item label="修边公差(+/-)/Slitting Tolerance">
  345. <el-input :readonly="readonly" v-model="sheetData.slittingTolerance" :disabled="plmTechnicalSpecificationSheetFlag('slittingTolerance') === 'N'" style="width: 160px; margin-left: -4px"></el-input>
  346. </el-form-item>
  347. </el-col>
  348. </el-row>
  349. </el-form>
  350. </div>
  351. <el-table
  352. :height="'250'"
  353. ref="table"
  354. :data="tableData"
  355. highlight-current-row
  356. border
  357. @row-click="chooseRoute"
  358. style="width: 100%">
  359. <el-table-column
  360. fixed="left"
  361. header-align="center"
  362. align="center"
  363. width="60"
  364. label="操作">
  365. <template slot-scope="scope">
  366. <a type="text" size="small" @click="bmModel(scope.row)" v-if="!ifDisableFlag && isAuth('103002:bmRoute') && !readonly">填写</a>
  367. </template>
  368. </el-table-column>
  369. <!-- <el-table-column-->
  370. <!-- v-for="(item,index) in columnList1" :key="index"-->
  371. <!-- :sortable="item.columnSortable"-->
  372. <!-- :prop="item.columnProp"-->
  373. <!-- :header-align="item.headerAlign"-->
  374. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  375. <!-- :align="item.align"-->
  376. <!-- :fixed="item.fixed == ''?false:item.fixed"-->
  377. <!-- :min-width="item.columnWidth"-->
  378. <!-- :label="item.columnLabel">-->
  379. <!-- <template slot-scope="scope">-->
  380. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  381. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  382. <!-- </template>-->
  383. <!-- </el-table-column>-->
  384. <el-table-column label="工序号" header-align="center">
  385. <el-table-column
  386. prop="operationNo"
  387. header-align="center"
  388. align="center"
  389. min-width="80"
  390. label="Operation No.">
  391. </el-table-column>
  392. </el-table-column>
  393. <el-table-column label="工序名称" header-align="center">
  394. <el-table-column
  395. prop="operationName"
  396. header-align="center"
  397. align="left"
  398. min-width="120"
  399. label="Operation Desc">
  400. </el-table-column>
  401. </el-table-column>
  402. <el-table-column label="加工中心编码" header-align="center">
  403. <el-table-column
  404. prop="workCenterNo"
  405. header-align="center"
  406. align="left"
  407. min-width="80"
  408. label="Work Center No.">
  409. </el-table-column>
  410. </el-table-column>
  411. <el-table-column label="加工中心名称" header-align="center">
  412. <el-table-column
  413. prop="workCenterDesc"
  414. header-align="center"
  415. align="left"
  416. min-width="120"
  417. label="Work Center Desc.">
  418. </el-table-column>
  419. </el-table-column>
  420. <!-- <el-table-column label="机器调机时间" header-align="center">-->
  421. <!-- <el-table-column-->
  422. <!-- prop="machSetupTime"-->
  423. <!-- header-align="center"-->
  424. <!-- align="right"-->
  425. <!-- min-width="80"-->
  426. <!-- label="Mach Setup Time">-->
  427. <!-- </el-table-column>-->
  428. <!-- </el-table-column>-->
  429. <!-- <el-table-column label="产出单位" header-align="center">-->
  430. <!-- <el-table-column-->
  431. <!-- prop="runTimeCode"-->
  432. <!-- header-align="center"-->
  433. <!-- align="center"-->
  434. <!-- min-width="60"-->
  435. <!-- label="Factor Unit">-->
  436. <!-- </el-table-column>-->
  437. <!-- </el-table-column>-->
  438. <!-- <el-table-column label="人工单位产出" header-align="center">-->
  439. <!-- <el-table-column-->
  440. <!-- prop="laborRunFactor"-->
  441. <!-- header-align="center"-->
  442. <!-- align="right"-->
  443. <!-- min-width="80"-->
  444. <!-- label="Labour Run Factor">-->
  445. <!-- </el-table-column>-->
  446. <!-- </el-table-column>-->
  447. <!-- <el-table-column label="人工调机时间" header-align="center">-->
  448. <!-- <el-table-column-->
  449. <!-- prop="laborSetupTime"-->
  450. <!-- header-align="center"-->
  451. <!-- align="right"-->
  452. <!-- min-width="80"-->
  453. <!-- label="Labour Setup Time">-->
  454. <!-- </el-table-column>-->
  455. <!-- </el-table-column>-->
  456. </el-table>
  457. <component style="margin-top: 5px" :is="selectedComponent" ref="routeRef" :key="componentKey"></component>
  458. </el-form>
  459. <!-- <el-dialog append-to-body title="工艺路线" :close-on-click-modal="false" v-drag :visible.sync="routeFlag" width="470px">-->
  460. <!-- <el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">-->
  461. <!-- <el-form-item :label="'工序编码'">-->
  462. <!-- <el-input v-model="routingData.itemNo" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input>-->
  463. <!-- </el-form-item>-->
  464. <!-- <el-form-item :label="'工序名称'">-->
  465. <!-- <el-input v-model="routingData.operationDesc" style="width: 440px" ></el-input>-->
  466. <!-- </el-form-item>-->
  467. <!-- </el-form>-->
  468. <!-- <el-footer style="height:40px;margin-top: 10px;text-align:center">-->
  469. <!-- <el-button type="primary" @click="routeSave()">保存</el-button>-->
  470. <!-- <el-button type="primary" @click="routeFlag = false">取消</el-button>-->
  471. <!-- </el-footer>-->
  472. <!-- </el-dialog>-->
  473. <el-dialog width="530px" title="审查工程师" :close-on-click-modal="false" :visible.sync="reviewEngineerFlag">
  474. <el-transfer
  475. v-model="reviewEngineerList" class="rq" filterable
  476. :props="{key: 'operatorId',label: 'operatorName'}"
  477. :data="operatorList" :titles="['未选择', '已选择']">
  478. </el-transfer>
  479. <span slot="footer" class="dialog-footer">
  480. <div style="margin-top: 5px">
  481. <el-button type="primary" @click="savereviewEngineerList()">确定</el-button>
  482. <el-button @click="reviewEngineerFlag = false" type="primary">取消</el-button>
  483. </div>
  484. </span>
  485. </el-dialog>
  486. <el-dialog width="530px" title="PE工程师" :close-on-click-modal="false" :visible.sync="peEngineerFlag">
  487. <el-transfer
  488. v-model="peEngineerList" class="rq" filterable
  489. :props="{key: 'operatorId',label: 'operatorName'}"
  490. :data="operatorList" :titles="['未选择', '已选择']">
  491. </el-transfer>
  492. <span slot="footer" class="dialog-footer">
  493. <div style="margin-top: 5px">
  494. <el-button type="primary" @click="savepeEngineerList()">确定</el-button>
  495. <el-button @click="peEngineerFlag = false" type="primary">取消</el-button>
  496. </div>
  497. </span>
  498. </el-dialog>
  499. <el-dialog width="530px" title="选择CQE" :close-on-click-modal="false" :visible.sync="cqeFlag">
  500. <el-transfer
  501. v-model="cqeList" class="rq" filterable
  502. :props="{key: 'operatorId',label: 'operatorName'}"
  503. :data="operatorList" :titles="['未选择', '已选择']">
  504. </el-transfer>
  505. <span slot="footer" class="dialog-footer">
  506. <div style="margin-top: 5px">
  507. <el-button type="primary" @click="savecqeList()">确定</el-button>
  508. <el-button @click="cqeFlag = false" type="primary">取消</el-button>
  509. </div>
  510. </span>
  511. </el-dialog>
  512. <el-dialog append-to-body width="900px" title="工序记录" top="10vh" @close="closeItemModel" :close-on-click-modal="false" :visible.sync="routeModelFlag">
  513. <el-form label-position="top" style="margin-top: -5px; margin-left: 0px;" >
  514. <el-row :gutter="20">
  515. <el-col :span="6"><div class="grid-content bg-purple">
  516. <el-form-item :label="'工序编码/Operation No.'">
  517. <el-input v-model="currentRow.operationNo" disabled></el-input>
  518. </el-form-item>
  519. </div></el-col>
  520. <el-col :span="6"><div class="grid-content bg-purple">
  521. <el-form-item :label="'工序名称/Operation Desc.'">
  522. <el-input v-model="currentRow.operationName" disabled></el-input>
  523. </el-form-item>
  524. </div></el-col>
  525. </el-row>
  526. </el-form>
  527. <div v-if="currentRow.itemType === 'prepress'">
  528. <prepress ref="prepress" @closeModel="closeModel"></prepress>
  529. </div>
  530. <div v-else-if="currentRow.itemType === 'printing'">
  531. <printing ref="printing" @closeModel="closeModel"></printing>
  532. </div>
  533. <div v-else-if="currentRow.itemType === 'printOther'">
  534. <printOther ref="printOther" @closeModel="closeModel"></printOther>
  535. </div>
  536. <div v-else-if="currentRow.itemType === 'overprinting'">
  537. <overprinting ref="overprinting" @closeModel="closeModel"></overprinting>
  538. </div>
  539. <div v-else-if="currentRow.itemType === 'slitting'">
  540. <slitting ref="slitting" @closeModel="closeModel"></slitting>
  541. </div>
  542. <div v-else-if="currentRow.itemType === 'lamTemperature'">
  543. <lamTemperature ref="lamTemperature" @closeModel="closeModel"></lamTemperature>
  544. </div>
  545. <div v-else-if="currentRow.itemType === 'cutting'">
  546. <cutting ref="cutting" @closeModel="closeModel"></cutting>
  547. </div>
  548. <div v-else-if="currentRow.itemType === 'InkMixing'">
  549. <InkMixing ref="InkMixing" @closeModel="closeModel"></InkMixing>
  550. </div>
  551. <div v-else-if="currentRow.itemType === 'InkFormulation'">
  552. <InkFormulation ref="InkFormulation" @closeModel="closeModel"></InkFormulation>
  553. </div>
  554. <div v-else-if="currentRow.itemType === 'lamination'">
  555. <lamination ref="lamination" @closeModel="closeModel"></lamination>
  556. </div>
  557. <div v-else-if="currentRow.itemType === 'CNC'">
  558. <CNC ref="CNC" @closeModel="closeModel"></CNC>
  559. </div>
  560. <div v-else-if="currentRow.itemType === 'Cut'">
  561. <Cut ref="Cut" @closeModel="closeModel"></Cut>
  562. </div>
  563. <div v-else-if="currentRow.itemType === 'packagePage'">
  564. <packagePage ref="packagePage" @closeModel="closeModel"></packagePage>
  565. </div>
  566. <div v-else-if="currentRow.itemType === 'fqc'">
  567. <fqc ref="fqc" @closeModel="closeModel"></fqc>
  568. </div>
  569. <div v-else-if="currentRow.itemType === 'cqc'">
  570. <cqc ref="cqc" @closeModel="closeModel"></cqc>
  571. </div>
  572. <div v-else-if="currentRow.itemType === 'printFlexo'">
  573. <printFlexo ref="printFlexo" @closeModel="closeModel"></printFlexo>
  574. </div>
  575. <div v-else-if="currentRow.itemType === 'printIndigo'">
  576. <printIndigo ref="printIndigo" @closeModel="closeModel"></printIndigo>
  577. </div>
  578. </el-dialog>
  579. <el-dialog title="变更工艺路线" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="750px">
  580. <el-table
  581. :data="routeDetailList"
  582. height="300"
  583. border
  584. highlight-current-row
  585. onclick=""
  586. @row-click="getRow"
  587. ref="componentTable"
  588. style="width:100%">
  589. <el-table-column
  590. prop="partNo"
  591. header-align="left"
  592. align="left"
  593. min-width="80"
  594. label="物料编码">
  595. </el-table-column>
  596. <el-table-column
  597. prop="routingType"
  598. header-align="left"
  599. align="left"
  600. min-width="80"
  601. label="Routing类型">
  602. </el-table-column>
  603. <el-table-column
  604. prop="routingRevision"
  605. header-align="left"
  606. align="left"
  607. min-width="80"
  608. label="Routing版本">
  609. </el-table-column>
  610. <el-table-column
  611. prop="alternativeNo"
  612. header-align="left"
  613. align="left"
  614. min-width="80"
  615. label="替代编码">
  616. </el-table-column>
  617. <el-table-column
  618. prop="alternativeDescription"
  619. header-align="left"
  620. align="left"
  621. min-width="80"
  622. label="替代名称">
  623. </el-table-column>
  624. <el-table-column
  625. prop="status"
  626. header-align="left"
  627. align="left"
  628. min-width="60"
  629. label="状态">
  630. </el-table-column>
  631. <el-table-column
  632. prop="phaseInDate"
  633. header-align="left"
  634. align="left"
  635. min-width="80"
  636. label="生效日期">
  637. </el-table-column>
  638. <el-table-column
  639. prop="phaseOutDate"
  640. header-align="left"
  641. align="left"
  642. min-width="80"
  643. label="失效日期">
  644. </el-table-column>
  645. </el-table>
  646. <el-footer style="height:30px;margin-top:20px;text-align:center">
  647. <el-button type="primary" @click="updateBMRouteRev()">确定</el-button>
  648. <el-button type="primary" @click="modalFlag=false">取消</el-button>
  649. </el-footer>
  650. </el-dialog>
  651. <ChooseUser ref="baseList" @getBaseData="getBaseData"></ChooseUser>
  652. <!-- 提交 -->
  653. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
  654. <el-form :inline="true" label-position="top">
  655. <el-form-item :label="'驳回意见'">
  656. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit style="width: 479px;height: 30px"></el-input>
  657. </el-form-item>
  658. </el-form>
  659. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  660. <el-button type="primary" :loading="submitLoading" @click="rejectSubmit">确定</el-button>
  661. <el-button type="primary" @click="submitModalFlag = false">取消</el-button>
  662. </el-footer>
  663. </el-dialog>
  664. </div>
  665. </template>
  666. <script>
  667. import {
  668. searchBMRoutingDetail,
  669. searchTechnicalSpecificationTeamStr,
  670. updateBMRoutingDetail,
  671. searchBMRoute,
  672. searchRouteDetail,
  673. updateBMRouteRev,
  674. tsdBasicInformationSearch,
  675. updateBMProcess,
  676. submitChange,getBMStatusDesc, // 提交
  677. getOADetailForBM,
  678. } from "@/api/sampleManagement/technicalSpecificationList.js"
  679. import {
  680. getNodeAuthority, // 获取节点权限
  681. } from '@/api/changeManagement/changeManagement.js'
  682. import ChooseUser from '@/views/modules/common/ChooseUser'
  683. import {
  684. searchOperatorWithSite,
  685. } from "@/api/project/project.js"
  686. import prepress from "./com_bm_prepress";/*组件*/
  687. import printing from "./com_bm_printing";/*组件*/
  688. import printOther from "./com_bm_printOther";/*组件*/
  689. import overprinting from "./com_bm_demoSlot";/*组件*/
  690. import slitting from "./com_bm_demoSlot";/*组件*/
  691. import lamTemperature from "./com_bm_demoSlot";/*组件*/
  692. import cutting from "./com_bm_demoSlot";/*组件*/
  693. import InkMixing from "./com_bm_inkMixing";/*组件*/
  694. import InkFormulation from "./com_bm_inkFormulation";/*组件*/
  695. import lamination from "./com_bm_lamination";/*组件*/
  696. import CNC from "./com_bm_cnc";
  697. import Cut from "./com_bm_cut";
  698. import packagePage from "./com_bm_demoSlot";/*组件*/
  699. import fqc from "./com_bm_demoSlot";/*组件*/
  700. import cqc from "./com_bm_demoSlot";/*组件*/
  701. import printFlexo from "./com_bm_printingFlexo";/*组件*/
  702. import printIndigo from "./com_bm_printingIndigo";
  703. import DictDataSelect from "../../sys/dict-data-select-highlight";
  704. import {updateBMProcessInfo} from "../../../../api/sampleManagement/technicalSpecificationList";
  705. /*组件*/
  706. export default {
  707. components: {
  708. DictDataSelect,
  709. ChooseUser,
  710. prepress,
  711. printing,
  712. printOther,
  713. overprinting,
  714. slitting,
  715. lamTemperature,
  716. cutting,
  717. InkMixing,
  718. InkFormulation,
  719. lamination,
  720. CNC,
  721. Cut,
  722. packagePage,
  723. fqc,
  724. cqc,
  725. printFlexo,
  726. printIndigo,
  727. },
  728. props: {
  729. readonly: {
  730. type: Boolean,
  731. default: false,
  732. },
  733. },
  734. computed: {
  735. plmTechnicalSpecificationSheetFlag () {
  736. return (value) => {
  737. if (!this.plmTechnicalSpecificationSheetArr) {
  738. return 'N'
  739. }
  740. let arr = this.plmTechnicalSpecificationSheetArr.filter(a => a.fieldId === value)
  741. if (arr.length > 0) {
  742. return arr[0].updateFlag
  743. }
  744. return 'N'
  745. }
  746. },
  747. },
  748. data() {
  749. return {
  750. spForm: {
  751. sp: '',
  752. nodeName: '',
  753. },
  754. nowRoute: {},
  755. //动态组件
  756. selectedComponent: null,
  757. routeData: {
  758. site: '',
  759. partNo: '',
  760. alternativeNo: '',
  761. routingType: '',
  762. routingRevision: '',
  763. },
  764. componentKey: 0,
  765. routeFlag: false,
  766. routeModelFlag: false,
  767. height: 200,
  768. searchData: {
  769. site: '',
  770. username: this.$store.state.user.name,
  771. codeNo: '',
  772. buNo:'',
  773. fieldId:''
  774. },
  775. baseForm:{
  776. status:'',
  777. isReject:'',
  778. },
  779. tableData:'',
  780. partList:[],
  781. superAdmin:false,
  782. ifDisableFlag:false,
  783. sheetData: {
  784. site: '',
  785. codeNo: '',
  786. process: '',
  787. overPrintOperator: '',
  788. overPrintOperatorName: '',
  789. printOperator: '',
  790. printOperatorName: '',
  791. simplexDuplex: '',
  792. repeat: '',
  793. hp: '',
  794. across: null,
  795. printCopyPosition: '',
  796. labelSize: '',
  797. labelLength: '',
  798. labelWidth: '',
  799. vp: '',
  800. down: null,
  801. actualNumber: null,
  802. goodsRollWidth: '',
  803. newCutter: '',
  804. dimensionTolerance: '',
  805. p2cTolerance: '',
  806. slittingTolerance: '',
  807. sheet: '',
  808. radius: '',
  809. },
  810. sheetData2: {
  811. process: '',
  812. overPrintOperator: '',
  813. printOperator: '',
  814. simplexDuplex: '',
  815. repeat: '',
  816. labelLength: '',
  817. labelWidth: '',
  818. hp: '',
  819. vp: '',
  820. across: '',
  821. down: '',
  822. printCopyPosition: '',
  823. goodsRollWidth: '',
  824. newCutter: '',
  825. p2cTolerance: '',
  826. dimensionTolerance: '',
  827. slittingTolerance: ''
  828. },
  829. dataForm: {
  830. site: '',
  831. codeNo:'',
  832. processDetail:'',
  833. supplyAdhesiveTape: '',
  834. routingDrawing:'',
  835. drawingRevison:'',
  836. drawingDate:'',
  837. workInfo:'',
  838. wiRevison:'',
  839. wiDate:'',
  840. reviewEngineer: '',
  841. routingRemark:'',
  842. routingAction:'',
  843. username:this.$store.state.user.name,
  844. peEngineer:'',
  845. cqe:'',
  846. reviewEngineerList:[],
  847. peEngineerList:[],
  848. cqeList:[],
  849. },
  850. reviewEngineerFlag:false,
  851. peEngineerFlag:false,
  852. cqeFlag:false,
  853. operatorList:[],
  854. reviewEngineerList:[],
  855. peEngineerList:[],
  856. cqeList:[],
  857. //工艺路线部分
  858. routingData:{
  859. id:0,
  860. site:'',
  861. codeNo:'',
  862. itemNo:'',
  863. operationDesc:'',
  864. remark:'',
  865. username:'',
  866. },
  867. columnList1: [
  868. {
  869. userId: this.$store.state.user.name,
  870. functionId: 104003,
  871. serialNumber: '104003Table2OperationNo',
  872. tableId: '104003Table2',
  873. tableName: 'Routing工序表',
  874. columnProp: 'operationNo',
  875. headerAlign: 'center',
  876. align: 'center',
  877. columnLabel: '工序号/Operation No.',
  878. columnHidden: false,
  879. columnImage: false,
  880. columnSortable: false,
  881. sortLv: 0,
  882. status: true,
  883. fixed: '',
  884. columnWidth: 80
  885. },
  886. {
  887. userId: this.$store.state.user.name,
  888. functionId: 104003,
  889. serialNumber: '104003Table2OperationName',
  890. tableId: '104003Table2',
  891. tableName: 'Routing工序表',
  892. columnProp: 'operationName',
  893. headerAlign: 'center',
  894. align: 'left',
  895. columnLabel: '工序名称/Operation Desc',
  896. columnHidden: false,
  897. columnImage: false,
  898. columnSortable: false,
  899. sortLv: 0,
  900. status: true,
  901. fixed: '',
  902. columnWidth: 120
  903. },
  904. {
  905. userId: this.$store.state.user.name,
  906. functionId: 104003,
  907. serialNumber: '104003Table2EfficiencyFactor',
  908. tableId: '104003Table2',
  909. tableName: 'Routing工序表',
  910. columnProp: 'efficiencyFactor',
  911. headerAlign: 'center',
  912. align: 'right',
  913. columnLabel: '效率/Efficiency',
  914. columnHidden: false,
  915. columnImage: false,
  916. columnSortable: false,
  917. sortLv: 0,
  918. status: true,
  919. fixed: '',
  920. columnWidth: 80
  921. },
  922. {
  923. userId: this.$store.state.user.name,
  924. functionId: 104003,
  925. serialNumber: '104003Table2MachRunFactor',
  926. tableId: '104003Table2',
  927. tableName: 'Routing工序表',
  928. columnProp: 'machRunFactor',
  929. headerAlign: 'center',
  930. align: 'right',
  931. columnLabel: '机器单位产出/Mach Run Factor',
  932. columnHidden: false,
  933. columnImage: false,
  934. columnSortable: false,
  935. sortLv: 0,
  936. status: true,
  937. fixed: '',
  938. columnWidth: 80
  939. },
  940. {
  941. userId: this.$store.state.user.name,
  942. functionId: 104003,
  943. serialNumber: '104003Table2MachSetupTime',
  944. tableId: '104003Table2',
  945. tableName: 'Routing工序表',
  946. columnProp: 'machSetupTime',
  947. headerAlign: 'center',
  948. align: 'right',
  949. columnLabel: '机器调机时间/Mach Setup Time',
  950. columnHidden: false,
  951. columnImage: false,
  952. columnSortable: false,
  953. sortLv: 0,
  954. status: true,
  955. fixed: '',
  956. columnWidth: 80
  957. },
  958. {
  959. userId: this.$store.state.user.name,
  960. functionId: 104003,
  961. serialNumber: '104003Table2RunTimeCode',
  962. tableId: '104003Table2',
  963. tableName: 'Routing工序表',
  964. columnProp: 'runTimeCode',
  965. headerAlign: 'center',
  966. align: 'center',
  967. columnLabel: '产出单位/Factor Unit',
  968. columnHidden: false,
  969. columnImage: false,
  970. columnSortable: false,
  971. sortLv: 0,
  972. status: true,
  973. fixed: '',
  974. columnWidth: 60
  975. },
  976. {
  977. userId: this.$store.state.user.name,
  978. functionId: 104003,
  979. serialNumber: '104003Table2LaborRunFactor',
  980. tableId: '104003Table2',
  981. tableName: 'Routing工序表',
  982. columnProp: 'laborRunFactor',
  983. headerAlign: 'center',
  984. align: 'right',
  985. columnLabel: '人工单位产出/Labour Run Factor',
  986. columnHidden: false,
  987. columnImage: false,
  988. columnSortable: false,
  989. sortLv: 0,
  990. status: true,
  991. fixed: '',
  992. columnWidth: 80
  993. },
  994. {
  995. userId: this.$store.state.user.name,
  996. functionId: 104003,
  997. serialNumber: '104003Table2LaborSetupTime',
  998. tableId: '104003Table2',
  999. tableName: 'Routing工序表',
  1000. columnProp: 'laborSetupTime',
  1001. headerAlign: 'center',
  1002. align: 'right',
  1003. columnLabel: '人工调机时间/Labour Setup Time',
  1004. columnHidden: false,
  1005. columnImage: false,
  1006. columnSortable: false,
  1007. sortLv: 0,
  1008. status: true,
  1009. fixed: '',
  1010. columnWidth: 80
  1011. },
  1012. {
  1013. userId: this.$store.state.user.name,
  1014. functionId: 104003,
  1015. serialNumber: '104003Table2CrewSize',
  1016. tableId: '104003Table2',
  1017. tableName: 'Routing工序表',
  1018. columnProp: 'crewSize',
  1019. headerAlign: 'center',
  1020. align: 'right',
  1021. columnLabel: '生产参与人数/Crew Size',
  1022. columnHidden: false,
  1023. columnImage: false,
  1024. columnSortable: false,
  1025. sortLv: 0,
  1026. status: true,
  1027. fixed: '',
  1028. columnWidth: 80
  1029. },
  1030. {
  1031. userId: this.$store.state.user.name,
  1032. functionId: 104003,
  1033. serialNumber: '104003Table2SetupCrewSize',
  1034. tableId: '104003Table2',
  1035. tableName: 'Routing工序表',
  1036. columnProp: 'setupCrewSize',
  1037. headerAlign: 'center',
  1038. align: 'right',
  1039. columnLabel: '调机人数/Setup Crew Size',
  1040. columnHidden: false,
  1041. columnImage: false,
  1042. columnSortable: false,
  1043. sortLv: 0,
  1044. status: true,
  1045. fixed: '',
  1046. columnWidth: 80
  1047. },
  1048. {
  1049. userId: this.$store.state.user.name,
  1050. functionId: 104003,
  1051. serialNumber: '104003Table2OutsideOpItem',
  1052. tableId: '104003Table2',
  1053. tableName: 'Routing工序表',
  1054. columnProp: 'outsideOpItem',
  1055. headerAlign: 'center',
  1056. align: 'center',
  1057. columnLabel: '外协采购料号/Outside OP Item',
  1058. columnHidden: false,
  1059. columnImage: false,
  1060. columnSortable: false,
  1061. sortLv: 0,
  1062. status: true,
  1063. fixed: '',
  1064. columnWidth: 120
  1065. },
  1066. {
  1067. userId: this.$store.state.user.name,
  1068. functionId: 104003,
  1069. serialNumber: '104003Table2MachineNo',
  1070. tableId: '104003Table2',
  1071. tableName: 'Routing工序表',
  1072. columnProp: 'machineNo',
  1073. headerAlign: 'center',
  1074. align: 'center',
  1075. columnLabel: '机台/Machine No.',
  1076. columnHidden: false,
  1077. columnImage: false,
  1078. columnSortable: false,
  1079. sortLv: 0,
  1080. status: true,
  1081. fixed: '',
  1082. columnWidth: 80
  1083. },
  1084. {
  1085. userId: this.$store.state.user.name,
  1086. functionId: 104003,
  1087. serialNumber: '104003Table2WorkCenterNo',
  1088. tableId: '104003Table2',
  1089. tableName: 'Routing工序表',
  1090. columnProp: 'workCenterNo',
  1091. headerAlign: 'center',
  1092. align: 'center',
  1093. columnLabel: '加工中心编码/Work Center No.',
  1094. columnHidden: false,
  1095. columnImage: false,
  1096. columnSortable: false,
  1097. sortLv: 0,
  1098. status: true,
  1099. fixed: '',
  1100. columnWidth: 85
  1101. },
  1102. {
  1103. userId: this.$store.state.user.name,
  1104. functionId: 104003,
  1105. serialNumber: '104003Table2WorkCenterDesc',
  1106. tableId: '104003Table2',
  1107. tableName: 'Routing工序表',
  1108. columnProp: 'workCenterDesc',
  1109. headerAlign: 'center',
  1110. align: 'center',
  1111. columnLabel: '加工中心描述/Work Center Desc.',
  1112. columnHidden: false,
  1113. columnImage: false,
  1114. columnSortable: false,
  1115. sortLv: 0,
  1116. status: true,
  1117. fixed: '',
  1118. columnWidth: 100
  1119. },
  1120. {
  1121. userId: this.$store.state.user.name,
  1122. functionId: 104003,
  1123. serialNumber: '104003Table2LaborClassNo',
  1124. tableId: '104003Table2',
  1125. tableName: 'Routing工序表',
  1126. columnProp: 'laborClassDesc',
  1127. headerAlign: 'center',
  1128. align: 'center',
  1129. columnLabel: '雇员分类/Labour Class',
  1130. columnHidden: false,
  1131. columnImage: false,
  1132. columnSortable: false,
  1133. sortLv: 0,
  1134. status: true,
  1135. fixed: '',
  1136. columnWidth: 80
  1137. },
  1138. {
  1139. userId: this.$store.state.user.name,
  1140. functionId: 104003,
  1141. serialNumber: '104003Table2SetupLaborClassDesc',
  1142. tableId: '104003Table2',
  1143. tableName: 'Routing工序表',
  1144. columnProp: 'setupLaborClassDesc',
  1145. headerAlign: 'center',
  1146. align: 'center',
  1147. columnLabel: '调机雇员分类/Setup Labour Class',
  1148. columnHidden: false,
  1149. columnImage: false,
  1150. columnSortable: false,
  1151. sortLv: 0,
  1152. status: true,
  1153. fixed: '',
  1154. columnWidth: 80
  1155. },
  1156. {
  1157. userId: this.$store.state.user.name,
  1158. functionId: 104003,
  1159. serialNumber: '104003Table2NoteText',
  1160. tableId: '104003Table2',
  1161. tableName: 'Routing工序表',
  1162. columnProp: 'noteText',
  1163. headerAlign: 'center',
  1164. align: 'left',
  1165. columnLabel: '备注/Comments',
  1166. columnHidden: false,
  1167. columnImage: false,
  1168. columnSortable: false,
  1169. sortLv: 0,
  1170. status: true,
  1171. fixed: '',
  1172. columnWidth: 150
  1173. },
  1174. ],
  1175. currentRow:{},
  1176. //变更工艺路线
  1177. modalFlag:false,
  1178. routeDetailList:[],
  1179. currentRoute:null,
  1180. tagNo:'',
  1181. tagNo1:'',
  1182. rejectOpinion: '',
  1183. submitModalFlag: false,
  1184. submitLoading: false,
  1185. plmTechnicalSpecificationSheetArr: []
  1186. }
  1187. },
  1188. mounted () {
  1189. this.$nextTick(() => {
  1190. this.height = window.innerHeight - 100
  1191. })
  1192. },
  1193. methods: {
  1194. // 获取基础数据列表S
  1195. getBaseList (type) {
  1196. this.tagNo1 = type
  1197. this.$nextTick(() => {
  1198. let strVal = ''
  1199. let roleId = ''
  1200. if (type === 1) {
  1201. strVal = this.sheetData.overPrintOperator
  1202. roleId = 'R018'
  1203. }
  1204. if (type===2) {
  1205. strVal = this.sheetData.printOperator
  1206. roleId = 'R019'
  1207. }
  1208. this.$refs.baseList.init(this.searchData.site,this.searchData.buNo, strVal,roleId)
  1209. })
  1210. },
  1211. /* 列表方法的回调 */
  1212. getBaseData (val) {
  1213. if (this.tagNo1 === 1) {
  1214. this.sheetData.overPrintOperator = val.username
  1215. this.sheetData.overPrintOperatorName = val.userDisplay
  1216. this.$nextTick(() => {
  1217. this.$triggerInputEvent(this.$refs.overPrintOperatorName)
  1218. })
  1219. }
  1220. if (this.tagNo1 === 2) {
  1221. this.sheetData.printOperator = val.username
  1222. this.sheetData.printOperatorName = val.userDisplay
  1223. this.$nextTick(() => {
  1224. this.$triggerInputEvent(this.$refs.printOperatorName)
  1225. })
  1226. }
  1227. },
  1228. //初始化组件的参数
  1229. init (inData) {
  1230. // if (this.dataForm.codeNo != null && this.dataForm.codeNo !== '') {
  1231. // return false;
  1232. // }
  1233. //初始化参数
  1234. this.searchData = JSON.parse(JSON.stringify(inData))
  1235. //刷新表格
  1236. this.searchTable()
  1237. },
  1238. searchTable (type) {
  1239. tsdBasicInformationSearch(this.searchData).then(({data}) => {
  1240. if (data&& data.code === 0) {
  1241. this.sheetData = data.row
  1242. this.baseForm = data.row
  1243. this.routeData.site = data.row.site
  1244. this.routeData.partNo = data.row.finalPartNo
  1245. this.getNodeAuthority(data.row)
  1246. if (type) {
  1247. this.$message.success( '操作成功')
  1248. }
  1249. } else {
  1250. this.$message.error(data.msg)
  1251. }
  1252. })
  1253. getOADetailForBM(this.searchData).then(({data}) => {
  1254. this.spForm.nodeName = data.row.nodeName
  1255. this.spForm.sp = data.row.sp == null ? '' : data.row.sp
  1256. })
  1257. if (this.searchData.buNo === 'RDC') {
  1258. searchBMRoutingDetail(this.searchData).then(({data}) => {
  1259. if (data&& data.code === 0) {
  1260. if (data.rows.length > 0) {
  1261. this.dataForm = data.rows[0]
  1262. } else {
  1263. this.dataForm.site = this.searchData.site
  1264. this.dataForm.codeNo = this.searchData.codeNo
  1265. }
  1266. } else {
  1267. this.$message.error(data.msg)
  1268. }
  1269. })
  1270. let inData = {
  1271. site: this.searchData.site,
  1272. codeNo: this.searchData.codeNo,
  1273. type: 'reviewEngineer',
  1274. }
  1275. searchTechnicalSpecificationTeamStr(inData).then(({data}) => {
  1276. this.dataForm.reviewEngineerList = data.rows
  1277. })
  1278. let inData2 = {
  1279. site: this.searchData.site,
  1280. codeNo: this.searchData.codeNo,
  1281. type: 'cqe',
  1282. }
  1283. searchTechnicalSpecificationTeamStr(inData2).then(({data}) => {
  1284. this.dataForm.cqeList = data.rows
  1285. })
  1286. let inData3 = {
  1287. site: this.searchData.site,
  1288. codeNo: this.searchData.codeNo,
  1289. type: 'peEngineer',
  1290. }
  1291. searchTechnicalSpecificationTeamStr(inData3).then(({data}) => {
  1292. this.dataForm.peEngineerList = data.rows
  1293. })
  1294. } else {
  1295. searchBMRoute(this.searchData).then(({data}) => {
  1296. if (data&& data.code === 0) {
  1297. this.tableData = data.rows
  1298. this.routeData = data.row
  1299. this.$nextTick(() => {
  1300. if (this.tableData.length > 0) {
  1301. const firstRow = this.tableData[0];
  1302. // 高亮第一行(可选)
  1303. this.$refs.table.setCurrentRow(firstRow);
  1304. // 触发 chooseRoute 方法
  1305. this.chooseRoute(firstRow);
  1306. }
  1307. });
  1308. } else {
  1309. this.$message.error(data.msg)
  1310. }
  1311. })
  1312. }
  1313. },
  1314. closeModel () {
  1315. this.routeModelFlag = false
  1316. },
  1317. // 根据itemType
  1318. bmModel (row) {
  1319. this.currentRow = row
  1320. this.routeModelFlag = true
  1321. setTimeout(() => {
  1322. switch (this.currentRow.itemType) {
  1323. case 'prepress':
  1324. this.getPrepress();
  1325. break
  1326. case 'printing':
  1327. this.getPrinting();
  1328. break
  1329. case 'printOther':
  1330. this.getPrintOther();
  1331. break
  1332. case 'overprinting':
  1333. this.getOverprinting();
  1334. break
  1335. case 'slitting':
  1336. this.getSlitting();
  1337. break
  1338. case 'lamTemperature':
  1339. this.getLamTemperature();
  1340. break
  1341. case 'cutting':
  1342. this.getCutting();
  1343. break
  1344. case 'InkMixing':
  1345. this.getInkMixing();
  1346. break
  1347. case 'InkFormulation':
  1348. this.getInkFormulation();
  1349. break
  1350. case 'lamination':
  1351. this.getLamination();
  1352. break
  1353. case 'CNC':
  1354. this.getCNC();
  1355. break
  1356. case 'Cut':
  1357. this.getCut();
  1358. break
  1359. case 'packagePage':
  1360. this.getPackagePage();
  1361. break
  1362. case 'fqc':
  1363. this.getFqc();
  1364. break
  1365. case 'cqc':
  1366. this.getCqc();
  1367. break
  1368. case 'printFlexo':
  1369. this.getPrintFlexo();
  1370. break
  1371. case 'printIndigo':
  1372. this.getPrintIndigo();
  1373. break
  1374. }
  1375. }, 500);
  1376. },
  1377. getPrepress () {
  1378. let inData = JSON.parse(JSON.stringify(this.searchData))
  1379. inData.type = 'prepress'
  1380. this.$refs.prepress.init(inData)
  1381. },
  1382. getPrinting () {
  1383. let inData = JSON.parse(JSON.stringify(this.searchData))
  1384. inData.type = 'printing'
  1385. this.$refs.printing.init(inData)
  1386. },
  1387. getPrintOther () {
  1388. let inData = JSON.parse(JSON.stringify(this.searchData))
  1389. inData.type = 'printOther'
  1390. this.$refs.printOther.init(inData)
  1391. },
  1392. getOverprinting () {
  1393. let inData = JSON.parse(JSON.stringify(this.searchData))
  1394. inData.type = 'overprinting'
  1395. this.$refs.overprinting.init(inData)
  1396. },
  1397. getSlitting(){
  1398. let inData=JSON.parse(JSON.stringify(this.searchData))
  1399. inData.type='slitting'
  1400. this.$refs.slitting.init(inData)
  1401. },
  1402. getLamTemperature(){
  1403. let inData=JSON.parse(JSON.stringify(this.searchData))
  1404. inData.type='lamTemperature'
  1405. this.$refs.lamTemperature.init(inData)
  1406. },
  1407. getCutting(){
  1408. let inData=JSON.parse(JSON.stringify(this.searchData))
  1409. inData.type='cutting'
  1410. this.$refs.cutting.init(inData)
  1411. },
  1412. getInkMixing(){
  1413. let inData=JSON.parse(JSON.stringify(this.searchData))
  1414. inData.type='InkMixing'
  1415. this.$refs.InkMixing.init(inData)
  1416. },
  1417. getInkFormulation(){
  1418. let inData=JSON.parse(JSON.stringify(this.searchData))
  1419. inData.type='InkFormulation'
  1420. this.$refs.InkFormulation.init(inData)
  1421. },
  1422. getLamination(){
  1423. let inData=JSON.parse(JSON.stringify(this.searchData))
  1424. inData.type='lamination'
  1425. this.$refs.lamination.init(inData)
  1426. },
  1427. getCNC(){
  1428. let inData=JSON.parse(JSON.stringify(this.searchData))
  1429. inData.type='CNC'
  1430. this.$refs.CNC.init(inData)
  1431. },
  1432. getCut(){
  1433. let inData=JSON.parse(JSON.stringify(this.searchData))
  1434. inData.type='Cut'
  1435. this.$refs.Cut.init(inData)
  1436. },
  1437. getPackagePage(){
  1438. let inData=JSON.parse(JSON.stringify(this.searchData))
  1439. inData.type='packagePage'
  1440. this.$refs.packagePage.init(inData)
  1441. },
  1442. getFqc(){
  1443. let inData=JSON.parse(JSON.stringify(this.searchData))
  1444. inData.type='fqc'
  1445. this.$refs.fqc.init(inData)
  1446. },
  1447. getCqc(){
  1448. let inData=JSON.parse(JSON.stringify(this.searchData))
  1449. inData.type='cqc'
  1450. this.$refs.cqc.init(inData)
  1451. },
  1452. getPrintFlexo () {
  1453. let inData = JSON.parse(JSON.stringify(this.searchData))
  1454. inData.type = 'printFlexo'
  1455. this.$refs.printFlexo.init(inData)
  1456. },
  1457. getPrintIndigo () {
  1458. let inData = JSON.parse(JSON.stringify(this.searchData))
  1459. inData.type = 'printIndigo'
  1460. this.$refs.printIndigo.init(inData)
  1461. },
  1462. reviewEngineerChooseModal(){
  1463. if(this.ifDisableFlag){
  1464. return false
  1465. }
  1466. let inData={
  1467. site:this.searchData.site,
  1468. }
  1469. searchOperatorWithSite(inData).then(({data}) => {
  1470. this.operatorList=data.rows
  1471. })
  1472. this.reviewEngineerList = JSON.parse(JSON.stringify(this.dataForm.reviewEngineerList));
  1473. this.reviewEngineerFlag=true
  1474. },
  1475. savereviewEngineerList(){
  1476. let reviewEngineerName='';
  1477. for (let i = 0; i < this.reviewEngineerList.length; i++) {
  1478. let select= this.operatorList.filter(item => item.operatorId === this.reviewEngineerList[i])
  1479. if(select.length>0){
  1480. reviewEngineerName+=select[0].operatorName+';'
  1481. }
  1482. }
  1483. this.dataForm.reviewEngineer=reviewEngineerName
  1484. this.dataForm.reviewEngineerList=JSON.parse(JSON.stringify(this.reviewEngineerList));
  1485. this.reviewEngineerFlag=false
  1486. },
  1487. peEngineerChooseModal(){
  1488. if(this.ifDisableFlag){
  1489. return false
  1490. }
  1491. let inData={
  1492. site:this.searchData.site,
  1493. }
  1494. searchOperatorWithSite(inData).then(({data}) => {
  1495. this.operatorList=data.rows
  1496. })
  1497. this.peEngineerList = JSON.parse(JSON.stringify(this.dataForm.peEngineerList));
  1498. this.peEngineerFlag=true
  1499. },
  1500. savepeEngineerList(){
  1501. let peEngineerName='';
  1502. for (let i = 0; i < this.peEngineerList.length; i++) {
  1503. let select= this.operatorList.filter(item => item.operatorId === this.peEngineerList[i])
  1504. if(select.length>0){
  1505. peEngineerName+=select[0].operatorName+';'
  1506. }
  1507. }
  1508. this.dataForm.peEngineer=peEngineerName
  1509. this.dataForm.peEngineerList=JSON.parse(JSON.stringify(this.peEngineerList));
  1510. this.peEngineerFlag=false
  1511. },
  1512. cqeModal(){
  1513. if(this.ifDisableFlag){
  1514. return false
  1515. }
  1516. let inData={
  1517. site:this.searchData.site,
  1518. }
  1519. searchOperatorWithSite(inData).then(({data}) => {
  1520. this.operatorList=data.rows
  1521. })
  1522. this.cqeList = JSON.parse(JSON.stringify(this.dataForm.cqeList));
  1523. this.cqeFlag=true
  1524. },
  1525. savecqeList(){
  1526. let cqeName='';
  1527. for (let i = 0; i < this.cqeList.length; i++) {
  1528. let select= this.operatorList.filter(item => item.operatorId === this.cqeList[i])
  1529. if(select.length>0){
  1530. cqeName+=select[0].operatorName+';'
  1531. }
  1532. }
  1533. this.dataForm.cqe=cqeName
  1534. this.dataForm.cqeList=JSON.parse(JSON.stringify(this.cqeList));
  1535. this.cqeFlag=false
  1536. },
  1537. saveData(){
  1538. this.$confirm("是否保存基本信息?", '保存提示', {
  1539. confirmButtonText: '确定',
  1540. cancelButtonText: '取消',
  1541. }).then(() => {
  1542. updateBMRoutingDetail(this.dataForm).then(({data}) => {
  1543. if (data && data.code === 0) {
  1544. this.$message.success( '操作成功')
  1545. } else {
  1546. this.$message.error(data.msg)
  1547. }
  1548. })
  1549. }).catch(() => {
  1550. return
  1551. })
  1552. },
  1553. chooseRoute (row) {
  1554. this.nowRoute = JSON.parse(JSON.stringify(row))
  1555. switch (row.itemType) {
  1556. case 'prepress':
  1557. this.selectedComponent = 'prepress'
  1558. let prepressData = JSON.parse(JSON.stringify(this.searchData))
  1559. prepressData.type='prepress'
  1560. prepressData.ifDisableFlag = true
  1561. this.$nextTick (()=>{this.$refs.routeRef.init(prepressData)})
  1562. break;
  1563. case 'printing':
  1564. this.selectedComponent = 'printing';
  1565. let printing = JSON.parse(JSON.stringify(this.searchData))
  1566. printing.type = 'printing'
  1567. printing.ifDisableFlag = true
  1568. this.$nextTick (()=>{this.$refs.routeRef.init(printing)});
  1569. break;
  1570. case 'printOther':
  1571. this.selectedComponent = 'printOther';
  1572. let printOther = JSON.parse(JSON.stringify(this.searchData))
  1573. printOther.type = 'printOther'
  1574. printOther.ifDisableFlag = true
  1575. this.$nextTick (()=>{this.$refs.routeRef.init(printOther)});
  1576. break;
  1577. case 'overprinting':
  1578. this.selectedComponent='overprinting';
  1579. let overprinting = JSON.parse(JSON.stringify(this.searchData))
  1580. overprinting.type = 'overprinting'
  1581. overprinting.ifDisableFlag = true
  1582. this.$nextTick (()=>{this.$refs.routeRef.init(overprinting)});
  1583. break;
  1584. case 'slitting':
  1585. this.selectedComponent = 'slitting';
  1586. let slitting=JSON.parse(JSON.stringify(this.searchData))
  1587. slitting.type = 'slitting'
  1588. slitting.ifDisableFlag = true
  1589. this.$nextTick (()=>{this.$refs.routeRef.init(slitting)});
  1590. break;
  1591. case 'lamTemperature':
  1592. this.selectedComponent = 'lamTemperature';
  1593. let lamTemperature = JSON.parse(JSON.stringify(this.searchData))
  1594. lamTemperature.type = 'lamTemperature'
  1595. lamTemperature.ifDisableFlag = true
  1596. this.$nextTick (()=>{this.$refs.routeRef.init(lamTemperature)});
  1597. break;
  1598. case 'cutting':
  1599. this.selectedComponent = 'cutting';
  1600. let cutting = JSON.parse(JSON.stringify(this.searchData))
  1601. cutting.type = 'cutting'
  1602. cutting.ifDisableFlag = true
  1603. this.$nextTick (()=>{this.$refs.routeRef.init(cutting)});
  1604. break;
  1605. case 'InkMixing':
  1606. this.selectedComponent='InkMixing';
  1607. let InkMixing=JSON.parse(JSON.stringify(this.searchData))
  1608. InkMixing.type='InkMixing'
  1609. InkMixing.ifDisableFlag=true
  1610. this.$nextTick (()=>{this.$refs.routeRef.init(InkMixing)});
  1611. break;
  1612. case 'InkFormulation':
  1613. this.selectedComponent='InkFormulation';
  1614. let InkFormulation=JSON.parse(JSON.stringify(this.searchData))
  1615. InkFormulation.type='InkFormulation'
  1616. InkFormulation.ifDisableFlag=true
  1617. this.$nextTick (()=>{this.$refs.routeRef.init(InkFormulation)});
  1618. break;
  1619. case 'lamination':
  1620. this.selectedComponent='lamination';
  1621. let lamination=JSON.parse(JSON.stringify(this.searchData))
  1622. lamination.type='lamination'
  1623. lamination.ifDisableFlag=true
  1624. this.$nextTick (()=>{this.$refs.routeRef.init(lamination)});
  1625. break;
  1626. case 'CNC':
  1627. this.selectedComponent='CNC';
  1628. let CNC=JSON.parse(JSON.stringify(this.searchData))
  1629. CNC.type='CNC'
  1630. CNC.ifDisableFlag=true
  1631. this.$nextTick (()=>{this.$refs.routeRef.init(CNC)});
  1632. break;
  1633. case 'Cut':
  1634. this.selectedComponent='Cut';
  1635. let inData=JSON.parse(JSON.stringify(this.searchData))
  1636. inData.type='Cut'
  1637. inData.ifDisableFlag=true
  1638. this.$nextTick (()=>{this.$refs.routeRef.init(inData)});
  1639. break;
  1640. case 'packagePage':
  1641. this.selectedComponent='packagePage';
  1642. let packagePage=JSON.parse(JSON.stringify(this.searchData))
  1643. packagePage.type='packagePage'
  1644. packagePage.ifDisableFlag=true
  1645. this.$nextTick (()=>{this.$refs.routeRef.init(packagePage)});
  1646. break;
  1647. case 'fqc':
  1648. this.selectedComponent='fqc';
  1649. let fqc=JSON.parse(JSON.stringify(this.searchData))
  1650. fqc.type='fqc'
  1651. fqc.ifDisableFlag=true
  1652. this.$nextTick (()=>{this.$refs.routeRef.init(fqc)});
  1653. break;
  1654. case 'cqc':
  1655. this.selectedComponent='cqc';
  1656. let cqc=JSON.parse(JSON.stringify(this.searchData))
  1657. cqc.type='cqc'
  1658. cqc.ifDisableFlag=true
  1659. this.$nextTick (()=>{this.$refs.routeRef.init(cqc)});
  1660. break;
  1661. case 'printFlexo':
  1662. this.selectedComponent='printFlexo';
  1663. let printFlexo=JSON.parse(JSON.stringify(this.searchData))
  1664. printFlexo.type='printFlexo'
  1665. printFlexo.ifDisableFlag=true
  1666. this.$nextTick (()=>{this.$refs.routeRef.init(printFlexo)});
  1667. break;
  1668. case 'printIndigo':
  1669. this.selectedComponent='printIndigo';
  1670. let printIndigo=JSON.parse(JSON.stringify(this.searchData))
  1671. printIndigo.type='printIndigo'
  1672. printIndigo.ifDisableFlag=true
  1673. this.$nextTick (()=>{this.$refs.routeRef.init(printIndigo)});
  1674. break;
  1675. default :
  1676. this.selectedComponent = null;
  1677. break;
  1678. }
  1679. },
  1680. searchDetailTable(){
  1681. searchRouteDetail(this.routeData).then(({data}) => {
  1682. this.routeDetailList=data.rows;
  1683. });
  1684. },
  1685. changeRouteRev(){
  1686. this.searchDetailTable()
  1687. this.currentRoute=null
  1688. this.modalFlag=true;
  1689. },
  1690. getRow (row) {
  1691. this.currentRoute = row
  1692. },
  1693. updateBMProcess () {
  1694. updateBMProcess(this.sheetData).then(({data}) => {
  1695. if (data && data.code === 0) {
  1696. this.$nextTick (()=>{this.$refs.routeRef.saveData(2)})
  1697. this.$clearHighLight()
  1698. tsdBasicInformationSearch(this.searchData).then(({data}) => {
  1699. if (data.row) {
  1700. this.sheetData = data.row
  1701. }
  1702. })
  1703. this.$message.success('操作成功')
  1704. } else {
  1705. this.$message.error(data.msg)
  1706. }
  1707. })
  1708. },
  1709. updateBMRouteRev () {
  1710. if (this.currentRoute == null) {
  1711. this.$alert('请点击选择Route版本!', '错误', {
  1712. confirmButtonText: '确定'
  1713. })
  1714. return false;
  1715. }
  1716. if (this.currentRoute.status!=='Buildable') {
  1717. this.$alert('只有Buildable状态的可以保存!', '错误', {
  1718. confirmButtonText: '确定'
  1719. })
  1720. return false;
  1721. }
  1722. let inData = {
  1723. site: this.routeData.site,
  1724. codeNo: this.searchData.codeNo,
  1725. routingType: this.currentRoute.routingType,
  1726. routingRevision: this.currentRoute.routingRevision,
  1727. routingAlternativeNo: this.currentRoute.alternativeNo
  1728. }
  1729. this.$confirm("更改工艺路线后,之前填写的工艺信息都将覆盖,是否继续?", '保存提示', {
  1730. confirmButtonText: '确定',
  1731. cancelButtonText: '取消',
  1732. }).then(() => {
  1733. updateBMRouteRev(inData).then(({data}) => {
  1734. if (data && data.code === 0) {
  1735. this.searchTable()
  1736. this.modalFlag = false
  1737. this.$message.success('操作成功')
  1738. } else {
  1739. this.$message.error(data.msg)
  1740. }
  1741. })
  1742. })
  1743. },
  1744. jumpRoute () {
  1745. if (this.routeData.routingRevision != null || this.routeData.routingRevision !== '') {
  1746. this.$message.error("route明细不存在")
  1747. }
  1748. let inData = {
  1749. site: this.searchData.site,
  1750. partNo: this.routeData.partNo,
  1751. routingType: this.routeData.routingType,
  1752. routingRevision: this.routeData.routingRevision,
  1753. }
  1754. localStorage.setItem('routeData', JSON.stringify(inData))
  1755. window.open('#/part-routingManagement');
  1756. },
  1757. // 获取流程的配置权限
  1758. getNodeAuthority (row) {
  1759. getBMStatusDesc(this.searchData).then(({data}) => {
  1760. this.superAdmin = data.superAdmin
  1761. if (data.superAdmin) {
  1762. this.ifDisableFlag = false
  1763. } else if (data.status === '已完成' || data.status === '已升版' || data.status === 'Dead') {
  1764. this.ifDisableFlag = true
  1765. }
  1766. let tempData = {
  1767. site: row.site,
  1768. stepId: row.stepId,
  1769. menuId: '103002'
  1770. }
  1771. getNodeAuthority(tempData).then(({data}) => {
  1772. if (data && data.code === 0) {
  1773. this.plmTechnicalSpecificationSheetArr = data.rows.plm_technical_specification_sheet
  1774. }
  1775. })
  1776. })
  1777. },
  1778. // 打开提交模态框
  1779. submitDataModal () {
  1780. this.rejectOpinion = ''
  1781. this.submitModalFlag = true
  1782. },
  1783. // 同意提交
  1784. agreeSubmit () {
  1785. this.$confirm(`是否确认提交?`, '提示', {
  1786. confirmButtonText: '确定',
  1787. cancelButtonText: '取消',
  1788. type: 'warning'
  1789. }).then(() => {
  1790. let tempData = {
  1791. site: this.searchData.site,
  1792. userName: this.$store.state.user.name,
  1793. codeNo: this.searchData.codeNo,
  1794. menuId: '103002',
  1795. nodeConclusion: 'Y'
  1796. }
  1797. this.submitData(tempData)
  1798. })
  1799. },
  1800. // 驳回提交
  1801. rejectSubmit () {
  1802. this.$confirm(`是否确认驳回?`, '提示', {
  1803. confirmButtonText: '确定',
  1804. cancelButtonText: '取消',
  1805. type: 'warning'
  1806. }).then(() => {
  1807. let tempData = {
  1808. site: this.searchData.site,
  1809. userName: this.$store.state.user.name,
  1810. codeNo: this.searchData.codeNo,
  1811. menuId: '103002',
  1812. nodeConclusion: 'N',
  1813. rejectOpinion : this.rejectOpinion
  1814. }
  1815. this.submitData(tempData)
  1816. })
  1817. },
  1818. async submitData (tempData) {
  1819. let map = new Map(Object.entries(this.sheetData2))
  1820. if (this.plmTechnicalSpecificationSheetArr) {
  1821. for (let i = 0; i < this.plmTechnicalSpecificationSheetArr.length; i++) {
  1822. if (map.has(this.plmTechnicalSpecificationSheetArr[i].fieldId) && !this.sheetData[this.plmTechnicalSpecificationSheetArr[i].fieldId] && this.plmTechnicalSpecificationSheetArr[i].required === 'Y') {
  1823. this.$message.warning(this.plmTechnicalSpecificationSheetArr[i].fieldName + '不能为空!')
  1824. return
  1825. }
  1826. }
  1827. }
  1828. await updateBMProcess(this.sheetData).then(({data}) => {
  1829. if (data && data.code === 0) {
  1830. this.$nextTick (()=>{this.$refs.routeRef.saveData(2)})
  1831. tsdBasicInformationSearch(this.searchData).then(({data}) => {
  1832. if (data.row) {
  1833. this.sheetData = data.row
  1834. }
  1835. })
  1836. } else {
  1837. this.$message.error(data.msg)
  1838. return false
  1839. }
  1840. })
  1841. // await updateBMRoutingDetail(this.dataForm).then(({data}) => {
  1842. // if (data && data.code === 0) {
  1843. // } else {
  1844. // this.$message.error(data.msg)
  1845. // return false
  1846. // }
  1847. // })
  1848. this.submitLoading = true
  1849. await submitChange(tempData).then(({data}) => {
  1850. if (data && data.code === 0) {
  1851. this.searchTable()
  1852. // 2025-05-31 操作成功才刷新界面,如果报错了则不刷新界面
  1853. //window.location.reload();
  1854. this.submitModalFlag = false
  1855. this.submitLoading = false
  1856. this.$message({message: '操作成功', type: 'success'})
  1857. } else {
  1858. this.submitLoading = false
  1859. this.$alert(data.msg, '错误', {
  1860. confirmButtonText: '确定'
  1861. })
  1862. }
  1863. }).catch(() => {
  1864. this.submitLoading = false
  1865. })
  1866. },
  1867. // 关闭模态框后刷新下方预览 重新加载组件
  1868. closeItemModel () {
  1869. this.componentKey = Number( this.componentKey) + 1
  1870. this.chooseRoute(this.nowRoute)
  1871. },
  1872. },
  1873. }
  1874. </script>
  1875. <style scoped>
  1876. input[readonly] {
  1877. cursor: text;
  1878. }
  1879. </style>