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.

2031 lines
65 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <div class="customer-css">
  3. <!-- 菜单按钮区域 -->
  4. <fieldset class="customer-field" style="width: 675px; padding: 0.35em 0.75em 0.425em;">
  5. <legend>菜单</legend>
  6. <el-form :inline="true" label-position="top" label-width="100px" style="">
  7. <el-form-item :label="''">
  8. <el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
  9. style="margin-left: 10px; margin-bottom: 5px;">查询
  10. </el-button>
  11. </el-form-item>
  12. <el-form-item :label="''">
  13. <el-button type="primary" @click="switchOperatorModal(0)" class="customer-bun-mid"
  14. style="margin-left: 10px; margin-bottom: 5px;">报工
  15. </el-button>
  16. </el-form-item>
  17. <el-form-item :label="''">
  18. <el-button type="primary" @click="switchOperatorModal(1)" class="customer-bun-mid"
  19. style="margin-left: 10px; margin-bottom: 5px;">FQC报工
  20. </el-button>
  21. </el-form-item>
  22. <el-form-item :label="''">
  23. <el-button type="primary" @click="switchOperatorModal(2)" class="customer-bun-mid"
  24. style="margin-left: 10px; margin-bottom: 5px;">返工重检
  25. </el-button>
  26. </el-form-item>
  27. <el-form-item :label="''">
  28. <el-button type="primary" @click="switchOperatorModal(4)" class="customer-bun-mid"
  29. style="margin-left: 10px; margin-bottom: 5px;">换包装
  30. </el-button>
  31. </el-form-item>
  32. <el-form-item :label="''">
  33. <el-button type="primary" @click="switchOperatorModal(3)" class="customer-bun-mid"
  34. style="margin-left: 10px; margin-bottom: 5px;">FQC分卷
  35. </el-button>
  36. </el-form-item>
  37. <el-form-item :label="''">
  38. <el-button type="primary" class="customer-bun-mid" @click="switchOperatorModal(8)"
  39. style="margin-left: 10px; width: 60px; margin-bottom: 5px;">分切报工
  40. </el-button>
  41. </el-form-item>
  42. </el-form>
  43. </fieldset>
  44. <!-- 查询时间和产品 -->
  45. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  46. <el-form-item :label="'工厂编号:'">
  47. <el-input v-model="searchData.site" style="width: 85px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'机台编号:'">
  50. <el-input v-model="searchData.resourceId" style="width: 110px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'计划开工时间:'">
  53. <el-date-picker class="el-time-width"
  54. style=""
  55. v-model="searchData.planStartTime1"
  56. value-format="yyyy-MM-dd">
  57. </el-date-picker>
  58. </el-form-item>
  59. <el-form-item :label="''">
  60. <el-date-picker class="el-time-width"
  61. style="margin-top: 20px;"
  62. v-model="searchData.planStartTime2"
  63. format="yyyy-MM-dd"
  64. value-format="yyyy-MM-dd"
  65. placeholder="">
  66. </el-date-picker>
  67. </el-form-item>
  68. <el-form-item :label="'生产订单号:'">
  69. <el-input v-model="searchData.orderNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
  70. </el-form-item>
  71. <el-form-item :label="'派工单号:'">
  72. <el-input v-model="searchData.seqNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
  73. </el-form-item>
  74. <el-form-item :label="''" style="margin-left: -5px;">
  75. <el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已结束派工单
  76. </el-checkbox>
  77. </el-form-item>
  78. </el-form>
  79. <!-- 右键操作菜单 -->
  80. <el-form :inline="true">
  81. <el-form-item label="生产工单列表">
  82. <el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
  83. <el-button type="primary" @click="menuButtonFlag">
  84. 主菜单<i class="el-icon-arrow-down el-icon--right"></i>
  85. </el-button>
  86. <el-dropdown-menu v-show="menuShow" slot="dropdown">
  87. <el-dropdown-item class="customer-li" command="0" :disabled="menuButton.prdButton"><span>生产订单</span>
  88. </el-dropdown-item>
  89. <hr width="95%"/>
  90. <el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">关闭</el-dropdown-item>
  91. <el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">打开
  92. </el-dropdown-item>
  93. <hr width="95%"/>
  94. <el-dropdown-item class="customer-li" command="3" :disabled="menuButton.pauseButton">暂停</el-dropdown-item>
  95. <el-dropdown-item class="customer-li" command="4" :disabled="menuButton.openReverseButton">重新开工
  96. </el-dropdown-item>
  97. <hr width="95%"/>
  98. <el-dropdown-item class="customer-li" command="5" :disabled="menuButton.createRecheckButton">创建重检派工单
  99. </el-dropdown-item>
  100. <hr width="95%"/>
  101. <el-dropdown-item class="customer-li" command="6" :disabled="menuButton.canceledAllPrdButton">取消所有派工单操作
  102. </el-dropdown-item>
  103. <hr width="95%"/>
  104. <el-dropdown-item class="customer-li" command="7" :disabled="menuButton.costRollUpFlagButton">生产已排料
  105. </el-dropdown-item>
  106. <el-dropdown-item class="customer-li" command="8" :disabled="menuButton.canceledCostRollUpFlagButton">
  107. 取消生产已排料
  108. </el-dropdown-item>
  109. <el-dropdown-item class="customer-li" command="查看物料库存"
  110. :disabled="menuButton.partStockFlag">查看物料库存</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. <comSplitOrderReport :close-on-click-modal="false"
  165. :visible.sync="showSplitReportFlag" ref="comSplitOrderReport">
  166. </comSplitOrderReport>
  167. <!-- 正常的结束派工单组件 -->
  168. <comFinishSchedule :close-on-click-modal="false"
  169. :visible.sync="showFinishScheduleFlag" ref="comFinishSchedule"
  170. @processFinishScheduleOperation="processFinishScheduleOperation">
  171. </comFinishSchedule>
  172. <!-- fqc报工的组件 -->
  173. <fqcProduceReportNormal :close-on-click-modal="false"
  174. :visible.sync="fqcShowReportFlag" ref="fqcProduceReportNormal">
  175. </fqcProduceReportNormal>
  176. <!-- 返工重检 -->
  177. <reworkInspectReport :close-on-click-modal="false"
  178. :visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport>
  179. <!-- FQC分卷 -->
  180. <fqcSplitRollReport :close-on-click-modal="false"
  181. :visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport>
  182. <!-- 创建重检派工单 -->
  183. <createRecheck ref="createRecheck"></createRecheck>
  184. <!-- 换包装 -->
  185. <changePackaging :close-on-click-modal="false"
  186. :visible.sync="changePackagingFlag" ref="changePackaging"></changePackaging>
  187. <!-- 物料库存查询 -->
  188. <comPartStock ref="comPartStock" :close-on-click-modal="false"
  189. :visible.sync="showPartStockFlag">
  190. </comPartStock>
  191. </div>
  192. </template>
  193. <script>
  194. import {
  195. getProduceScheduleList,
  196. reportCheck,
  197. getUserSpecialSecurity,
  198. closeOrOpenProduceOrder,
  199. pauseOrOpenProduceOrder,
  200. costRollUpProduceOrder,
  201. manualProduceOrder,
  202. repairSOFlagProduceOrder,
  203. workbenchCancelallops,
  204. getShopOrder
  205. } from '@/api/yieldReport/produce_order.js';
  206. /*引入组件*/
  207. import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
  208. import comProduceReportNormal from "./com_produce_report_normal";/* 报工的组件*/
  209. import comFinishSchedule from "./com_finish_schedule";/*结束派工的组件*/
  210. import fqcProduceReportNormal from "./otherReport/fqc_produce_report_normal";/*结束派工的组件*/
  211. import reworkInspectReport from "./otherReport/rework_inspect_report";/*结束派工的组件*/
  212. import fqcSplitRollReport from "./otherReport/fqc_split_roll_report";/*结束派工的组件*/
  213. import changePackaging from "./otherReport/change_packaging";/*结束派工的组件*/
  214. import createRecheck from './com_create_recheck'
  215. import Com_split_schedule from "../schedule/com_split_schedule";
  216. import comSplitOrderReport from './com_split_order_report';
  217. import comPartStock from "../common/com_part_stock";/*展示物料库存的组件*/
  218. /*分切报工*/
  219. export default {
  220. data() {
  221. return {
  222. height: 800,
  223. menuShow: false,
  224. showOperatorFlag: false,
  225. showReportFlag: false,
  226. showSplitReportFlag: false,
  227. fqcShowReportFlag: false,
  228. reworkShowReportFlag: false,
  229. fqcRollShowReportFlag: false,
  230. showFinishScheduleFlag: false,
  231. changePackagingFlag: false,
  232. showPartStockFlag: false,
  233. searchData: {
  234. site: this.$store.state.user.site,
  235. resourceId: '',
  236. orderNo: '',
  237. seqNo: '',
  238. planStartTime1: '',
  239. planStartTime2: this.dayjs(new Date()).format('YYYY-MM-DD'),
  240. closedFlag: 'N',
  241. status: 1,
  242. username: this.$store.state.user.name,
  243. searchFlag: false
  244. },
  245. currentRow: {},
  246. operatorData: {
  247. site: this.$store.state.user.site,
  248. username: this.$store.state.user.name,
  249. userDisplay: this.$store.state.user.userDisplay,
  250. operatorId: '',
  251. operatorName: '',
  252. status: '',
  253. showFlag: false
  254. },
  255. produceScheduleList: [],
  256. dataListLoading: false,
  257. buttons: {
  258. search: '查询',
  259. },
  260. columnProduceScheduleArray: [
  261. {
  262. userId: this.$store.state.user.name,
  263. functionId: 5302,
  264. serialNumber: '5302ProduceCostRollUpFlag',
  265. tableId: "5302Produce",
  266. tableName: "待生产工单",
  267. columnProp: "costRollUpFlag",
  268. headerAlign: "center",
  269. align: "center",
  270. columnLabel: "已排料",
  271. columnWidth: 80,
  272. columnHidden: false,
  273. columnImage: false,
  274. columnSortable: true,
  275. sortLv: 0,
  276. status: true,
  277. fixed: false
  278. },
  279. {
  280. userId: this.$store.state.user.name,
  281. functionId: 5302,
  282. serialNumber: '5302ProduceManualFlag',
  283. tableId: "5302Produce",
  284. tableName: "待生产工单",
  285. columnProp: "manualFlag",
  286. headerAlign: "center",
  287. align: "center",
  288. columnLabel: "刀模已发",
  289. columnWidth: 90,
  290. columnHidden: false,
  291. columnImage: false,
  292. columnSortable: true,
  293. sortLv: 0,
  294. status: true,
  295. fixed: false
  296. },
  297. {
  298. userId: this.$store.state.user.name,
  299. functionId: 5302,
  300. serialNumber: '5302ProduceRepairSOFlag',
  301. tableId: "5302Produce",
  302. tableName: "待生产工单",
  303. columnProp: "repairSOFlag",
  304. headerAlign: "center",
  305. align: "center",
  306. columnLabel: "印版已发",
  307. columnWidth: 90,
  308. columnHidden: false,
  309. columnImage: false,
  310. columnSortable: true,
  311. sortLv: 0,
  312. status: true,
  313. fixed: false
  314. },
  315. {
  316. userId: this.$store.state.user.name,
  317. functionId: 5302,
  318. serialNumber: '5302ProducePreResourceInfo',
  319. tableId: "5302Produce",
  320. tableName: "待生产工单",
  321. columnProp: "preResourceInfo",
  322. headerAlign: "center",
  323. align: "left",
  324. columnLabel: "上工序机台信息",
  325. columnWidth: 100,
  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: '5302ProducePreQtyFinished',
  337. tableId: "5302Produce",
  338. tableName: "待生产工单",
  339. columnProp: "preQtyFinished",
  340. headerAlign: "center",
  341. align: "right",
  342. columnLabel: "上工序完工数",
  343. columnWidth: 100,
  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: '5302ProducePlanStartTime',
  355. tableId: "5302Produce",
  356. tableName: "待生产工单",
  357. columnProp: "planStartTime",
  358. headerAlign: "center",
  359. align: "center",
  360. columnLabel: "计划开工时间",
  361. columnWidth: 125,
  362. columnHidden: false,
  363. columnImage: false,
  364. columnSortable: true,
  365. sortLv: 0,
  366. status: true,
  367. fixed: false
  368. },
  369. {
  370. userId: this.$store.state.user.name,
  371. functionId: 5302,
  372. serialNumber: '5302ProducePlanFinishTime',
  373. tableId: "5302Produce",
  374. tableName: "待生产工单",
  375. columnProp: "planFinishTime",
  376. headerAlign: "center",
  377. align: "center",
  378. columnLabel: "计划完工时间",
  379. columnWidth: 125,
  380. columnHidden: false,
  381. columnImage: false,
  382. columnSortable: true,
  383. sortLv: 0,
  384. status: true,
  385. fixed: false
  386. },
  387. {
  388. userId: this.$store.state.user.name,
  389. functionId: 5302,
  390. serialNumber: '5302ProduceTimeRequired',
  391. tableId: "5302Produce",
  392. tableName: "待生产工单",
  393. columnProp: "timeRequired",
  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: '5302ProduceTimeReported',
  409. tableId: "5302Produce",
  410. tableName: "待生产工单",
  411. columnProp: "timeReported",
  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: '5302ProduceOrderNo',
  427. tableId: "5302Produce",
  428. tableName: "待生产工单",
  429. columnProp: "orderNo",
  430. headerAlign: "center",
  431. align: "center",
  432. columnLabel: "生产订单号",
  433. columnWidth: 70,
  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: '5302ProduceItemNo',
  445. tableId: "5302Produce",
  446. tableName: "待生产工单",
  447. columnProp: "itemNo",
  448. headerAlign: "center",
  449. align: "center",
  450. columnLabel: "工序号",
  451. columnWidth: 80,
  452. columnHidden: false,
  453. columnImage: false,
  454. columnSortable: true,
  455. sortLv: 0,
  456. status: true,
  457. fixed: false
  458. },
  459. {
  460. userId: this.$store.state.user.name,
  461. functionId: 5302,
  462. serialNumber: '5302ProduceItemDesc',
  463. tableId: "5302Produce",
  464. tableName: "待生产工单",
  465. columnProp: "itemDesc",
  466. headerAlign: "center",
  467. align: "center",
  468. columnLabel: "工序描述",
  469. columnWidth: 80,
  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: '5302ProduceResourceId',
  481. tableId: "5302Produce",
  482. tableName: "待生产工单",
  483. columnProp: "resourceId",
  484. headerAlign: "center",
  485. align: "center",
  486. columnLabel: "机台",
  487. columnWidth: 60,
  488. columnHidden: false,
  489. columnImage: false,
  490. columnSortable: true,
  491. sortLv: 0,
  492. status: true,
  493. fixed: false
  494. },
  495. {
  496. userId: this.$store.state.user.name,
  497. functionId: 5302,
  498. serialNumber: '5302ProduceQtyRequired',
  499. tableId: "5302Produce",
  500. tableName: "待生产工单",
  501. columnProp: "qtyRequired",
  502. headerAlign: "center",
  503. align: "center",
  504. columnLabel: "需求数量",
  505. columnWidth: 60,
  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: '5302ProduceQtyReported',
  517. tableId: "5302Produce",
  518. tableName: "待生产工单",
  519. columnProp: "qtyReported",
  520. headerAlign: "center",
  521. align: "right",
  522. columnLabel: "已报告数量",
  523. columnWidth: 100,
  524. columnHidden: false,
  525. columnImage: false,
  526. columnSortable: true,
  527. sortLv: 0,
  528. status: true,
  529. fixed: false
  530. },
  531. {
  532. userId: this.$store.state.user.name,
  533. functionId: 5302,
  534. serialNumber: '5302ProduceNeedDate',
  535. tableId: "5302Produce",
  536. tableName: "待生产工单",
  537. columnProp: "needDate",
  538. headerAlign: "center",
  539. align: "center",
  540. columnLabel: "生产订单要求完工日期",
  541. columnWidth: 170,
  542. columnHidden: false,
  543. columnImage: false,
  544. columnSortable: true,
  545. sortLv: 0,
  546. status: true,
  547. fixed: false
  548. },
  549. {
  550. userId: this.$store.state.user.name,
  551. functionId: 5302,
  552. serialNumber: '5302ProduceClosedFlag',
  553. tableId: "5302Produce",
  554. tableName: "待生产工单",
  555. columnProp: "closedFlag",
  556. headerAlign: "center",
  557. align: "center",
  558. columnLabel: "已关闭",
  559. columnWidth: 50,
  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: '5302ProducePartNo',
  571. tableId: "5302Produce",
  572. tableName: "待生产工单",
  573. columnProp: "partNo",
  574. headerAlign: "center",
  575. align: "center",
  576. columnLabel: "产品编码",
  577. columnWidth: 110,
  578. columnHidden: false,
  579. columnImage: false,
  580. columnSortable: true,
  581. sortLv: 0,
  582. status: true,
  583. fixed: false
  584. },
  585. {
  586. userId: this.$store.state.user.name,
  587. functionId: 5302,
  588. serialNumber: '5302ProducePartDesc',
  589. tableId: "5302Produce",
  590. tableName: "待生产工单",
  591. columnProp: "partDesc",
  592. headerAlign: "center",
  593. align: "center",
  594. columnLabel: "产品名称",
  595. columnWidth: 180,
  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: '5302ProduceSpec',
  607. tableId: "5302Produce",
  608. tableName: "待生产工单",
  609. columnProp: "spec",
  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: '5302ProduceSeqNo',
  625. tableId: "5302Produce",
  626. tableName: "待生产工单",
  627. columnProp: "seqNo",
  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: '5302ProduceQtyApprove',
  643. tableId: "5302Produce",
  644. tableName: "待生产工单",
  645. columnProp: "qtyApprove",
  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: '5302ProduceBarcodeId',
  661. tableId: "5302Produce",
  662. tableName: "条形码",
  663. columnProp: "barcodeId",
  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: '5302ProduceRemark',
  679. tableId: "5302Produce",
  680. tableName: "待生产工单",
  681. columnProp: "remark",
  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: '5302ProduceCrewSize',
  697. tableId: "5302Produce",
  698. tableName: "待生产工单",
  699. columnProp: "crewSize",
  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: '5302ProduceQtyScrapt',
  715. tableId: "5302Produce",
  716. tableName: "待生产工单",
  717. columnProp: "qtyScrapt",
  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: '5302ProduceOutWorkFlag',
  733. tableId: "5302Produce",
  734. tableName: "待生产工单",
  735. columnProp: "outWorkFlag",
  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: '5302ProduceScheduledDate',
  751. tableId: "5302Produce",
  752. tableName: "待生产工单",
  753. columnProp: "scheduledDate",
  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: '5302ProduceScheduledSeqNo',
  769. tableId: "5302Produce",
  770. tableName: "待生产工单",
  771. columnProp: "scheduledSeqNo",
  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: '5302ProduceShiftNo',
  787. tableId: "5302Produce",
  788. tableName: "待生产工单",
  789. columnProp: "shiftNo",
  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: '5302ProduceMachSetupTime',
  805. tableId: "5302Produce",
  806. tableName: "待生产工单",
  807. columnProp: "machSetupTime",
  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: '5302ProduceMachRunFactor',
  823. tableId: "5302Produce",
  824. tableName: "待生产工单",
  825. columnProp: "machRunFactor",
  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: '5302ProduceFactorUnit',
  841. tableId: "5302Produce",
  842. tableName: "待生产工单",
  843. columnProp: "factorUnit",
  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: '5302ProduceEfficiency',
  859. tableId: "5302Produce",
  860. tableName: "待生产工单",
  861. columnProp: "efficiency",
  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: '5302ProduceNextItemNo',
  877. tableId: "5302Produce",
  878. tableName: "待生产工单",
  879. columnProp: "nextItemNo",
  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: '5302ProduceNextItemDesc',
  895. tableId: "5302Produce",
  896. tableName: "待生产工单",
  897. columnProp: "nextItemDesc",
  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: '5302ProducePreItemNo',
  913. tableId: "5302Produce",
  914. tableName: "待生产工单",
  915. columnProp: "preItemNo",
  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: '5302ProducePreItemDesc',
  931. tableId: "5302Produce",
  932. tableName: "待生产工单",
  933. columnProp: "preItemDesc",
  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: '5302ProduceSite',
  949. tableId: "5302Produce",
  950. tableName: "待生产工单",
  951. columnProp: "site",
  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: '5302ProduceParkFlag',
  967. tableId: "5302Produce",
  968. tableName: "待生产工单",
  969. columnProp: "parkFlag",
  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: '5302ProduceCustomerName',
  985. tableId: "5302Produce",
  986. tableName: "待生产工单",
  987. columnProp: "customerName",
  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: '5302ProduceCustPartNo',
  1003. tableId: "5302Produce",
  1004. tableName: "待生产工单",
  1005. columnProp: "custPartNo",
  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. userId: this.$store.state.user.name,
  1019. functionId: 5302,
  1020. serialNumber: '5302ProduceQtyRequiredOriginal',
  1021. tableId: "5302Produce",
  1022. tableName: "待生产工单",
  1023. columnProp: "qtyRequiredOriginal",
  1024. headerAlign: "center",
  1025. align: "center",
  1026. columnLabel: "原始派工单需求数量",
  1027. columnWidth: 80,
  1028. columnHidden: false,
  1029. columnImage: false,
  1030. columnSortable: false,
  1031. sortLv: 0,
  1032. status: true,
  1033. fixed: false
  1034. },
  1035. {
  1036. userId: this.$store.state.user.name,
  1037. functionId: 5302,
  1038. serialNumber: '5302ProduceClosedBy',
  1039. tableId: "5302Produce",
  1040. tableName: "待生产工单",
  1041. columnProp: "closedBy",
  1042. headerAlign: "center",
  1043. align: "center",
  1044. columnLabel: "关闭人",
  1045. columnWidth: 80,
  1046. columnHidden: false,
  1047. columnImage: false,
  1048. columnSortable: false,
  1049. sortLv: 0,
  1050. status: true,
  1051. fixed: false
  1052. },
  1053. {
  1054. userId: this.$store.state.user.name,
  1055. functionId: 5302,
  1056. serialNumber: '5302ProduceClosedDate',
  1057. tableId: "5302Produce",
  1058. tableName: "待生产工单",
  1059. columnProp: "closedDate",
  1060. headerAlign: "center",
  1061. align: "center",
  1062. columnLabel: "关闭日期",
  1063. columnWidth: 80,
  1064. columnHidden: false,
  1065. columnImage: false,
  1066. columnSortable: false,
  1067. sortLv: 0,
  1068. status: true,
  1069. fixed: false
  1070. },
  1071. ],
  1072. menuButton: {
  1073. prdButton: true,
  1074. openButton: true,
  1075. closedButton: true,
  1076. pauseButton: true,
  1077. openReverseButton: true,
  1078. costRollUpFlagButton: true,
  1079. canceledCostRollUpFlagButton: false,
  1080. manualFlagButton: false,
  1081. canceledManualFlagButton: false,
  1082. repairSOFlagButton: false,
  1083. canceledRepairSOFlagButton: false,
  1084. canceledAllPrdButton: false,
  1085. createRecheckButton: false,
  1086. partStockFlag: true,/*查看物料库存*/
  1087. }
  1088. }
  1089. },
  1090. components: {
  1091. Com_split_schedule,
  1092. comSwitchOperator,/*切换用户的组件*/
  1093. comProduceReportNormal,/*报工页面的组件*/
  1094. comSplitOrderReport,/*分切报工*/
  1095. comFinishSchedule,/*结束派工单的组件*/
  1096. fqcProduceReportNormal, /*FQC报工*/
  1097. reworkInspectReport, /*返工重建*/
  1098. fqcSplitRollReport, /*FQC分卷*/
  1099. createRecheck,/*创建重检派工单*/
  1100. changePackaging, /*换包装*/
  1101. comPartStock,/*展示物料库存的组件*/
  1102. },
  1103. mounted() {
  1104. this.$nextTick(() => {
  1105. this.height = window.innerHeight - 235;
  1106. })
  1107. },
  1108. methods: {
  1109. // 控制是否显示功能
  1110. menuButtonFlag() {
  1111. this.menuShow = false
  1112. if (JSON.stringify(this.currentRow) == '{}') {
  1113. this.menuButton.prdButton = true
  1114. this.menuButton.openButton = true
  1115. this.menuButton.closedButton = true
  1116. this.menuButton.pauseButton = true
  1117. this.menuButton.costRollUpFlagButton = true
  1118. this.menuButton.canceledCostRollUpFlagButton = true
  1119. this.menuButton.manualFlagButton = true
  1120. this.menuButton.canceledManualFlagButton = true
  1121. this.menuButton.repairSOFlagButton = true
  1122. this.menuButton.canceledRepairSOFlagButton = true
  1123. this.menuButton.canceledAllPrdButton = true
  1124. this.menuButton.createRecheckButton = true
  1125. } else {
  1126. let currentRow = null
  1127. // 获取订单信息
  1128. let searchOrder = {
  1129. orderNo: this.currentRow.orderNo,
  1130. seqNo: this.currentRow.seqNo,
  1131. site: this.currentRow.site,
  1132. username: this.$store.state.user.name,
  1133. searchFlag: true
  1134. }
  1135. getProduceScheduleList(searchOrder).then(({data}) => {
  1136. //设置查询数据
  1137. currentRow = data.rows[0];
  1138. if (currentRow == null) {
  1139. return;
  1140. }
  1141. this.menuButton.canceledAllPrdButton = false
  1142. this.menuButton.createRecheckButton = false
  1143. this.menuButton.partStockFlag = false;
  1144. // 判断是否具有该页面权限
  1145. let menList = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]').filter(item => item.path == 'shopOrder-shopOrder/shopOrder')
  1146. if (menList.length > 0) {
  1147. this.menuButton.prdButton = false
  1148. }
  1149. // 关闭按钮
  1150. if (currentRow.closedFlag == 'N') {
  1151. let data = {
  1152. userSpecialSecurityNo: 230,
  1153. username: this.$store.state.user.name,
  1154. }
  1155. getUserSpecialSecurity(data).then(({data}) => {
  1156. if (data.userSpecialSecurity == 'Y') {
  1157. this.menuButton.closedButton = false
  1158. } else {
  1159. this.menuButton.closedButton = true
  1160. }
  1161. })
  1162. } else {
  1163. this.menuButton.closedButton = true
  1164. }
  1165. // 打开按钮
  1166. if (currentRow.closedFlag == 'Y') {
  1167. let data = {
  1168. userSpecialSecurityNo: 231,
  1169. username: this.$store.state.user.name,
  1170. }
  1171. getUserSpecialSecurity(data).then(({data}) => {
  1172. if (data.userSpecialSecurity == 'Y') {
  1173. this.menuButton.openButton = false
  1174. } else {
  1175. this.menuButton.openButton = true
  1176. }
  1177. })
  1178. } else {
  1179. this.menuButton.openButton = true
  1180. }
  1181. // 暂停
  1182. if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'N') {
  1183. this.menuButton.pauseButton = false
  1184. } else {
  1185. this.menuButton.pauseButton = true
  1186. }
  1187. // 重开
  1188. if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'Y') {
  1189. this.menuButton.openReverseButton = false
  1190. } else {
  1191. this.menuButton.openReverseButton = true
  1192. }
  1193. // 生产排料
  1194. if (currentRow.costRollUpFlag == 'N') {
  1195. // 获取特殊权限
  1196. let data = {
  1197. userSpecialSecurityNo: 238,
  1198. username: this.$store.state.user.name,
  1199. }
  1200. getUserSpecialSecurity(data).then(({data}) => {
  1201. if (data.userSpecialSecurity == 'Y') {
  1202. this.menuButton.costRollUpFlagButton = false
  1203. } else {
  1204. this.menuButton.costRollUpFlagButton = true
  1205. }
  1206. })
  1207. } else {
  1208. this.menuButton.costRollUpFlagButton = true
  1209. }
  1210. // 取消生产排料
  1211. if (currentRow.costRollUpFlag == 'Y') {
  1212. // 获取特殊权限
  1213. let data = {
  1214. userSpecialSecurityNo: 238,
  1215. username: this.$store.state.user.name,
  1216. }
  1217. getUserSpecialSecurity(data).then(({data}) => {
  1218. if (data.userSpecialSecurity == 'Y') {
  1219. this.menuButton.canceledCostRollUpFlagButton = false
  1220. } else {
  1221. this.menuButton.canceledCostRollUpFlagButton = true
  1222. }
  1223. })
  1224. } else {
  1225. this.menuButton.canceledCostRollUpFlagButton = true
  1226. }
  1227. // 刀模已发 确认
  1228. if (currentRow.manualFlag == 'N') {
  1229. // 获取特殊权限
  1230. let data = {
  1231. userSpecialSecurityNo: 258,
  1232. username: this.$store.state.user.name,
  1233. }
  1234. getUserSpecialSecurity(data).then(({data}) => {
  1235. if (data.userSpecialSecurity == 'Y') {
  1236. this.menuButton.manualFlagButton = false
  1237. } else {
  1238. this.menuButton.manualFlagButton = true
  1239. }
  1240. })
  1241. } else {
  1242. this.menuButton.manualFlagButton = true
  1243. }
  1244. // 刀模已发 取消
  1245. if (currentRow.manualFlag == 'Y') {
  1246. // 获取特殊权限
  1247. let canceledAllPrdData = {
  1248. userSpecialSecurityNo: 259,
  1249. username: this.$store.state.user.name,
  1250. }
  1251. getUserSpecialSecurity(canceledAllPrdData).then(({data}) => {
  1252. if (data.userSpecialSecurity == 'Y') {
  1253. this.menuButton.canceledManualFlagButton = false
  1254. } else {
  1255. this.menuButton.canceledManualFlagButton = true
  1256. }
  1257. })
  1258. } else {
  1259. this.menuButton.canceledManualFlagButton = true
  1260. }
  1261. // 印版已发 确认
  1262. if (currentRow.repairSOFlag == 'N') {
  1263. // 获取特殊权限
  1264. let data = {
  1265. userSpecialSecurityNo: 259,
  1266. username: this.$store.state.user.name,
  1267. }
  1268. getUserSpecialSecurity(data).then(({data}) => {
  1269. if (data.userSpecialSecurity == 'Y') {
  1270. this.menuButton.repairSOFlagButton = false
  1271. } else {
  1272. this.menuButton.repairSOFlagButton = true
  1273. }
  1274. })
  1275. } else {
  1276. this.menuButton.repairSOFlagButton = true
  1277. }
  1278. // 印版已发 取消
  1279. if (currentRow.repairSOFlag == 'Y') {
  1280. // 获取特殊权限
  1281. let data = {
  1282. userSpecialSecurityNo: 259,
  1283. username: this.$store.state.user.name,
  1284. }
  1285. getUserSpecialSecurity(data).then(({data}) => {
  1286. if (data.userSpecialSecurity == 'Y') {
  1287. this.menuButton.canceledRepairSOFlagButton = false
  1288. } else {
  1289. this.menuButton.canceledRepairSOFlagButton = true
  1290. }
  1291. })
  1292. } else {
  1293. this.menuButton.canceledRepairSOFlagButton = true
  1294. }
  1295. this.menuShow = true
  1296. });
  1297. }
  1298. },
  1299. /*区分不同的菜单 调用不同的方法 调用不同的方法*/
  1300. handleCommand(val) {
  1301. //区分是哪一个方法调用
  1302. //页面跳转
  1303. if ('0' == val) {
  1304. if (JSON.stringify(this.currentRow) == '{}') {
  1305. this.$message.error('请先选择派工单!');
  1306. return false;
  1307. }
  1308. this.$router.push({
  1309. path: '/shopOrder-shopOrder/shopOrder',
  1310. query: {
  1311. order: this.currentRow.orderNo,
  1312. site: this.currentRow.site,
  1313. user: this.$store.state.user.name
  1314. }
  1315. })
  1316. }
  1317. if('查看物料库存' === val){
  1318. //判断是否选择好了工单
  1319. if(this.currentRow == null || this.currentRow == {}){
  1320. //重置按钮
  1321. this.menuButton.partStockFlag = true;
  1322. //返回错误
  1323. this.$message.error('请选择派工单!');
  1324. return false;
  1325. }
  1326. let tempData = {'site': this.currentRow.site, 'orderNo': this.currentRow.orderNo};
  1327. //打开组件 需要的数据 展示需要的数据
  1328. this.$nextTick(() => {
  1329. this.showPartStockFlag = true;
  1330. this.$refs.comPartStock.init(tempData);
  1331. })
  1332. }
  1333. // 关闭
  1334. if ('1' == val) {
  1335. //调用提示的方法
  1336. this.$confirm(`确定要关闭当前派工单吗?`, `关闭派工单`, {
  1337. confirmButtonText: '确定',
  1338. cancelButtonText: '取消',
  1339. type: 'warning'
  1340. }).then(() => {
  1341. let data = {
  1342. username: this.$store.state.user.name,
  1343. itemNo: this.currentRow.itemNo,
  1344. site: this.currentRow.site,
  1345. orderNo: this.currentRow.orderNo,
  1346. seqNo: this.currentRow.seqNo,
  1347. closedFlag: 'Y',
  1348. }
  1349. closeOrOpenProduceOrder(data).then(({data}) => {
  1350. if (data.code == 0) {
  1351. this.$message.success(data.msg)
  1352. } else {
  1353. this.$message.error(data.msg)
  1354. }
  1355. })
  1356. });
  1357. }
  1358. // 打开
  1359. if ('2' == val) {
  1360. //调用提示的方法
  1361. this.$confirm(`确定要打开当前派工单吗?`, `关闭派工单`, {
  1362. confirmButtonText: '确定',
  1363. cancelButtonText: '取消',
  1364. type: 'warning'
  1365. }).then(() => {
  1366. let data = {
  1367. username: this.$store.state.user.name,
  1368. itemNo: this.currentRow.itemNo,
  1369. site: this.currentRow.site,
  1370. orderNo: this.currentRow.orderNo,
  1371. seqNo: this.currentRow.seqNo,
  1372. closedFlag: 'N',
  1373. }
  1374. closeOrOpenProduceOrder(data).then(({data}) => {
  1375. if (data.code == 0) {
  1376. this.$message.success(data.msg)
  1377. } else {
  1378. this.$message.error(data.msg)
  1379. }
  1380. })
  1381. });
  1382. }
  1383. // 暂停
  1384. if ('3' == 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. itemNo: this.currentRow.itemNo,
  1394. site: this.currentRow.site,
  1395. orderNo: this.currentRow.orderNo,
  1396. seqNo: this.currentRow.seqNo,
  1397. parkFlag: 'Y',
  1398. }
  1399. pauseOrOpenProduceOrder(data).then(({data}) => {
  1400. if (data.code == 0) {
  1401. this.$message.success(data.msg)
  1402. } else {
  1403. this.$message.error(data.msg)
  1404. }
  1405. })
  1406. });
  1407. }
  1408. // 重开
  1409. if ('4' == val) {
  1410. //调用提示的方法
  1411. this.$confirm(`确定要重开当前派工单吗?`, `关闭派工单`, {
  1412. confirmButtonText: '确定',
  1413. cancelButtonText: '取消',
  1414. type: 'warning'
  1415. }).then(() => {
  1416. let data = {
  1417. username: this.$store.state.user.name,
  1418. itemNo: this.currentRow.itemNo,
  1419. site: this.currentRow.site,
  1420. orderNo: this.currentRow.orderNo,
  1421. seqNo: this.currentRow.seqNo,
  1422. parkFlag: 'N',
  1423. }
  1424. pauseOrOpenProduceOrder(data).then(({data}) => {
  1425. if (data.code == 0) {
  1426. this.$message.success(data.msg)
  1427. } else {
  1428. this.$message.error(data.msg)
  1429. }
  1430. })
  1431. });
  1432. }
  1433. // 创建重检派工单
  1434. if ('5' == val) {
  1435. this.$nextTick(() => {
  1436. this.$refs.createRecheck.init(this.currentRow);
  1437. });
  1438. }
  1439. // 取消所有派工单操作
  1440. if ('6' == val) {
  1441. //调用提示的方法
  1442. this.$confirm(` 确定取消所有派工单操作`, `生产订单`, {
  1443. confirmButtonText: '确定',
  1444. cancelButtonText: '取消',
  1445. type: 'warning'
  1446. }).then(() => {
  1447. let data = {
  1448. orderNo: this.currentRow.orderNo,
  1449. itemNo: this.currentRow.itemNo,
  1450. site: this.currentRow.site,
  1451. seqNo: this.currentRow.seqNo,
  1452. username: this.searchData.username,
  1453. userDisplay: this.searchData.userDisplay,
  1454. }
  1455. workbenchCancelallops(data).then(({data}) => {
  1456. if (data.code == 0) {
  1457. this.$message.success(data.msg)
  1458. } else {
  1459. this.$message.warning(data.msg)
  1460. }
  1461. })
  1462. })
  1463. }
  1464. // 生产已排料 确认
  1465. if ('7' == val) {
  1466. //调用提示的方法
  1467. this.$confirm(` 确定该订单的料已排`, `生产已排料`, {
  1468. confirmButtonText: '确定',
  1469. cancelButtonText: '取消',
  1470. type: 'warning'
  1471. }).then(() => {
  1472. let data = {
  1473. username: this.$store.state.user.name,
  1474. orderNo: this.currentRow.orderNo,
  1475. costRollUpFlag: 'Y',
  1476. site: this.currentRow.site,
  1477. orderChangeStatus: "订单已排料",
  1478. }
  1479. costRollUpProduceOrder(data).then(({data}) => {
  1480. if (data.code == 0) {
  1481. this.$message.success(data.msg)
  1482. } else {
  1483. this.$message.warning(data.msg)
  1484. }
  1485. })
  1486. })
  1487. }
  1488. // 生产已排料 取消
  1489. if ('8' == val) {
  1490. //调用提示的方法
  1491. this.$confirm(` 确定要撤销该订单的排料?`, `撤销订单排料`, {
  1492. confirmButtonText: '确定',
  1493. cancelButtonText: '取消',
  1494. type: 'warning'
  1495. }).then(() => {
  1496. let data = {
  1497. username: this.$store.state.user.name,
  1498. orderNo: this.currentRow.orderNo,
  1499. costRollUpFlag: 'N',
  1500. site: this.currentRow.site,
  1501. orderChangeStatus: "撤销订单排料",
  1502. }
  1503. costRollUpProduceOrder(data).then(({data}) => {
  1504. if (data.code == 0) {
  1505. this.$message.success(data.msg)
  1506. } else {
  1507. this.$message.warning(data.msg)
  1508. }
  1509. })
  1510. })
  1511. }
  1512. // 刀模 确认
  1513. if ('9' == val) {
  1514. this.$confirm(` 确定该订单的刀模已发?`, `刀模已发`, {
  1515. confirmButtonText: '确定',
  1516. cancelButtonText: '取消',
  1517. type: 'warning'
  1518. }).then(() => {
  1519. let data = {
  1520. username: this.$store.state.user.name,
  1521. orderNo: this.currentRow.orderNo,
  1522. manualFlag: 'Y',
  1523. site: this.currentRow.site,
  1524. orderChangeStatus: "订单刀模已发",
  1525. }
  1526. manualProduceOrder(data).then(({data}) => {
  1527. if (data.code == 0) {
  1528. this.$message.success(data.msg)
  1529. } else {
  1530. this.$message.warning(data.msg)
  1531. }
  1532. })
  1533. })
  1534. }
  1535. // 刀模 取消
  1536. if ('10' == val) {
  1537. this.$confirm(` 确定要撤销该订单的刀模已发?`, `刀模已发`, {
  1538. confirmButtonText: '确定',
  1539. cancelButtonText: '取消',
  1540. type: 'warning'
  1541. }).then(() => {
  1542. let data = {
  1543. username: this.$store.state.user.name,
  1544. orderNo: this.currentRow.orderNo,
  1545. manualFlag: 'N',
  1546. site: this.currentRow.site,
  1547. orderChangeStatus: "撤销订单刀模已发",
  1548. }
  1549. manualProduceOrder(data).then(({data}) => {
  1550. if (data.code == 0) {
  1551. this.$message.success(data.msg)
  1552. } else {
  1553. this.$message.warning(data.msg)
  1554. }
  1555. })
  1556. })
  1557. }
  1558. // 印版已发
  1559. if ('11' == val) {
  1560. this.$confirm(` 确定该订单的印版已发?`, `印版已发`, {
  1561. confirmButtonText: '确定',
  1562. cancelButtonText: '取消',
  1563. type: 'warning'
  1564. }).then(() => {
  1565. let data = {
  1566. username: this.$store.state.user.name,
  1567. orderNo: this.currentRow.orderNo,
  1568. repairSOFlag: 'Y',
  1569. site: this.currentRow.site,
  1570. orderChangeStatus: "订单印版已发",
  1571. }
  1572. repairSOFlagProduceOrder(data).then(({data}) => {
  1573. if (data.code == 0) {
  1574. this.$message.success(data.msg)
  1575. } else {
  1576. this.$message.warning(data.msg)
  1577. }
  1578. })
  1579. })
  1580. }
  1581. // 印版已发 取消
  1582. if ('12' == val) {
  1583. this.$confirm(` 确定要撤销该订单的印版已发?`, `订单印版`, {
  1584. confirmButtonText: '确定',
  1585. cancelButtonText: '取消',
  1586. type: 'warning'
  1587. }).then(() => {
  1588. let data = {
  1589. username: this.$store.state.user.name,
  1590. orderNo: this.currentRow.orderNo,
  1591. repairSOFlag: 'N',
  1592. site: this.currentRow.site,
  1593. orderChangeStatus: "订单印版已发",
  1594. }
  1595. repairSOFlagProduceOrder(data).then(({data}) => {
  1596. if (data.code == 0) {
  1597. this.$message.success(data.msg)
  1598. } else {
  1599. this.$message.warning(data.msg)
  1600. }
  1601. })
  1602. })
  1603. }
  1604. },
  1605. // FQC 报工
  1606. fqcReportModal() {
  1607. //首先判断是否选择好派工单
  1608. if (JSON.stringify(this.currentRow) == '{}') {
  1609. this.$message.error('请先选择派工单!');
  1610. return false;
  1611. }
  1612. //打开操作员切换功能
  1613. this.fqcShowReportFlag = true;
  1614. this.$nextTick(() => {
  1615. this.$refs.fqcProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1616. });
  1617. },
  1618. // FQC 分卷
  1619. fqcSplitRollModal() {
  1620. if (JSON.stringify(this.currentRow) == '{}') {
  1621. this.$message.error('请先选择派工单!');
  1622. return false;
  1623. }
  1624. //打开操作员切换功能
  1625. this.fqcRollShowReportFlag = true;
  1626. this.$nextTick(() => {
  1627. this.$refs.fqcSplitRollReport.init(this.currentRow.seqNo, this.operatorData);
  1628. });
  1629. },
  1630. // 返工重捡
  1631. reworkInspectModal() {
  1632. //首先判断是否选择好派工单
  1633. if (JSON.stringify(this.currentRow) == '{}') {
  1634. this.$message.error('请先选择派工单!');
  1635. return false;
  1636. }
  1637. //打开操作员切换功能
  1638. this.reworkShowReportFlag = true;
  1639. this.$nextTick(() => {
  1640. this.$refs.reworkInspectReport.init(this.currentRow.seqNo, this.operatorData);
  1641. });
  1642. },
  1643. // 换包装
  1644. changePackaging() {
  1645. //首先判断是否选择好派工单
  1646. if (JSON.stringify(this.currentRow) == '{}') {
  1647. this.$message.error('请先选择派工单!');
  1648. return false;
  1649. }
  1650. //打开操作员切换功能
  1651. this.changePackagingFlag = true;
  1652. this.$nextTick(() => {
  1653. this.$refs.changePackaging.init(this.currentRow.seqNo, this.operatorData);
  1654. });
  1655. },
  1656. /*查询派工单*/
  1657. getProduceScheduleList() {
  1658. //开始真的查询;
  1659. this.searchData.searchFlag = true;
  1660. getProduceScheduleList(this.searchData).then(({data}) => {
  1661. //设置查询数据
  1662. this.produceScheduleList = data.rows;
  1663. })
  1664. },
  1665. /*刷新页面table*/
  1666. refreshPageTables() {
  1667. this.currentRow = {}
  1668. this.getProduceScheduleList();
  1669. },
  1670. /*设置选中行的参数*/
  1671. setCurrentRow(row, column, event) {
  1672. this.currentRow = JSON.parse(JSON.stringify(row));
  1673. },
  1674. //设置参数
  1675. initOperatorData(operatorData) {
  1676. this.showOperatorFlag = false;
  1677. this.operatorData = JSON.parse(JSON.stringify(operatorData));
  1678. if (operatorData.reportType == 0) {
  1679. //切换到报工组件
  1680. this.switchProduceReportModal();
  1681. }
  1682. if (operatorData.reportType == 1) {
  1683. //切换到fqc报工组件
  1684. this.fqcReportModal();
  1685. }
  1686. if (operatorData.reportType == 2) {
  1687. //切换到返工 重检组件
  1688. this.reworkInspectModal();
  1689. }
  1690. if (operatorData.reportType == 3) {
  1691. //切换到fqc分卷组件
  1692. this.fqcSplitRollModal();
  1693. }
  1694. if (operatorData.reportType == 4) {
  1695. // 换包装
  1696. this.changePackaging();
  1697. }
  1698. /*分切报工*/
  1699. if (operatorData.reportType == 8) {
  1700. // 分切报工
  1701. this.showSplitOrderReportModal();
  1702. }
  1703. },
  1704. notInitOperatorData(val) {
  1705. //注销用户信息
  1706. this.operatorData.operatorId = '';
  1707. this.operatorData.operatorName = '';
  1708. //关闭切换用户模态框
  1709. this.showOperatorFlag = false;
  1710. if (val == 0) {
  1711. //切换到报工组件
  1712. this.switchProduceReportModal();
  1713. }
  1714. if (val == 1) {
  1715. //切换到fqc报工组件
  1716. this.fqcReportModal();
  1717. }
  1718. if (val == 2) {
  1719. //切换到返工 重检组件
  1720. this.reworkInspectModal();
  1721. }
  1722. if (val == 3) {
  1723. //切换到fqc分卷组件
  1724. this.fqcSplitRollModal();
  1725. }
  1726. if (val == 4) {
  1727. //切换到换包装
  1728. this.changePackaging();
  1729. }
  1730. //分切报工
  1731. if (val == 8) {
  1732. //分切报工
  1733. this.showSplitOrderReportModal();
  1734. }
  1735. },
  1736. //切换员工modal
  1737. switchOperatorModal(val) {
  1738. //首先判断是否选择好派工单
  1739. if (JSON.stringify(this.currentRow) == '{}') {
  1740. this.$message.error('请先选择派工单!');
  1741. return false;
  1742. }
  1743. if (val == 0) {
  1744. let data = {
  1745. site: this.currentRow.site,
  1746. resourceId: this.currentRow.resourceId,
  1747. workCenterNo: this.currentRow.workCenterNo,
  1748. seqNo: this.currentRow.seqNo,
  1749. username: this.$store.state.user.name
  1750. }
  1751. reportCheck(data).then(({data}) => {
  1752. if (data.code == 0) {
  1753. //打开操作员切换功能
  1754. this.showOperatorFlag = true;
  1755. this.$nextTick(() => {
  1756. this.$refs.comSwitchOperator.init(val);
  1757. });
  1758. }
  1759. if (data.code == 300) {
  1760. this.$message.warning(data.msg)
  1761. }
  1762. if (data.code == 400) {
  1763. this.$confirm(`${data.msg}`, '提示', {
  1764. confirmButtonText: '确定',
  1765. cancelButtonText: '取消',
  1766. type: 'warning'
  1767. }).then(() => {
  1768. //打开操作员切换功能
  1769. this.showOperatorFlag = true;
  1770. this.$nextTick(() => {
  1771. this.$refs.comSwitchOperator.init(val);
  1772. });
  1773. })
  1774. }
  1775. })
  1776. }else if(val == 8){//处理 分切工单
  1777. //判断当前工单是否是分切工单
  1778. let orderType = this.currentRow.orderType;
  1779. if(orderType === 'D'){
  1780. this.showOperatorFlag = true;
  1781. this.$refs.comSwitchOperator.init(val);
  1782. }else{
  1783. this.$message.error('当前工单非分切工单!');
  1784. return false;
  1785. }
  1786. }else{
  1787. if (val == 4){
  1788. getShopOrder(this.currentRow).then(({data}) =>{
  1789. if (data.code == 0){
  1790. if (data.data == 'P'){
  1791. //打开操作员切换功能
  1792. this.showOperatorFlag = true;
  1793. this.$nextTick(() => {
  1794. this.$refs.comSwitchOperator.init(val);
  1795. });
  1796. }else {
  1797. this.$alert('该订单不是特殊订单,不能采用该功能!', '提示', {
  1798. confirmButtonText: '确定'})
  1799. }
  1800. }
  1801. })
  1802. }else {
  1803. //打开操作员切换功能
  1804. this.showOperatorFlag = true;
  1805. this.$nextTick(() => {
  1806. this.$refs.comSwitchOperator.init(val);
  1807. });
  1808. }
  1809. }
  1810. },
  1811. //切换报工modal
  1812. switchProduceReportModal() {
  1813. //首先判断是否选择好派工单
  1814. if (JSON.stringify(this.currentRow) == '{}') {
  1815. this.$message.error('请先选择派工单!');
  1816. return false;
  1817. }
  1818. //打开操作员切换功能
  1819. this.showReportFlag = true;
  1820. this.$nextTick(() => {
  1821. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1822. });
  1823. },
  1824. //打开分切报工的
  1825. showSplitOrderReportModal() {
  1826. //首先判断是否选择好派工单
  1827. if (JSON.stringify(this.currentRow) == '{}') {
  1828. this.$message.error('请先选择派工单!');
  1829. return false;
  1830. }
  1831. this.$nextTick(() => {
  1832. //打开分切报工功能
  1833. this.showSplitReportFlag = true;
  1834. this.$refs.comSplitOrderReport.init(this.currentRow.seqNo, this.operatorData);
  1835. });
  1836. },
  1837. //打开结束派工单的modal
  1838. showFinishScheduleModal() {
  1839. //首先判断是否选择好派工单
  1840. if (JSON.stringify(this.currentRow) == '{}') {
  1841. this.$message.error('请先选择派工单!');
  1842. return false;
  1843. }
  1844. //打开操作员切换功能
  1845. this.showFinishScheduleFlag = true;
  1846. this.$nextTick(() => {
  1847. this.$refs.comFinishSchedule.init(this.currentRow, this.operatorData);
  1848. });
  1849. },
  1850. //结束派工单后刷新页面
  1851. processFinishScheduleOperation() {
  1852. //刷新当前页面的数据
  1853. this.refreshPageTables();
  1854. },
  1855. //保存操作员的信息
  1856. saveOperatorData() {
  1857. //查询操作员信息
  1858. getOperatorData(this.operatorData).then(({data}) => {
  1859. let operatorData = data.row;
  1860. let status = operatorData.status;
  1861. this.operatorData.operatorName = data.row.operatorName;
  1862. //重置操作员信息状态
  1863. this.operatorData.status = status;
  1864. //判断是否验证通过
  1865. if (status == 'N') {
  1866. this.operatorFlag = false;
  1867. } else {
  1868. this.operatorFlag = true;
  1869. }
  1870. if (!this.operatorFlag) {
  1871. this.$message.error('操作员信息不可用!');
  1872. }
  1873. })
  1874. //判断是否检查通过--不通过不在继续
  1875. .then(() => {
  1876. if (!this.operatorFlag) {
  1877. return false;
  1878. }
  1879. //关闭操作员切换功能
  1880. this.operatorData.showFlag = false;
  1881. //打开组件
  1882. this.showReportFlag = true;
  1883. //打开报工操作页面
  1884. this.$nextTick(() => {
  1885. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData);
  1886. });
  1887. })
  1888. }
  1889. },
  1890. created() {
  1891. //不查询
  1892. getProduceScheduleList(this.searchData).then(({data}) => {
  1893. //设置查询数据
  1894. this.searchData.searchFlag = false;
  1895. this.produceScheduleList = data.rows;
  1896. });
  1897. }
  1898. }
  1899. </script>
  1900. <style>
  1901. .el-textarea__inner {
  1902. padding: 5px 5px;
  1903. }
  1904. </style>
  1905. <!--当前页面的标签样式-->
  1906. <style scoped lang="scss">
  1907. /*针对el-card*/
  1908. .customer-card .el-form-item__content {
  1909. margin-top: -15px;
  1910. }
  1911. .customer-card .el-form-item {
  1912. height: 22px;
  1913. }
  1914. .customer-border .el-form-item__content {
  1915. margin-top: -30px;
  1916. }
  1917. /*全局年与日类型 宽度*/
  1918. div.el-time-width {
  1919. width: 110px !important;
  1920. }
  1921. /* 全局时间右边框*/
  1922. .customer-css input.el-input__inner {
  1923. height: 22px !important;
  1924. padding-right: 0px !important;
  1925. }
  1926. /* 控制el-card标签的数据*/
  1927. div.customer-el-card {
  1928. margin-left: 110px;
  1929. margin-top: -15px;
  1930. height: 20px;
  1931. width: 60px;
  1932. }
  1933. /* 颜色控制 */
  1934. div.customer-el-card-pink {
  1935. background: #FF00FF;
  1936. }
  1937. div.customer-el-card-orange {
  1938. background: #FFD700;
  1939. }
  1940. div.customer-el-card-blue {
  1941. background: #0000CD;
  1942. }
  1943. /*清掉样式*/
  1944. .el-radio + .el-radio {
  1945. margin-left: 0px;
  1946. }
  1947. /*当前按钮的通用样式*/
  1948. .customer-css .customer-bun-mid {
  1949. width: 65px;
  1950. text-align: center;
  1951. }
  1952. /*当前按钮的通用样式*/
  1953. .customer-css .el-button--medium {
  1954. padding: 5px 5px;
  1955. }
  1956. /*添加主菜单和明细菜单的样式*/
  1957. .customer-css .customer-dropdown .el-button--primary {
  1958. padding: 2px;
  1959. font-size: 12px;
  1960. }
  1961. .el-dropdown-menu--medium .el-dropdown-menu__item {
  1962. line-height: 18px;
  1963. padding: 0 17px;
  1964. font-size: 12px;
  1965. }
  1966. hr {
  1967. margin-top: 0px;
  1968. }
  1969. /*控制上下间距*/
  1970. </style>