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.

1617 lines
57 KiB

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