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.

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