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.

1598 lines
56 KiB

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