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.

2000 lines
63 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <div class="customer-css">
  3. <!-- 菜单按钮区域 -->
  4. <fieldset class="customer-field" style="width: 675px; padding: 0.35em 0.75em 0.425em;">
  5. <legend>菜单</legend>
  6. <el-form :inline="true" label-position="top" label-width="100px" style="">
  7. <el-form-item :label="''">
  8. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  9. style="margin-left: 10px; margin-bottom: 5px;">查询
  10. </el-button>
  11. </el-form-item>
  12. <el-form-item :label="''">
  13. <el-button type="primary" @click="switchOperatorModal(0)" class="customer-bun-mid"
  14. style="margin-left: 10px; margin-bottom: 5px;">报工
  15. </el-button>
  16. </el-form-item>
  17. <el-form-item :label="''">
  18. <el-button type="primary" @click="switchOperatorModal(1)" class="customer-bun-mid"
  19. style="margin-left: 10px; margin-bottom: 5px;">FQC报工
  20. </el-button>
  21. </el-form-item>
  22. <el-form-item :label="''">
  23. <el-button type="primary" @click="switchOperatorModal(2)" class="customer-bun-mid"
  24. style="margin-left: 10px; margin-bottom: 5px;">返工重检
  25. </el-button>
  26. </el-form-item>
  27. <el-form-item :label="''">
  28. <el-button type="primary" @click="switchOperatorModal(4)" class="customer-bun-mid"
  29. style="margin-left: 10px; margin-bottom: 5px;">换包装
  30. </el-button>
  31. </el-form-item>
  32. <el-form-item :label="''">
  33. <el-button type="primary" @click="switchOperatorModal(3)" class="customer-bun-mid"
  34. style="margin-left: 10px; margin-bottom: 5px;">FQC分卷
  35. </el-button>
  36. </el-form-item>
  37. <el-form-item :label="''">
  38. <el-button type="primary" class="customer-bun-mid" @click="switchOperatorModal(8)"
  39. style="margin-left: 10px; width: 60px; margin-bottom: 5px;">分切报工
  40. </el-button>
  41. </el-form-item>
  42. </el-form>
  43. </fieldset>
  44. <!-- 查询时间和产品 -->
  45. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  46. <el-form-item :label="'工厂编号:'">
  47. <el-input v-model="searchData.site" style="width: 85px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'机台编号:'">
  50. <el-input v-model="searchData.resourceId" style="width: 110px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'计划开工时间:'">
  53. <el-date-picker class="el-time-width"
  54. style=""
  55. v-model="searchData.planStartTime1"
  56. value-format="yyyy-MM-dd">
  57. </el-date-picker>
  58. </el-form-item>
  59. <el-form-item :label="''">
  60. <el-date-picker class="el-time-width"
  61. style="margin-top: 20px;"
  62. v-model="searchData.planStartTime2"
  63. format="yyyy-MM-dd"
  64. value-format="yyyy-MM-dd"
  65. placeholder="">
  66. </el-date-picker>
  67. </el-form-item>
  68. <el-form-item :label="'生产订单号:'">
  69. <el-input v-model="searchData.orderNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
  70. </el-form-item>
  71. <el-form-item :label="'派工单号:'">
  72. <el-input v-model="searchData.seqNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
  73. </el-form-item>
  74. <el-form-item :label="''" style="margin-left: -5px;">
  75. <el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单
  76. </el-checkbox>
  77. </el-form-item>
  78. </el-form>
  79. <!-- 右键操作菜单 -->
  80. <el-form :inline="true">
  81. <el-form-item label="生产工单列表">
  82. <el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
  83. <el-button type="primary" @click="menuButtonFlag">
  84. 主菜单<i class="el-icon-arrow-down el-icon--right"></i>
  85. </el-button>
  86. <el-dropdown-menu v-show="menuShow" slot="dropdown">
  87. <el-dropdown-item class="customer-li" command="0" :disabled="menuButton.prdButton"><span>生产订单</span>
  88. </el-dropdown-item>
  89. <hr width="95%"/>
  90. <el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">关闭</el-dropdown-item>
  91. <el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">打开
  92. </el-dropdown-item>
  93. <hr width="95%"/>
  94. <el-dropdown-item class="customer-li" command="3" :disabled="menuButton.pauseButton">暂停</el-dropdown-item>
  95. <el-dropdown-item class="customer-li" command="4" :disabled="menuButton.openReverseButton">重新开工
  96. </el-dropdown-item>
  97. <hr width="95%"/>
  98. <el-dropdown-item class="customer-li" command="5" :disabled="menuButton.createRecheckButton">创建重检派工单
  99. </el-dropdown-item>
  100. <hr width="95%"/>
  101. <el-dropdown-item class="customer-li" command="6" :disabled="menuButton.canceledAllPrdButton">取消所有派工单操作
  102. </el-dropdown-item>
  103. <hr width="95%"/>
  104. <el-dropdown-item class="customer-li" command="7" :disabled="menuButton.costRollUpFlagButton">生产已排料
  105. </el-dropdown-item>
  106. <el-dropdown-item class="customer-li" command="8" :disabled="menuButton.canceledCostRollUpFlagButton">
  107. 取消生产已排料
  108. </el-dropdown-item>
  109. <hr width="95%"/>
  110. <el-dropdown-item class="customer-li" command="9" :disabled="menuButton.manualFlagButton">刀模已发
  111. </el-dropdown-item>
  112. <el-dropdown-item class="customer-li" command="10" :disabled="menuButton.canceledManualFlagButton">取消刀模已发
  113. </el-dropdown-item>
  114. <hr width="95%"/>
  115. <el-dropdown-item class="customer-li" command="11" :disabled="menuButton.repairSOFlagButton">印版已发
  116. </el-dropdown-item>
  117. <el-dropdown-item class="customer-li" command="12" :disabled="menuButton.canceledRepairSOFlagButton">取消印版已发
  118. </el-dropdown-item>
  119. <hr width="95%"/>
  120. </el-dropdown-menu>
  121. </el-dropdown>
  122. </el-form-item>
  123. </el-form>
  124. <!-- 工单主表信息 -->
  125. <el-main style="margin-left: -20px; margin-top: -20px; width: 104%;">
  126. <el-table @row-click="setCurrentRow"
  127. :height="height"
  128. highlight-current-row
  129. :data="produceScheduleList"
  130. border
  131. v-loading="dataListLoading"
  132. style="width: 100%;">
  133. <el-table-column
  134. v-for="(item,index) in columnProduceScheduleArray" :key="index"
  135. :sortable="item.columnSortable"
  136. :prop="item.columnProp"
  137. :header-align="item.headerAlign"
  138. :show-overflow-tooltip="item.showOverflowTooltip"
  139. :align="item.align"
  140. :fixed="item.fixed"
  141. :width="item.columnWidth"
  142. :label="item.columnLabel">
  143. <template slot-scope="scope">
  144. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  145. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  146. style="width: 100px; height: 80px"/></span>
  147. </template>
  148. </el-table-column>
  149. </el-table>
  150. </el-main>
  151. <!-- 切换操作员 -->
  152. <comSwitchOperator ref="comSwitchOperator" :close-on-click-modal="false"
  153. :visible.sync="showOperatorFlag"
  154. @initOperatorData="initOperatorData"
  155. @notInitOperatorData="notInitOperatorData">
  156. </comSwitchOperator>
  157. <!-- 正常报工的组件 -->
  158. <comProduceReportNormal :close-on-click-modal="false"
  159. :visible.sync="showReportFlag" ref="comProduceReportNormal">
  160. </comProduceReportNormal>
  161. <!-- 分切报工的组件 -->
  162. <comSplitOrderReport :close-on-click-modal="false"
  163. :visible.sync="showSplitReportFlag" ref="comSplitOrderReport">
  164. </comSplitOrderReport>
  165. <!-- 正常的结束派工单组件 -->
  166. <comFinishSchedule :close-on-click-modal="false"
  167. :visible.sync="showFinishScheduleFlag" ref="comFinishSchedule"
  168. @processFinishScheduleOperation="processFinishScheduleOperation">
  169. </comFinishSchedule>
  170. <!-- fqc报工的组件 -->
  171. <fqcProduceReportNormal :close-on-click-modal="false"
  172. :visible.sync="fqcShowReportFlag" ref="fqcProduceReportNormal">
  173. </fqcProduceReportNormal>
  174. <!-- 返工重检 -->
  175. <reworkInspectReport :close-on-click-modal="false"
  176. :visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport>
  177. <!-- FQC分卷 -->
  178. <fqcSplitRollReport :close-on-click-modal="false"
  179. :visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport>
  180. <!-- 创建重检派工单 -->
  181. <createRecheck ref="createRecheck"></createRecheck>
  182. <!-- 换包装 -->
  183. <changePackaging :close-on-click-modal="false"
  184. :visible.sync="changePackagingFlag" ref="changePackaging"></changePackaging>
  185. </div>
  186. </template>
  187. <script>
  188. import {
  189. getProduceScheduleList,
  190. reportCheck,
  191. getUserSpecialSecurity,
  192. closeOrOpenProduceOrder,
  193. pauseOrOpenProduceOrder,
  194. costRollUpProduceOrder,
  195. manualProduceOrder,
  196. repairSOFlagProduceOrder,
  197. workbenchCancelallops,
  198. getShopOrder
  199. } from '@/api/yieldReport/produce_order.js';
  200. /*引入组件*/
  201. import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
  202. import comProduceReportNormal from "./com_produce_report_normal";/* 报工的组件*/
  203. import comFinishSchedule from "./com_finish_schedule";/*结束派工的组件*/
  204. import fqcProduceReportNormal from "./otherReport/fqc_produce_report_normal";/*结束派工的组件*/
  205. import reworkInspectReport from "./otherReport/rework_inspect_report";/*结束派工的组件*/
  206. import fqcSplitRollReport from "./otherReport/fqc_split_roll_report";/*结束派工的组件*/
  207. import changePackaging from "./otherReport/change_packaging";/*结束派工的组件*/
  208. import createRecheck from './com_create_recheck'
  209. import Com_split_schedule from "../schedule/com_split_schedule";
  210. import comSplitOrderReport from './com_split_order_report';/*分切报工*/
  211. export default {
  212. data() {
  213. return {
  214. height: 800,
  215. menuShow: false,
  216. showOperatorFlag: false,
  217. showReportFlag: false,
  218. showSplitReportFlag: false,
  219. fqcShowReportFlag: false,
  220. reworkShowReportFlag: false,
  221. fqcRollShowReportFlag: false,
  222. showFinishScheduleFlag: false,
  223. changePackagingFlag: false,
  224. searchData: {
  225. site: this.$store.state.user.site,
  226. resourceId: '',
  227. orderNo: '',
  228. seqNo: '',
  229. planStartTime1: '',
  230. planStartTime2: this.dayjs(new Date()).format('YYYY-MM-DD'),
  231. closedFlag: 'N',
  232. status: 1,
  233. username: this.$store.state.user.name,
  234. searchFlag: false
  235. },
  236. currentRow: {},
  237. operatorData: {
  238. site: this.$store.state.user.site,
  239. username: this.$store.state.user.name,
  240. userDisplay: this.$store.state.user.userDisplay,
  241. operatorId: '',
  242. operatorName: '',
  243. status: '',
  244. showFlag: false
  245. },
  246. produceScheduleList: [],
  247. dataListLoading: false,
  248. buttons: {
  249. search: '查询',
  250. },
  251. columnProduceScheduleArray: [
  252. {
  253. userId: this.$store.state.user.name,
  254. functionId: 5302,
  255. serialNumber: '5302ProducePlanStartTime',
  256. tableId: "5302Produce",
  257. tableName: "待生产工单",
  258. columnProp: "planStartTime",
  259. headerAlign: "center",
  260. align: "center",
  261. columnLabel: "计划开工时间",
  262. columnWidth: 125,
  263. columnHidden: false,
  264. columnImage: false,
  265. columnSortable: false,
  266. sortLv: 0,
  267. status: true,
  268. fixed: false
  269. },
  270. {
  271. userId: this.$store.state.user.name,
  272. functionId: 5302,
  273. serialNumber: '5302ProducePlanFinishTime',
  274. tableId: "5302Produce",
  275. tableName: "待生产工单",
  276. columnProp: "planFinishTime",
  277. headerAlign: "center",
  278. align: "center",
  279. columnLabel: "计划完工时间",
  280. columnWidth: 125,
  281. columnHidden: false,
  282. columnImage: false,
  283. columnSortable: false,
  284. sortLv: 0,
  285. status: true,
  286. fixed: false
  287. },
  288. {
  289. userId: this.$store.state.user.name,
  290. functionId: 5302,
  291. serialNumber: '5302ProduceTimeRequired',
  292. tableId: "5302Produce",
  293. tableName: "待生产工单",
  294. columnProp: "timeRequired",
  295. headerAlign: "center",
  296. align: "center",
  297. columnLabel: "需求时间",
  298. columnWidth: 60,
  299. columnHidden: false,
  300. columnImage: false,
  301. columnSortable: false,
  302. sortLv: 0,
  303. status: true,
  304. fixed: false
  305. },
  306. {
  307. userId: this.$store.state.user.name,
  308. functionId: 5302,
  309. serialNumber: '5302ProduceTimeReported',
  310. tableId: "5302Produce",
  311. tableName: "待生产工单",
  312. columnProp: "timeReported",
  313. headerAlign: "center",
  314. align: "center",
  315. columnLabel: "已报告时间",
  316. columnWidth: 70,
  317. columnHidden: false,
  318. columnImage: false,
  319. columnSortable: false,
  320. sortLv: 0,
  321. status: true,
  322. fixed: false
  323. },
  324. {
  325. userId: this.$store.state.user.name,
  326. functionId: 5302,
  327. serialNumber: '5302ProduceOrderNo',
  328. tableId: "5302Produce",
  329. tableName: "待生产工单",
  330. columnProp: "orderNo",
  331. headerAlign: "center",
  332. align: "center",
  333. columnLabel: "生产订单号",
  334. columnWidth: 70,
  335. columnHidden: false,
  336. columnImage: false,
  337. columnSortable: false,
  338. sortLv: 0,
  339. status: true,
  340. fixed: false
  341. },
  342. {
  343. userId: this.$store.state.user.name,
  344. functionId: 5302,
  345. serialNumber: '5302ProduceItemNo',
  346. tableId: "5302Produce",
  347. tableName: "待生产工单",
  348. columnProp: "itemNo",
  349. headerAlign: "center",
  350. align: "center",
  351. columnLabel: "工序号",
  352. columnWidth: 50,
  353. columnHidden: false,
  354. columnImage: false,
  355. columnSortable: false,
  356. sortLv: 0,
  357. status: true,
  358. fixed: false
  359. },
  360. {
  361. userId: this.$store.state.user.name,
  362. functionId: 5302,
  363. serialNumber: '5302ProduceItemDesc',
  364. tableId: "5302Produce",
  365. tableName: "待生产工单",
  366. columnProp: "itemDesc",
  367. headerAlign: "center",
  368. align: "center",
  369. columnLabel: "工序描述",
  370. columnWidth: 80,
  371. columnHidden: false,
  372. columnImage: false,
  373. columnSortable: false,
  374. sortLv: 0,
  375. status: true,
  376. fixed: false
  377. },
  378. {
  379. userId: this.$store.state.user.name,
  380. functionId: 5302,
  381. serialNumber: '5302ProduceResourceId',
  382. tableId: "5302Produce",
  383. tableName: "待生产工单",
  384. columnProp: "resourceId",
  385. headerAlign: "center",
  386. align: "center",
  387. columnLabel: "机台",
  388. columnWidth: 60,
  389. columnHidden: false,
  390. columnImage: false,
  391. columnSortable: false,
  392. sortLv: 0,
  393. status: true,
  394. fixed: false
  395. },
  396. {
  397. userId: this.$store.state.user.name,
  398. functionId: 5302,
  399. serialNumber: '5302ProduceQtyRequired',
  400. tableId: "5302Produce",
  401. tableName: "待生产工单",
  402. columnProp: "qtyRequired",
  403. headerAlign: "center",
  404. align: "center",
  405. columnLabel: "需求数量",
  406. columnWidth: 60,
  407. columnHidden: false,
  408. columnImage: false,
  409. columnSortable: false,
  410. sortLv: 0,
  411. status: true,
  412. fixed: false
  413. },
  414. {
  415. userId: this.$store.state.user.name,
  416. functionId: 5302,
  417. serialNumber: '5302ProduceQtyReported',
  418. tableId: "5302Produce",
  419. tableName: "待生产工单",
  420. columnProp: "qtyReported",
  421. headerAlign: "center",
  422. align: "center",
  423. columnLabel: "已报告数量",
  424. columnWidth: 70,
  425. columnHidden: false,
  426. columnImage: false,
  427. columnSortable: false,
  428. sortLv: 0,
  429. status: true,
  430. fixed: false
  431. },
  432. {
  433. userId: this.$store.state.user.name,
  434. functionId: 5302,
  435. serialNumber: '5302ProduceNeedDate',
  436. tableId: "5302Produce",
  437. tableName: "待生产工单",
  438. columnProp: "needDate",
  439. headerAlign: "center",
  440. align: "center",
  441. columnLabel: "生产订单要求完工日期",
  442. columnWidth: 130,
  443. columnHidden: false,
  444. columnImage: false,
  445. columnSortable: false,
  446. sortLv: 0,
  447. status: true,
  448. fixed: false
  449. },
  450. {
  451. userId: this.$store.state.user.name,
  452. functionId: 5302,
  453. serialNumber: '5302ProduceClosedFlag',
  454. tableId: "5302Produce",
  455. tableName: "待生产工单",
  456. columnProp: "closedFlag",
  457. headerAlign: "center",
  458. align: "center",
  459. columnLabel: "已关闭",
  460. columnWidth: 50,
  461. columnHidden: false,
  462. columnImage: false,
  463. columnSortable: false,
  464. sortLv: 0,
  465. status: true,
  466. fixed: false
  467. },
  468. {
  469. userId: this.$store.state.user.name,
  470. functionId: 5302,
  471. serialNumber: '5302ProducePartNo',
  472. tableId: "5302Produce",
  473. tableName: "待生产工单",
  474. columnProp: "partNo",
  475. headerAlign: "center",
  476. align: "center",
  477. columnLabel: "产品编码",
  478. columnWidth: 110,
  479. columnHidden: false,
  480. columnImage: false,
  481. columnSortable: false,
  482. sortLv: 0,
  483. status: true,
  484. fixed: false
  485. },
  486. {
  487. userId: this.$store.state.user.name,
  488. functionId: 5302,
  489. serialNumber: '5302ProducePartDesc',
  490. tableId: "5302Produce",
  491. tableName: "待生产工单",
  492. columnProp: "partDesc",
  493. headerAlign: "center",
  494. align: "center",
  495. columnLabel: "产品名称",
  496. columnWidth: 180,
  497. columnHidden: false,
  498. columnImage: false,
  499. columnSortable: false,
  500. sortLv: 0,
  501. status: true,
  502. fixed: false
  503. },
  504. {
  505. userId: this.$store.state.user.name,
  506. functionId: 5302,
  507. serialNumber: '5302ProduceSpec',
  508. tableId: "5302Produce",
  509. tableName: "待生产工单",
  510. columnProp: "spec",
  511. headerAlign: "center",
  512. align: "center",
  513. columnLabel: "规格型号",
  514. columnWidth: 80,
  515. columnHidden: false,
  516. columnImage: false,
  517. columnSortable: false,
  518. sortLv: 0,
  519. status: true,
  520. fixed: false
  521. },
  522. {
  523. userId: this.$store.state.user.name,
  524. functionId: 5302,
  525. serialNumber: '5302ProduceSeqNo',
  526. tableId: "5302Produce",
  527. tableName: "待生产工单",
  528. columnProp: "seqNo",
  529. headerAlign: "center",
  530. align: "center",
  531. columnLabel: "次序号",
  532. columnWidth: 80,
  533. columnHidden: false,
  534. columnImage: false,
  535. columnSortable: false,
  536. sortLv: 0,
  537. status: true,
  538. fixed: false
  539. },
  540. {
  541. userId: this.$store.state.user.name,
  542. functionId: 5302,
  543. serialNumber: '5302ProduceQtyApprove',
  544. tableId: "5302Produce",
  545. tableName: "待生产工单",
  546. columnProp: "qtyApprove",
  547. headerAlign: "center",
  548. align: "center",
  549. columnLabel: "合格数量",
  550. columnWidth: 80,
  551. columnHidden: false,
  552. columnImage: false,
  553. columnSortable: false,
  554. sortLv: 0,
  555. status: true,
  556. fixed: false
  557. },
  558. {
  559. userId: this.$store.state.user.name,
  560. functionId: 5302,
  561. serialNumber: '5302ProduceBarcodeId',
  562. tableId: "5302Produce",
  563. tableName: "条形码",
  564. columnProp: "barcodeId",
  565. headerAlign: "center",
  566. align: "center",
  567. columnLabel: "条形码",
  568. columnWidth: 80,
  569. columnHidden: false,
  570. columnImage: false,
  571. columnSortable: false,
  572. sortLv: 0,
  573. status: true,
  574. fixed: false
  575. },
  576. {
  577. userId: this.$store.state.user.name,
  578. functionId: 5302,
  579. serialNumber: '5302ProduceRemark',
  580. tableId: "5302Produce",
  581. tableName: "待生产工单",
  582. columnProp: "remark",
  583. headerAlign: "center",
  584. align: "center",
  585. columnLabel: "备注",
  586. columnWidth: 80,
  587. columnHidden: false,
  588. columnImage: false,
  589. columnSortable: false,
  590. sortLv: 0,
  591. status: true,
  592. fixed: false
  593. },
  594. {
  595. userId: this.$store.state.user.name,
  596. functionId: 5302,
  597. serialNumber: '5302ProduceCrewSize',
  598. tableId: "5302Produce",
  599. tableName: "待生产工单",
  600. columnProp: "crewSize",
  601. headerAlign: "center",
  602. align: "center",
  603. columnLabel: "操作工人数",
  604. columnWidth: 80,
  605. columnHidden: false,
  606. columnImage: false,
  607. columnSortable: false,
  608. sortLv: 0,
  609. status: true,
  610. fixed: false
  611. },
  612. {
  613. userId: this.$store.state.user.name,
  614. functionId: 5302,
  615. serialNumber: '5302ProduceQtyScrapt',
  616. tableId: "5302Produce",
  617. tableName: "待生产工单",
  618. columnProp: "qtyScrapt",
  619. headerAlign: "center",
  620. align: "center",
  621. columnLabel: "报废数量",
  622. columnWidth: 80,
  623. columnHidden: false,
  624. columnImage: false,
  625. columnSortable: false,
  626. sortLv: 0,
  627. status: true,
  628. fixed: false
  629. },
  630. {
  631. userId: this.$store.state.user.name,
  632. functionId: 5302,
  633. serialNumber: '5302ProduceOutWorkFlag',
  634. tableId: "5302Produce",
  635. tableName: "待生产工单",
  636. columnProp: "outWorkFlag",
  637. headerAlign: "center",
  638. align: "center",
  639. columnLabel: "是否外协",
  640. columnWidth: 80,
  641. columnHidden: false,
  642. columnImage: false,
  643. columnSortable: false,
  644. sortLv: 0,
  645. status: true,
  646. fixed: false
  647. },
  648. {
  649. userId: this.$store.state.user.name,
  650. functionId: 5302,
  651. serialNumber: '5302ProduceScheduledDate',
  652. tableId: "5302Produce",
  653. tableName: "待生产工单",
  654. columnProp: "scheduledDate",
  655. headerAlign: "center",
  656. align: "center",
  657. columnLabel: "排产日期",
  658. columnWidth: 80,
  659. columnHidden: false,
  660. columnImage: false,
  661. columnSortable: false,
  662. sortLv: 0,
  663. status: true,
  664. fixed: false
  665. },
  666. {
  667. userId: this.$store.state.user.name,
  668. functionId: 5302,
  669. serialNumber: '5302ProduceScheduledSeqNo',
  670. tableId: "5302Produce",
  671. tableName: "待生产工单",
  672. columnProp: "scheduledSeqNo",
  673. headerAlign: "center",
  674. align: "center",
  675. columnLabel: "次序号",
  676. columnWidth: 80,
  677. columnHidden: false,
  678. columnImage: false,
  679. columnSortable: false,
  680. sortLv: 0,
  681. status: true,
  682. fixed: false
  683. },
  684. {
  685. userId: this.$store.state.user.name,
  686. functionId: 5302,
  687. serialNumber: '5302ProduceShiftNo',
  688. tableId: "5302Produce",
  689. tableName: "待生产工单",
  690. columnProp: "shiftNo",
  691. headerAlign: "center",
  692. align: "center",
  693. columnLabel: "班次",
  694. columnWidth: 80,
  695. columnHidden: false,
  696. columnImage: false,
  697. columnSortable: false,
  698. sortLv: 0,
  699. status: true,
  700. fixed: false
  701. },
  702. {
  703. userId: this.$store.state.user.name,
  704. functionId: 5302,
  705. serialNumber: '5302ProduceMachSetupTime',
  706. tableId: "5302Produce",
  707. tableName: "待生产工单",
  708. columnProp: "machSetupTime",
  709. headerAlign: "center",
  710. align: "center",
  711. columnLabel: "调机时间",
  712. columnWidth: 80,
  713. columnHidden: false,
  714. columnImage: false,
  715. columnSortable: false,
  716. sortLv: 0,
  717. status: true,
  718. fixed: false
  719. },
  720. {
  721. userId: this.$store.state.user.name,
  722. functionId: 5302,
  723. serialNumber: '5302ProduceMachRunFactor',
  724. tableId: "5302Produce",
  725. tableName: "待生产工单",
  726. columnProp: "machRunFactor",
  727. headerAlign: "center",
  728. align: "center",
  729. columnLabel: "单位产出",
  730. columnWidth: 80,
  731. columnHidden: false,
  732. columnImage: false,
  733. columnSortable: false,
  734. sortLv: 0,
  735. status: true,
  736. fixed: false
  737. },
  738. {
  739. userId: this.$store.state.user.name,
  740. functionId: 5302,
  741. serialNumber: '5302ProduceFactorUnit',
  742. tableId: "5302Produce",
  743. tableName: "待生产工单",
  744. columnProp: "factorUnit",
  745. headerAlign: "center",
  746. align: "center",
  747. columnLabel: "产出单位",
  748. columnWidth: 80,
  749. columnHidden: false,
  750. columnImage: false,
  751. columnSortable: false,
  752. sortLv: 0,
  753. status: true,
  754. fixed: false
  755. },
  756. {
  757. userId: this.$store.state.user.name,
  758. functionId: 5302,
  759. serialNumber: '5302ProduceEfficiency',
  760. tableId: "5302Produce",
  761. tableName: "待生产工单",
  762. columnProp: "efficiency",
  763. headerAlign: "center",
  764. align: "center",
  765. columnLabel: "效率",
  766. columnWidth: 80,
  767. columnHidden: false,
  768. columnImage: false,
  769. columnSortable: false,
  770. sortLv: 0,
  771. status: true,
  772. fixed: false
  773. },
  774. {
  775. userId: this.$store.state.user.name,
  776. functionId: 5302,
  777. serialNumber: '5302ProduceNextItemNo',
  778. tableId: "5302Produce",
  779. tableName: "待生产工单",
  780. columnProp: "nextItemNo",
  781. headerAlign: "center",
  782. align: "center",
  783. columnLabel: "下道工序号",
  784. columnWidth: 80,
  785. columnHidden: false,
  786. columnImage: false,
  787. columnSortable: false,
  788. sortLv: 0,
  789. status: true,
  790. fixed: false
  791. },
  792. {
  793. userId: this.$store.state.user.name,
  794. functionId: 5302,
  795. serialNumber: '5302ProduceNextItemDesc',
  796. tableId: "5302Produce",
  797. tableName: "待生产工单",
  798. columnProp: "nextItemDesc",
  799. headerAlign: "center",
  800. align: "center",
  801. columnLabel: "下道工序名称",
  802. columnWidth: 80,
  803. columnHidden: false,
  804. columnImage: false,
  805. columnSortable: false,
  806. sortLv: 0,
  807. status: true,
  808. fixed: false
  809. },
  810. {
  811. userId: this.$store.state.user.name,
  812. functionId: 5302,
  813. serialNumber: '5302ProducePreItemNo',
  814. tableId: "5302Produce",
  815. tableName: "待生产工单",
  816. columnProp: "preItemNo",
  817. headerAlign: "center",
  818. align: "center",
  819. columnLabel: "前道工序号",
  820. columnWidth: 80,
  821. columnHidden: false,
  822. columnImage: false,
  823. columnSortable: false,
  824. sortLv: 0,
  825. status: true,
  826. fixed: false
  827. },
  828. {
  829. userId: this.$store.state.user.name,
  830. functionId: 5302,
  831. serialNumber: '5302ProducePreItemDesc',
  832. tableId: "5302Produce",
  833. tableName: "待生产工单",
  834. columnProp: "preItemDesc",
  835. headerAlign: "center",
  836. align: "center",
  837. columnLabel: "前道工序名称",
  838. columnWidth: 80,
  839. columnHidden: false,
  840. columnImage: false,
  841. columnSortable: false,
  842. sortLv: 0,
  843. status: true,
  844. fixed: false
  845. },
  846. {
  847. userId: this.$store.state.user.name,
  848. functionId: 5302,
  849. serialNumber: '5302ProduceSite',
  850. tableId: "5302Produce",
  851. tableName: "待生产工单",
  852. columnProp: "site",
  853. headerAlign: "center",
  854. align: "center",
  855. columnLabel: "工厂编号",
  856. columnWidth: 80,
  857. columnHidden: false,
  858. columnImage: false,
  859. columnSortable: false,
  860. sortLv: 0,
  861. status: true,
  862. fixed: false
  863. },
  864. {
  865. userId: this.$store.state.user.name,
  866. functionId: 5302,
  867. serialNumber: '5302ProduceParkFlag',
  868. tableId: "5302Produce",
  869. tableName: "待生产工单",
  870. columnProp: "parkFlag",
  871. headerAlign: "center",
  872. align: "center",
  873. columnLabel: "暂停",
  874. columnWidth: 80,
  875. columnHidden: false,
  876. columnImage: false,
  877. columnSortable: false,
  878. sortLv: 0,
  879. status: true,
  880. fixed: false
  881. },
  882. {
  883. userId: this.$store.state.user.name,
  884. functionId: 5302,
  885. serialNumber: '5302ProduceCustomerName',
  886. tableId: "5302Produce",
  887. tableName: "待生产工单",
  888. columnProp: "customerName",
  889. headerAlign: "center",
  890. align: "center",
  891. columnLabel: "客户名称",
  892. columnWidth: 80,
  893. columnHidden: false,
  894. columnImage: false,
  895. columnSortable: false,
  896. sortLv: 0,
  897. status: true,
  898. fixed: false
  899. },
  900. {
  901. userId: this.$store.state.user.name,
  902. functionId: 5302,
  903. serialNumber: '5302ProduceCustPartNo',
  904. tableId: "5302Produce",
  905. tableName: "待生产工单",
  906. columnProp: "custPartNo",
  907. headerAlign: "center",
  908. align: "center",
  909. columnLabel: "客户产品料号",
  910. columnWidth: 80,
  911. columnHidden: false,
  912. columnImage: false,
  913. columnSortable: false,
  914. sortLv: 0,
  915. status: true,
  916. fixed: false
  917. },
  918. {
  919. userId: this.$store.state.user.name,
  920. functionId: 5302,
  921. serialNumber: '5302ProduceQtyRequiredOriginal',
  922. tableId: "5302Produce",
  923. tableName: "待生产工单",
  924. columnProp: "qtyRequiredOriginal",
  925. headerAlign: "center",
  926. align: "center",
  927. columnLabel: "原始派工单需求数量",
  928. columnWidth: 80,
  929. columnHidden: false,
  930. columnImage: false,
  931. columnSortable: false,
  932. sortLv: 0,
  933. status: true,
  934. fixed: false
  935. },
  936. {
  937. userId: this.$store.state.user.name,
  938. functionId: 5302,
  939. serialNumber: '5302ProduceClosedBy',
  940. tableId: "5302Produce",
  941. tableName: "待生产工单",
  942. columnProp: "closedBy",
  943. headerAlign: "center",
  944. align: "center",
  945. columnLabel: "关闭人",
  946. columnWidth: 80,
  947. columnHidden: false,
  948. columnImage: false,
  949. columnSortable: false,
  950. sortLv: 0,
  951. status: true,
  952. fixed: false
  953. },
  954. {
  955. userId: this.$store.state.user.name,
  956. functionId: 5302,
  957. serialNumber: '5302ProduceClosedDate',
  958. tableId: "5302Produce",
  959. tableName: "待生产工单",
  960. columnProp: "closedDate",
  961. headerAlign: "center",
  962. align: "center",
  963. columnLabel: "关闭日期",
  964. columnWidth: 80,
  965. columnHidden: false,
  966. columnImage: false,
  967. columnSortable: false,
  968. sortLv: 0,
  969. status: true,
  970. fixed: false
  971. },
  972. {
  973. userId: this.$store.state.user.name,
  974. functionId: 5302,
  975. serialNumber: '5302ProduceCostRollUpFlag',
  976. tableId: "5302Produce",
  977. tableName: "待生产工单",
  978. columnProp: "costRollUpFlag",
  979. headerAlign: "center",
  980. align: "center",
  981. columnLabel: "已排料",
  982. columnWidth: 80,
  983. columnHidden: false,
  984. columnImage: false,
  985. columnSortable: false,
  986. sortLv: 0,
  987. status: true,
  988. fixed: false
  989. },
  990. {
  991. userId: this.$store.state.user.name,
  992. functionId: 5302,
  993. serialNumber: '5302ProduceManualFlag',
  994. tableId: "5302Produce",
  995. tableName: "待生产工单",
  996. columnProp: "manualFlag",
  997. headerAlign: "center",
  998. align: "center",
  999. columnLabel: "刀模已发",
  1000. columnWidth: 80,
  1001. columnHidden: false,
  1002. columnImage: false,
  1003. columnSortable: false,
  1004. sortLv: 0,
  1005. status: true,
  1006. fixed: false
  1007. },
  1008. {
  1009. userId: this.$store.state.user.name,
  1010. functionId: 5302,
  1011. serialNumber: '5302ProduceRepairSOFlag',
  1012. tableId: "5302Produce",
  1013. tableName: "待生产工单",
  1014. columnProp: "repairSOFlag",
  1015. headerAlign: "center",
  1016. align: "center",
  1017. columnLabel: "印版已发",
  1018. columnWidth: 80,
  1019. columnHidden: false,
  1020. columnImage: false,
  1021. columnSortable: false,
  1022. sortLv: 0,
  1023. status: true,
  1024. fixed: false
  1025. },
  1026. {
  1027. userId: this.$store.state.user.name,
  1028. functionId: 5302,
  1029. serialNumber: '5302ProducePreResourceInfo',
  1030. tableId: "5302Produce",
  1031. tableName: "待生产工单",
  1032. columnProp: "preResourceInfo",
  1033. headerAlign: "center",
  1034. align: "center",
  1035. columnLabel: "上工序机台信息",
  1036. columnWidth: 120,
  1037. columnHidden: false,
  1038. columnImage: false,
  1039. columnSortable: false,
  1040. sortLv: 0,
  1041. status: true,
  1042. fixed: false
  1043. },
  1044. {
  1045. userId: this.$store.state.user.name,
  1046. functionId: 5302,
  1047. serialNumber: '5302ProducePreQtyFinished',
  1048. tableId: "5302Produce",
  1049. tableName: "待生产工单",
  1050. columnProp: "preQtyFinished",
  1051. headerAlign: "center",
  1052. align: "center",
  1053. columnLabel: "上工序完工数",
  1054. columnWidth: 120,
  1055. columnHidden: false,
  1056. columnImage: false,
  1057. columnSortable: false,
  1058. sortLv: 0,
  1059. status: true,
  1060. fixed: false
  1061. },
  1062. ],
  1063. menuButton: {
  1064. prdButton: true,
  1065. openButton: true,
  1066. closedButton: true,
  1067. pauseButton: true,
  1068. openReverseButton: true,
  1069. costRollUpFlagButton: true,
  1070. canceledCostRollUpFlagButton: false,
  1071. manualFlagButton: false,
  1072. canceledManualFlagButton: false,
  1073. repairSOFlagButton: false,
  1074. canceledRepairSOFlagButton: false,
  1075. canceledAllPrdButton: false,
  1076. createRecheckButton: false,
  1077. }
  1078. }
  1079. },
  1080. components: {
  1081. Com_split_schedule,
  1082. comSwitchOperator,/*切换用户的组件*/
  1083. comProduceReportNormal,/*报工页面的组件*/
  1084. comSplitOrderReport,/*分切报工*/
  1085. comFinishSchedule,/*结束派工单的组件*/
  1086. fqcProduceReportNormal, /*FQC报工*/
  1087. reworkInspectReport, /*返工重建*/
  1088. fqcSplitRollReport, /*FQC分卷*/
  1089. createRecheck,/*创建重检派工单*/
  1090. changePackaging, /*换包装*/
  1091. },
  1092. mounted() {
  1093. this.$nextTick(() => {
  1094. this.height = window.innerHeight - 235;
  1095. })
  1096. },
  1097. methods: {
  1098. // 控制是否显示功能
  1099. menuButtonFlag() {
  1100. this.menuShow = false
  1101. if (JSON.stringify(this.currentRow) == '{}') {
  1102. this.menuButton.prdButton = true
  1103. this.menuButton.openButton = true
  1104. this.menuButton.closedButton = true
  1105. this.menuButton.pauseButton = true
  1106. this.menuButton.costRollUpFlagButton = true
  1107. this.menuButton.canceledCostRollUpFlagButton = true
  1108. this.menuButton.manualFlagButton = true
  1109. this.menuButton.canceledManualFlagButton = true
  1110. this.menuButton.repairSOFlagButton = true
  1111. this.menuButton.canceledRepairSOFlagButton = true
  1112. this.menuButton.canceledAllPrdButton = true
  1113. this.menuButton.createRecheckButton = true
  1114. } else {
  1115. let currentRow = null
  1116. // 获取订单信息
  1117. let searchOrder = {
  1118. orderNo: this.currentRow.orderNo,
  1119. seqNo: this.currentRow.seqNo,
  1120. site: this.currentRow.site,
  1121. username: this.$store.state.user.name,
  1122. searchFlag: true
  1123. }
  1124. getProduceScheduleList(searchOrder).then(({data}) => {
  1125. //设置查询数据
  1126. currentRow = data.rows[0];
  1127. if (currentRow == null) {
  1128. return;
  1129. }
  1130. this.menuButton.canceledAllPrdButton = false
  1131. this.menuButton.createRecheckButton = false
  1132. // 判断是否具有该页面权限
  1133. let menList = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]').filter(item => item.path == 'shopOrder-shopOrder/shopOrder')
  1134. if (menList.length > 0) {
  1135. this.menuButton.prdButton = false
  1136. }
  1137. // 关闭按钮
  1138. if (currentRow.closedFlag == 'N') {
  1139. let data = {
  1140. userSpecialSecurityNo: 230,
  1141. username: this.$store.state.user.name,
  1142. }
  1143. getUserSpecialSecurity(data).then(({data}) => {
  1144. if (data.userSpecialSecurity == 'Y') {
  1145. this.menuButton.closedButton = false
  1146. } else {
  1147. this.menuButton.closedButton = true
  1148. }
  1149. })
  1150. } else {
  1151. this.menuButton.closedButton = true
  1152. }
  1153. // 打开按钮
  1154. if (currentRow.closedFlag == 'Y') {
  1155. let data = {
  1156. userSpecialSecurityNo: 231,
  1157. username: this.$store.state.user.name,
  1158. }
  1159. getUserSpecialSecurity(data).then(({data}) => {
  1160. if (data.userSpecialSecurity == 'Y') {
  1161. this.menuButton.openButton = false
  1162. } else {
  1163. this.menuButton.openButton = true
  1164. }
  1165. })
  1166. } else {
  1167. this.menuButton.openButton = true
  1168. }
  1169. // 暂停
  1170. if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'N') {
  1171. this.menuButton.pauseButton = false
  1172. } else {
  1173. this.menuButton.pauseButton = true
  1174. }
  1175. // 重开
  1176. if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'Y') {
  1177. this.menuButton.openReverseButton = false
  1178. } else {
  1179. this.menuButton.openReverseButton = true
  1180. }
  1181. // 生产排料
  1182. if (currentRow.costRollUpFlag == 'N') {
  1183. // 获取特殊权限
  1184. let data = {
  1185. userSpecialSecurityNo: 238,
  1186. username: this.$store.state.user.name,
  1187. }
  1188. getUserSpecialSecurity(data).then(({data}) => {
  1189. if (data.userSpecialSecurity == 'Y') {
  1190. this.menuButton.costRollUpFlagButton = false
  1191. } else {
  1192. this.menuButton.costRollUpFlagButton = true
  1193. }
  1194. })
  1195. } else {
  1196. this.menuButton.costRollUpFlagButton = true
  1197. }
  1198. // 取消生产排料
  1199. if (currentRow.costRollUpFlag == 'Y') {
  1200. // 获取特殊权限
  1201. let data = {
  1202. userSpecialSecurityNo: 238,
  1203. username: this.$store.state.user.name,
  1204. }
  1205. getUserSpecialSecurity(data).then(({data}) => {
  1206. if (data.userSpecialSecurity == 'Y') {
  1207. this.menuButton.canceledCostRollUpFlagButton = false
  1208. } else {
  1209. this.menuButton.canceledCostRollUpFlagButton = true
  1210. }
  1211. })
  1212. } else {
  1213. this.menuButton.canceledCostRollUpFlagButton = true
  1214. }
  1215. // 刀模已发 确认
  1216. if (currentRow.manualFlag == 'N') {
  1217. // 获取特殊权限
  1218. let data = {
  1219. userSpecialSecurityNo: 258,
  1220. username: this.$store.state.user.name,
  1221. }
  1222. getUserSpecialSecurity(data).then(({data}) => {
  1223. if (data.userSpecialSecurity == 'Y') {
  1224. this.menuButton.manualFlagButton = false
  1225. } else {
  1226. this.menuButton.manualFlagButton = true
  1227. }
  1228. })
  1229. } else {
  1230. this.menuButton.manualFlagButton = true
  1231. }
  1232. // 刀模已发 取消
  1233. if (currentRow.manualFlag == 'Y') {
  1234. // 获取特殊权限
  1235. let canceledAllPrdData = {
  1236. userSpecialSecurityNo: 259,
  1237. username: this.$store.state.user.name,
  1238. }
  1239. getUserSpecialSecurity(canceledAllPrdData).then(({data}) => {
  1240. if (data.userSpecialSecurity == 'Y') {
  1241. this.menuButton.canceledManualFlagButton = false
  1242. } else {
  1243. this.menuButton.canceledManualFlagButton = true
  1244. }
  1245. })
  1246. } else {
  1247. this.menuButton.canceledManualFlagButton = true
  1248. }
  1249. // 印版已发 确认
  1250. if (currentRow.repairSOFlag == 'N') {
  1251. // 获取特殊权限
  1252. let data = {
  1253. userSpecialSecurityNo: 259,
  1254. username: this.$store.state.user.name,
  1255. }
  1256. getUserSpecialSecurity(data).then(({data}) => {
  1257. if (data.userSpecialSecurity == 'Y') {
  1258. this.menuButton.repairSOFlagButton = false
  1259. } else {
  1260. this.menuButton.repairSOFlagButton = true
  1261. }
  1262. })
  1263. } else {
  1264. this.menuButton.repairSOFlagButton = true
  1265. }
  1266. // 印版已发 取消
  1267. if (currentRow.repairSOFlag == 'Y') {
  1268. // 获取特殊权限
  1269. let data = {
  1270. userSpecialSecurityNo: 259,
  1271. username: this.$store.state.user.name,
  1272. }
  1273. getUserSpecialSecurity(data).then(({data}) => {
  1274. if (data.userSpecialSecurity == 'Y') {
  1275. this.menuButton.canceledRepairSOFlagButton = false
  1276. } else {
  1277. this.menuButton.canceledRepairSOFlagButton = true
  1278. }
  1279. })
  1280. } else {
  1281. this.menuButton.canceledRepairSOFlagButton = true
  1282. }
  1283. this.menuShow = true
  1284. });
  1285. }
  1286. },
  1287. /*区分不同的菜单 调用不同的方法 调用不同的方法*/
  1288. handleCommand(val) {
  1289. //区分是哪一个方法调用
  1290. //页面跳转
  1291. if ('0' == val) {
  1292. if (JSON.stringify(this.currentRow) == '{}') {
  1293. this.$message.error('请先选择派工单!');
  1294. return false;
  1295. }
  1296. this.$router.push({
  1297. path: '/shopOrder-shopOrder/shopOrder',
  1298. query: {
  1299. order: this.currentRow.orderNo,
  1300. site: this.currentRow.site,
  1301. user: this.$store.state.user.name
  1302. }
  1303. })
  1304. }
  1305. // 关闭
  1306. if ('1' == val) {
  1307. //调用提示的方法
  1308. this.$confirm(`确定要关闭当前派工单吗?`, `关闭派工单`, {
  1309. confirmButtonText: '确定',
  1310. cancelButtonText: '取消',
  1311. type: 'warning'
  1312. }).then(() => {
  1313. let data = {
  1314. username: this.$store.state.user.name,
  1315. itemNo: this.currentRow.itemNo,
  1316. site: this.currentRow.site,
  1317. orderNo: this.currentRow.orderNo,
  1318. seqNo: this.currentRow.seqNo,
  1319. closedFlag: 'Y',
  1320. }
  1321. closeOrOpenProduceOrder(data).then(({data}) => {
  1322. if (data.code == 0) {
  1323. this.$message.success(data.msg)
  1324. } else {
  1325. this.$message.error(data.msg)
  1326. }
  1327. })
  1328. });
  1329. }
  1330. // 打开
  1331. if ('2' == val) {
  1332. //调用提示的方法
  1333. this.$confirm(`确定要打开当前派工单吗?`, `关闭派工单`, {
  1334. confirmButtonText: '确定',
  1335. cancelButtonText: '取消',
  1336. type: 'warning'
  1337. }).then(() => {
  1338. let data = {
  1339. username: this.$store.state.user.name,
  1340. itemNo: this.currentRow.itemNo,
  1341. site: this.currentRow.site,
  1342. orderNo: this.currentRow.orderNo,
  1343. seqNo: this.currentRow.seqNo,
  1344. closedFlag: 'N',
  1345. }
  1346. closeOrOpenProduceOrder(data).then(({data}) => {
  1347. if (data.code == 0) {
  1348. this.$message.success(data.msg)
  1349. } else {
  1350. this.$message.error(data.msg)
  1351. }
  1352. })
  1353. });
  1354. }
  1355. // 暂停
  1356. if ('3' == val) {
  1357. //调用提示的方法
  1358. this.$confirm(`确定要暂停当前派工单吗?`, `关闭派工单`, {
  1359. confirmButtonText: '确定',
  1360. cancelButtonText: '取消',
  1361. type: 'warning'
  1362. }).then(() => {
  1363. let data = {
  1364. username: this.$store.state.user.name,
  1365. itemNo: this.currentRow.itemNo,
  1366. site: this.currentRow.site,
  1367. orderNo: this.currentRow.orderNo,
  1368. seqNo: this.currentRow.seqNo,
  1369. parkFlag: 'Y',
  1370. }
  1371. pauseOrOpenProduceOrder(data).then(({data}) => {
  1372. if (data.code == 0) {
  1373. this.$message.success(data.msg)
  1374. } else {
  1375. this.$message.error(data.msg)
  1376. }
  1377. })
  1378. });
  1379. }
  1380. // 重开
  1381. if ('4' == val) {
  1382. //调用提示的方法
  1383. this.$confirm(`确定要重开当前派工单吗?`, `关闭派工单`, {
  1384. confirmButtonText: '确定',
  1385. cancelButtonText: '取消',
  1386. type: 'warning'
  1387. }).then(() => {
  1388. let data = {
  1389. username: this.$store.state.user.name,
  1390. itemNo: this.currentRow.itemNo,
  1391. site: this.currentRow.site,
  1392. orderNo: this.currentRow.orderNo,
  1393. seqNo: this.currentRow.seqNo,
  1394. parkFlag: 'N',
  1395. }
  1396. pauseOrOpenProduceOrder(data).then(({data}) => {
  1397. if (data.code == 0) {
  1398. this.$message.success(data.msg)
  1399. } else {
  1400. this.$message.error(data.msg)
  1401. }
  1402. })
  1403. });
  1404. }
  1405. // 创建重检派工单
  1406. if ('5' == val) {
  1407. this.$nextTick(() => {
  1408. this.$refs.createRecheck.init(this.currentRow);
  1409. });
  1410. }
  1411. // 取消所有派工单操作
  1412. if ('6' == val) {
  1413. //调用提示的方法
  1414. this.$confirm(` 确定取消所有派工单操作`, `生产已排料`, {
  1415. confirmButtonText: '确定',
  1416. cancelButtonText: '取消',
  1417. type: 'warning'
  1418. }).then(() => {
  1419. let data = {
  1420. orderNo: this.currentRow.orderNo,
  1421. itemNo: this.currentRow.itemNo,
  1422. site: this.currentRow.site,
  1423. seqNo: this.currentRow.seqNo,
  1424. username: this.searchData.username,
  1425. userDisplay: this.searchData.userDisplay,
  1426. }
  1427. workbenchCancelallops(data).then(({data}) => {
  1428. if (data.code == 0) {
  1429. this.$message.success(data.msg)
  1430. } else {
  1431. this.$message.warning(data.msg)
  1432. }
  1433. })
  1434. })
  1435. }
  1436. // 生产已排料 确认
  1437. if ('7' == val) {
  1438. //调用提示的方法
  1439. this.$confirm(` 确定该订单的料已排`, `生产已排料`, {
  1440. confirmButtonText: '确定',
  1441. cancelButtonText: '取消',
  1442. type: 'warning'
  1443. }).then(() => {
  1444. let data = {
  1445. username: this.$store.state.user.name,
  1446. orderNo: this.currentRow.orderNo,
  1447. costRollUpFlag: 'Y',
  1448. site: this.currentRow.site,
  1449. orderChangeStatus: "订单已排料",
  1450. }
  1451. costRollUpProduceOrder(data).then(({data}) => {
  1452. if (data.code == 0) {
  1453. this.$message.success(data.msg)
  1454. } else {
  1455. this.$message.warning(data.msg)
  1456. }
  1457. })
  1458. })
  1459. }
  1460. // 生产已排料 取消
  1461. if ('8' == val) {
  1462. //调用提示的方法
  1463. this.$confirm(` 确定要撤销该订单的排料?`, `撤销订单排料`, {
  1464. confirmButtonText: '确定',
  1465. cancelButtonText: '取消',
  1466. type: 'warning'
  1467. }).then(() => {
  1468. let data = {
  1469. username: this.$store.state.user.name,
  1470. orderNo: this.currentRow.orderNo,
  1471. costRollUpFlag: 'N',
  1472. site: this.currentRow.site,
  1473. orderChangeStatus: "撤销订单排料",
  1474. }
  1475. costRollUpProduceOrder(data).then(({data}) => {
  1476. if (data.code == 0) {
  1477. this.$message.success(data.msg)
  1478. } else {
  1479. this.$message.warning(data.msg)
  1480. }
  1481. })
  1482. })
  1483. }
  1484. // 刀模 确认
  1485. if ('9' == val) {
  1486. this.$confirm(` 确定该订单的刀模已发?`, `刀模已发`, {
  1487. confirmButtonText: '确定',
  1488. cancelButtonText: '取消',
  1489. type: 'warning'
  1490. }).then(() => {
  1491. let data = {
  1492. username: this.$store.state.user.name,
  1493. orderNo: this.currentRow.orderNo,
  1494. manualFlag: 'Y',
  1495. site: this.currentRow.site,
  1496. orderChangeStatus: "订单刀模已发",
  1497. }
  1498. manualProduceOrder(data).then(({data}) => {
  1499. if (data.code == 0) {
  1500. this.$message.success(data.msg)
  1501. } else {
  1502. this.$message.warning(data.msg)
  1503. }
  1504. })
  1505. })
  1506. }
  1507. // 刀模 取消
  1508. if ('10' == val) {
  1509. this.$confirm(` 确定要撤销该订单的刀模已发?`, `刀模已发`, {
  1510. confirmButtonText: '确定',
  1511. cancelButtonText: '取消',
  1512. type: 'warning'
  1513. }).then(() => {
  1514. let data = {
  1515. username: this.$store.state.user.name,
  1516. orderNo: this.currentRow.orderNo,
  1517. manualFlag: 'N',
  1518. site: this.currentRow.site,
  1519. orderChangeStatus: "撤销订单刀模已发",
  1520. }
  1521. manualProduceOrder(data).then(({data}) => {
  1522. if (data.code == 0) {
  1523. this.$message.success(data.msg)
  1524. } else {
  1525. this.$message.warning(data.msg)
  1526. }
  1527. })
  1528. })
  1529. }
  1530. // 印版已发
  1531. if ('11' == val) {
  1532. this.$confirm(` 确定该订单的印版已发?`, `印版已发`, {
  1533. confirmButtonText: '确定',
  1534. cancelButtonText: '取消',
  1535. type: 'warning'
  1536. }).then(() => {
  1537. let data = {
  1538. username: this.$store.state.user.name,
  1539. orderNo: this.currentRow.orderNo,
  1540. repairSOFlag: 'Y',
  1541. site: this.currentRow.site,
  1542. orderChangeStatus: "订单印版已发",
  1543. }
  1544. repairSOFlagProduceOrder(data).then(({data}) => {
  1545. if (data.code == 0) {
  1546. this.$message.success(data.msg)
  1547. } else {
  1548. this.$message.warning(data.msg)
  1549. }
  1550. })
  1551. })
  1552. }
  1553. // 印版已发 取消
  1554. if ('12' == val) {
  1555. this.$confirm(` 确定要撤销该订单的印版已发?`, `订单印版`, {
  1556. confirmButtonText: '确定',
  1557. cancelButtonText: '取消',
  1558. type: 'warning'
  1559. }).then(() => {
  1560. let data = {
  1561. username: this.$store.state.user.name,
  1562. orderNo: this.currentRow.orderNo,
  1563. repairSOFlag: 'N',
  1564. site: this.currentRow.site,
  1565. orderChangeStatus: "订单印版已发",
  1566. }
  1567. repairSOFlagProduceOrder(data).then(({data}) => {
  1568. if (data.code == 0) {
  1569. this.$message.success(data.msg)
  1570. } else {
  1571. this.$message.warning(data.msg)
  1572. }
  1573. })
  1574. })
  1575. }
  1576. },
  1577. // FQC 报工
  1578. fqcReportModal() {
  1579. //首先判断是否选择好派工单
  1580. if (JSON.stringify(this.currentRow) == '{}') {
  1581. this.$message.error('请先选择派工单!');
  1582. return false;
  1583. }
  1584. //打开操作员切换功能
  1585. this.fqcShowReportFlag = true;
  1586. this.$nextTick(() => {
  1587. this.$refs.fqcProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1588. });
  1589. },
  1590. // FQC 分卷
  1591. fqcSplitRollModal() {
  1592. if (JSON.stringify(this.currentRow) == '{}') {
  1593. this.$message.error('请先选择派工单!');
  1594. return false;
  1595. }
  1596. //打开操作员切换功能
  1597. this.fqcRollShowReportFlag = true;
  1598. this.$nextTick(() => {
  1599. this.$refs.fqcSplitRollReport.init(this.currentRow.seqNo, this.operatorData);
  1600. });
  1601. },
  1602. // 返工重捡
  1603. reworkInspectModal() {
  1604. //首先判断是否选择好派工单
  1605. if (JSON.stringify(this.currentRow) == '{}') {
  1606. this.$message.error('请先选择派工单!');
  1607. return false;
  1608. }
  1609. //打开操作员切换功能
  1610. this.reworkShowReportFlag = true;
  1611. this.$nextTick(() => {
  1612. this.$refs.reworkInspectReport.init(this.currentRow.seqNo, this.operatorData);
  1613. });
  1614. },
  1615. // 换包装
  1616. changePackaging() {
  1617. //首先判断是否选择好派工单
  1618. if (JSON.stringify(this.currentRow) == '{}') {
  1619. this.$message.error('请先选择派工单!');
  1620. return false;
  1621. }
  1622. //打开操作员切换功能
  1623. this.changePackagingFlag = true;
  1624. this.$nextTick(() => {
  1625. this.$refs.changePackaging.init(this.currentRow.seqNo, this.operatorData);
  1626. });
  1627. },
  1628. /*查询派工单*/
  1629. getProduceScheduleList() {
  1630. //开始真的查询;
  1631. this.searchData.searchFlag = true;
  1632. getProduceScheduleList(this.searchData).then(({data}) => {
  1633. //设置查询数据
  1634. this.produceScheduleList = data.rows;
  1635. })
  1636. },
  1637. /*刷新页面table*/
  1638. refreshPageTables() {
  1639. this.currentRow = {}
  1640. this.getProduceScheduleList();
  1641. },
  1642. /*设置选中行的参数*/
  1643. setCurrentRow(row, column, event) {
  1644. this.currentRow = JSON.parse(JSON.stringify(row));
  1645. },
  1646. //设置参数
  1647. initOperatorData(operatorData) {
  1648. this.showOperatorFlag = false;
  1649. this.operatorData = JSON.parse(JSON.stringify(operatorData));
  1650. if (operatorData.reportType == 0) {
  1651. //切换到报工组件
  1652. this.switchProduceReportModal();
  1653. }
  1654. if (operatorData.reportType == 1) {
  1655. //切换到fqc报工组件
  1656. this.fqcReportModal();
  1657. }
  1658. if (operatorData.reportType == 2) {
  1659. //切换到返工 重检组件
  1660. this.reworkInspectModal();
  1661. }
  1662. if (operatorData.reportType == 3) {
  1663. //切换到fqc分卷组件
  1664. this.fqcSplitRollModal();
  1665. }
  1666. if (operatorData.reportType == 4) {
  1667. // 换包装
  1668. this.changePackaging();
  1669. }
  1670. /*分切报工*/
  1671. if (operatorData.reportType == 8) {
  1672. // 分切报工
  1673. this.showSplitOrderReportModal();
  1674. }
  1675. },
  1676. notInitOperatorData(val) {
  1677. //注销用户信息
  1678. this.operatorData.operatorId = '';
  1679. this.operatorData.operatorName = '';
  1680. //关闭切换用户模态框
  1681. this.showOperatorFlag = false;
  1682. if (val == 0) {
  1683. //切换到报工组件
  1684. this.switchProduceReportModal();
  1685. }
  1686. if (val == 1) {
  1687. //切换到fqc报工组件
  1688. this.fqcReportModal();
  1689. }
  1690. if (val == 2) {
  1691. //切换到返工 重检组件
  1692. this.reworkInspectModal();
  1693. }
  1694. if (val == 3) {
  1695. //切换到fqc分卷组件
  1696. this.fqcSplitRollModal();
  1697. }
  1698. if (val == 4) {
  1699. //切换到换包装
  1700. this.changePackaging();
  1701. }
  1702. //分切报工
  1703. if (val == 8) {
  1704. //分切报工
  1705. this.showSplitOrderReportModal();
  1706. }
  1707. },
  1708. //切换员工modal
  1709. switchOperatorModal(val) {
  1710. //首先判断是否选择好派工单
  1711. if (JSON.stringify(this.currentRow) == '{}') {
  1712. this.$message.error('请先选择派工单!');
  1713. return false;
  1714. }
  1715. if (val == 0) {
  1716. let data = {
  1717. site: this.currentRow.site,
  1718. resourceId: this.currentRow.resourceId,
  1719. workCenterNo: this.currentRow.workCenterNo,
  1720. seqNo: this.currentRow.seqNo,
  1721. username: this.$store.state.user.name
  1722. }
  1723. reportCheck(data).then(({data}) => {
  1724. if (data.code == 0) {
  1725. //打开操作员切换功能
  1726. this.showOperatorFlag = true;
  1727. this.$nextTick(() => {
  1728. this.$refs.comSwitchOperator.init(val);
  1729. });
  1730. }
  1731. if (data.code == 300) {
  1732. this.$message.warning(data.msg)
  1733. }
  1734. if (data.code == 400) {
  1735. this.$confirm(`${data.msg}`, '提示', {
  1736. confirmButtonText: '确定',
  1737. cancelButtonText: '取消',
  1738. type: 'warning'
  1739. }).then(() => {
  1740. //打开操作员切换功能
  1741. this.showOperatorFlag = true;
  1742. this.$nextTick(() => {
  1743. this.$refs.comSwitchOperator.init(val);
  1744. });
  1745. })
  1746. }
  1747. })
  1748. }else if(val == 8){//处理 分切工单
  1749. //判断当前工单是否是分切工单
  1750. let orderType = this.currentRow.orderType;
  1751. if(orderType === 'D'){
  1752. this.showOperatorFlag = true;
  1753. this.$refs.comSwitchOperator.init(val);
  1754. }else{
  1755. this.$message.error('当前工单非分切工单!');
  1756. return false;
  1757. }
  1758. }else{
  1759. if (val == 4){
  1760. getShopOrder(this.currentRow).then(({data}) =>{
  1761. if (data.code == 0){
  1762. if (data.data == 'P'){
  1763. //打开操作员切换功能
  1764. this.showOperatorFlag = true;
  1765. this.$nextTick(() => {
  1766. this.$refs.comSwitchOperator.init(val);
  1767. });
  1768. }else {
  1769. this.$alert('该订单不是特殊订单,不能采用该功能!', '提示', {
  1770. confirmButtonText: '确定'})
  1771. }
  1772. }
  1773. })
  1774. }else {
  1775. //打开操作员切换功能
  1776. this.showOperatorFlag = true;
  1777. this.$nextTick(() => {
  1778. this.$refs.comSwitchOperator.init(val);
  1779. });
  1780. }
  1781. }
  1782. },
  1783. //切换报工modal
  1784. switchProduceReportModal() {
  1785. //首先判断是否选择好派工单
  1786. if (JSON.stringify(this.currentRow) == '{}') {
  1787. this.$message.error('请先选择派工单!');
  1788. return false;
  1789. }
  1790. //打开操作员切换功能
  1791. this.showReportFlag = true;
  1792. this.$nextTick(() => {
  1793. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1794. });
  1795. },
  1796. //打开分切报工的
  1797. showSplitOrderReportModal() {
  1798. //首先判断是否选择好派工单
  1799. if (JSON.stringify(this.currentRow) == '{}') {
  1800. this.$message.error('请先选择派工单!');
  1801. return false;
  1802. }
  1803. this.$nextTick(() => {
  1804. //打开分切报工功能
  1805. this.showSplitReportFlag = true;
  1806. this.$refs.comSplitOrderReport.init(this.currentRow.seqNo, this.operatorData);
  1807. });
  1808. },
  1809. //打开结束派工单的modal
  1810. showFinishScheduleModal() {
  1811. //首先判断是否选择好派工单
  1812. if (JSON.stringify(this.currentRow) == '{}') {
  1813. this.$message.error('请先选择派工单!');
  1814. return false;
  1815. }
  1816. //打开操作员切换功能
  1817. this.showFinishScheduleFlag = true;
  1818. this.$nextTick(() => {
  1819. this.$refs.comFinishSchedule.init(this.currentRow, this.operatorData);
  1820. });
  1821. },
  1822. //结束派工单后刷新页面
  1823. processFinishScheduleOperation() {
  1824. //刷新当前页面的数据
  1825. this.refreshPageTables();
  1826. },
  1827. //保存操作员的信息
  1828. saveOperatorData() {
  1829. //查询操作员信息
  1830. getOperatorData(this.operatorData).then(({data}) => {
  1831. let operatorData = data.row;
  1832. let status = operatorData.status;
  1833. this.operatorData.operatorName = data.row.operatorName;
  1834. //重置操作员信息状态
  1835. this.operatorData.status = status;
  1836. //判断是否验证通过
  1837. if (status == 'N') {
  1838. this.operatorFlag = false;
  1839. } else {
  1840. this.operatorFlag = true;
  1841. }
  1842. if (!this.operatorFlag) {
  1843. this.$message.error('操作员信息不可用!');
  1844. }
  1845. })
  1846. //判断是否检查通过--不通过不在继续
  1847. .then(() => {
  1848. if (!this.operatorFlag) {
  1849. return false;
  1850. }
  1851. //关闭操作员切换功能
  1852. this.operatorData.showFlag = false;
  1853. //打开组件
  1854. this.showReportFlag = true;
  1855. //打开报工操作页面
  1856. this.$nextTick(() => {
  1857. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1858. });
  1859. })
  1860. }
  1861. },
  1862. created() {
  1863. //不查询
  1864. getProduceScheduleList(this.searchData).then(({data}) => {
  1865. //设置查询数据
  1866. this.searchData.searchFlag = false;
  1867. this.produceScheduleList = data.rows;
  1868. });
  1869. }
  1870. }
  1871. </script>
  1872. <style>
  1873. .el-textarea__inner {
  1874. padding: 5px 5px;
  1875. }
  1876. </style>
  1877. <!--当前页面的标签样式-->
  1878. <style scoped lang="scss">
  1879. /*针对el-card*/
  1880. .customer-card .el-form-item__content {
  1881. margin-top: -15px;
  1882. }
  1883. .customer-card .el-form-item {
  1884. height: 22px;
  1885. }
  1886. .customer-border .el-form-item__content {
  1887. margin-top: -30px;
  1888. }
  1889. /*全局年与日类型 宽度*/
  1890. div.el-time-width {
  1891. width: 110px !important;
  1892. }
  1893. /* 全局时间右边框*/
  1894. .customer-css input.el-input__inner {
  1895. height: 22px !important;
  1896. padding-right: 0px !important;
  1897. }
  1898. /* 控制el-card标签的数据*/
  1899. div.customer-el-card {
  1900. margin-left: 110px;
  1901. margin-top: -15px;
  1902. height: 20px;
  1903. width: 60px;
  1904. }
  1905. /* 颜色控制 */
  1906. div.customer-el-card-pink {
  1907. background: #FF00FF;
  1908. }
  1909. div.customer-el-card-orange {
  1910. background: #FFD700;
  1911. }
  1912. div.customer-el-card-blue {
  1913. background: #0000CD;
  1914. }
  1915. /*清掉样式*/
  1916. .el-radio + .el-radio {
  1917. margin-left: 0px;
  1918. }
  1919. /*当前按钮的通用样式*/
  1920. .customer-css .customer-bun-mid {
  1921. width: 65px;
  1922. text-align: center;
  1923. }
  1924. /*当前按钮的通用样式*/
  1925. .customer-css .el-button--medium {
  1926. padding: 5px 5px;
  1927. }
  1928. /*添加主菜单和明细菜单的样式*/
  1929. .customer-css .customer-dropdown .el-button--primary {
  1930. padding: 2px;
  1931. font-size: 12px;
  1932. }
  1933. .el-dropdown-menu--medium .el-dropdown-menu__item {
  1934. line-height: 18px;
  1935. padding: 0 17px;
  1936. font-size: 12px;
  1937. }
  1938. hr {
  1939. margin-top: 0px;
  1940. }
  1941. /*控制上下间距*/
  1942. </style>