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.

2409 lines
78 KiB

6 months ago
5 months ago
6 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
2 months ago
2 months ago
2 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
  1. <template>
  2. <div class="customer-css">
  3. <!-- 菜单按钮区域 -->
  4. <fieldset class="customer-field" style="width: 200px; 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;">{{ buttons.searchButton }}
  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. :disabled="reportButton.normalReportButton"
  15. style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.reportButton }}
  16. </el-button>
  17. </el-form-item>
  18. </el-form>
  19. </fieldset>
  20. <!-- 查询时间和产品 -->
  21. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  22. <el-form-item :label=labels.siteNo>
  23. <el-input v-model="searchData.site" style="width: 85px"></el-input>
  24. </el-form-item>
  25. <el-form-item :label=labels.resourceId>
  26. <span slot="label" @click="getBaseList(95)"><a herf="#">机台编号:</a></span>
  27. <el-input v-model="searchData.resourceId" clearable style="width: 110px"></el-input>
  28. </el-form-item>
  29. <el-form-item :label=labels.planStartTime>
  30. <el-date-picker class="el-time-width"
  31. style=""
  32. v-model="searchData.planStartTime1"
  33. value-format="yyyy-MM-dd">
  34. </el-date-picker>
  35. </el-form-item>
  36. <el-form-item :label="''">
  37. <el-date-picker class="el-time-width"
  38. style="margin-top: 20px;"
  39. v-model="searchData.planStartTime2"
  40. format="yyyy-MM-dd"
  41. value-format="yyyy-MM-dd"
  42. placeholder="">
  43. </el-date-picker>
  44. </el-form-item>
  45. <el-form-item :label=labels.orderNo>
  46. <el-input v-model="searchData.orderNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
  47. </el-form-item>
  48. <el-form-item :label=labels.seqNo>
  49. <el-input v-model="searchData.seqNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
  50. </el-form-item>
  51. <el-form-item :label="''" style="margin-left: -5px;">
  52. <el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">{{ labels.showFinishedSeqNo }}
  53. </el-checkbox>
  54. </el-form-item>
  55. </el-form>
  56. <!-- 右键操作菜单 -->
  57. <el-form :inline="true">
  58. <el-form-item :label=labels.shopOrderList>
  59. <el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
  60. <el-button type="primary" @click="menuButtonFlag" :disabled="authEdit">
  61. {{ labels.primaryMenu }}<i class="el-icon-arrow-down el-icon--right"></i>
  62. </el-button>
  63. <el-dropdown-menu v-show="menuShow" slot="dropdown">
  64. <el-dropdown-item class="customer-li" command="0" :disabled="menuButton.prdButton">
  65. <span>{{ labels.shopOrderLabel }}</span>
  66. </el-dropdown-item>
  67. <hr width="95%"/>
  68. <el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">{{
  69. labels.closeLabel
  70. }}
  71. </el-dropdown-item>
  72. <el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">{{ labels.openLabel }}
  73. </el-dropdown-item>
  74. <hr width="95%"/>
  75. <el-dropdown-item class="customer-li" command="3" :disabled="menuButton.pauseButton">{{
  76. labels.pauseLabel
  77. }}
  78. </el-dropdown-item>
  79. <el-dropdown-item class="customer-li" command="4" :disabled="menuButton.openReverseButton">
  80. {{ labels.reopenLabel }}
  81. </el-dropdown-item>
  82. <hr width="95%"/>
  83. <el-dropdown-item class="customer-li" command="5" :disabled="menuButton.createRecheckButton">
  84. {{ labels.createReCheckSeqNo }}
  85. </el-dropdown-item>
  86. <hr width="95%"/>
  87. <el-dropdown-item class="customer-li" command="6" :disabled="menuButton.canceledAllPrdButton">
  88. {{ labels.cancelAllScheduleOperations }}
  89. </el-dropdown-item>
  90. <hr width="95%"/>
  91. <!-- <el-dropdown-item class="customer-li" command="7" :disabled="menuButton.costRollUpFlagButton">-->
  92. <!-- {{ labels.prodIssued }}-->
  93. <!-- </el-dropdown-item>-->
  94. <!-- <el-dropdown-item class="customer-li" command="8" :disabled="menuButton.canceledCostRollUpFlagButton">-->
  95. <!-- {{ labels.cancelProdIssued }}-->
  96. <!-- </el-dropdown-item>-->
  97. <el-dropdown-item class="customer-li" command="查看物料库存"
  98. :disabled="menuButton.partStockFlag">{{ labels.viewPartStock }}
  99. </el-dropdown-item>
  100. <hr width="95%"/>
  101. <!-- <el-dropdown-item class="customer-li" command="9" :disabled="menuButton.manualFlagButton">-->
  102. <!-- {{ labels.toolIssued }}-->
  103. <!-- </el-dropdown-item>-->
  104. <!-- <el-dropdown-item class="customer-li" command="10" :disabled="menuButton.canceledManualFlagButton">-->
  105. <!-- {{ labels.cancelToolIssued }}-->
  106. <!-- </el-dropdown-item>-->
  107. <!-- <hr width="95%"/>-->
  108. <!-- <el-dropdown-item class="customer-li" command="11" :disabled="menuButton.repairSOFlagButton">-->
  109. <!-- {{ labels.printIssued }}-->
  110. <!-- </el-dropdown-item>-->
  111. <!-- <el-dropdown-item class="customer-li" command="12" :disabled="menuButton.canceledRepairSOFlagButton">-->
  112. <!-- {{ labels.cancelPrintIssued }}-->
  113. <!-- </el-dropdown-item>-->
  114. <!-- <hr width="95%"/>-->
  115. </el-dropdown-menu>
  116. </el-dropdown>
  117. <!-- <el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>-->
  118. <!-- <el-button v-if="showDefault" @click="saveColumnList()" type="primary">{{ buttons.defaultTable }}</el-button>-->
  119. <download-excel
  120. :fields="fields()"
  121. :data="exportList"
  122. type="xls"
  123. :name="exportName"
  124. :header="exportHeader"
  125. :footer="exportFooter"
  126. :defaultValue="exportDefaultValue"
  127. :fetch="createExportData"
  128. :before-generate="startDownload"
  129. :before-finish="finishDownload"
  130. worksheet="导出信息"
  131. class="el-button el-button--primary el-button--medium">
  132. {{ buttons.download||'导出' }}
  133. </download-excel>
  134. </el-form-item>
  135. </el-form>
  136. <!-- 工单主表信息 -->
  137. <el-main style="margin-left: -20px; margin-top: -20px; width: 104%;">
  138. <el-table @row-click="setCurrentRow"
  139. :height="height"
  140. highlight-current-row
  141. :data="produceScheduleList"
  142. border
  143. v-loading="dataListLoading"
  144. style="width: 100%;">
  145. <el-table-column
  146. v-for="(item,index) in columnList" :key="index"
  147. :sortable="item.columnSortable"
  148. :prop="item.columnProp"
  149. :header-align="item.headerAlign"
  150. :show-overflow-tooltip="item.showOverflowTooltip"
  151. :align="item.align"
  152. :fixed="item.fixed==''?false:item.fixed"
  153. :width="item.columnWidth"
  154. :label="item.columnLabel">
  155. <template slot-scope="scope">
  156. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  157. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  158. style="width: 100px; height: 80px"/></span>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. </el-main>
  163. <!-- 切换操作员 -->
  164. <comSwitchOperator ref="comSwitchOperator" :close-on-click-modal="false"
  165. :visible.sync="showOperatorFlag"
  166. @initOperatorData="initOperatorData"
  167. @notInitOperatorData="notInitOperatorData">
  168. </comSwitchOperator>
  169. <!-- 正常报工的组件 -->
  170. <comProduceReportNormal :close-on-click-modal="false"
  171. :visible.sync="showReportFlag" ref="comProduceReportNormal">
  172. </comProduceReportNormal>
  173. <!-- 分切报工的组件 -->
  174. <comSplitOrderReport :close-on-click-modal="false"
  175. :visible.sync="showSplitReportFlag" ref="comSplitOrderReport">
  176. </comSplitOrderReport>
  177. <!-- 正常的结束派工单组件 -->
  178. <comFinishSchedule :close-on-click-modal="false"
  179. :visible.sync="showFinishScheduleFlag" ref="comFinishSchedule"
  180. @processFinishScheduleOperation="processFinishScheduleOperation">
  181. </comFinishSchedule>
  182. <!-- fqc报工的组件 -->
  183. <fqcProduceReportNormal :close-on-click-modal="false"
  184. :visible.sync="fqcShowReportFlag" ref="fqcProduceReportNormal">
  185. </fqcProduceReportNormal>
  186. <!-- 返工重检 -->
  187. <reworkInspectReport :close-on-click-modal="false"
  188. :visible.sync="reworkShowReportFlag" ref="reworkInspectReport"></reworkInspectReport>
  189. <!-- FQC分卷 -->
  190. <fqcSplitRollReport :close-on-click-modal="false"
  191. :visible.sync="fqcRollShowReportFlag" ref="fqcSplitRollReport"></fqcSplitRollReport>
  192. <!-- 创建重检派工单 -->
  193. <createRecheck ref="createRecheck"></createRecheck>
  194. <!-- 换包装 -->
  195. <changePackaging :close-on-click-modal="false"
  196. :visible.sync="changePackagingFlag" ref="changePackaging"></changePackaging>
  197. <!-- 物料库存查询 -->
  198. <comPartStock ref="comPartStock" :close-on-click-modal="false"
  199. :visible.sync="showPartStockFlag">
  200. </comPartStock>
  201. <!--列表的组件-->
  202. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  203. <!-- 动态列 -->
  204. <column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
  205. </div>
  206. </template>
  207. <script>
  208. import {
  209. getProduceScheduleList,
  210. reportCheck,
  211. getUserSpecialSecurity,
  212. closeOrOpenProduceOrder,
  213. pauseOrOpenProduceOrder,
  214. costRollUpProduceOrder,
  215. manualProduceOrder,
  216. repairSOFlagProduceOrder,
  217. workbenchCancelallops,
  218. getShopOrder,
  219. getScheduleMultiReportSpecialAuth,/* 获取派工单的特殊权限 */
  220. getResourceByUser
  221. } from '@/api/yieldReport/produce_order.js'
  222. /* 动态表头 */
  223. import {
  224. saveTableDefaultList,
  225. getTableDefaultListLanguage,
  226. getTableUserListLanguage,
  227. removerDefault,
  228. removerUser
  229. } from '@/api/table.js'
  230. /* 引入组件 */
  231. import Chooselist from '@/views/modules/common/Chooselist_eam'
  232. import comSwitchOperator from './com_switch_operator'/* 切换操作员 */
  233. import comProduceReportNormal from './com_produce_report_normal'/* 报工的组件 */
  234. import comFinishSchedule from './com_finish_schedule'/* 结束派工的组件 */
  235. import fqcProduceReportNormal from './otherReport/fqc_produce_report_normal'/* 结束派工的组件 */
  236. import reworkInspectReport from './otherReport/rework_inspect_report'/* 结束派工的组件 */
  237. import fqcSplitRollReport from './otherReport/fqc_split_roll_report'/* 结束派工的组件 */
  238. import changePackaging from './otherReport/change_packaging'/* 结束派工的组件 */
  239. import createRecheck from './com_create_recheck'
  240. import Com_split_schedule from '../schedule/com_split_schedule'
  241. import comSplitOrderReport from './com_split_order_report'
  242. import comPartStock from '../common/com_part_stock'
  243. import column from '@/views/modules/common/column'
  244. /* 展示物料库存的组件 */
  245. /* 分切报工 */
  246. import {
  247. searchSysLanguagePackList,
  248. searchSysLanguageParam,
  249. searchFunctionButtonList,
  250. saveButtonList,
  251. searchSysLanguage,
  252. searchLanguageListByLanguageCode,
  253. saveSysLanguageOne,
  254. searchPageLanguageData,
  255. removerLanguage,
  256. saveSysLanguageList
  257. } from "@/api/sysLanguage.js";
  258. var functionId = '104003006';
  259. export default {
  260. data() {
  261. return {
  262. height: 800,
  263. authEdit: false,
  264. authAdd: false,
  265. authDelete: false,
  266. menuId: this.$route.meta.menuId,
  267. menuShow: false,
  268. showOperatorFlag: false,
  269. showReportFlag: false,
  270. showSplitReportFlag: false,
  271. showDefault: false,
  272. visible: false,
  273. fqcShowReportFlag: false,
  274. reworkShowReportFlag: false,
  275. fqcRollShowReportFlag: false,
  276. showFinishScheduleFlag: false,
  277. changePackagingFlag: false,
  278. showPartStockFlag: false,
  279. searchData: {
  280. site: this.$store.state.user.site,
  281. resourceId: '',
  282. orderNo: '',
  283. seqNo: '',
  284. planStartTime1: '',
  285. planStartTime2: '',
  286. closedFlag: 'N',
  287. status: 1,
  288. username: this.$store.state.user.name,
  289. searchFlag: false,
  290. exportFlag: "N",
  291. },
  292. currentRow: {},
  293. operatorData: {
  294. site: this.$store.state.user.site,
  295. username: this.$store.state.user.name,
  296. userDisplay: this.$store.state.user.userDisplay,
  297. operatorId: '',
  298. operatorName: '',
  299. status: '',
  300. showFlag: false
  301. },
  302. produceScheduleList: [],
  303. dataListLoading: false,
  304. columnList: [
  305. {
  306. userId: this.$store.state.user.name,
  307. functionId: 5302,
  308. serialNumber: '5302ProduceSerialNumber',
  309. tableId: '5302Produce',
  310. tableName: '待生产工单',
  311. columnProp: 'serialNumber',
  312. headerAlign: 'center',
  313. align: 'right',
  314. columnLabel: '序号',
  315. columnWidth: 80,
  316. columnHidden: false,
  317. columnImage: false,
  318. columnSortable: false,
  319. sortLv: 0,
  320. status: true,
  321. fixed: ''
  322. },
  323. {
  324. userId: this.$store.state.user.name,
  325. functionId: 5302,
  326. serialNumber: '5302ProduceOrderNo',
  327. tableId: '5302Produce',
  328. tableName: '待生产工单',
  329. columnProp: 'orderNo',
  330. headerAlign: 'center',
  331. align: 'left',
  332. columnLabel: '生产订单号',
  333. columnWidth: 120,
  334. columnHidden: false,
  335. columnImage: false,
  336. columnSortable: false,
  337. sortLv: 0,
  338. status: true,
  339. fixed: ''
  340. },
  341. {
  342. userId: this.$store.state.user.name,
  343. functionId: 5302,
  344. serialNumber: '5302ProduceSeqNo',
  345. tableId: '5302Produce',
  346. tableName: '待生产工单',
  347. columnProp: 'seqNo',
  348. headerAlign: 'center',
  349. align: 'left',
  350. columnLabel: '派工单号',
  351. columnWidth: 80,
  352. columnHidden: false,
  353. columnImage: false,
  354. columnSortable: false,
  355. sortLv: 0,
  356. status: true,
  357. fixed: ''
  358. },
  359. {
  360. userId: this.$store.state.user.name,
  361. functionId: 5302,
  362. serialNumber: '5302ProduceItemNo',
  363. tableId: '5302Produce',
  364. tableName: '待生产工单',
  365. columnProp: 'itemNo',
  366. headerAlign: 'center',
  367. align: 'right',
  368. columnLabel: '生产工序',
  369. columnWidth: 80,
  370. columnHidden: false,
  371. columnImage: false,
  372. columnSortable: true,
  373. sortLv: 0,
  374. status: true,
  375. fixed: ''
  376. },
  377. {
  378. userId: this.$store.state.user.name,
  379. functionId: 5302,
  380. serialNumber: '5302ProduceItemDesc',
  381. tableId: '5302Produce',
  382. tableName: '待生产工单',
  383. columnProp: 'itemDesc',
  384. headerAlign: 'center',
  385. align: 'left',
  386. columnLabel: '工序名称',
  387. columnWidth: 100,
  388. columnHidden: false,
  389. columnImage: false,
  390. columnSortable: false,
  391. sortLv: 0,
  392. status: true,
  393. fixed: ''
  394. },
  395. {
  396. userId: this.$store.state.user.name,
  397. functionId: 5302,
  398. serialNumber: '5302ProduceResourceId',
  399. tableId: '5302Produce',
  400. tableName: '待生产工单',
  401. columnProp: 'resourceId',
  402. headerAlign: 'center',
  403. align: 'left',
  404. columnLabel: '生产机台',
  405. columnWidth: 100,
  406. columnHidden: false,
  407. columnImage: false,
  408. columnSortable: true,
  409. sortLv: 0,
  410. status: true,
  411. fixed: ''
  412. },
  413. {
  414. userId: this.$store.state.user.name,
  415. functionId: 5302,
  416. serialNumber: '5302ProducePartNo',
  417. tableId: '5302Produce',
  418. tableName: '待生产工单',
  419. columnProp: 'partNo',
  420. headerAlign: 'center',
  421. align: 'left',
  422. columnLabel: '产品编码',
  423. columnWidth: 120,
  424. columnHidden: false,
  425. columnImage: false,
  426. columnSortable: true,
  427. sortLv: 0,
  428. status: true,
  429. fixed: ''
  430. },
  431. {
  432. userId: this.$store.state.user.name,
  433. functionId: 5302,
  434. serialNumber: '5302ProducePartDesc',
  435. tableId: '5302Produce',
  436. tableName: '待生产工单',
  437. columnProp: 'partDesc',
  438. headerAlign: 'center',
  439. align: 'left',
  440. columnLabel: '产品名称',
  441. columnWidth: 200,
  442. columnHidden: false,
  443. columnImage: false,
  444. columnSortable: false,
  445. sortLv: 0,
  446. status: true,
  447. fixed: ''
  448. },
  449. {
  450. userId: this.$store.state.user.name,
  451. functionId: 5302,
  452. serialNumber: '5302ProduceSpec',
  453. tableId: '5302Produce',
  454. tableName: '待生产工单',
  455. columnProp: 'spec',
  456. headerAlign: 'center',
  457. align: 'left',
  458. columnLabel: '规格型号',
  459. columnWidth: 100,
  460. columnHidden: false,
  461. columnImage: false,
  462. columnSortable: false,
  463. sortLv: 0,
  464. status: true,
  465. fixed: ''
  466. },
  467. {
  468. userId: this.$store.state.user.name,
  469. functionId: 5302,
  470. serialNumber: '5302ProduceQtyRequired',
  471. tableId: '5302Produce',
  472. tableName: '待生产工单',
  473. columnProp: 'qtyRequired',
  474. headerAlign: 'center',
  475. align: 'right',
  476. columnLabel: '需求数量',
  477. columnWidth: 100,
  478. columnHidden: false,
  479. columnImage: false,
  480. columnSortable: false,
  481. sortLv: 0,
  482. status: true,
  483. fixed: ''
  484. },
  485. {
  486. userId: this.$store.state.user.name,
  487. functionId: 5302,
  488. serialNumber: '5302ProduceQtyReported',
  489. tableId: '5302Produce',
  490. tableName: '待生产工单',
  491. columnProp: 'qtyReported',
  492. headerAlign: 'center',
  493. align: 'right',
  494. columnLabel: '完工数量',
  495. columnWidth: 100,
  496. columnHidden: false,
  497. columnImage: false,
  498. columnSortable: true,
  499. sortLv: 0,
  500. status: true,
  501. fixed: ''
  502. },
  503. {
  504. userId: this.$store.state.user.name,
  505. functionId: 5302,
  506. serialNumber: '5302ProduceQtyToReport',
  507. tableId: '5302Produce',
  508. tableName: '待生产工单',
  509. columnProp: 'qtyToReport',
  510. headerAlign: 'center',
  511. align: 'right',
  512. columnLabel: '未完数量',
  513. columnWidth: 100,
  514. columnHidden: false,
  515. columnImage: false,
  516. columnSortable: true,
  517. sortLv: 0,
  518. status: true,
  519. fixed: ''
  520. },
  521. {
  522. userId: this.$store.state.user.name,
  523. functionId: 5302,
  524. serialNumber: '5302ProduceTimeRequired',
  525. tableId: '5302Produce',
  526. tableName: '待生产工单',
  527. columnProp: 'timeRequired',
  528. headerAlign: 'center',
  529. align: 'right',
  530. columnLabel: '需求时间',
  531. columnWidth: 80,
  532. columnHidden: false,
  533. columnImage: false,
  534. columnSortable: false,
  535. sortLv: 0,
  536. status: true,
  537. fixed: ''
  538. },
  539. {
  540. userId: this.$store.state.user.name,
  541. functionId: 5302,
  542. serialNumber: '5302ProduceTimeReported',
  543. tableId: '5302Produce',
  544. tableName: '待生产工单',
  545. columnProp: 'timeReported',
  546. headerAlign: 'center',
  547. align: 'right',
  548. columnLabel: '累计工时(m)',
  549. columnWidth: 80,
  550. columnHidden: false,
  551. columnImage: false,
  552. columnSortable: false,
  553. sortLv: 0,
  554. status: true,
  555. fixed: ''
  556. },
  557. {
  558. userId: this.$store.state.user.name,
  559. functionId: 5302,
  560. serialNumber: '5302ProduceQtyApprove',
  561. tableId: '5302Produce',
  562. tableName: '待生产工单',
  563. columnProp: 'qtyApprove',
  564. headerAlign: 'center',
  565. align: 'right',
  566. columnLabel: '合格数量',
  567. columnWidth: 80,
  568. columnHidden: false,
  569. columnImage: false,
  570. columnSortable: false,
  571. sortLv: 0,
  572. status: true,
  573. fixed: ''
  574. },
  575. {
  576. userId: this.$store.state.user.name,
  577. functionId: 5302,
  578. serialNumber: '5302ProduceQtyScrapt',
  579. tableId: '5302Produce',
  580. tableName: '待生产工单',
  581. columnProp: 'qtyScrapt',
  582. headerAlign: 'center',
  583. align: 'right',
  584. columnLabel: '不良数量',
  585. columnWidth: 80,
  586. columnHidden: false,
  587. columnImage: false,
  588. columnSortable: false,
  589. sortLv: 0,
  590. status: true,
  591. fixed: ''
  592. },
  593. {
  594. userId: this.$store.state.user.name,
  595. functionId: 5302,
  596. serialNumber: '5302ProduceScheduledDate',
  597. tableId: '5302Produce',
  598. tableName: '待生产工单',
  599. columnProp: 'scheduledDate',
  600. headerAlign: 'center',
  601. align: 'center',
  602. columnLabel: '排产日期',
  603. columnWidth: 100,
  604. columnHidden: false,
  605. columnImage: false,
  606. columnSortable: false,
  607. sortLv: 0,
  608. status: true,
  609. fixed: ''
  610. },
  611. {
  612. userId: this.$store.state.user.name,
  613. functionId: 5302,
  614. serialNumber: '5302ProducePlanStartTime',
  615. tableId: '5302Produce',
  616. tableName: '待生产工单',
  617. columnProp: 'planStartTime',
  618. headerAlign: 'center',
  619. align: 'center',
  620. columnLabel: '计划开工时间',
  621. columnWidth: 130,
  622. columnHidden: false,
  623. columnImage: false,
  624. columnSortable: true,
  625. sortLv: 0,
  626. status: true,
  627. fixed: ''
  628. },
  629. {
  630. userId: this.$store.state.user.name,
  631. functionId: 5302,
  632. serialNumber: '5302ProducePlanFinishTime',
  633. tableId: '5302Produce',
  634. tableName: '待生产工单',
  635. columnProp: 'planFinishTime',
  636. headerAlign: 'center',
  637. align: 'center',
  638. columnLabel: '计划完工时间',
  639. columnWidth: 130,
  640. columnHidden: false,
  641. columnImage: false,
  642. columnSortable: true,
  643. sortLv: 0,
  644. status: true,
  645. fixed: ''
  646. },
  647. {
  648. userId: this.$store.state.user.name,
  649. functionId: 5302,
  650. serialNumber: '5302ProduceShiftNo',
  651. tableId: '5302Produce',
  652. tableName: '待生产工单',
  653. columnProp: 'shiftNo',
  654. headerAlign: 'center',
  655. align: 'left',
  656. columnLabel: '班次',
  657. columnWidth: 80,
  658. columnHidden: false,
  659. columnImage: false,
  660. columnSortable: false,
  661. sortLv: 0,
  662. status: true,
  663. fixed: ''
  664. },
  665. {
  666. userId: this.$store.state.user.name,
  667. functionId: 5302,
  668. serialNumber: '5302ProduceMachSetupTime',
  669. tableId: '5302Produce',
  670. tableName: '待生产工单',
  671. columnProp: 'machSetupTime',
  672. headerAlign: 'center',
  673. align: 'right',
  674. columnLabel: '调机时间',
  675. columnWidth: 80,
  676. columnHidden: false,
  677. columnImage: false,
  678. columnSortable: false,
  679. sortLv: 0,
  680. status: true,
  681. fixed: ''
  682. },
  683. {
  684. userId: this.$store.state.user.name,
  685. functionId: 5302,
  686. serialNumber: '5302ProduceMachRunFactor',
  687. tableId: '5302Produce',
  688. tableName: '待生产工单',
  689. columnProp: 'machRunFactor',
  690. headerAlign: 'center',
  691. align: 'right',
  692. columnLabel: '单位产出',
  693. columnWidth: 80,
  694. columnHidden: false,
  695. columnImage: false,
  696. columnSortable: false,
  697. sortLv: 0,
  698. status: true,
  699. fixed: ''
  700. },
  701. {
  702. userId: this.$store.state.user.name,
  703. functionId: 5302,
  704. serialNumber: '5302ProduceFactorUnit',
  705. tableId: '5302Produce',
  706. tableName: '待生产工单',
  707. columnProp: 'factorUnit',
  708. headerAlign: 'center',
  709. align: 'left',
  710. columnLabel: '产出单位',
  711. columnWidth: 80,
  712. columnHidden: false,
  713. columnImage: false,
  714. columnSortable: false,
  715. sortLv: 0,
  716. status: true,
  717. fixed: ''
  718. },
  719. {
  720. userId: this.$store.state.user.name,
  721. functionId: 5302,
  722. serialNumber: '5302ProduceEfficiency',
  723. tableId: '5302Produce',
  724. tableName: '待生产工单',
  725. columnProp: 'efficiency',
  726. headerAlign: 'center',
  727. align: 'right',
  728. columnLabel: '效率',
  729. columnWidth: 80,
  730. columnHidden: false,
  731. columnImage: false,
  732. columnSortable: false,
  733. sortLv: 0,
  734. status: true,
  735. fixed: ''
  736. },
  737. {
  738. userId: this.$store.state.user.name,
  739. functionId: 5302,
  740. serialNumber: '5302ProduceNextItemNo',
  741. tableId: '5302Produce',
  742. tableName: '待生产工单',
  743. columnProp: 'nextItemNo',
  744. headerAlign: 'center',
  745. align: 'right',
  746. columnLabel: '下道工序号',
  747. columnWidth: 80,
  748. columnHidden: false,
  749. columnImage: false,
  750. columnSortable: false,
  751. sortLv: 0,
  752. status: true,
  753. fixed: ''
  754. },
  755. {
  756. userId: this.$store.state.user.name,
  757. functionId: 5302,
  758. serialNumber: '5302ProduceNextItemDesc',
  759. tableId: '5302Produce',
  760. tableName: '待生产工单',
  761. columnProp: 'nextItemDesc',
  762. headerAlign: 'center',
  763. align: 'left',
  764. columnLabel: '下道工序名称',
  765. columnWidth: 100,
  766. columnHidden: false,
  767. columnImage: false,
  768. columnSortable: false,
  769. sortLv: 0,
  770. status: true,
  771. fixed: ''
  772. },
  773. {
  774. userId: this.$store.state.user.name,
  775. functionId: 5302,
  776. serialNumber: '5302ProducePreItemNo',
  777. tableId: '5302Produce',
  778. tableName: '待生产工单',
  779. columnProp: 'preItemNo',
  780. headerAlign: 'center',
  781. align: 'right',
  782. columnLabel: '前道工序号',
  783. columnWidth: 80,
  784. columnHidden: false,
  785. columnImage: false,
  786. columnSortable: false,
  787. sortLv: 0,
  788. status: true,
  789. fixed: ''
  790. },
  791. {
  792. userId: this.$store.state.user.name,
  793. functionId: 5302,
  794. serialNumber: '5302ProducePreItemDesc',
  795. tableId: '5302Produce',
  796. tableName: '待生产工单',
  797. columnProp: 'preItemDesc',
  798. headerAlign: 'center',
  799. align: 'left',
  800. columnLabel: '前道工序名称',
  801. columnWidth: 100,
  802. columnHidden: false,
  803. columnImage: false,
  804. columnSortable: false,
  805. sortLv: 0,
  806. status: true,
  807. fixed: ''
  808. },
  809. {
  810. userId: this.$store.state.user.name,
  811. functionId: 5302,
  812. serialNumber: '5302ProduceCustomerName',
  813. tableId: '5302Produce',
  814. tableName: '待生产工单',
  815. columnProp: 'customerName',
  816. headerAlign: 'center',
  817. align: 'left',
  818. columnLabel: '客户名称',
  819. columnWidth: 100,
  820. columnHidden: false,
  821. columnImage: false,
  822. columnSortable: false,
  823. sortLv: 0,
  824. status: true,
  825. fixed: ''
  826. },
  827. {
  828. userId: this.$store.state.user.name,
  829. functionId: 5302,
  830. serialNumber: '5302ProduceCustPartNo',
  831. tableId: '5302Produce',
  832. tableName: '待生产工单',
  833. columnProp: 'custPartNo',
  834. headerAlign: 'center',
  835. align: 'left',
  836. columnLabel: '客户料号',
  837. columnWidth: 100,
  838. columnHidden: false,
  839. columnImage: false,
  840. columnSortable: false,
  841. sortLv: 0,
  842. status: true,
  843. fixed: ''
  844. },
  845. {
  846. userId: this.$store.state.user.name,
  847. functionId: 5302,
  848. serialNumber: '5302ProducePreResourceInfo',
  849. tableId: '5302Produce',
  850. tableName: '待生产工单',
  851. columnProp: 'preResourceInfo',
  852. headerAlign: 'center',
  853. align: 'left',
  854. columnLabel: '上工序机台信息',
  855. columnWidth: 100,
  856. columnHidden: false,
  857. columnImage: false,
  858. columnSortable: false,
  859. sortLv: 0,
  860. status: true,
  861. fixed: ''
  862. },
  863. {
  864. userId: this.$store.state.user.name,
  865. functionId: 5302,
  866. serialNumber: '5302ProducePreQtyFinished',
  867. tableId: '5302Produce',
  868. tableName: '待生产工单',
  869. columnProp: 'preQtyFinished',
  870. headerAlign: 'center',
  871. align: 'right',
  872. columnLabel: '上工序完工数',
  873. columnWidth: 100,
  874. columnHidden: false,
  875. columnImage: false,
  876. columnSortable: false,
  877. sortLv: 0,
  878. status: true,
  879. fixed: ''
  880. },
  881. {
  882. userId: this.$store.state.user.name,
  883. functionId: 5302,
  884. serialNumber: '5302ProduceNeedDate',
  885. tableId: '5302Produce',
  886. tableName: '待生产工单',
  887. columnProp: 'needDate',
  888. headerAlign: 'center',
  889. align: 'center',
  890. columnLabel: '生产订单要求完工日期',
  891. columnWidth: 160,
  892. columnHidden: false,
  893. columnImage: false,
  894. columnSortable: true,
  895. sortLv: 0,
  896. status: true,
  897. fixed: ''
  898. },
  899. {
  900. userId: this.$store.state.user.name,
  901. functionId: 5302,
  902. serialNumber: '5302ProduceClosedFlag',
  903. tableId: '5302Produce',
  904. tableName: '待生产工单',
  905. columnProp: 'closedFlag',
  906. headerAlign: 'center',
  907. align: 'center',
  908. columnLabel: '已关闭',
  909. columnWidth: 50,
  910. columnHidden: false,
  911. columnImage: false,
  912. columnSortable: false,
  913. sortLv: 0,
  914. status: true,
  915. fixed: ''
  916. },
  917. {
  918. userId: this.$store.state.user.name,
  919. functionId: 5302,
  920. serialNumber: '5302ProduceBarcodeId',
  921. tableId: '5302Produce',
  922. tableName: '条形码',
  923. columnProp: 'barcodeId',
  924. headerAlign: 'center',
  925. align: 'left',
  926. columnLabel: '条形码',
  927. columnWidth: 80,
  928. columnHidden: false,
  929. columnImage: false,
  930. columnSortable: false,
  931. sortLv: 0,
  932. status: true,
  933. fixed: ''
  934. },
  935. {
  936. userId: this.$store.state.user.name,
  937. functionId: 5302,
  938. serialNumber: '5302ProduceRemark',
  939. tableId: '5302Produce',
  940. tableName: '待生产工单',
  941. columnProp: 'remark',
  942. headerAlign: 'center',
  943. align: 'left',
  944. columnLabel: '备注',
  945. columnWidth: 200,
  946. columnHidden: false,
  947. columnImage: false,
  948. columnSortable: false,
  949. sortLv: 0,
  950. status: true,
  951. fixed: ''
  952. },
  953. {
  954. userId: this.$store.state.user.name,
  955. functionId: 5302,
  956. serialNumber: '5302ProduceCrewSize',
  957. tableId: '5302Produce',
  958. tableName: '待生产工单',
  959. columnProp: 'crewSize',
  960. headerAlign: 'center',
  961. align: 'right',
  962. columnLabel: '操作工人数',
  963. columnWidth: 100,
  964. columnHidden: false,
  965. columnImage: false,
  966. columnSortable: false,
  967. sortLv: 0,
  968. status: true,
  969. fixed: ''
  970. },
  971. {
  972. userId: this.$store.state.user.name,
  973. functionId: 5302,
  974. serialNumber: '5302ProduceOutWorkFlag',
  975. tableId: '5302Produce',
  976. tableName: '待生产工单',
  977. columnProp: 'outWorkFlag',
  978. headerAlign: 'center',
  979. align: 'center',
  980. columnLabel: '是否外协',
  981. columnWidth: 80,
  982. columnHidden: false,
  983. columnImage: false,
  984. columnSortable: false,
  985. sortLv: 0,
  986. status: true,
  987. fixed: ''
  988. },
  989. {
  990. userId: this.$store.state.user.name,
  991. functionId: 5302,
  992. serialNumber: '5302ProduceScheduledSeqNo',
  993. tableId: '5302Produce',
  994. tableName: '待生产工单',
  995. columnProp: 'scheduledSeqNo',
  996. headerAlign: 'center',
  997. align: 'left',
  998. columnLabel: '次序号',
  999. columnWidth: 80,
  1000. columnHidden: false,
  1001. columnImage: false,
  1002. columnSortable: false,
  1003. sortLv: 0,
  1004. status: true,
  1005. fixed: ''
  1006. },
  1007. {
  1008. userId: this.$store.state.user.name,
  1009. functionId: 5302,
  1010. serialNumber: '5302ProduceParkFlag',
  1011. tableId: '5302Produce',
  1012. tableName: '待生产工单',
  1013. columnProp: 'parkFlag',
  1014. headerAlign: 'center',
  1015. align: 'center',
  1016. columnLabel: '暂停',
  1017. columnWidth: 80,
  1018. columnHidden: false,
  1019. columnImage: false,
  1020. columnSortable: false,
  1021. sortLv: 0,
  1022. status: true,
  1023. fixed: ''
  1024. },
  1025. {
  1026. userId: this.$store.state.user.name,
  1027. functionId: 5302,
  1028. serialNumber: '5302ProduceQtyRequiredOriginal',
  1029. tableId: '5302Produce',
  1030. tableName: '待生产工单',
  1031. columnProp: 'qtyRequiredOriginal',
  1032. headerAlign: 'center',
  1033. align: 'right',
  1034. columnLabel: '原始派工单需求数量',
  1035. columnWidth: 80,
  1036. columnHidden: false,
  1037. columnImage: false,
  1038. columnSortable: false,
  1039. sortLv: 0,
  1040. status: true,
  1041. fixed: ''
  1042. },
  1043. {
  1044. userId: this.$store.state.user.name,
  1045. functionId: 5302,
  1046. serialNumber: '5302ProduceClosedBy',
  1047. tableId: '5302Produce',
  1048. tableName: '待生产工单',
  1049. columnProp: 'closedBy',
  1050. headerAlign: 'center',
  1051. align: 'center',
  1052. columnLabel: '关闭人',
  1053. columnWidth: 100,
  1054. columnHidden: false,
  1055. columnImage: false,
  1056. columnSortable: false,
  1057. sortLv: 0,
  1058. status: true,
  1059. fixed: ''
  1060. },
  1061. {
  1062. userId: this.$store.state.user.name,
  1063. functionId: 5302,
  1064. serialNumber: '5302ProduceClosedDate',
  1065. tableId: '5302Produce',
  1066. tableName: '待生产工单',
  1067. columnProp: 'closedDate',
  1068. headerAlign: 'center',
  1069. align: 'center',
  1070. columnLabel: '关闭日期',
  1071. columnWidth: 130,
  1072. columnHidden: false,
  1073. columnImage: false,
  1074. columnSortable: false,
  1075. sortLv: 0,
  1076. status: true,
  1077. fixed: ''
  1078. }
  1079. ],
  1080. reportButton: {
  1081. normalReportButton: true,
  1082. fqcReportButton: true,
  1083. reworkReportButton: true,
  1084. packReportButton: true,
  1085. fqcSegmentReportButton: true,
  1086. slitReportButton: true
  1087. },
  1088. menuButton: {
  1089. prdButton: true,
  1090. openButton: true,
  1091. closedButton: true,
  1092. pauseButton: true,
  1093. openReverseButton: true,
  1094. costRollUpFlagButton: true,
  1095. canceledCostRollUpFlagButton: false,
  1096. manualFlagButton: false,
  1097. canceledManualFlagButton: false,
  1098. repairSOFlagButton: false,
  1099. canceledRepairSOFlagButton: false,
  1100. canceledAllPrdButton: false,
  1101. createRecheckButton: false,
  1102. partStockFlag: true/* 查看物料库存 */
  1103. },
  1104. queryTable: {
  1105. userId: this.$store.state.user.name,
  1106. functionId: this.$route.meta.menuId,
  1107. tableId: '5302Produce',
  1108. languageCode: this.$i18n.locale
  1109. },
  1110. // 用户table 查询参数
  1111. queryTableUser: {
  1112. userId: this.$store.state.user.name,
  1113. functionId: this.$route.meta.menuId,
  1114. tableId: '5302Produce',
  1115. status: true,
  1116. languageCode: this.$i18n.locale
  1117. },
  1118. // 用户table 配置集合
  1119. userColumnList: [],
  1120. buttons: {
  1121. searchButton: '查询',
  1122. reportButton: '报工',
  1123. fqcReportButton: 'FQC报工',
  1124. reworkInspectReport: '返工重检',
  1125. repackageReport: '换包装',
  1126. fqcSplitRollReport: 'FQC分卷',
  1127. splitReport: '分切报工',
  1128. settingTable: '设置列表',
  1129. defaultTable: '设置默认配置',
  1130. },
  1131. queryButton: {
  1132. functionId: functionId,
  1133. table_id: '*',
  1134. languageCode: this.$i18n.locale,
  1135. objectType: 'button'
  1136. },
  1137. labels: {
  1138. menuLabel: '菜单',
  1139. siteNo: '工厂编号:',
  1140. resourceId: '机台编号:',
  1141. planStartTime: '计划开工时间:',
  1142. orderNo: '生产订单号:',
  1143. seqNo: '派工单号:',
  1144. showFinishedSeqNo: '显示已结束派工单',
  1145. shopOrderList: '生产工单列表 ',
  1146. primaryMenu: '主菜单',
  1147. shopOrderLabel: '生产订单',
  1148. closeLabel: '关闭',
  1149. openLabel: '打开',
  1150. pauseLabel: '暂停',
  1151. reopenLabel: '重新开工',
  1152. createReCheckSeqNo: '创建重检派工单',
  1153. cancelAllScheduleOperations: '取消所有派工单操作',
  1154. prodIssued: '生产已排料',
  1155. cancelProdIssued: '取消生产已排料',
  1156. viewPartStock: '查看物料库存',
  1157. toolIssued: '刀模已发',
  1158. cancelToolIssued: '取消刀模已发',
  1159. printIssued: '印版已发',
  1160. cancelPrintIssued: '取消印版已发',
  1161. pleaseSelectSchedule: '请先选择派工单!',
  1162. confirmLabel: '确定',
  1163. cancelLabel: '取消',
  1164. sureCloseThisSchedule: '确定要关闭当前派工单吗?',
  1165. closeScheduleLabel: '关闭派工单',
  1166. sureOpenThisSchedule: '确定要打开当前派工单吗?',
  1167. surePauseThisSchedule: '确定要暂停当前派工单吗??',
  1168. sureReopenThisSchedule: '确定要重开当前派工单吗?',
  1169. sureCancelScheduleAllOperations: '确定取消所有派工单操作?',
  1170. sureThisOrderMaterialIsIssued: '确定该订单的料已排?',
  1171. sureCancelThisOrderMaterialIssued: '确定要撤销该订单的排料?',
  1172. cancelOrderMaterialIssued: '撤销订单排料',
  1173. sureThisOrderToolIsIssued: '确定该订单的刀模已发?',
  1174. sureCancelThisOrderToolIssued: '确定要撤销该订单的刀模已发?',
  1175. sureThisOrderPrintIsIssued: '确定该订单的印版已发?',
  1176. sureCancelThisOrderPrintIssued: '确定要撤销该订单的印版已发?',
  1177. thisScheduleCantReport: '当前派工单无法使用报工!',
  1178. thisOrderIsNotSplitOrder: '当前工单非分切工单!',
  1179. thisScheduleIsNotFqc: '当前派工单非FQC报工派工单!',
  1180. thisOrderIsNotSpecialOrder: '该订单不是特殊订单,不能采用该功能!',
  1181. operatorCantBeUsed: '操作员信息不可用!',
  1182. },
  1183. queryLabel: {
  1184. functionId: functionId,
  1185. table_id: '*',
  1186. languageCode: this.$i18n.locale,
  1187. objectType: 'label'
  1188. },
  1189. // 导出 start
  1190. exportList: [],
  1191. exportName: "生产工单",
  1192. exportHeader: [],
  1193. exportFooter: [],
  1194. exportDefaultValue: "",
  1195. // 导出 end
  1196. }
  1197. },
  1198. components: {
  1199. Chooselist, /* 选择的组件 */
  1200. Com_split_schedule,
  1201. comSwitchOperator, /* 切换用户的组件 */
  1202. comProduceReportNormal, /* 报工页面的组件 */
  1203. comSplitOrderReport, /* 分切报工 */
  1204. comFinishSchedule, /* 结束派工单的组件 */
  1205. fqcProduceReportNormal, /* FQC报工 */
  1206. reworkInspectReport, /* 返工重建 */
  1207. fqcSplitRollReport, /* FQC分卷 */
  1208. createRecheck, /* 创建重检派工单 */
  1209. changePackaging, /* 换包装 */
  1210. comPartStock, /* 展示物料库存的组件 */
  1211. column/* 动态列 */
  1212. },
  1213. mounted() {
  1214. this.$nextTick(() => {
  1215. this.height = window.innerHeight - 235
  1216. })
  1217. },
  1218. methods: {
  1219. // 控制是否显示功能
  1220. menuButtonFlag() {
  1221. this.menuShow = false
  1222. if (JSON.stringify(this.currentRow) == '{}') {
  1223. this.menuButton.prdButton = true
  1224. this.menuButton.openButton = true
  1225. this.menuButton.closedButton = true
  1226. this.menuButton.pauseButton = true
  1227. this.menuButton.costRollUpFlagButton = true
  1228. this.menuButton.canceledCostRollUpFlagButton = true
  1229. this.menuButton.manualFlagButton = true
  1230. this.menuButton.canceledManualFlagButton = true
  1231. this.menuButton.repairSOFlagButton = true
  1232. this.menuButton.canceledRepairSOFlagButton = true
  1233. this.menuButton.canceledAllPrdButton = true
  1234. this.menuButton.createRecheckButton = true
  1235. } else {
  1236. let currentRow = null
  1237. // 获取订单信息
  1238. let searchOrder = {
  1239. orderNo: this.currentRow.orderNo,
  1240. seqNo: this.currentRow.seqNo,
  1241. site: this.currentRow.site,
  1242. username: this.$store.state.user.name,
  1243. searchFlag: true,
  1244. exportFlag: 'N',
  1245. }
  1246. getProduceScheduleList(searchOrder).then(({data}) => {
  1247. // 设置查询数据
  1248. currentRow = data.rows[0]
  1249. if (currentRow == null) {
  1250. return
  1251. }
  1252. // this.menuButton.canceledAllPrdButton = false
  1253. this.menuButton.createRecheckButton = false
  1254. this.menuButton.partStockFlag = false
  1255. // 判断是否具有该页面权限
  1256. let menList = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]').filter(item => item.path == 'shopOrder-shopOrder/shopOrder')
  1257. if (menList.length > 0) {
  1258. this.menuButton.prdButton = false
  1259. }
  1260. let canceledAllPrd = {
  1261. userSpecialSecurityNo: 232,
  1262. username: this.$store.state.user.name
  1263. }
  1264. getUserSpecialSecurity(canceledAllPrd).then(({data}) => {
  1265. if (data.userSpecialSecurity == 'Y') {
  1266. this.menuButton.canceledAllPrdButton = false
  1267. } else {
  1268. this.menuButton.canceledAllPrdButton = true
  1269. }
  1270. })
  1271. // 关闭按钮
  1272. if (currentRow.closedFlag == 'N') {
  1273. let data = {
  1274. userSpecialSecurityNo: 230,
  1275. username: this.$store.state.user.name
  1276. }
  1277. getUserSpecialSecurity(data).then(({data}) => {
  1278. if (data.userSpecialSecurity == 'Y') {
  1279. this.menuButton.closedButton = false
  1280. } else {
  1281. this.menuButton.closedButton = true
  1282. }
  1283. })
  1284. } else {
  1285. this.menuButton.closedButton = true
  1286. }
  1287. // 打开按钮
  1288. if (currentRow.closedFlag == 'Y') {
  1289. let data = {
  1290. userSpecialSecurityNo: 231,
  1291. username: this.$store.state.user.name
  1292. }
  1293. getUserSpecialSecurity(data).then(({data}) => {
  1294. if (data.userSpecialSecurity == 'Y') {
  1295. this.menuButton.openButton = false
  1296. } else {
  1297. this.menuButton.openButton = true
  1298. }
  1299. })
  1300. } else {
  1301. this.menuButton.openButton = true
  1302. }
  1303. // 暂停
  1304. if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'N') {
  1305. this.menuButton.pauseButton = false
  1306. } else {
  1307. this.menuButton.pauseButton = true
  1308. }
  1309. // 重开
  1310. if (currentRow.closedFlag == 'N' && currentRow.parkFlag == 'Y') {
  1311. this.menuButton.openReverseButton = false
  1312. } else {
  1313. this.menuButton.openReverseButton = true
  1314. }
  1315. // 生产排料
  1316. if (currentRow.matIssueFlag == 'N') {
  1317. // 获取特殊权限
  1318. let data = {
  1319. userSpecialSecurityNo: 238,
  1320. username: this.$store.state.user.name
  1321. }
  1322. getUserSpecialSecurity(data).then(({data}) => {
  1323. if (data.userSpecialSecurity == 'Y') {
  1324. this.menuButton.costRollUpFlagButton = false
  1325. } else {
  1326. this.menuButton.costRollUpFlagButton = true
  1327. }
  1328. })
  1329. } else {
  1330. this.menuButton.costRollUpFlagButton = true
  1331. }
  1332. // 取消生产排料
  1333. if (currentRow.matIssueFlag == 'Y') {
  1334. // 获取特殊权限
  1335. let data = {
  1336. userSpecialSecurityNo: 238,
  1337. username: this.$store.state.user.name
  1338. }
  1339. getUserSpecialSecurity(data).then(({data}) => {
  1340. if (data.userSpecialSecurity == 'Y') {
  1341. this.menuButton.canceledCostRollUpFlagButton = false
  1342. } else {
  1343. this.menuButton.canceledCostRollUpFlagButton = true
  1344. }
  1345. })
  1346. } else {
  1347. this.menuButton.canceledCostRollUpFlagButton = true
  1348. }
  1349. // 刀模已发 确认
  1350. if (currentRow.toolIssueFlag == 'N') {
  1351. // 获取特殊权限
  1352. let data = {
  1353. userSpecialSecurityNo: 258,
  1354. username: this.$store.state.user.name
  1355. }
  1356. getUserSpecialSecurity(data).then(({data}) => {
  1357. if (data.userSpecialSecurity == 'Y') {
  1358. this.menuButton.manualFlagButton = false
  1359. } else {
  1360. this.menuButton.manualFlagButton = true
  1361. }
  1362. })
  1363. } else {
  1364. this.menuButton.manualFlagButton = true
  1365. }
  1366. // 刀模已发 取消
  1367. if (currentRow.toolIssueFlag == 'Y') {
  1368. // 获取特殊权限
  1369. let canceledAllPrdData = {
  1370. userSpecialSecurityNo: 259,
  1371. username: this.$store.state.user.name
  1372. }
  1373. getUserSpecialSecurity(canceledAllPrdData).then(({data}) => {
  1374. if (data.userSpecialSecurity == 'Y') {
  1375. this.menuButton.canceledManualFlagButton = false
  1376. } else {
  1377. this.menuButton.canceledManualFlagButton = true
  1378. }
  1379. })
  1380. } else {
  1381. this.menuButton.canceledManualFlagButton = true
  1382. }
  1383. // 印版已发 确认
  1384. if (currentRow.plateIssueFlag == 'N') {
  1385. // 获取特殊权限
  1386. let data = {
  1387. userSpecialSecurityNo: 259,
  1388. username: this.$store.state.user.name
  1389. }
  1390. getUserSpecialSecurity(data).then(({data}) => {
  1391. if (data.userSpecialSecurity == 'Y') {
  1392. this.menuButton.repairSOFlagButton = false
  1393. } else {
  1394. this.menuButton.repairSOFlagButton = true
  1395. }
  1396. })
  1397. } else {
  1398. this.menuButton.repairSOFlagButton = true
  1399. }
  1400. // 印版已发 取消
  1401. if (currentRow.plateIssueFlag == 'Y') {
  1402. // 获取特殊权限
  1403. let data = {
  1404. userSpecialSecurityNo: 259,
  1405. username: this.$store.state.user.name
  1406. }
  1407. getUserSpecialSecurity(data).then(({data}) => {
  1408. if (data.userSpecialSecurity == 'Y') {
  1409. this.menuButton.canceledRepairSOFlagButton = false
  1410. } else {
  1411. this.menuButton.canceledRepairSOFlagButton = true
  1412. }
  1413. })
  1414. } else {
  1415. this.menuButton.canceledRepairSOFlagButton = true
  1416. }
  1417. this.menuShow = true
  1418. })
  1419. }
  1420. },
  1421. /* 区分不同的菜单 调用不同的方法 调用不同的方法 */
  1422. handleCommand(val) {
  1423. // 区分是哪一个方法调用
  1424. // 页面跳转
  1425. if (val == '0') {
  1426. if (JSON.stringify(this.currentRow) == '{}') {
  1427. this.$message.error(this.labels.pleaseSelectSchedule)
  1428. return false
  1429. }
  1430. this.$router.push({
  1431. path: '/shopOrder-shopOrder/shopOrder',
  1432. query: {
  1433. order: this.currentRow.orderNo,
  1434. site: this.currentRow.site,
  1435. user: this.$store.state.user.name
  1436. }
  1437. })
  1438. }
  1439. if (val === '查看物料库存') {
  1440. // 判断是否选择好了工单
  1441. if (this.currentRow == null || this.currentRow == {}) {
  1442. // 重置按钮
  1443. this.menuButton.partStockFlag = true
  1444. // 返回错误
  1445. this.$message.error(this.labels.pleaseSelectSchedule)
  1446. return false
  1447. }
  1448. let tempData = {'site': this.currentRow.site, 'orderNo': this.currentRow.orderNo}
  1449. // 打开组件 需要的数据 展示需要的数据
  1450. this.$nextTick(() => {
  1451. this.showPartStockFlag = true
  1452. this.$refs.comPartStock.init(tempData)
  1453. })
  1454. }
  1455. // 关闭
  1456. if (val == '1') {
  1457. // 调用提示的方法
  1458. this.$confirm(this.labels.sureCloseThisSchedule, this.labels.closeScheduleLabel, {
  1459. confirmButtonText: this.labels.confirmLabel,
  1460. cancelButtonText: this.labels.cancelLabel,
  1461. type: 'warning'
  1462. }).then(() => {
  1463. let data = {
  1464. username: this.$store.state.user.name,
  1465. itemNo: this.currentRow.itemNo,
  1466. site: this.currentRow.site,
  1467. orderNo: this.currentRow.orderNo,
  1468. seqNo: this.currentRow.seqNo,
  1469. closedFlag: 'Y'
  1470. }
  1471. closeOrOpenProduceOrder(data).then(({data}) => {
  1472. if (data.code == 0) {
  1473. this.$message.success(data.msg)
  1474. } else {
  1475. this.$message.error(data.msg)
  1476. }
  1477. })
  1478. })
  1479. }
  1480. // 打开
  1481. if (val == '2') {
  1482. // 调用提示的方法
  1483. this.$confirm(this.labels.sureOpenThisSchedule, this.labels.closeScheduleLabel, {
  1484. confirmButtonText: this.labels.confirmLabel,
  1485. cancelButtonText: this.labels.cancelLabel,
  1486. type: 'warning'
  1487. }).then(() => {
  1488. let data = {
  1489. username: this.$store.state.user.name,
  1490. itemNo: this.currentRow.itemNo,
  1491. site: this.currentRow.site,
  1492. orderNo: this.currentRow.orderNo,
  1493. seqNo: this.currentRow.seqNo,
  1494. closedFlag: 'N'
  1495. }
  1496. closeOrOpenProduceOrder(data).then(({data}) => {
  1497. if (data.code == 0) {
  1498. this.$message.success(data.msg)
  1499. } else {
  1500. this.$message.error(data.msg)
  1501. }
  1502. })
  1503. })
  1504. }
  1505. // 暂停
  1506. if (val == '3') {
  1507. // 调用提示的方法
  1508. this.$confirm(this.labels.surePauseThisSchedule, this.labels.closeScheduleLabel, {
  1509. confirmButtonText: this.labels.confirmLabel,
  1510. cancelButtonText: this.labels.cancelLabel,
  1511. type: 'warning'
  1512. }).then(() => {
  1513. let data = {
  1514. username: this.$store.state.user.name,
  1515. itemNo: this.currentRow.itemNo,
  1516. site: this.currentRow.site,
  1517. orderNo: this.currentRow.orderNo,
  1518. seqNo: this.currentRow.seqNo,
  1519. parkFlag: 'Y'
  1520. }
  1521. pauseOrOpenProduceOrder(data).then(({data}) => {
  1522. if (data.code == 0) {
  1523. this.$message.success(data.msg)
  1524. } else {
  1525. this.$message.error(data.msg)
  1526. }
  1527. })
  1528. })
  1529. }
  1530. // 重开
  1531. if (val == '4') {
  1532. // 调用提示的方法
  1533. this.$confirm(this.labels.sureReopenThisSchedule, this.labels.closeScheduleLabel, {
  1534. confirmButtonText: this.labels.confirmLabel,
  1535. cancelButtonText: this.labels.cancelLabel,
  1536. type: 'warning'
  1537. }).then(() => {
  1538. let data = {
  1539. username: this.$store.state.user.name,
  1540. itemNo: this.currentRow.itemNo,
  1541. site: this.currentRow.site,
  1542. orderNo: this.currentRow.orderNo,
  1543. seqNo: this.currentRow.seqNo,
  1544. parkFlag: 'N'
  1545. }
  1546. pauseOrOpenProduceOrder(data).then(({data}) => {
  1547. if (data.code == 0) {
  1548. this.$message.success(data.msg)
  1549. } else {
  1550. this.$message.error(data.msg)
  1551. }
  1552. })
  1553. })
  1554. }
  1555. // 创建重检派工单
  1556. if (val == '5') {
  1557. this.$nextTick(() => {
  1558. this.$refs.createRecheck.init(this.currentRow)
  1559. })
  1560. }
  1561. // 取消所有派工单操作
  1562. if (val == '6') {
  1563. // 调用提示的方法
  1564. this.$confirm(this.labels.sureCancelScheduleAllOperations, this.labels.shopOrderLabel, {
  1565. confirmButtonText: this.labels.confirmLabel,
  1566. cancelButtonText: this.labels.cancelLabel,
  1567. type: 'warning'
  1568. }).then(() => {
  1569. let data = {
  1570. orderNo: this.currentRow.orderNo,
  1571. itemNo: this.currentRow.itemNo,
  1572. site: this.currentRow.site,
  1573. seqNo: this.currentRow.seqNo,
  1574. username: this.searchData.username,
  1575. userDisplay: this.searchData.userDisplay
  1576. }
  1577. workbenchCancelallops(data).then(({data}) => {
  1578. if (data.code == 0) {
  1579. this.$message.success(data.msg)
  1580. } else {
  1581. this.$message.warning(data.msg)
  1582. }
  1583. })
  1584. })
  1585. }
  1586. // 生产已排料 确认
  1587. if (val == '7') {
  1588. // 调用提示的方法
  1589. this.$confirm(this.labels.sureThisOrderMaterialIsIssued, this.labels.prodIssued, {
  1590. confirmButtonText: this.labels.confirmLabel,
  1591. cancelButtonText: this.labels.cancelLabel,
  1592. type: 'warning'
  1593. }).then(() => {
  1594. let data = {
  1595. site: this.currentRow.site,
  1596. orderNo: this.currentRow.orderNo,
  1597. itemNo: this.currentRow.itemNo,
  1598. seqNo: this.currentRow.seqNo,
  1599. username: this.$store.state.user.name,
  1600. matIssueFlag: 'Y',
  1601. orderChangeStatus: '订单已排料'
  1602. }
  1603. costRollUpProduceOrder(data).then(({data}) => {
  1604. if (data.code == 0) {
  1605. this.$message.success(data.msg)
  1606. } else {
  1607. this.$message.warning(data.msg)
  1608. }
  1609. })
  1610. })
  1611. }
  1612. // 生产已排料 取消
  1613. if (val == '8') {
  1614. // 调用提示的方法
  1615. this.$confirm(this.labels.sureCancelThisOrderMaterialIssued, this.labels.cancelOrderMaterialIssued, {
  1616. confirmButtonText: this.labels.confirmLabel,
  1617. cancelButtonText: this.labels.cancelLabel,
  1618. type: 'warning'
  1619. }).then(() => {
  1620. let data = {
  1621. site: this.currentRow.site,
  1622. orderNo: this.currentRow.orderNo,
  1623. itemNo: this.currentRow.itemNo,
  1624. seqNo: this.currentRow.seqNo,
  1625. matIssueFlag: 'N',
  1626. orderChangeStatus: '撤销订单排料'
  1627. }
  1628. costRollUpProduceOrder(data).then(({data}) => {
  1629. if (data.code == 0) {
  1630. this.$message.success(data.msg)
  1631. } else {
  1632. this.$message.warning(data.msg)
  1633. }
  1634. })
  1635. })
  1636. }
  1637. // 刀模 确认
  1638. if (val == '9') {
  1639. this.$confirm(this.labels.sureCancelThisOrderToolIssued, this.labels.toolIssued, {
  1640. confirmButtonText: this.labels.confirmLabel,
  1641. cancelButtonText: this.labels.cancelLabel,
  1642. type: 'warning'
  1643. }).then(() => {
  1644. let data = {
  1645. site: this.currentRow.site,
  1646. orderNo: this.currentRow.orderNo,
  1647. itemNo: this.currentRow.itemNo,
  1648. seqNo: this.currentRow.seqNo,
  1649. toolIssueFlag: 'Y',
  1650. orderChangeStatus: '订单刀模已发'
  1651. }
  1652. manualProduceOrder(data).then(({data}) => {
  1653. if (data.code == 0) {
  1654. this.$message.success(data.msg)
  1655. } else {
  1656. this.$message.warning(data.msg)
  1657. }
  1658. })
  1659. })
  1660. }
  1661. // 刀模 取消
  1662. if (val == '10') {
  1663. this.$confirm(this.labels.sureCancelThisOrderToolIssued, this.labels.toolIssued, {
  1664. confirmButtonText: this.labels.confirmLabel,
  1665. cancelButtonText: this.labels.cancelLabel,
  1666. type: 'warning'
  1667. }).then(() => {
  1668. let data = {
  1669. site: this.currentRow.site,
  1670. orderNo: this.currentRow.orderNo,
  1671. itemNo: this.currentRow.itemNo,
  1672. seqNo: this.currentRow.seqNo,
  1673. toolIssueFlag: 'N',
  1674. orderChangeStatus: '撤销订单刀模已发'
  1675. }
  1676. manualProduceOrder(data).then(({data}) => {
  1677. if (data.code == 0) {
  1678. this.$message.success(data.msg)
  1679. } else {
  1680. this.$message.warning(data.msg)
  1681. }
  1682. })
  1683. })
  1684. }
  1685. // 印版已发
  1686. if (val == '11') {
  1687. this.$confirm(this.labels.sureThisOrderPrintIsIssued, this.labels.printIssued, {
  1688. confirmButtonText: this.labels.confirmLabel,
  1689. cancelButtonText: this.labels.cancelLabel,
  1690. type: 'warning'
  1691. }).then(() => {
  1692. let data = {
  1693. site: this.currentRow.site,
  1694. orderNo: this.currentRow.orderNo,
  1695. itemNo: this.currentRow.itemNo,
  1696. seqNo: this.currentRow.seqNo,
  1697. plateIssueFlag: 'Y',
  1698. orderChangeStatus: '订单印版已发'
  1699. }
  1700. repairSOFlagProduceOrder(data).then(({data}) => {
  1701. if (data.code == 0) {
  1702. this.$message.success(data.msg)
  1703. } else {
  1704. this.$message.warning(data.msg)
  1705. }
  1706. })
  1707. })
  1708. }
  1709. // 印版已发 取消
  1710. if (val == '12') {
  1711. this.$confirm(this.labels.sureCancelThisOrderPrintIssued, this.labels.printIssued, {
  1712. confirmButtonText: this.labels.confirmLabel,
  1713. cancelButtonText: this.labels.cancelLabel,
  1714. type: 'warning'
  1715. }).then(() => {
  1716. let data = {
  1717. site: this.currentRow.site,
  1718. orderNo: this.currentRow.orderNo,
  1719. itemNo: this.currentRow.itemNo,
  1720. seqNo: this.currentRow.seqNo,
  1721. plateIssueFlag: 'N',
  1722. orderChangeStatus: '订单印版已发'
  1723. }
  1724. repairSOFlagProduceOrder(data).then(({data}) => {
  1725. if (data.code == 0) {
  1726. this.$message.success(data.msg)
  1727. } else {
  1728. this.$message.warning(data.msg)
  1729. }
  1730. })
  1731. })
  1732. }
  1733. },
  1734. // FQC 报工
  1735. fqcReportModal() {
  1736. // 首先判断是否选择好派工单
  1737. if (JSON.stringify(this.currentRow) == '{}') {
  1738. this.$message.error(this.labels.pleaseSelectSchedule)
  1739. return false
  1740. }
  1741. // 打开操作员切换功能
  1742. this.fqcShowReportFlag = true
  1743. this.$nextTick(() => {
  1744. this.$refs.fqcProduceReportNormal.init(this.currentRow.seqNo, this.operatorData)
  1745. })
  1746. },
  1747. // FQC 分卷
  1748. fqcSplitRollModal() {
  1749. if (JSON.stringify(this.currentRow) == '{}') {
  1750. this.$message.error(this.labels.pleaseSelectSchedule)
  1751. return false
  1752. }
  1753. // 打开操作员切换功能
  1754. this.fqcRollShowReportFlag = true
  1755. this.$nextTick(() => {
  1756. this.$refs.fqcSplitRollReport.init(this.currentRow.seqNo, this.operatorData)
  1757. })
  1758. },
  1759. // 返工重捡
  1760. reworkInspectModal() {
  1761. // 首先判断是否选择好派工单
  1762. if (JSON.stringify(this.currentRow) == '{}') {
  1763. this.$message.error(this.labels.pleaseSelectSchedule)
  1764. return false
  1765. }
  1766. // 打开操作员切换功能
  1767. this.reworkShowReportFlag = true
  1768. this.$nextTick(() => {
  1769. this.$refs.reworkInspectReport.init(this.currentRow.seqNo, this.operatorData)
  1770. })
  1771. },
  1772. // 换包装
  1773. changePackaging() {
  1774. // 首先判断是否选择好派工单
  1775. if (JSON.stringify(this.currentRow) == '{}') {
  1776. this.$message.error(this.labels.pleaseSelectSchedule)
  1777. return false
  1778. }
  1779. // 打开操作员切换功能
  1780. this.changePackagingFlag = true
  1781. this.$nextTick(() => {
  1782. this.$refs.changePackaging.init(this.currentRow.seqNo, this.operatorData)
  1783. })
  1784. },
  1785. /* 查询派工单 */
  1786. getProduceScheduleList() {
  1787. // 开始真的查询;
  1788. this.searchData.searchFlag = true
  1789. getProduceScheduleList(this.searchData).then(({data}) => {
  1790. // 设置查询数据
  1791. this.produceScheduleList = data.rows
  1792. })
  1793. },
  1794. /* 刷新页面table */
  1795. refreshPageTables() {
  1796. this.currentRow = {}
  1797. this.getProduceScheduleList()
  1798. },
  1799. /* 设置选中行的参数 */
  1800. setCurrentRow(row, column, event) {
  1801. this.currentRow = JSON.parse(JSON.stringify(row))
  1802. },
  1803. // 设置参数
  1804. initOperatorData(operatorData) {
  1805. this.showOperatorFlag = false
  1806. this.operatorData = JSON.parse(JSON.stringify(operatorData))
  1807. if (operatorData.reportType == 0) {
  1808. // 切换到报工组件
  1809. this.switchProduceReportModal()
  1810. }
  1811. if (operatorData.reportType == 1) {
  1812. // 切换到fqc报工组件
  1813. this.fqcReportModal()
  1814. }
  1815. if (operatorData.reportType == 2) {
  1816. // 切换到返工 重检组件
  1817. this.reworkInspectModal()
  1818. }
  1819. if (operatorData.reportType == 3) {
  1820. // 切换到fqc分卷组件
  1821. this.fqcSplitRollModal()
  1822. }
  1823. if (operatorData.reportType == 4) {
  1824. // 换包装
  1825. this.changePackaging()
  1826. }
  1827. /* 分切报工 */
  1828. if (operatorData.reportType == 8) {
  1829. // 分切报工
  1830. this.showSplitOrderReportModal()
  1831. }
  1832. },
  1833. notInitOperatorData(val) {
  1834. // 注意:现在关闭对话框时会自动设置为当前登录人,不再清空操作员信息
  1835. // 关闭切换用户模态框
  1836. this.showOperatorFlag = false
  1837. if (val == 0) {
  1838. // 切换到报工组件
  1839. this.switchProduceReportModal()
  1840. }
  1841. if (val == 1) {
  1842. // 切换到fqc报工组件
  1843. this.fqcReportModal()
  1844. }
  1845. if (val == 2) {
  1846. // 切换到返工 重检组件
  1847. this.reworkInspectModal()
  1848. }
  1849. if (val == 3) {
  1850. // 切换到fqc分卷组件
  1851. this.fqcSplitRollModal()
  1852. }
  1853. if (val == 4) {
  1854. // 切换到换包装
  1855. this.changePackaging()
  1856. }
  1857. // 分切报工
  1858. if (val == 8) {
  1859. // 分切报工
  1860. this.showSplitOrderReportModal()
  1861. }
  1862. },
  1863. // 切换员工modal
  1864. switchOperatorModal(val) {
  1865. // 首先判断是否选择好派工单
  1866. if (JSON.stringify(this.currentRow) == '{}') {
  1867. this.$message.error(this.labels.pleaseSelectSchedule)
  1868. return false
  1869. }
  1870. //获取下一道工序
  1871. let nextItemNo = this.currentRow.nextItemNo;
  1872. if (val == 0) {
  1873. let orderType = this.currentRow.orderType
  1874. let workCenterNo = this.currentRow.workCenterNo
  1875. // if (orderType != 'S' || workCenterNo === 'FQC' || nextItemNo == 0) {
  1876. // // 验证通过
  1877. // this.$message.error(this.labels.thisScheduleCantReport)
  1878. // return false
  1879. // }
  1880. let data = {
  1881. site: this.currentRow.site,
  1882. resourceId: this.currentRow.resourceId,
  1883. workCenterNo: this.currentRow.workCenterNo,
  1884. seqNo: this.currentRow.seqNo,
  1885. username: this.$store.state.user.name
  1886. }
  1887. reportCheck(data).then(({data}) => {
  1888. if (data.code == 0) {
  1889. // 打开操作员切换功能
  1890. this.showOperatorFlag = true
  1891. this.$nextTick(() => {
  1892. this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
  1893. })
  1894. }
  1895. if (data.code == 300) {
  1896. this.$message.warning(data.msg)
  1897. }
  1898. if (data.code == 400) {
  1899. this.$confirm(`${data.msg}`, '提示', {
  1900. confirmButtonText: this.labels.confirmLabel,
  1901. cancelButtonText: this.labels.cancelLabel,
  1902. type: 'warning'
  1903. }).then(() => {
  1904. // 打开操作员切换功能
  1905. this.showOperatorFlag = true
  1906. this.$nextTick(() => {
  1907. this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
  1908. })
  1909. })
  1910. }
  1911. })
  1912. } else if (val == 8) { // 处理 分切工单
  1913. // 判断当前工单是否是分切工单
  1914. let orderType = this.currentRow.orderType
  1915. if (orderType === 'D') {
  1916. this.showOperatorFlag = true
  1917. this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
  1918. } else {
  1919. this.$message.error(this.labels.thisOrderIsNotSplitOrder)
  1920. return false
  1921. }
  1922. } else if (val == 1) { // 处理 FQC
  1923. // 判断订单类型和加工中心
  1924. let workCenterNo = this.currentRow.workCenterNo
  1925. if (workCenterNo === 'FQC' || nextItemNo == 0) {
  1926. this.showOperatorFlag = true
  1927. this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
  1928. } else {
  1929. this.$message.error(this.labels.thisScheduleIsNotFqc)
  1930. return false
  1931. }
  1932. } else {
  1933. if (val == 4) {
  1934. getShopOrder(this.currentRow).then(({data}) => {
  1935. if (data.code == 0) {
  1936. if (data.data == 'P') {
  1937. // 打开操作员切换功能
  1938. this.showOperatorFlag = true
  1939. this.$nextTick(() => {
  1940. this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
  1941. })
  1942. } else {
  1943. this.$alert(this.labels.thisOrderIsNotSpecialOrder, '提示', {
  1944. confirmButtonText: this.labels.confirmLabel
  1945. })
  1946. }
  1947. }
  1948. })
  1949. } else {
  1950. // 打开操作员切换功能
  1951. this.showOperatorFlag = true
  1952. this.$nextTick(() => {
  1953. this.$refs.comSwitchOperator.init(val, this.currentRow, false, false)
  1954. })
  1955. }
  1956. }
  1957. },
  1958. // 切换报工modal
  1959. switchProduceReportModal() {
  1960. // 首先判断是否选择好派工单
  1961. if (JSON.stringify(this.currentRow) == '{}') {
  1962. this.$message.error(this.labels.pleaseSelectSchedule)
  1963. return false
  1964. }
  1965. // 打开操作员切换功能
  1966. this.showReportFlag = true
  1967. this.$nextTick(() => {
  1968. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData)
  1969. })
  1970. },
  1971. // 打开分切报工的
  1972. showSplitOrderReportModal() {
  1973. // 首先判断是否选择好派工单
  1974. if (JSON.stringify(this.currentRow) == '{}') {
  1975. this.$message.error(this.labels.pleaseSelectSchedule)
  1976. return false
  1977. }
  1978. this.$nextTick(() => {
  1979. // 打开分切报工功能
  1980. this.showSplitReportFlag = true
  1981. this.$refs.comSplitOrderReport.init(this.currentRow.seqNo, this.operatorData)
  1982. })
  1983. },
  1984. // 打开结束派工单的modal
  1985. showFinishScheduleModal() {
  1986. // 首先判断是否选择好派工单
  1987. if (JSON.stringify(this.currentRow) == '{}') {
  1988. this.$message.error(this.labels.pleaseSelectSchedule)
  1989. return false
  1990. }
  1991. // 打开操作员切换功能
  1992. this.showFinishScheduleFlag = true
  1993. this.$nextTick(() => {
  1994. this.$refs.comFinishSchedule.init(this.currentRow, this.operatorData)
  1995. })
  1996. },
  1997. // 结束派工单后刷新页面
  1998. processFinishScheduleOperation() {
  1999. // 刷新当前页面的数据
  2000. this.refreshPageTables()
  2001. },
  2002. // 保存操作员的信息
  2003. saveOperatorData() {
  2004. // 查询操作员信息
  2005. getOperatorData(this.operatorData).then(({data}) => {
  2006. let operatorData = data.row
  2007. let status = operatorData.status
  2008. this.operatorData.operatorName = data.row.operatorName
  2009. // 重置操作员信息状态
  2010. this.operatorData.status = status
  2011. // 判断是否验证通过
  2012. if (status == 'N') {
  2013. this.operatorFlag = false
  2014. } else {
  2015. this.operatorFlag = true
  2016. }
  2017. if (!this.operatorFlag) {
  2018. this.$message.error(this.labels.operatorCantBeUsed)
  2019. }
  2020. })
  2021. // 判断是否检查通过--不通过不在继续
  2022. .then(() => {
  2023. if (!this.operatorFlag) {
  2024. return false
  2025. }
  2026. // 关闭操作员切换功能
  2027. this.operatorData.showFlag = false
  2028. // 打开组件
  2029. this.showReportFlag = true
  2030. // 打开报工操作页面
  2031. this.$nextTick(() => {
  2032. this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData)
  2033. })
  2034. })
  2035. },
  2036. /* 列表方法的回调 */
  2037. getBaseData(val) {
  2038. if (this.tagNo === 95) {
  2039. this.searchData.resourceId = val.ResourceID
  2040. }
  2041. },
  2042. // 获取基础数据列表
  2043. getBaseList(val) {
  2044. this.tagNo = val
  2045. this.$nextTick(() => {
  2046. let strVal = ''
  2047. if (val === 95) {
  2048. strVal = this.searchData.resourceId
  2049. }
  2050. this.$refs.baseList.init(val, strVal, " AND WorkCenterNo <> 'FQC'")
  2051. })
  2052. },
  2053. // 打开页面设置
  2054. userSetting() {
  2055. this.visible = true
  2056. let queryTable = {
  2057. userId: this.$store.state.user.name,
  2058. functionId: this.$route.meta.menuId,
  2059. tableId: '5302Produce',
  2060. languageCode: this.$i18n.locale
  2061. }
  2062. this.$nextTick(() => {
  2063. this.$refs.column.init(queryTable)
  2064. })
  2065. },
  2066. // 获取 用户保存的 格式列
  2067. getTableUserColumn() {
  2068. getTableUserListLanguage(this.queryTableUser).then(({data}) => {
  2069. if (data && data.code == 0 && data.rows.length > 0) {
  2070. // this.columnList = []
  2071. this.columnList = data.rows
  2072. } else {
  2073. this.getColumnList()
  2074. }
  2075. })
  2076. },
  2077. // 保存 默认配置 列
  2078. async saveColumnList() {
  2079. // 删除所有的该页面下保存的数据
  2080. if (this.userColumnList) {
  2081. // 删除 user自定义的数据
  2082. await removerUser(this.queryTable)
  2083. }
  2084. // 删除默认配置
  2085. await removerDefault(this.queryTable)
  2086. // 保存页面 table属性
  2087. let sumColumnList = this.columnList// concat(this.columnList1);
  2088. sumColumnList = sumColumnList.map(item => {
  2089. return item = {
  2090. tableId: item.tableId,
  2091. tableName: item.tableName,
  2092. columnProp: item.columnProp,
  2093. columnLabel: item.columnLabel,
  2094. columnHidden: item.columnHidden,
  2095. columnImage: item.columnImage,
  2096. columnSortable: item.columnSortable,
  2097. columnWidth: item.columnWidth,
  2098. format: item.format,
  2099. functionId: this.$route.meta.menuId,
  2100. sortLv: item.sortLv,
  2101. status: true,
  2102. fixed: item.fixed,
  2103. serialNumber: item.serialNumber,
  2104. columnType: item.columnType,
  2105. align: item.align
  2106. }
  2107. })
  2108. await saveTableDefaultList(sumColumnList)
  2109. // 保存页面 button label title 属性
  2110. /* let buttons = this.buttonList.map(item => {
  2111. return item = {
  2112. functionId: this.$route.meta.menuId,
  2113. languageValue: item.languageValue,
  2114. objectId: item.objectId,
  2115. objectType: item.objectType,
  2116. tableId: item.tableId
  2117. }
  2118. })
  2119. await saveButtonList(buttons) */
  2120. this.getFunctionButtonList()
  2121. this.getColumnList()
  2122. },
  2123. // 获取 tableDefault 列
  2124. getColumnList() {
  2125. getTableDefaultListLanguage(this.queryTable).then(({data}) => {
  2126. if (data && data.code == 0) {
  2127. // this.showDefault = false
  2128. this.columnList = data.rows
  2129. } else {
  2130. // this.showDefault = true
  2131. }
  2132. })
  2133. },
  2134. //获取按钮的权限数据
  2135. getButtonAuthData() {
  2136. let updateFlag = this.isAuth(this.menuId + ":revise");
  2137. let fullControFlag = this.isAuth(this.menuId + ":fullContro");
  2138. let deleteFlag = this.isAuth(this.menuId + ":remove");
  2139. //处理页面的权限数据
  2140. this.authEdit = !updateFlag && !fullControFlag;
  2141. this.authAdd = !fullControFlag;
  2142. this.authDelete = !deleteFlag;
  2143. },
  2144. //获取多语言的信息
  2145. getMultiLanguageList() {
  2146. //首先查询当前按钮的多语言
  2147. searchFunctionButtonList(this.queryButton).then(({data}) => {
  2148. if (data && data.code == 0) {
  2149. this.buttons = data.data
  2150. } else {
  2151. // saveButtonList(this.buttonList).then(({data}) => {
  2152. // })
  2153. }
  2154. });
  2155. //其次查询当前标签的多语言
  2156. searchFunctionButtonList(this.queryLabel).then(({data}) => {
  2157. if (data && data.code == 0) {
  2158. this.labels = data.data
  2159. } else {
  2160. // saveButtonList(this.buttonList).then(({data}) => {
  2161. // })
  2162. }
  2163. });
  2164. },
  2165. fields() {
  2166. let json = "{"
  2167. this.columnList.forEach((item, index) => {
  2168. if (index == this.columnList.length - 1) {
  2169. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2170. } else {
  2171. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2172. }
  2173. })
  2174. json += "}"
  2175. let s = eval("(" + json + ")")
  2176. return s
  2177. },
  2178. //导出excel
  2179. async createExportData() {
  2180. // 开始真的查询;
  2181. this.searchData.searchFlag = true;
  2182. this.searchData.exportFlag = "Y";
  2183. await getProduceScheduleList(this.searchData).then(({data}) => {
  2184. // 设置查询数据
  2185. this.exportList = data.rows
  2186. })
  2187. //重置判断是否是导出的sql
  2188. this.searchData.exportFlag = "N";
  2189. return this.exportList;
  2190. },
  2191. startDownload() {
  2192. // this.exportData = this.dataList
  2193. },
  2194. finishDownload() {
  2195. },
  2196. },
  2197. created() {
  2198. // 根据登陆人员的username 查询机台授权表中的权限,筛选出对应的机台(默认第一个)
  2199. let tempData = {
  2200. username: this.$store.state.user.name,
  2201. }
  2202. getResourceByUser(tempData).then(({data}) => {
  2203. if (data.code === 0) {
  2204. if (data.rows.length > 0) {
  2205. this.searchData.resourceId = data.rows[0].resourceID
  2206. }
  2207. }
  2208. // 等待getResourceByUser执行完成后,再查询生产排程列表
  2209. this.searchData.searchFlag = true;
  2210. // 不查询
  2211. getProduceScheduleList(this.searchData).then(({data}) => {
  2212. // 设置查询数据
  2213. //this.searchData.searchFlag = false;
  2214. this.searchData.exportFlag = 'N';
  2215. this.produceScheduleList = data.rows
  2216. })
  2217. })
  2218. /* 获取报工的特殊权限 */
  2219. getScheduleMultiReportSpecialAuth(this.searchData).then(({data}) => {
  2220. let authMap = data.authMap
  2221. // 区分是否打开按钮
  2222. if (authMap.normalReportFlag === 'Y') {
  2223. this.reportButton.normalReportButton = false
  2224. } else {
  2225. this.reportButton.normalReportButton = true
  2226. }
  2227. if (authMap.fqcReportFlag === 'Y') {
  2228. this.reportButton.fqcReportButton = false
  2229. } else {
  2230. this.reportButton.fqcReportButton = true
  2231. }
  2232. if (authMap.reworkReportFlag === 'Y') {
  2233. this.reportButton.reworkReportButton = false
  2234. } else {
  2235. this.reportButton.reworkReportButton = true
  2236. }
  2237. if (authMap.packReportFlag === 'Y') {
  2238. this.reportButton.packReportButton = false
  2239. } else {
  2240. this.reportButton.packReportButton = true
  2241. }
  2242. if (authMap.fqcSegmentReportFlag === 'Y') {
  2243. this.reportButton.fqcSegmentReportButton = false
  2244. } else {
  2245. this.reportButton.fqcSegmentReportButton = true
  2246. }
  2247. if (authMap.slitReportFlag === 'Y') {
  2248. this.reportButton.slitReportButton = false
  2249. } else {
  2250. this.reportButton.slitReportButton = true
  2251. }
  2252. })
  2253. // 获取动态表头的信息
  2254. // this.getTableUserColumn()
  2255. //获取按钮的权限
  2256. this.getButtonAuthData();
  2257. //
  2258. // this.getMultiLanguageList(); //刷新多语言的信息
  2259. }
  2260. }
  2261. </script>
  2262. <style>
  2263. .el-textarea__inner {
  2264. padding: 5px 5px;
  2265. }
  2266. </style>
  2267. <!--当前页面的标签样式-->
  2268. <style scoped lang="scss">
  2269. /*针对el-card*/
  2270. .customer-card .el-form-item__content {
  2271. margin-top: -15px;
  2272. }
  2273. .customer-card .el-form-item {
  2274. height: 22px;
  2275. }
  2276. .customer-border .el-form-item__content {
  2277. margin-top: -30px;
  2278. }
  2279. /*全局年与日类型 宽度*/
  2280. div.el-time-width {
  2281. width: 110px !important;
  2282. }
  2283. /* 全局时间右边框*/
  2284. .customer-css input.el-input__inner {
  2285. height: 22px !important;
  2286. padding-right: 0px !important;
  2287. }
  2288. /* 控制el-card标签的数据*/
  2289. div.customer-el-card {
  2290. margin-left: 110px;
  2291. margin-top: -15px;
  2292. height: 20px;
  2293. width: 60px;
  2294. }
  2295. /* 颜色控制 */
  2296. div.customer-el-card-pink {
  2297. background: #FF00FF;
  2298. }
  2299. div.customer-el-card-orange {
  2300. background: #FFD700;
  2301. }
  2302. div.customer-el-card-blue {
  2303. background: #0000CD;
  2304. }
  2305. /*清掉样式*/
  2306. .el-radio + .el-radio {
  2307. margin-left: 0px;
  2308. }
  2309. /*当前按钮的通用样式*/
  2310. .customer-css .customer-bun-mid {
  2311. width: 65px;
  2312. text-align: center;
  2313. }
  2314. /*当前按钮的通用样式*/
  2315. .customer-css .el-button--medium {
  2316. padding: 5px 5px;
  2317. }
  2318. /*添加主菜单和明细菜单的样式*/
  2319. .customer-css .customer-dropdown .el-button--primary {
  2320. padding: 2px;
  2321. font-size: 12px;
  2322. }
  2323. .el-dropdown-menu--medium .el-dropdown-menu__item {
  2324. line-height: 18px;
  2325. padding: 0 17px;
  2326. font-size: 12px;
  2327. }
  2328. hr {
  2329. margin-top: 0px;
  2330. }
  2331. /*控制上下间距*/
  2332. </style>