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.

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