乐天mes前端
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.

856 lines
27 KiB

4 years ago
  1. <template>
  2. <div class="customer-css">
  3. <!-- 查询时间和产品 -->
  4. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
  5. <el-form-item :label="'工厂编号:'">
  6. <el-input v-model="searchData.site" style="width: 85px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'物料编码:'">
  9. <el-input v-model="searchData.partNo" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'机台编号:'">
  12. <el-input v-model="searchData.resourceId" style="width: 110px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'计划日期:'">
  15. <el-date-picker
  16. style="width: 120px"
  17. v-model="searchData.date1"
  18. type="date"
  19. value-format="yyyy-MM-dd"
  20. placeholder="选择日期">
  21. </el-date-picker>
  22. </el-form-item>
  23. <el-form-item :label="' '">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.date2"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item :label="'生产订单号:'">
  33. <el-input v-model="searchData.orderNo" style="width: 120px" ></el-input>
  34. </el-form-item>
  35. <el-form-item :label="''" style="margin-left: -5px;">
  36. <el-checkbox style="margin-top: 20px;" true-label="Y" false-label="N" v-model="searchData.closedFlag">显示已关闭计划
  37. </el-checkbox>
  38. </el-form-item>
  39. <el-form-item :label="' '" style="margin-left: -5px;">
  40. <el-button type="primary" @click="refreshTables()" class="customer-bun-mid"
  41. style="margin-left: 10px; margin-bottom: 5px;">查询
  42. </el-button>
  43. <download-excel
  44. :fields="fields()"
  45. :data="exportData"
  46. type="xls"
  47. :name="exportName"
  48. :footer="exportFooter"
  49. :fetch="createExportData"
  50. :before-generate="startDownload"
  51. :before-finish="finishDownload"
  52. worksheet="导出信息"
  53. class="el-button el-button--primary el-button--medium">
  54. 导出
  55. </download-excel>
  56. </el-form-item>
  57. <div class="mainTable">
  58. <el-table :height="height"
  59. :data="dataList"
  60. :row-class-name="routingRowClassName2"
  61. border
  62. v-loading="dataListLoading"
  63. style="width: 100%;">
  64. <el-table-column
  65. prop=""
  66. header-align="center"
  67. align="center"
  68. width="70"
  69. label="操作">
  70. <template slot-scope="scope" class="foo_container">
  71. <a type="text" size="small" @click="printAction(scope.row)">打印标签</a>
  72. </template>
  73. </el-table-column>
  74. <el-table-column
  75. v-for="(item,index) in columnArray" :key="index"
  76. :sortable="item.columnSortable"
  77. :prop="item.columnProp"
  78. :header-align="item.headerAlign"
  79. :show-overflow-tooltip="item.showOverflowTooltip"
  80. :align="item.align"
  81. :fixed="item.fixed"
  82. :width="item.columnWidth"
  83. :label="item.columnLabel">
  84. <template slot-scope="scope">
  85. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  86. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  87. style="width: 100px; height: 80px"/></span>
  88. </template>
  89. </el-table-column>
  90. </el-table>
  91. </div>
  92. </el-form>
  93. </div>
  94. </template>
  95. <script>
  96. import {
  97. getProduceScheduleList
  98. } from '@/api/production/dailyPlan.js'
  99. import {
  100. printSerialNo
  101. } from '@/api/production/pallet.js'
  102. export default {
  103. name: 'search_schedule',
  104. data () {
  105. return {
  106. // 导出 start
  107. exportData: [],
  108. exportName: "排产日计划清单"+this.dayjs().format('YYYYMMDDHHmmss'),
  109. exportFooter: [],
  110. // 导出 end
  111. height:200,
  112. dataList:[],
  113. dataListLoading: false,
  114. columnArray: [
  115. {
  116. userId: this.$store.state.user.name,
  117. functionId: 5302,
  118. serialNumber: '5302ProduceScheduledDate',
  119. tableId: "5302Produce",
  120. tableName: "待生产工单",
  121. columnProp: "scheduledDate",
  122. headerAlign: "center",
  123. align: "left",
  124. columnLabel: "排产日期",
  125. columnWidth: 80,
  126. columnHidden: false,
  127. columnImage: false,
  128. columnSortable: false,
  129. sortLv: 0,
  130. status: true,
  131. fixed: false
  132. },
  133. {
  134. userId: this.$store.state.user.name,
  135. functionId: 5302,
  136. serialNumber: '5302ProduceItemDesc',
  137. tableId: "5302Produce",
  138. tableName: "待生产工单",
  139. columnProp: "printFlag",
  140. headerAlign: "center",
  141. align: "left",
  142. columnLabel: "是否打印",
  143. columnWidth: 60,
  144. columnHidden: false,
  145. columnImage: false,
  146. columnSortable: false,
  147. sortLv: 0,
  148. status: true,
  149. fixed: false
  150. },
  151. {
  152. userId: this.$store.state.user.name,
  153. functionId: 5302,
  154. serialNumber: '5302ProduceOrderNo',
  155. tableId: "5302Produce",
  156. tableName: "待生产工单",
  157. columnProp: "orderNo",
  158. headerAlign: "center",
  159. align: "left",
  160. columnLabel: "生产订单号",
  161. columnWidth: 120,
  162. columnHidden: false,
  163. columnImage: false,
  164. columnSortable: false,
  165. sortLv: 0,
  166. status: true,
  167. fixed: false
  168. },
  169. {
  170. userId: this.$store.state.user.name,
  171. functionId: 5302,
  172. serialNumber: '5302ProduceItemNo',
  173. tableId: "5302Produce",
  174. tableName: "待生产工单",
  175. columnProp: "itemNo",
  176. headerAlign: "center",
  177. align: "right",
  178. columnLabel: "工序号",
  179. columnWidth: 50,
  180. columnHidden: false,
  181. columnImage: false,
  182. columnSortable: false,
  183. sortLv: 0,
  184. status: true,
  185. fixed: false
  186. },
  187. {
  188. userId: this.$store.state.user.name,
  189. functionId: 5302,
  190. serialNumber: '5302ProduceItemDesc',
  191. tableId: "5302Produce",
  192. tableName: "待生产工单",
  193. columnProp: "itemDesc",
  194. headerAlign: "center",
  195. align: "left",
  196. columnLabel: "工序描述",
  197. columnWidth: 80,
  198. columnHidden: false,
  199. columnImage: false,
  200. columnSortable: false,
  201. sortLv: 0,
  202. status: true,
  203. fixed: false
  204. },
  205. {
  206. userId: this.$store.state.user.name,
  207. functionId: 5302,
  208. serialNumber: '5302ProduceResourceId',
  209. tableId: "5302Produce",
  210. tableName: "待生产工单",
  211. columnProp: "resourceId",
  212. headerAlign: "center",
  213. align: "left",
  214. columnLabel: "机台",
  215. columnWidth: 60,
  216. columnHidden: false,
  217. columnImage: false,
  218. columnSortable: false,
  219. sortLv: 0,
  220. status: true,
  221. fixed: false
  222. },
  223. {
  224. userId: this.$store.state.user.name,
  225. functionId: 5302,
  226. serialNumber: '5302ProduceTimeRequired',
  227. tableId: "5302Produce",
  228. tableName: "待生产工单",
  229. columnProp: "timeRequired",
  230. headerAlign: "center",
  231. align: "right",
  232. columnLabel: "需求时间",
  233. columnWidth: 60,
  234. columnHidden: false,
  235. columnImage: false,
  236. columnSortable: false,
  237. sortLv: 0,
  238. status: true,
  239. fixed: false
  240. },
  241. {
  242. userId: this.$store.state.user.name,
  243. functionId: 5302,
  244. serialNumber: '5302ProduceTimeReported',
  245. tableId: "5302Produce",
  246. tableName: "待生产工单",
  247. columnProp: "timeReported",
  248. headerAlign: "center",
  249. align: "right",
  250. columnLabel: "已报告时间",
  251. columnWidth: 70,
  252. columnHidden: false,
  253. columnImage: false,
  254. columnSortable: false,
  255. sortLv: 0,
  256. status: true,
  257. fixed: false
  258. },
  259. {
  260. userId: this.$store.state.user.name,
  261. functionId: 5302,
  262. serialNumber: '5302ProduceQtyRequired',
  263. tableId: "5302Produce",
  264. tableName: "待生产工单",
  265. columnProp: "qtyRequired",
  266. headerAlign: "center",
  267. align: "right",
  268. columnLabel: "需求数量",
  269. columnWidth: 60,
  270. columnHidden: false,
  271. columnImage: false,
  272. columnSortable: false,
  273. sortLv: 0,
  274. status: true,
  275. fixed: false
  276. },
  277. {
  278. userId: this.$store.state.user.name,
  279. functionId: 5302,
  280. serialNumber: '5302ProduceQtyReported',
  281. tableId: "5302Produce",
  282. tableName: "待生产工单",
  283. columnProp: "qtyReported",
  284. headerAlign: "center",
  285. align: "right",
  286. columnLabel: "已报告数量",
  287. columnWidth: 70,
  288. columnHidden: false,
  289. columnImage: false,
  290. columnSortable: false,
  291. sortLv: 0,
  292. status: true,
  293. fixed: false
  294. },
  295. {
  296. userId: this.$store.state.user.name,
  297. functionId: 5302,
  298. serialNumber: '5302ProduceNeedDate',
  299. tableId: "5302Produce",
  300. tableName: "待生产工单",
  301. columnProp: "needDate",
  302. headerAlign: "center",
  303. align: "left",
  304. columnLabel: "生产订单要求完工日期",
  305. columnWidth: 130,
  306. columnHidden: false,
  307. columnImage: false,
  308. columnSortable: false,
  309. sortLv: 0,
  310. status: true,
  311. fixed: false
  312. },
  313. {
  314. userId: this.$store.state.user.name,
  315. functionId: 5302,
  316. serialNumber: '5302ProduceClosedFlag',
  317. tableId: "5302Produce",
  318. tableName: "待生产工单",
  319. columnProp: "closedFlag",
  320. headerAlign: "center",
  321. align: "left",
  322. columnLabel: "已关闭",
  323. columnWidth: 50,
  324. columnHidden: false,
  325. columnImage: false,
  326. columnSortable: false,
  327. sortLv: 0,
  328. status: true,
  329. fixed: false
  330. },
  331. {
  332. userId: this.$store.state.user.name,
  333. functionId: 5302,
  334. serialNumber: '5302ProducePartNo',
  335. tableId: "5302Produce",
  336. tableName: "待生产工单",
  337. columnProp: "partNo",
  338. headerAlign: "center",
  339. align: "left",
  340. columnLabel: "产品编码",
  341. columnWidth: 110,
  342. columnHidden: false,
  343. columnImage: false,
  344. columnSortable: false,
  345. sortLv: 0,
  346. status: true,
  347. fixed: false
  348. },
  349. {
  350. userId: this.$store.state.user.name,
  351. functionId: 5302,
  352. serialNumber: '5302ProducePartDesc',
  353. tableId: "5302Produce",
  354. tableName: "待生产工单",
  355. columnProp: "partDesc",
  356. headerAlign: "center",
  357. align: "left",
  358. columnLabel: "产品名称",
  359. columnWidth: 180,
  360. columnHidden: false,
  361. columnImage: false,
  362. columnSortable: false,
  363. sortLv: 0,
  364. status: true,
  365. fixed: false
  366. },
  367. {
  368. userId: this.$store.state.user.name,
  369. functionId: 5302,
  370. serialNumber: '5302ProduceSpec',
  371. tableId: "5302Produce",
  372. tableName: "待生产工单",
  373. columnProp: "spec",
  374. headerAlign: "center",
  375. align: "left",
  376. columnLabel: "规格型号",
  377. columnWidth: 80,
  378. columnHidden: false,
  379. columnImage: false,
  380. columnSortable: false,
  381. sortLv: 0,
  382. status: true,
  383. fixed: false
  384. },
  385. {
  386. userId: this.$store.state.user.name,
  387. functionId: 5302,
  388. serialNumber: '5302ProduceSeqNo',
  389. tableId: "5302Produce",
  390. tableName: "待生产工单",
  391. columnProp: "seqNo",
  392. headerAlign: "center",
  393. align: "right",
  394. columnLabel: "次序号",
  395. columnWidth: 80,
  396. columnHidden: false,
  397. columnImage: false,
  398. columnSortable: false,
  399. sortLv: 0,
  400. status: true,
  401. fixed: false
  402. },
  403. {
  404. userId: this.$store.state.user.name,
  405. functionId: 5302,
  406. serialNumber: '5302ProduceQtyApprove',
  407. tableId: "5302Produce",
  408. tableName: "待生产工单",
  409. columnProp: "qtyApprove",
  410. headerAlign: "center",
  411. align: "right",
  412. columnLabel: "合格数量",
  413. columnWidth: 80,
  414. columnHidden: false,
  415. columnImage: false,
  416. columnSortable: false,
  417. sortLv: 0,
  418. status: true,
  419. fixed: false
  420. },
  421. // {
  422. // userId: this.$store.state.user.name,
  423. // functionId: 5302,
  424. // serialNumber: '5302ProduceBarcodeId',
  425. // tableId: "5302Produce",
  426. // tableName: "条形码",
  427. // columnProp: "barcodeId",
  428. // headerAlign: "center",
  429. // align: "left",
  430. // columnLabel: "条形码",
  431. // columnWidth: 80,
  432. // columnHidden: false,
  433. // columnImage: false,
  434. // columnSortable: false,
  435. // sortLv: 0,
  436. // status: true,
  437. // fixed: false
  438. // },
  439. {
  440. userId: this.$store.state.user.name,
  441. functionId: 5302,
  442. serialNumber: '5302ProduceRemark',
  443. tableId: "5302Produce",
  444. tableName: "待生产工单",
  445. columnProp: "remark",
  446. headerAlign: "center",
  447. align: "left",
  448. columnLabel: "备注",
  449. columnWidth: 80,
  450. columnHidden: false,
  451. columnImage: false,
  452. columnSortable: false,
  453. sortLv: 0,
  454. status: true,
  455. fixed: false
  456. },
  457. {
  458. userId: this.$store.state.user.name,
  459. functionId: 5302,
  460. serialNumber: '5302ProduceCrewSize',
  461. tableId: "5302Produce",
  462. tableName: "待生产工单",
  463. columnProp: "crewSize",
  464. headerAlign: "center",
  465. align: "right",
  466. columnLabel: "操作工人数",
  467. columnWidth: 80,
  468. columnHidden: false,
  469. columnImage: false,
  470. columnSortable: false,
  471. sortLv: 0,
  472. status: true,
  473. fixed: false
  474. },
  475. {
  476. userId: this.$store.state.user.name,
  477. functionId: 5302,
  478. serialNumber: '5302ProduceQtyScrapt',
  479. tableId: "5302Produce",
  480. tableName: "待生产工单",
  481. columnProp: "qtyScrapt",
  482. headerAlign: "center",
  483. align: "right",
  484. columnLabel: "报废数量",
  485. columnWidth: 80,
  486. columnHidden: false,
  487. columnImage: false,
  488. columnSortable: false,
  489. sortLv: 0,
  490. status: true,
  491. fixed: false
  492. },
  493. {
  494. userId: this.$store.state.user.name,
  495. functionId: 5302,
  496. serialNumber: '5302ProduceOutWorkFlag',
  497. tableId: "5302Produce",
  498. tableName: "待生产工单",
  499. columnProp: "outWorkFlag",
  500. headerAlign: "center",
  501. align: "left",
  502. columnLabel: "是否外协",
  503. columnWidth: 80,
  504. columnHidden: false,
  505. columnImage: false,
  506. columnSortable: false,
  507. sortLv: 0,
  508. status: true,
  509. fixed: false
  510. },
  511. // {
  512. // userId: this.$store.state.user.name,
  513. // functionId: 5302,
  514. // serialNumber: '5302ProduceScheduledSeqNo',
  515. // tableId: "5302Produce",
  516. // tableName: "待生产工单",
  517. // columnProp: "scheduledSeqNo",
  518. // headerAlign: "center",
  519. // align: "right",
  520. // columnLabel: "次序号",
  521. // columnWidth: 80,
  522. // columnHidden: false,
  523. // columnImage: false,
  524. // columnSortable: false,
  525. // sortLv: 0,
  526. // status: true,
  527. // fixed: false
  528. // },
  529. {
  530. userId: this.$store.state.user.name,
  531. functionId: 5302,
  532. serialNumber: '5302ProduceShiftNo',
  533. tableId: "5302Produce",
  534. tableName: "待生产工单",
  535. columnProp: "shiftNo",
  536. headerAlign: "center",
  537. align: "left",
  538. columnLabel: "班次",
  539. columnWidth: 80,
  540. columnHidden: false,
  541. columnImage: false,
  542. columnSortable: false,
  543. sortLv: 0,
  544. status: true,
  545. fixed: false
  546. },
  547. {
  548. userId: this.$store.state.user.name,
  549. functionId: 5302,
  550. serialNumber: '5302ProduceMachSetupTime',
  551. tableId: "5302Produce",
  552. tableName: "待生产工单",
  553. columnProp: "machSetupTime",
  554. headerAlign: "center",
  555. align: "right",
  556. columnLabel: "调机时间",
  557. columnWidth: 80,
  558. columnHidden: false,
  559. columnImage: false,
  560. columnSortable: false,
  561. sortLv: 0,
  562. status: true,
  563. fixed: false
  564. },
  565. {
  566. userId: this.$store.state.user.name,
  567. functionId: 5302,
  568. serialNumber: '5302ProduceMachRunFactor',
  569. tableId: "5302Produce",
  570. tableName: "待生产工单",
  571. columnProp: "machRunFactor",
  572. headerAlign: "center",
  573. align: "right",
  574. columnLabel: "单位产出",
  575. columnWidth: 80,
  576. columnHidden: false,
  577. columnImage: false,
  578. columnSortable: false,
  579. sortLv: 0,
  580. status: true,
  581. fixed: false
  582. },
  583. {
  584. userId: this.$store.state.user.name,
  585. functionId: 5302,
  586. serialNumber: '5302ProduceFactorUnit',
  587. tableId: "5302Produce",
  588. tableName: "待生产工单",
  589. columnProp: "factorUnit",
  590. headerAlign: "center",
  591. align: "right",
  592. columnLabel: "产出单位",
  593. columnWidth: 80,
  594. columnHidden: false,
  595. columnImage: false,
  596. columnSortable: false,
  597. sortLv: 0,
  598. status: true,
  599. fixed: false
  600. },
  601. {
  602. userId: this.$store.state.user.name,
  603. functionId: 5302,
  604. serialNumber: '5302ProduceEfficiency',
  605. tableId: "5302Produce",
  606. tableName: "待生产工单",
  607. columnProp: "efficiency",
  608. headerAlign: "center",
  609. align: "right",
  610. columnLabel: "效率",
  611. columnWidth: 80,
  612. columnHidden: false,
  613. columnImage: false,
  614. columnSortable: false,
  615. sortLv: 0,
  616. status: true,
  617. fixed: false
  618. },
  619. {
  620. userId: this.$store.state.user.name,
  621. functionId: 5302,
  622. serialNumber: '5302ProduceSite',
  623. tableId: "5302Produce",
  624. tableName: "待生产工单",
  625. columnProp: "site",
  626. headerAlign: "center",
  627. align: "left",
  628. columnLabel: "工厂编号",
  629. columnWidth: 80,
  630. columnHidden: false,
  631. columnImage: false,
  632. columnSortable: false,
  633. sortLv: 0,
  634. status: true,
  635. fixed: false
  636. },
  637. {
  638. userId: this.$store.state.user.name,
  639. functionId: 5302,
  640. serialNumber: '5302ProduceParkFlag',
  641. tableId: "5302Produce",
  642. tableName: "待生产工单",
  643. columnProp: "parkFlag",
  644. headerAlign: "center",
  645. align: "left",
  646. columnLabel: "暂停",
  647. columnWidth: 80,
  648. columnHidden: false,
  649. columnImage: false,
  650. columnSortable: false,
  651. sortLv: 0,
  652. status: true,
  653. fixed: false
  654. },
  655. // {
  656. // userId: this.$store.state.user.name,
  657. // functionId: 5302,
  658. // serialNumber: '5302ProduceCustomerName',
  659. // tableId: "5302Produce",
  660. // tableName: "待生产工单",
  661. // columnProp: "customerName",
  662. // headerAlign: "center",
  663. // align: "center",
  664. // columnLabel: "客户名称",
  665. // columnWidth: 80,
  666. // columnHidden: false,
  667. // columnImage: false,
  668. // columnSortable: false,
  669. // sortLv: 0,
  670. // status: true,
  671. // fixed: false
  672. // },
  673. // {
  674. // userId: this.$store.state.user.name,
  675. // functionId: 5302,
  676. // serialNumber: '5302ProduceCustPartNo',
  677. // tableId: "5302Produce",
  678. // tableName: "待生产工单",
  679. // columnProp: "custPartNo",
  680. // headerAlign: "center",
  681. // align: "center",
  682. // columnLabel: "客户产品料号",
  683. // columnWidth: 80,
  684. // columnHidden: false,
  685. // columnImage: false,
  686. // columnSortable: false,
  687. // sortLv: 0,
  688. // status: true,
  689. // fixed: false
  690. // },
  691. // {
  692. // userId: this.$store.state.user.name,
  693. // functionId: 5302,
  694. // serialNumber: '5302ProduceQtyRequiredOriginal',
  695. // tableId: "5302Produce",
  696. // tableName: "待生产工单",
  697. // columnProp: "qtyRequiredOriginal",
  698. // headerAlign: "center",
  699. // align: "center",
  700. // columnLabel: "原始派工单需求数量",
  701. // columnWidth: 80,
  702. // columnHidden: false,
  703. // columnImage: false,
  704. // columnSortable: false,
  705. // sortLv: 0,
  706. // status: true,
  707. // fixed: false
  708. // },
  709. {
  710. userId: this.$store.state.user.name,
  711. functionId: 5302,
  712. serialNumber: '5302ProduceClosedBy',
  713. tableId: "5302Produce",
  714. tableName: "待生产工单",
  715. columnProp: "closedBy",
  716. headerAlign: "center",
  717. align: "left",
  718. columnLabel: "关闭人",
  719. columnWidth: 80,
  720. columnHidden: false,
  721. columnImage: false,
  722. columnSortable: false,
  723. sortLv: 0,
  724. status: true,
  725. fixed: false
  726. },
  727. {
  728. userId: this.$store.state.user.name,
  729. functionId: 5302,
  730. serialNumber: '5302ProduceClosedDate',
  731. tableId: "5302Produce",
  732. tableName: "待生产工单",
  733. columnProp: "closedDate",
  734. headerAlign: "center",
  735. align: "left",
  736. columnLabel: "关闭日期",
  737. columnWidth: 80,
  738. columnHidden: false,
  739. columnImage: false,
  740. columnSortable: false,
  741. sortLv: 0,
  742. status: true,
  743. fixed: false
  744. },
  745. {
  746. userId: this.$store.state.user.name,
  747. functionId: 5302,
  748. serialNumber: '5302ProduceCostRollUpFlag',
  749. tableId: "5302Produce",
  750. tableName: "待生产工单",
  751. columnProp: "costRollUpFlag",
  752. headerAlign: "center",
  753. align: "left",
  754. columnLabel: "已排料",
  755. columnWidth: 80,
  756. columnHidden: false,
  757. columnImage: false,
  758. columnSortable: false,
  759. sortLv: 0,
  760. status: true,
  761. fixed: false
  762. },
  763. ],
  764. searchData:{
  765. site:'',
  766. partNo:'',
  767. resourceId:'',
  768. date1:'',
  769. date2:'',
  770. orderNo:'',
  771. closedFlag:'',
  772. },
  773. }
  774. },
  775. mounted () {
  776. this.$nextTick(() => {
  777. this.height = window.innerHeight - 160
  778. })
  779. },
  780. methods: {
  781. //导出excel
  782. createExportData() {
  783. return this.dataList;
  784. },
  785. startDownload() {
  786. // this.exportData = this.dataList
  787. },
  788. finishDownload() {
  789. },
  790. fields() {
  791. let json = "{"
  792. this.columnArray.forEach((item, index) => {
  793. if (index == this.columnArray.length - 1) {
  794. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  795. } else {
  796. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  797. }
  798. })
  799. json += "}"
  800. let s = eval("(" + json + ")")
  801. return s
  802. },
  803. // 导出 end
  804. refreshTables(){
  805. getProduceScheduleList(this.searchData).then(({data}) => {
  806. //设置查询数据
  807. this.dataList = data.rows;
  808. })
  809. },
  810. printAction(row){
  811. let array=[];
  812. let data={
  813. site:row.site,
  814. orderNo:row.orderNo,
  815. itemNo:row.itemNo,
  816. scheduleDate:row.scheduledDate,
  817. shiftNo:row.shiftNo,
  818. }
  819. array.push(data);
  820. printSerialNo(array).then(({data}) => {
  821. if(data.code===200){
  822. this.$message({
  823. message: '打印成功',
  824. type: 'success',
  825. duration: 1500,
  826. onClose: () => {
  827. }
  828. })
  829. }else {
  830. this.$alert(data.msg, '错误', {
  831. confirmButtonText: '确定'
  832. })
  833. }
  834. })
  835. },
  836. },
  837. routingRowClassName2({row, rowIndex}){
  838. //判断当前行颜色参数
  839. if(row.printFlag=="Y"){
  840. return 'customer-row-2';
  841. }
  842. },
  843. }
  844. </script>
  845. <style scoped>
  846. </style>