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.

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