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.

1162 lines
35 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
  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" style="margin-left: 10px; width: 60px; margin-bottom: 5px;">列表</el-button>
  9. </el-form-item>
  10. <el-form-item :label="''">
  11. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  12. style="margin-left: 10px; margin-bottom: 5px;">查询
  13. </el-button>
  14. </el-form-item>
  15. <el-form-item :label="''">
  16. <el-button type="primary" @click="switchOperatorModal()" class="customer-bun-mid"
  17. style="margin-left: 10px; margin-bottom: 5px;">报工
  18. </el-button>
  19. </el-form-item>
  20. <el-form-item :label="''">
  21. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  22. style="margin-left: 10px; margin-bottom: 5px;">FQC报工
  23. </el-button>
  24. </el-form-item>
  25. <el-form-item :label="''">
  26. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  27. style="margin-left: 10px; margin-bottom: 5px;">返工重检
  28. </el-button>
  29. </el-form-item>
  30. <el-form-item :label="''">
  31. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  32. style="margin-left: 10px; margin-bottom: 5px;">换包装
  33. </el-button>
  34. </el-form-item>
  35. <el-form-item :label="''">
  36. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  37. style="margin-left: 10px; margin-bottom: 5px;">FQC分卷
  38. </el-button>
  39. </el-form-item>
  40. </el-form>
  41. </fieldset>
  42. <!-- 查询时间和产品 -->
  43. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  44. <el-form-item :label="'工厂编号:'">
  45. <el-input v-model="searchData.site" style="width: 85px"></el-input>
  46. </el-form-item>
  47. <el-form-item :label="'机台编号:'">
  48. <el-input v-model="searchData.resourceId" style="width: 110px"></el-input>
  49. </el-form-item>
  50. <el-form-item :label="'计划开工时间:'">
  51. <el-date-picker class="el-time-width"
  52. style=""
  53. v-model="searchData.planStartTime1"
  54. value-format="yyyy-MM-dd">
  55. </el-date-picker>
  56. </el-form-item>
  57. <el-form-item :label="''">
  58. <el-date-picker class="el-time-width"
  59. style="margin-top: 20px;"
  60. v-model="searchData.planStartTime2"
  61. format="yyyy-MM-dd"
  62. value-format="yyyy-MM-dd"
  63. placeholder="">
  64. </el-date-picker>
  65. </el-form-item>
  66. <el-form-item :label="'生产订单号:'">
  67. <el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
  68. </el-form-item>
  69. <el-form-item :label="'派工单号:'">
  70. <el-input v-model="searchData.seqNo" style="width: 120px"></el-input>
  71. </el-form-item>
  72. <el-form-item :label="''" style="margin-left: -5px;">
  73. <el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单
  74. </el-checkbox>
  75. </el-form-item>
  76. </el-form>
  77. <!-- 工单主表信息 -->
  78. <el-main style="margin-left: -20px; margin-top: -20px; width: 104%;">
  79. <el-table @row-click="setCurrentRow"
  80. :height="height"
  81. highlight-current-row
  82. :data="produceScheduleList"
  83. border
  84. v-loading="dataListLoading"
  85. style="width: 100%;">
  86. <el-table-column
  87. v-for="(item,index) in columnProduceScheduleArray" :key="index"
  88. :sortable="item.columnSortable"
  89. :prop="item.columnProp"
  90. :header-align="item.headerAlign"
  91. :show-overflow-tooltip="item.showOverflowTooltip"
  92. :align="item.align"
  93. :fixed="item.fixed"
  94. :width="item.columnWidth"
  95. :label="item.columnLabel">
  96. <template slot-scope="scope">
  97. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  98. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  99. style="width: 100px; height: 80px"/></span>
  100. </template>
  101. </el-table-column>
  102. </el-table>
  103. </el-main>
  104. <!-- 切换操作员 -->
  105. <comSwitchOperator ref="comSwitchOperator" :close-on-click-modal="false"
  106. :visible.sync="showOperatorFlag"
  107. @initOperatorData="initOperatorData" @notInitOperatorData="notInitOperatorData">
  108. </comSwitchOperator>
  109. <!-- 正常报工的组件 -->
  110. <comProduceReportNormal :close-on-click-modal="false"
  111. :visible.sync="showReportFlag" ref="comProduceReportNormal">
  112. </comProduceReportNormal>
  113. <!-- 正常的结束派工单组件 -->
  114. <comFinishSchedule :close-on-click-modal="false"
  115. :visible.sync="showFinishScheduleFlag" ref="comFinishSchedule"
  116. @processFinishScheduleOperation = "processFinishScheduleOperation">
  117. </comFinishSchedule>
  118. </div>
  119. </template>
  120. <script>
  121. import {
  122. getProduceScheduleList,
  123. } from '@/api/yieldReport/produce_order.js';
  124. /*引入组件*/
  125. import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
  126. import comProduceReportNormal from "./com_produce_report_normal";/* 报工的组件*/
  127. import comFinishSchedule from "./com_finish_schedule";/*结束派工的组件*/
  128. export default {
  129. data() {
  130. return {
  131. height: 800,
  132. showOperatorFlag: false,
  133. showReportFlag: false,
  134. showFinishScheduleFlag:false,
  135. searchData: {
  136. site: this.$store.state.user.site,
  137. resourceId: '',
  138. orderNo: '',
  139. seqNo: '',
  140. planStartTime1: '',
  141. planStartTime2: this.dayjs(new Date()).format('YYYY-MM-DD'),
  142. closedFlag: 'N',
  143. status: 1,
  144. username: this.$store.state.user.name,
  145. searchFlag: false
  146. },
  147. currentRow: {},
  148. operatorData: {
  149. site: this.$store.state.user.site,
  150. username: this.$store.state.user.name,
  151. operatorId: '',
  152. operatorName: '',
  153. status: '',
  154. showFlag: false
  155. },
  156. produceScheduleList: [],
  157. dataListLoading: false,
  158. buttons: {
  159. search: '查询',
  160. },
  161. columnProduceScheduleArray: [
  162. {
  163. userId: this.$store.state.user.name,
  164. functionId: 5302,
  165. serialNumber: '5302ProducePlanStartTime',
  166. tableId: "5302Produce",
  167. tableName: "待生产工单",
  168. columnProp: "planStartTime",
  169. headerAlign: "center",
  170. align: "center",
  171. columnLabel: "计划开工时间",
  172. columnWidth: 125,
  173. columnHidden: false,
  174. columnImage: false,
  175. columnSortable: false,
  176. sortLv: 0,
  177. status: true,
  178. fixed: false
  179. },
  180. {
  181. userId: this.$store.state.user.name,
  182. functionId: 5302,
  183. serialNumber: '5302ProducePlanFinishTime',
  184. tableId: "5302Produce",
  185. tableName: "待生产工单",
  186. columnProp: "planFinishTime",
  187. headerAlign: "center",
  188. align: "center",
  189. columnLabel: "计划完工时间",
  190. columnWidth: 125,
  191. columnHidden: false,
  192. columnImage: false,
  193. columnSortable: false,
  194. sortLv: 0,
  195. status: true,
  196. fixed: false
  197. },
  198. {
  199. userId: this.$store.state.user.name,
  200. functionId: 5302,
  201. serialNumber: '5302ProduceTimeRequired',
  202. tableId: "5302Produce",
  203. tableName: "待生产工单",
  204. columnProp: "timeRequired",
  205. headerAlign: "center",
  206. align: "center",
  207. columnLabel: "需求时间",
  208. columnWidth: 60,
  209. columnHidden: false,
  210. columnImage: false,
  211. columnSortable: false,
  212. sortLv: 0,
  213. status: true,
  214. fixed: false
  215. },
  216. {
  217. userId: this.$store.state.user.name,
  218. functionId: 5302,
  219. serialNumber: '5302ProduceTimeReported',
  220. tableId: "5302Produce",
  221. tableName: "待生产工单",
  222. columnProp: "timeReported",
  223. headerAlign: "center",
  224. align: "center",
  225. columnLabel: "已报告时间",
  226. columnWidth: 70,
  227. columnHidden: false,
  228. columnImage: false,
  229. columnSortable: false,
  230. sortLv: 0,
  231. status: true,
  232. fixed: false
  233. },
  234. {
  235. userId: this.$store.state.user.name,
  236. functionId: 5302,
  237. serialNumber: '5302ProduceOrderNo',
  238. tableId: "5302Produce",
  239. tableName: "待生产工单",
  240. columnProp: "orderNo",
  241. headerAlign: "center",
  242. align: "center",
  243. columnLabel: "生产订单号",
  244. columnWidth: 70,
  245. columnHidden: false,
  246. columnImage: false,
  247. columnSortable: false,
  248. sortLv: 0,
  249. status: true,
  250. fixed: false
  251. },
  252. {
  253. userId: this.$store.state.user.name,
  254. functionId: 5302,
  255. serialNumber: '5302ProduceItemNo',
  256. tableId: "5302Produce",
  257. tableName: "待生产工单",
  258. columnProp: "itemNo",
  259. headerAlign: "center",
  260. align: "center",
  261. columnLabel: "工序号",
  262. columnWidth: 50,
  263. columnHidden: false,
  264. columnImage: false,
  265. columnSortable: false,
  266. sortLv: 0,
  267. status: true,
  268. fixed: false
  269. },
  270. {
  271. userId: this.$store.state.user.name,
  272. functionId: 5302,
  273. serialNumber: '5302ProduceItemDesc',
  274. tableId: "5302Produce",
  275. tableName: "待生产工单",
  276. columnProp: "itemDesc",
  277. headerAlign: "center",
  278. align: "center",
  279. columnLabel: "工序描述",
  280. columnWidth: 80,
  281. columnHidden: false,
  282. columnImage: false,
  283. columnSortable: false,
  284. sortLv: 0,
  285. status: true,
  286. fixed: false
  287. },
  288. {
  289. userId: this.$store.state.user.name,
  290. functionId: 5302,
  291. serialNumber: '5302ProduceResourceId',
  292. tableId: "5302Produce",
  293. tableName: "待生产工单",
  294. columnProp: "resourceId",
  295. headerAlign: "center",
  296. align: "center",
  297. columnLabel: "机台",
  298. columnWidth: 60,
  299. columnHidden: false,
  300. columnImage: false,
  301. columnSortable: false,
  302. sortLv: 0,
  303. status: true,
  304. fixed: false
  305. },
  306. {
  307. userId: this.$store.state.user.name,
  308. functionId: 5302,
  309. serialNumber: '5302ProduceQtyRequired',
  310. tableId: "5302Produce",
  311. tableName: "待生产工单",
  312. columnProp: "qtyRequired",
  313. headerAlign: "center",
  314. align: "center",
  315. columnLabel: "需求数量",
  316. columnWidth: 60,
  317. columnHidden: false,
  318. columnImage: false,
  319. columnSortable: false,
  320. sortLv: 0,
  321. status: true,
  322. fixed: false
  323. },
  324. {
  325. userId: this.$store.state.user.name,
  326. functionId: 5302,
  327. serialNumber: '5302ProduceQtyReported',
  328. tableId: "5302Produce",
  329. tableName: "待生产工单",
  330. columnProp: "qtyReported",
  331. headerAlign: "center",
  332. align: "center",
  333. columnLabel: "已报告数量",
  334. columnWidth: 70,
  335. columnHidden: false,
  336. columnImage: false,
  337. columnSortable: false,
  338. sortLv: 0,
  339. status: true,
  340. fixed: false
  341. },
  342. {
  343. userId: this.$store.state.user.name,
  344. functionId: 5302,
  345. serialNumber: '5302ProduceNeedDate',
  346. tableId: "5302Produce",
  347. tableName: "待生产工单",
  348. columnProp: "needDate",
  349. headerAlign: "center",
  350. align: "center",
  351. columnLabel: "生产订单要求完工日期",
  352. columnWidth: 130,
  353. columnHidden: false,
  354. columnImage: false,
  355. columnSortable: false,
  356. sortLv: 0,
  357. status: true,
  358. fixed: false
  359. },
  360. {
  361. userId: this.$store.state.user.name,
  362. functionId: 5302,
  363. serialNumber: '5302ProduceClosedFlag',
  364. tableId: "5302Produce",
  365. tableName: "待生产工单",
  366. columnProp: "closedFlag",
  367. headerAlign: "center",
  368. align: "center",
  369. columnLabel: "已关闭",
  370. columnWidth: 50,
  371. columnHidden: false,
  372. columnImage: false,
  373. columnSortable: false,
  374. sortLv: 0,
  375. status: true,
  376. fixed: false
  377. },
  378. {
  379. userId: this.$store.state.user.name,
  380. functionId: 5302,
  381. serialNumber: '5302ProducePartNo',
  382. tableId: "5302Produce",
  383. tableName: "待生产工单",
  384. columnProp: "partNo",
  385. headerAlign: "center",
  386. align: "center",
  387. columnLabel: "产品编码",
  388. columnWidth: 110,
  389. columnHidden: false,
  390. columnImage: false,
  391. columnSortable: false,
  392. sortLv: 0,
  393. status: true,
  394. fixed: false
  395. },
  396. {
  397. userId: this.$store.state.user.name,
  398. functionId: 5302,
  399. serialNumber: '5302ProducePartDesc',
  400. tableId: "5302Produce",
  401. tableName: "待生产工单",
  402. columnProp: "partDesc",
  403. headerAlign: "center",
  404. align: "center",
  405. columnLabel: "产品名称",
  406. columnWidth: 180,
  407. columnHidden: false,
  408. columnImage: false,
  409. columnSortable: false,
  410. sortLv: 0,
  411. status: true,
  412. fixed: false
  413. },
  414. {
  415. userId: this.$store.state.user.name,
  416. functionId: 5302,
  417. serialNumber: '5302ProduceSpec',
  418. tableId: "5302Produce",
  419. tableName: "待生产工单",
  420. columnProp: "spec",
  421. headerAlign: "center",
  422. align: "center",
  423. columnLabel: "规格型号",
  424. columnWidth: 80,
  425. columnHidden: false,
  426. columnImage: false,
  427. columnSortable: false,
  428. sortLv: 0,
  429. status: true,
  430. fixed: false
  431. },
  432. {
  433. userId: this.$store.state.user.name,
  434. functionId: 5302,
  435. serialNumber: '5302ProduceSeqNo',
  436. tableId: "5302Produce",
  437. tableName: "待生产工单",
  438. columnProp: "seqNo",
  439. headerAlign: "center",
  440. align: "center",
  441. columnLabel: "次序号",
  442. columnWidth: 80,
  443. columnHidden: false,
  444. columnImage: false,
  445. columnSortable: false,
  446. sortLv: 0,
  447. status: true,
  448. fixed: false
  449. },
  450. {
  451. userId: this.$store.state.user.name,
  452. functionId: 5302,
  453. serialNumber: '5302ProduceQtyApprove',
  454. tableId: "5302Produce",
  455. tableName: "待生产工单",
  456. columnProp: "qtyApprove",
  457. headerAlign: "center",
  458. align: "center",
  459. columnLabel: "合格数量",
  460. columnWidth: 80,
  461. columnHidden: false,
  462. columnImage: false,
  463. columnSortable: false,
  464. sortLv: 0,
  465. status: true,
  466. fixed: false
  467. },
  468. {
  469. userId: this.$store.state.user.name,
  470. functionId: 5302,
  471. serialNumber: '5302ProduceBarcodeId',
  472. tableId: "5302Produce",
  473. tableName: "条形码",
  474. columnProp: "barcodeId",
  475. headerAlign: "center",
  476. align: "center",
  477. columnLabel: "条形码",
  478. columnWidth: 80,
  479. columnHidden: false,
  480. columnImage: false,
  481. columnSortable: false,
  482. sortLv: 0,
  483. status: true,
  484. fixed: false
  485. },
  486. {
  487. userId: this.$store.state.user.name,
  488. functionId: 5302,
  489. serialNumber: '5302ProduceRemark',
  490. tableId: "5302Produce",
  491. tableName: "待生产工单",
  492. columnProp: "remark",
  493. headerAlign: "center",
  494. align: "center",
  495. columnLabel: "备注",
  496. columnWidth: 80,
  497. columnHidden: false,
  498. columnImage: false,
  499. columnSortable: false,
  500. sortLv: 0,
  501. status: true,
  502. fixed: false
  503. },
  504. {
  505. userId: this.$store.state.user.name,
  506. functionId: 5302,
  507. serialNumber: '5302ProduceCrewSize',
  508. tableId: "5302Produce",
  509. tableName: "待生产工单",
  510. columnProp: "crewSize",
  511. headerAlign: "center",
  512. align: "center",
  513. columnLabel: "操作工人数",
  514. columnWidth: 80,
  515. columnHidden: false,
  516. columnImage: false,
  517. columnSortable: false,
  518. sortLv: 0,
  519. status: true,
  520. fixed: false
  521. },
  522. {
  523. userId: this.$store.state.user.name,
  524. functionId: 5302,
  525. serialNumber: '5302ProduceQtyScrapt',
  526. tableId: "5302Produce",
  527. tableName: "待生产工单",
  528. columnProp: "qtyScrapt",
  529. headerAlign: "center",
  530. align: "center",
  531. columnLabel: "报废数量",
  532. columnWidth: 80,
  533. columnHidden: false,
  534. columnImage: false,
  535. columnSortable: false,
  536. sortLv: 0,
  537. status: true,
  538. fixed: false
  539. },
  540. {
  541. userId: this.$store.state.user.name,
  542. functionId: 5302,
  543. serialNumber: '5302ProduceOutWorkFlag',
  544. tableId: "5302Produce",
  545. tableName: "待生产工单",
  546. columnProp: "outWorkFlag",
  547. headerAlign: "center",
  548. align: "center",
  549. columnLabel: "是否外协",
  550. columnWidth: 80,
  551. columnHidden: false,
  552. columnImage: false,
  553. columnSortable: false,
  554. sortLv: 0,
  555. status: true,
  556. fixed: false
  557. },
  558. {
  559. userId: this.$store.state.user.name,
  560. functionId: 5302,
  561. serialNumber: '5302ProduceScheduledDate',
  562. tableId: "5302Produce",
  563. tableName: "待生产工单",
  564. columnProp: "scheduledDate",
  565. headerAlign: "center",
  566. align: "center",
  567. columnLabel: "排产日期",
  568. columnWidth: 80,
  569. columnHidden: false,
  570. columnImage: false,
  571. columnSortable: false,
  572. sortLv: 0,
  573. status: true,
  574. fixed: false
  575. },
  576. {
  577. userId: this.$store.state.user.name,
  578. functionId: 5302,
  579. serialNumber: '5302ProduceScheduledSeqNo',
  580. tableId: "5302Produce",
  581. tableName: "待生产工单",
  582. columnProp: "scheduledSeqNo",
  583. headerAlign: "center",
  584. align: "center",
  585. columnLabel: "次序号",
  586. columnWidth: 80,
  587. columnHidden: false,
  588. columnImage: false,
  589. columnSortable: false,
  590. sortLv: 0,
  591. status: true,
  592. fixed: false
  593. },
  594. {
  595. userId: this.$store.state.user.name,
  596. functionId: 5302,
  597. serialNumber: '5302ProduceShiftNo',
  598. tableId: "5302Produce",
  599. tableName: "待生产工单",
  600. columnProp: "shiftNo",
  601. headerAlign: "center",
  602. align: "center",
  603. columnLabel: "班次",
  604. columnWidth: 80,
  605. columnHidden: false,
  606. columnImage: false,
  607. columnSortable: false,
  608. sortLv: 0,
  609. status: true,
  610. fixed: false
  611. },
  612. {
  613. userId: this.$store.state.user.name,
  614. functionId: 5302,
  615. serialNumber: '5302ProduceMachSetupTime',
  616. tableId: "5302Produce",
  617. tableName: "待生产工单",
  618. columnProp: "machSetupTime",
  619. headerAlign: "center",
  620. align: "center",
  621. columnLabel: "调机时间",
  622. columnWidth: 80,
  623. columnHidden: false,
  624. columnImage: false,
  625. columnSortable: false,
  626. sortLv: 0,
  627. status: true,
  628. fixed: false
  629. },
  630. {
  631. userId: this.$store.state.user.name,
  632. functionId: 5302,
  633. serialNumber: '5302ProduceMachRunFactor',
  634. tableId: "5302Produce",
  635. tableName: "待生产工单",
  636. columnProp: "machRunFactor",
  637. headerAlign: "center",
  638. align: "center",
  639. columnLabel: "单位产出",
  640. columnWidth: 80,
  641. columnHidden: false,
  642. columnImage: false,
  643. columnSortable: false,
  644. sortLv: 0,
  645. status: true,
  646. fixed: false
  647. },
  648. {
  649. userId: this.$store.state.user.name,
  650. functionId: 5302,
  651. serialNumber: '5302ProduceFactorUnit',
  652. tableId: "5302Produce",
  653. tableName: "待生产工单",
  654. columnProp: "factorUnit",
  655. headerAlign: "center",
  656. align: "center",
  657. columnLabel: "产出单位",
  658. columnWidth: 80,
  659. columnHidden: false,
  660. columnImage: false,
  661. columnSortable: false,
  662. sortLv: 0,
  663. status: true,
  664. fixed: false
  665. },
  666. {
  667. userId: this.$store.state.user.name,
  668. functionId: 5302,
  669. serialNumber: '5302ProduceEfficiency',
  670. tableId: "5302Produce",
  671. tableName: "待生产工单",
  672. columnProp: "efficiency",
  673. headerAlign: "center",
  674. align: "center",
  675. columnLabel: "效率",
  676. columnWidth: 80,
  677. columnHidden: false,
  678. columnImage: false,
  679. columnSortable: false,
  680. sortLv: 0,
  681. status: true,
  682. fixed: false
  683. },
  684. {
  685. userId: this.$store.state.user.name,
  686. functionId: 5302,
  687. serialNumber: '5302ProduceNextItemNo',
  688. tableId: "5302Produce",
  689. tableName: "待生产工单",
  690. columnProp: "nextItemNo",
  691. headerAlign: "center",
  692. align: "center",
  693. columnLabel: "下道工序号",
  694. columnWidth: 80,
  695. columnHidden: false,
  696. columnImage: false,
  697. columnSortable: false,
  698. sortLv: 0,
  699. status: true,
  700. fixed: false
  701. },
  702. {
  703. userId: this.$store.state.user.name,
  704. functionId: 5302,
  705. serialNumber: '5302ProduceNextItemDesc',
  706. tableId: "5302Produce",
  707. tableName: "待生产工单",
  708. columnProp: "nextItemDesc",
  709. headerAlign: "center",
  710. align: "center",
  711. columnLabel: "下道工序名称",
  712. columnWidth: 80,
  713. columnHidden: false,
  714. columnImage: false,
  715. columnSortable: false,
  716. sortLv: 0,
  717. status: true,
  718. fixed: false
  719. },
  720. {
  721. userId: this.$store.state.user.name,
  722. functionId: 5302,
  723. serialNumber: '5302ProducePreItemNo',
  724. tableId: "5302Produce",
  725. tableName: "待生产工单",
  726. columnProp: "preItemNo",
  727. headerAlign: "center",
  728. align: "center",
  729. columnLabel: "前道工序号",
  730. columnWidth: 80,
  731. columnHidden: false,
  732. columnImage: false,
  733. columnSortable: false,
  734. sortLv: 0,
  735. status: true,
  736. fixed: false
  737. },
  738. {
  739. userId: this.$store.state.user.name,
  740. functionId: 5302,
  741. serialNumber: '5302ProducePreItemDesc',
  742. tableId: "5302Produce",
  743. tableName: "待生产工单",
  744. columnProp: "preItemDesc",
  745. headerAlign: "center",
  746. align: "center",
  747. columnLabel: "前道工序名称",
  748. columnWidth: 80,
  749. columnHidden: false,
  750. columnImage: false,
  751. columnSortable: false,
  752. sortLv: 0,
  753. status: true,
  754. fixed: false
  755. },
  756. {
  757. userId: this.$store.state.user.name,
  758. functionId: 5302,
  759. serialNumber: '5302ProduceSite',
  760. tableId: "5302Produce",
  761. tableName: "待生产工单",
  762. columnProp: "site",
  763. headerAlign: "center",
  764. align: "center",
  765. columnLabel: "工厂编号",
  766. columnWidth: 80,
  767. columnHidden: false,
  768. columnImage: false,
  769. columnSortable: false,
  770. sortLv: 0,
  771. status: true,
  772. fixed: false
  773. },
  774. {
  775. userId: this.$store.state.user.name,
  776. functionId: 5302,
  777. serialNumber: '5302ProduceParkFlag',
  778. tableId: "5302Produce",
  779. tableName: "待生产工单",
  780. columnProp: "parkFlag",
  781. headerAlign: "center",
  782. align: "center",
  783. columnLabel: "暂停",
  784. columnWidth: 80,
  785. columnHidden: false,
  786. columnImage: false,
  787. columnSortable: false,
  788. sortLv: 0,
  789. status: true,
  790. fixed: false
  791. },
  792. {
  793. userId: this.$store.state.user.name,
  794. functionId: 5302,
  795. serialNumber: '5302ProduceCustomerName',
  796. tableId: "5302Produce",
  797. tableName: "待生产工单",
  798. columnProp: "customerName",
  799. headerAlign: "center",
  800. align: "center",
  801. columnLabel: "客户名称",
  802. columnWidth: 80,
  803. columnHidden: false,
  804. columnImage: false,
  805. columnSortable: false,
  806. sortLv: 0,
  807. status: true,
  808. fixed: false
  809. },
  810. {
  811. userId: this.$store.state.user.name,
  812. functionId: 5302,
  813. serialNumber: '5302ProduceCustPartNo',
  814. tableId: "5302Produce",
  815. tableName: "待生产工单",
  816. columnProp: "custPartNo",
  817. headerAlign: "center",
  818. align: "center",
  819. columnLabel: "客户产品料号",
  820. columnWidth: 80,
  821. columnHidden: false,
  822. columnImage: false,
  823. columnSortable: false,
  824. sortLv: 0,
  825. status: true,
  826. fixed: false
  827. },
  828. {
  829. userId: this.$store.state.user.name,
  830. functionId: 5302,
  831. serialNumber: '5302ProduceQtyRequiredOriginal',
  832. tableId: "5302Produce",
  833. tableName: "待生产工单",
  834. columnProp: "qtyRequiredOriginal",
  835. headerAlign: "center",
  836. align: "center",
  837. columnLabel: "原始派工单需求数量",
  838. columnWidth: 80,
  839. columnHidden: false,
  840. columnImage: false,
  841. columnSortable: false,
  842. sortLv: 0,
  843. status: true,
  844. fixed: false
  845. },
  846. {
  847. userId: this.$store.state.user.name,
  848. functionId: 5302,
  849. serialNumber: '5302ProduceClosedBy',
  850. tableId: "5302Produce",
  851. tableName: "待生产工单",
  852. columnProp: "closedBy",
  853. headerAlign: "center",
  854. align: "center",
  855. columnLabel: "关闭人",
  856. columnWidth: 80,
  857. columnHidden: false,
  858. columnImage: false,
  859. columnSortable: false,
  860. sortLv: 0,
  861. status: true,
  862. fixed: false
  863. },
  864. {
  865. userId: this.$store.state.user.name,
  866. functionId: 5302,
  867. serialNumber: '5302ProduceClosedDate',
  868. tableId: "5302Produce",
  869. tableName: "待生产工单",
  870. columnProp: "closedDate",
  871. headerAlign: "center",
  872. align: "center",
  873. columnLabel: "关闭日期",
  874. columnWidth: 80,
  875. columnHidden: false,
  876. columnImage: false,
  877. columnSortable: false,
  878. sortLv: 0,
  879. status: true,
  880. fixed: false
  881. },
  882. {
  883. userId: this.$store.state.user.name,
  884. functionId: 5302,
  885. serialNumber: '5302ProduceCostRollUpFlag',
  886. tableId: "5302Produce",
  887. tableName: "待生产工单",
  888. columnProp: "costRollUpFlag",
  889. headerAlign: "center",
  890. align: "center",
  891. columnLabel: "已排料",
  892. columnWidth: 80,
  893. columnHidden: false,
  894. columnImage: false,
  895. columnSortable: false,
  896. sortLv: 0,
  897. status: true,
  898. fixed: false
  899. },
  900. {
  901. userId: this.$store.state.user.name,
  902. functionId: 5302,
  903. serialNumber: '5302ProduceManualFlag',
  904. tableId: "5302Produce",
  905. tableName: "待生产工单",
  906. columnProp: "manualFlag",
  907. headerAlign: "center",
  908. align: "center",
  909. columnLabel: "刀模已发",
  910. columnWidth: 80,
  911. columnHidden: false,
  912. columnImage: false,
  913. columnSortable: false,
  914. sortLv: 0,
  915. status: true,
  916. fixed: false
  917. },
  918. {
  919. userId: this.$store.state.user.name,
  920. functionId: 5302,
  921. serialNumber: '5302ProduceRepairSOFlag',
  922. tableId: "5302Produce",
  923. tableName: "待生产工单",
  924. columnProp: "repairSOFlag",
  925. headerAlign: "center",
  926. align: "center",
  927. columnLabel: "印版已发",
  928. columnWidth: 80,
  929. columnHidden: false,
  930. columnImage: false,
  931. columnSortable: false,
  932. sortLv: 0,
  933. status: true,
  934. fixed: false
  935. }
  936. ],
  937. }
  938. },
  939. components: {
  940. comSwitchOperator,/*切换用户的组件*/
  941. comProduceReportNormal,/*报工页面的组件*/
  942. comFinishSchedule,/*结束派工单的组件*/
  943. },
  944. mounted() {
  945. this.$nextTick(() => {
  946. this.height = window.innerHeight - 225;
  947. })
  948. },
  949. methods: {
  950. /*查询派工单*/
  951. getProduceScheduleList() {
  952. //开始真的查询;
  953. this.searchData.searchFlag = true;
  954. getProduceScheduleList(this.searchData).then(({data}) => {
  955. //设置查询数据
  956. this.produceScheduleList = data.rows;
  957. })
  958. },
  959. /*刷新页面table*/
  960. refreshPageTables() {
  961. this.getProduceScheduleList();
  962. },
  963. /*设置选中行的参数*/
  964. setCurrentRow(row, column, event) {
  965. this.currentRow = JSON.parse(JSON.stringify(row));
  966. },
  967. //设置参数
  968. initOperatorData(operatorData){
  969. this.showOperatorFlag = false;
  970. this.operatorData = JSON.parse(JSON.stringify(operatorData));
  971. //切换到报工组件
  972. this.switchProduceReportModal();
  973. },
  974. notInitOperatorData(){
  975. //关闭切换用户模态框
  976. this.showOperatorFlag = false;
  977. //切换到报工组件
  978. this.switchProduceReportModal();
  979. },
  980. //切换员工modal
  981. switchOperatorModal() {
  982. //首先判断是否选择好派工单
  983. if (JSON.stringify(this.currentRow) == '{}') {
  984. this.$message.error('请先选择派工单!');
  985. return false;
  986. }
  987. //打开操作员切换功能
  988. this.showOperatorFlag = true;
  989. this.$nextTick(() => {
  990. this.$refs.comSwitchOperator.init();
  991. });
  992. },
  993. //切换报工modal
  994. switchProduceReportModal() {
  995. //首先判断是否选择好派工单
  996. if (JSON.stringify(this.currentRow) == '{}') {
  997. this.$message.error('请先选择派工单!');
  998. return false;
  999. }
  1000. //打开操作员切换功能
  1001. this.showReportFlag = true;
  1002. this.$nextTick(() => {
  1003. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1004. });
  1005. },
  1006. //打开结束派工单的modal
  1007. showFinishScheduleModal() {
  1008. //首先判断是否选择好派工单
  1009. if (JSON.stringify(this.currentRow) == '{}') {
  1010. this.$message.error('请先选择派工单!');
  1011. return false;
  1012. }
  1013. //打开操作员切换功能
  1014. this.showFinishScheduleFlag = true;
  1015. this.$nextTick(() => {
  1016. this.$refs.comFinishSchedule.init(this.currentRow, this.operatorData);
  1017. });
  1018. },
  1019. //结束派工单后刷新页面
  1020. processFinishScheduleOperation(){
  1021. //刷新当前页面的数据
  1022. this.refreshPageTables();
  1023. },
  1024. //保存操作员的信息
  1025. saveOperatorData() {
  1026. //查询操作员信息
  1027. getOperatorData(this.operatorData).then(({data}) => {
  1028. let operatorData = data.row;
  1029. let status = operatorData.status;
  1030. this.operatorData.operatorName = data.row.operatorName;
  1031. //重置操作员信息状态
  1032. this.operatorData.status = status;
  1033. //判断是否验证通过
  1034. if (status == 'N') {
  1035. this.operatorFlag = false;
  1036. } else {
  1037. this.operatorFlag = true;
  1038. }
  1039. if (!this.operatorFlag) {
  1040. this.$message.error('操作员信息不可用!');
  1041. }
  1042. })
  1043. //判断是否检查通过--不通过不在继续
  1044. .then(() => {
  1045. if (!this.operatorFlag) {
  1046. return false;
  1047. }
  1048. //关闭操作员切换功能
  1049. this.operatorData.showFlag = false;
  1050. //打开组件
  1051. this.showReportFlag = true;
  1052. //打开报工操作页面
  1053. this.$nextTick(() => {
  1054. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1055. });
  1056. })
  1057. }
  1058. },
  1059. created() {
  1060. //不查询
  1061. getProduceScheduleList(this.searchData).then(({data}) => {
  1062. //设置查询数据
  1063. this.searchData.searchFlag = false;
  1064. this.produceScheduleList = data.rows;
  1065. });
  1066. }
  1067. }
  1068. </script>
  1069. <style>
  1070. .el-textarea__inner {
  1071. padding: 5px 5px;
  1072. }
  1073. </style>
  1074. <!--当前页面的标签样式-->
  1075. <style scoped lang="scss">
  1076. /*针对el-card*/
  1077. .customer-card .el-form-item__content {
  1078. margin-top: -15px;
  1079. }
  1080. .customer-card .el-form-item {
  1081. height: 22px;
  1082. }
  1083. .customer-border .el-form-item__content {
  1084. margin-top: -30px;
  1085. }
  1086. /*全局年与日类型 宽度*/
  1087. div.el-time-width {
  1088. width: 110px !important;
  1089. }
  1090. /* 全局时间右边框*/
  1091. .customer-css input.el-input__inner {
  1092. height: 22px !important;
  1093. padding-right: 0px !important;
  1094. }
  1095. /* 控制el-card标签的数据*/
  1096. div.customer-el-card {
  1097. margin-left: 110px;
  1098. margin-top: -15px;
  1099. height: 20px;
  1100. width: 60px;
  1101. }
  1102. /* 颜色控制 */
  1103. div.customer-el-card-pink {
  1104. background: #FF00FF;
  1105. }
  1106. div.customer-el-card-orange {
  1107. background: #FFD700;
  1108. }
  1109. div.customer-el-card-blue {
  1110. background: #0000CD;
  1111. }
  1112. /*清掉样式*/
  1113. .el-radio + .el-radio {
  1114. margin-left: 0px;
  1115. }
  1116. /*当前按钮的通用样式*/
  1117. .customer-css .customer-bun-mid{
  1118. width: 65px;
  1119. text-align: center;
  1120. }
  1121. /*当前按钮的通用样式*/
  1122. .customer-css .el-button--medium {
  1123. padding: 5px 5px;
  1124. }
  1125. /*控制上下间距*/
  1126. </style>