赫艾前端
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.

905 lines
28 KiB

3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
1 year ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
3 years ago
2 years ago
1 year ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" >
  4. <el-form-item :label="'派工单号'">
  5. <el-input v-model="searchData.seqNo" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width: 130px"></el-input>
  6. </el-form-item>
  7. <el-form-item :label="'生产订单号'">
  8. <el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
  9. </el-form-item>
  10. <el-form-item :label="'加工中心编码'">
  11. <el-input v-model="searchData.workCenterNo" style="width: 120px"></el-input>
  12. </el-form-item>
  13. <el-form-item >
  14. <span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span>
  15. <el-input v-model="searchData.partNo" style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'规格型号'">
  18. <el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'工序名称'">
  21. <el-input v-model="searchData.operationDesc" style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item label="报废超标">
  24. <el-select v-model="searchData.scrapFlag" style="width: 120px">
  25. <el-option label="全部" value=""></el-option>
  26. <el-option label="超标" value="Y"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. </el-form>
  30. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  31. <el-form-item :label="'报工日期:'">
  32. <el-date-picker
  33. style="width: 130px"
  34. v-model="searchData.startDate"
  35. value-format="yyyy-MM-dd"
  36. placeholder="选择日期">
  37. </el-date-picker>
  38. </el-form-item>
  39. <el-form-item :label="'至: '">
  40. <el-date-picker
  41. style="width: 130px"
  42. v-model="searchData.endDate"
  43. type="date"
  44. value-format="yyyy-MM-dd"
  45. placeholder="选择日期">
  46. </el-date-picker>
  47. </el-form-item>
  48. <el-form-item >
  49. <span slot="label" style="" @click="getBaseList(26)"><a herf="#">操作员姓名</a></span>
  50. <el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item >
  53. <span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台ID</a></span>
  54. <el-input v-model="searchData.resourceId" style="width: 120px"></el-input>
  55. </el-form-item>
  56. <el-form-item label="是否返修">
  57. <el-select v-model="searchData.repairSOFlag" style="width: 120px">
  58. <el-option label="全部" value=""></el-option>
  59. <el-option label="返修" value="Y"></el-option>
  60. <el-option label="非返修" value="N"></el-option>
  61. </el-select>
  62. </el-form-item>
  63. <el-form-item :label="'班次'">
  64. <el-select v-model="searchData.shiftNo" style="width: 120px">
  65. <el-option label="全部" value=""></el-option>
  66. <el-option label="白班" value="白班"></el-option>
  67. <el-option label="晚班" value="晚班"></el-option>
  68. <el-option label="加班" value="加班"></el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item :label="' '">
  72. <el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
  73. <download-excel
  74. :fields="fields()"
  75. type="xls"
  76. :name="exportName"
  77. :fetch="createExportData"
  78. worksheet="导出信息"
  79. class="el-button el-button--primary el-button--medium">
  80. {{ '导出' }}
  81. </download-excel>
  82. </el-form-item>
  83. </el-form>
  84. <div class="sfdcTable">
  85. <el-table
  86. :height="height"
  87. :data="tableData"
  88. :row-class-name="tableRowClassName"
  89. border
  90. style="width: 100%">
  91. <el-table-column
  92. prop=""
  93. header-align="center"
  94. fixed="left"
  95. align="center"
  96. width="140"
  97. label="操作">
  98. <template slot-scope="scope" class="foo_container">
  99. <a type="text" size="small" v-if="scope.row.reportQty>=0" @click="timeHistModel(scope.row)">暂停记录</a>
  100. <a type="text" size="small" v-if="scope.row.acceptQty>0" @click="printCard(scope.row)">让步接收标签</a>
  101. </template>
  102. </el-table-column>
  103. <el-table-column
  104. v-for="(item,index) in columnList" :key="index"
  105. :sortable="item.columnSortable"
  106. :prop="item.columnProp"
  107. header-align="center"
  108. :show-overflow-tooltip="item.showOverflowTooltip"
  109. :align="item.align"
  110. :fixed="item.fixed==''?false:item.fixed"
  111. :min-width="item.columnWidth"
  112. :label="item.columnLabel">
  113. <template slot-scope="scope">
  114. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  115. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  116. style="width: 100px; height: 80px"/></span>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. </div>
  121. <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag title="暂停记录" :visible.sync="detailFlag" width="760px">
  122. <el-table
  123. height="300"
  124. :data="detailList"
  125. border
  126. style="width: 100%">
  127. <el-table-column
  128. prop="eventTime"
  129. header-align="center"
  130. align="center"
  131. min-width="130"
  132. label="暂停时间">
  133. </el-table-column>
  134. <el-table-column
  135. prop="tillTime"
  136. header-align="center"
  137. align="center"
  138. min-width="130"
  139. label="继续时间">
  140. </el-table-column>
  141. <el-table-column
  142. prop="completedFlag"
  143. header-align="center"
  144. align="center"
  145. min-width="80"
  146. label="是否继续">
  147. </el-table-column>
  148. <el-table-column
  149. prop="totalTime"
  150. header-align="center"
  151. align="right"
  152. min-width="80"
  153. label="暂停时长">
  154. </el-table-column>
  155. <el-table-column
  156. prop="abnormalDesc"
  157. header-align="center"
  158. align="left"
  159. min-width="90"
  160. label="暂停异常">
  161. </el-table-column>
  162. <el-table-column
  163. prop="abnormalRemark"
  164. header-align="center"
  165. align="left"
  166. min-width="120"
  167. label="异常备注">
  168. </el-table-column>
  169. <el-table-column
  170. prop="nextSeqNo"
  171. header-align="center"
  172. align="center"
  173. min-width="100"
  174. label="下一步派工单">
  175. </el-table-column>
  176. </el-table>
  177. <span slot="footer" class="dialog-footer">
  178. <el-button @click="detailFlag = false" type="primary">取消</el-button>
  179. </span>
  180. </el-dialog>
  181. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  182. </div>
  183. </template>
  184. <script>
  185. import {
  186. getSfdcList,
  187. printDefectCard,
  188. getTimeHistListForSfdc,
  189. } from '@/api/production/generateReport.js'
  190. import Chooselist from '@/views/modules/common/Chooselist'
  191. import {
  192. printTransNoLabel,
  193. } from "@/views/modules/print/print_transNo_label.js"
  194. export default {
  195. name: 'searchSfdc',
  196. components: {
  197. Chooselist
  198. },
  199. data () {
  200. return {
  201. site: this.$store.state.user.site,
  202. // 导出+动态列 start
  203. exportData: [],
  204. userDev:this.$store.state.user.userDev,
  205. exportName: "产量报告"+this.getStrDate(),
  206. columnList: [
  207. {
  208. tableId: "sfdcList",
  209. tableName: this.$route.meta.title,
  210. columnProp: "site",
  211. columnLabel: "工厂编号",
  212. columnHidden: false,
  213. columnImage: false,
  214. columnSortable: false,
  215. columnWidth: 60,
  216. format: null,
  217. functionId: this.$route.meta.menuId,
  218. sortLv: 0,
  219. status: true,
  220. fixed: '',
  221. serialNumber: null,
  222. columnType: null,
  223. align: 'left'
  224. }, {
  225. tableId: "sfdcList",
  226. tableName: this.$route.meta.title,
  227. columnProp: "assJobSeqNo",
  228. columnLabel: "派工单号",
  229. columnHidden: false,
  230. columnImage: false,
  231. columnSortable: false,
  232. columnWidth: 80,
  233. format: null,
  234. functionId: this.$route.meta.menuId,
  235. sortLv: 0,
  236. status: true,
  237. fixed: '',
  238. serialNumber: null,
  239. columnType: null,
  240. align: 'right'
  241. },
  242. {
  243. tableId: "sfdcList",
  244. tableName: this.$route.meta.title,
  245. columnProp: "orderNo",
  246. columnLabel: "生产订单号",
  247. columnHidden: false,
  248. columnImage: false,
  249. columnSortable: false,
  250. columnWidth: 80,
  251. format: null,
  252. functionId: this.$route.meta.menuId,
  253. sortLv: 0,
  254. status: true,
  255. fixed: '',
  256. serialNumber: null,
  257. columnType: null,
  258. align: 'left'
  259. }, {
  260. tableId: "sfdcList",
  261. tableName: this.$route.meta.title,
  262. columnProp: "itemNo",
  263. columnLabel: "工序号",
  264. columnHidden: false,
  265. columnImage: false,
  266. columnSortable: false,
  267. columnWidth: 60,
  268. format: null,
  269. functionId: this.$route.meta.menuId,
  270. sortLv: 0,
  271. status: true,
  272. fixed: '',
  273. serialNumber: null,
  274. columnType: null,
  275. align: 'right'
  276. }, {
  277. tableId: "sfdcList",
  278. tableName: this.$route.meta.title,
  279. columnProp: "operationDesc",
  280. columnLabel: "工序名称",
  281. columnHidden: false,
  282. columnImage: false,
  283. columnSortable: false,
  284. columnWidth: 120,
  285. format: null,
  286. functionId: this.$route.meta.menuId,
  287. sortLv: 0,
  288. status: true,
  289. fixed: '',
  290. serialNumber: null,
  291. columnType: null,
  292. align: 'left'
  293. }, {
  294. tableId: "sfdcList",
  295. tableName: this.$route.meta.title,
  296. columnProp: "seqNo",
  297. columnLabel: "次序号",
  298. columnHidden: false,
  299. columnImage: false,
  300. columnSortable: false,
  301. columnWidth: 50,
  302. format: null,
  303. functionId: this.$route.meta.menuId,
  304. sortLv: 0,
  305. status: true,
  306. fixed: '',
  307. serialNumber: null,
  308. columnType: null,
  309. align: 'right'
  310. }, {
  311. tableId: "sfdcList",
  312. tableName: this.$route.meta.title,
  313. columnProp: "partNo",
  314. columnLabel: "物料编码",
  315. columnHidden: false,
  316. columnImage: false,
  317. columnSortable: false,
  318. columnWidth: 70,
  319. format: null,
  320. functionId: this.$route.meta.menuId,
  321. sortLv: 0,
  322. status: true,
  323. fixed: '',
  324. serialNumber: null,
  325. columnType: null,
  326. align: 'left'
  327. }, {
  328. tableId: "sfdcList",
  329. tableName: this.$route.meta.title,
  330. columnProp: "partDesc",
  331. columnLabel: "产品型号",
  332. columnHidden: false,
  333. columnImage: false,
  334. columnSortable: false,
  335. columnWidth: 100,
  336. format: null,
  337. functionId: this.$route.meta.menuId,
  338. sortLv: 0,
  339. status: true,
  340. fixed: '',
  341. serialNumber: null,
  342. columnType: null,
  343. align: 'left'
  344. }, {
  345. tableId: "sfdcList",
  346. tableName: this.$route.meta.title,
  347. columnProp: "workCenterNo",
  348. columnLabel: "加工中心编号",
  349. columnHidden: false,
  350. columnImage: false,
  351. columnSortable: false,
  352. columnWidth: 70,
  353. format: null,
  354. functionId: this.$route.meta.menuId,
  355. sortLv: 0,
  356. status: true,
  357. fixed: '',
  358. serialNumber: null,
  359. columnType: null,
  360. align: 'left'
  361. }, {
  362. tableId: "sfdcList",
  363. tableName: this.$route.meta.title,
  364. columnProp: "reportDate",
  365. columnLabel: "报工日期",
  366. columnHidden: false,
  367. columnImage: false,
  368. columnSortable: false,
  369. columnWidth: 100,
  370. format: null,
  371. functionId: this.$route.meta.menuId,
  372. sortLv: 0,
  373. status: true,
  374. fixed: '',
  375. serialNumber: null,
  376. columnType: null,
  377. align: 'left'
  378. }, {
  379. tableId: "sfdcList",
  380. tableName: this.$route.meta.title,
  381. columnProp: "statisticDate",
  382. columnLabel: "报工时间",
  383. columnHidden: false,
  384. columnImage: false,
  385. columnSortable: false,
  386. columnWidth: 130,
  387. format: null,
  388. functionId: this.$route.meta.menuId,
  389. sortLv: 0,
  390. status: true,
  391. fixed: '',
  392. serialNumber: null,
  393. columnType: null,
  394. align: 'left'
  395. }, {
  396. tableId: "sfdcList",
  397. tableName: this.$route.meta.title,
  398. columnProp: "operatorId",
  399. columnLabel: "操作员",
  400. columnHidden: false,
  401. columnImage: false,
  402. columnSortable: false,
  403. columnWidth: 70,
  404. format: null,
  405. functionId: this.$route.meta.menuId,
  406. sortLv: 0,
  407. status: true,
  408. fixed: '',
  409. serialNumber: null,
  410. columnType: null,
  411. align: 'left'
  412. }, {
  413. tableId: "sfdcList",
  414. tableName: this.$route.meta.title,
  415. columnProp: "operatorName",
  416. columnLabel: "操作员姓名",
  417. columnHidden: false,
  418. columnImage: false,
  419. columnSortable: false,
  420. columnWidth: 100,
  421. format: null,
  422. functionId: this.$route.meta.menuId,
  423. sortLv: 0,
  424. status: true,
  425. fixed: '',
  426. serialNumber: null,
  427. columnType: null,
  428. align: 'left'
  429. }, {
  430. tableId: "sfdcList",
  431. tableName: this.$route.meta.title,
  432. columnProp: "reverseflag",
  433. columnLabel: "是否已取消报工",
  434. columnHidden: false,
  435. columnImage: false,
  436. columnSortable: false,
  437. columnWidth: 80,
  438. format: null,
  439. functionId: this.$route.meta.menuId,
  440. sortLv: 0,
  441. status: true,
  442. fixed: '',
  443. serialNumber: null,
  444. columnType: null,
  445. align: 'left'
  446. }, {
  447. tableId: "sfdcList",
  448. tableName: this.$route.meta.title,
  449. columnProp: "jobType",
  450. columnLabel: "派工类型",
  451. columnHidden: false,
  452. columnImage: false,
  453. columnSortable: false,
  454. columnWidth: 80,
  455. format: null,
  456. functionId: this.$route.meta.menuId,
  457. sortLv: 0,
  458. status: true,
  459. fixed: '',
  460. serialNumber: null,
  461. columnType: null,
  462. align: 'center'
  463. }, {
  464. tableId: "sfdcList",
  465. tableName: this.$route.meta.title,
  466. columnProp: "reportQty",
  467. columnLabel: "报告数量",
  468. columnHidden: false,
  469. columnImage: false,
  470. columnSortable: false,
  471. columnWidth: 80,
  472. format: null,
  473. functionId: this.$route.meta.menuId,
  474. sortLv: 0,
  475. status: true,
  476. fixed: '',
  477. serialNumber: null,
  478. columnType: null,
  479. align: 'right'
  480. }, {
  481. tableId: "sfdcList",
  482. tableName: this.$route.meta.title,
  483. columnProp: "approveQty",
  484. columnLabel: "合格数量",
  485. columnHidden: false,
  486. columnImage: false,
  487. columnSortable: false,
  488. columnWidth: 80,
  489. format: null,
  490. functionId: this.$route.meta.menuId,
  491. sortLv: 0,
  492. status: true,
  493. fixed: '',
  494. serialNumber: null,
  495. columnType: null,
  496. align: 'right'
  497. }, {
  498. tableId: "sfdcList",
  499. tableName: this.$route.meta.title,
  500. columnProp: "reportWeight",
  501. columnLabel: "报告重量",
  502. columnHidden: false,
  503. columnImage: false,
  504. columnSortable: false,
  505. columnWidth: 80,
  506. format: null,
  507. functionId: this.$route.meta.menuId,
  508. sortLv: 0,
  509. status: true,
  510. fixed: '',
  511. serialNumber: null,
  512. columnType: null,
  513. align: 'right'
  514. }, {
  515. tableId: "sfdcList",
  516. tableName: this.$route.meta.title,
  517. columnProp: "approveWeight",
  518. columnLabel: "合格重量",
  519. columnHidden: false,
  520. columnImage: false,
  521. columnSortable: false,
  522. columnWidth: 80,
  523. format: null,
  524. functionId: this.$route.meta.menuId,
  525. sortLv: 0,
  526. status: true,
  527. fixed: '',
  528. serialNumber: null,
  529. columnType: null,
  530. align: 'right'
  531. }, {
  532. tableId: "sfdcList",
  533. tableName: this.$route.meta.title,
  534. columnProp: "scrapRate",
  535. columnLabel: "订单报废率",
  536. columnHidden: false,
  537. columnImage: false,
  538. columnSortable: false,
  539. columnWidth: 80,
  540. format: null,
  541. functionId: this.$route.meta.menuId,
  542. sortLv: 0,
  543. status: true,
  544. fixed: '',
  545. serialNumber: null,
  546. columnType: null,
  547. align: 'right'
  548. }, {
  549. tableId: "sfdcList",
  550. tableName: this.$route.meta.title,
  551. columnProp: "csysScrapRate",
  552. columnLabel: "系统报废率",
  553. columnHidden: false,
  554. columnImage: false,
  555. columnSortable: false,
  556. columnWidth: 80,
  557. format: null,
  558. functionId: this.$route.meta.menuId,
  559. sortLv: 0,
  560. status: true,
  561. fixed: '',
  562. serialNumber: null,
  563. columnType: null,
  564. align: 'right'
  565. }, {
  566. tableId: "sfdcList",
  567. tableName: this.$route.meta.title,
  568. columnProp: "scrapQty",
  569. columnLabel: "报废数量",
  570. columnHidden: false,
  571. columnImage: false,
  572. columnSortable: false,
  573. columnWidth: 60,
  574. format: null,
  575. functionId: this.$route.meta.menuId,
  576. sortLv: 0,
  577. status: true,
  578. fixed: '',
  579. serialNumber: null,
  580. columnType: null,
  581. align: 'right'
  582. }, {
  583. tableId: "sfdcList",
  584. tableName: this.$route.meta.title,
  585. columnProp: "scrapRemark",
  586. columnLabel: "报废原因",
  587. columnHidden: false,
  588. columnImage: false,
  589. columnSortable: false,
  590. columnWidth: 100,
  591. format: null,
  592. functionId: this.$route.meta.menuId,
  593. sortLv: 0,
  594. status: true,
  595. fixed: '',
  596. serialNumber: null,
  597. columnType: null,
  598. align: 'left'
  599. }, {
  600. tableId: "sfdcList",
  601. tableName: this.$route.meta.title,
  602. columnProp: "acceptQty",
  603. columnLabel: "瑕疵数量",
  604. columnHidden: false,
  605. columnImage: false,
  606. columnSortable: false,
  607. columnWidth: 60,
  608. format: null,
  609. functionId: this.$route.meta.menuId,
  610. sortLv: 0,
  611. status: true,
  612. fixed: '',
  613. serialNumber: null,
  614. columnType: null,
  615. align: 'right'
  616. }, {
  617. tableId: "sfdcList",
  618. tableName: this.$route.meta.title,
  619. columnProp: "acceptRemark",
  620. columnLabel: "瑕疵原因",
  621. columnHidden: false,
  622. columnImage: false,
  623. columnSortable: false,
  624. columnWidth: 100,
  625. format: null,
  626. functionId: this.$route.meta.menuId,
  627. sortLv: 0,
  628. status: true,
  629. fixed: '',
  630. serialNumber: null,
  631. columnType: null,
  632. align: 'left'
  633. }, {
  634. tableId: "sfdcList",
  635. tableName: this.$route.meta.title,
  636. columnProp: "moldQty",
  637. columnLabel: "模数",
  638. columnHidden: false,
  639. columnImage: false,
  640. columnSortable: false,
  641. columnWidth: 80,
  642. format: null,
  643. functionId: this.$route.meta.menuId,
  644. sortLv: 0,
  645. status: true,
  646. fixed: '',
  647. serialNumber: null,
  648. columnType: null,
  649. align: 'right'
  650. }, {
  651. tableId: "sfdcList",
  652. tableName: this.$route.meta.title,
  653. columnProp: "wasteWeight",
  654. columnLabel: "废边重量(kg)",
  655. columnHidden: false,
  656. columnImage: false,
  657. columnSortable: false,
  658. columnWidth: 90,
  659. format: null,
  660. functionId: this.$route.meta.menuId,
  661. sortLv: 0,
  662. status: true,
  663. fixed: '',
  664. serialNumber: null,
  665. columnType: null,
  666. align: 'right'
  667. }, {
  668. tableId: "sfdcList",
  669. tableName: this.$route.meta.title,
  670. columnProp: "reportedManfTime",
  671. columnLabel: "生产时间",
  672. columnHidden: false,
  673. columnImage: false,
  674. columnSortable: false,
  675. columnWidth: 70,
  676. format: null,
  677. functionId: this.$route.meta.menuId,
  678. sortLv: 0,
  679. status: true,
  680. fixed: '',
  681. serialNumber: null,
  682. columnType: null,
  683. align: 'right'
  684. }, {
  685. tableId: "sfdcList",
  686. tableName: this.$route.meta.title,
  687. columnProp: "stopTime",
  688. columnLabel: "暂停时间",
  689. columnHidden: false,
  690. columnImage: false,
  691. columnSortable: false,
  692. columnWidth: 70,
  693. format: null,
  694. functionId: this.$route.meta.menuId,
  695. sortLv: 0,
  696. status: true,
  697. fixed: '',
  698. serialNumber: null,
  699. columnType: null,
  700. align: 'right'
  701. }, {
  702. tableId: "sfdcList",
  703. tableName: this.$route.meta.title,
  704. columnProp: "shiftNo",
  705. columnLabel: "班次编号",
  706. columnHidden: false,
  707. columnImage: false,
  708. columnSortable: false,
  709. columnWidth: 70,
  710. format: null,
  711. functionId: this.$route.meta.menuId,
  712. sortLv: 0,
  713. status: true,
  714. fixed: '',
  715. serialNumber: null,
  716. columnType: null,
  717. align: 'left'
  718. }, {
  719. tableId: "sfdcList",
  720. tableName: this.$route.meta.title,
  721. columnProp: "resourceId",
  722. columnLabel: "机台编号",
  723. columnHidden: false,
  724. columnImage: false,
  725. columnSortable: false,
  726. columnWidth: 70,
  727. format: null,
  728. functionId: this.$route.meta.menuId,
  729. sortLv: 0,
  730. status: true,
  731. fixed: '',
  732. serialNumber: null,
  733. columnType: null,
  734. align: 'left'
  735. }, {
  736. tableId: "sfdcList",
  737. tableName: this.$route.meta.title,
  738. columnProp: "resourceDesc",
  739. columnLabel: "机台名称",
  740. columnHidden: false,
  741. columnImage: false,
  742. columnSortable: false,
  743. columnWidth: 100,
  744. format: null,
  745. functionId: this.$route.meta.menuId,
  746. sortLv: 0,
  747. status: true,
  748. fixed: '',
  749. serialNumber: null,
  750. columnType: null,
  751. align: 'left'
  752. }
  753. ],
  754. visible:false,
  755. // 导出 end
  756. height: 200,
  757. tableData: [],
  758. detailFlag:false,
  759. detailList: [],
  760. searchData: {
  761. seqNo:'',
  762. orderNo: '',
  763. workCenterNo: '',
  764. partNo: '',
  765. site: this.$store.state.user.site,
  766. partDesc:'',
  767. startDate:new Date(),
  768. endDate:'',
  769. operatorName:'',
  770. resourceId:'',
  771. operationDesc:'',
  772. shiftNo:'',
  773. repairSOFlag:'',
  774. scrapFlag:'',
  775. },
  776. }
  777. },
  778. mounted () {
  779. this.$nextTick(() => {
  780. this.height = window.innerHeight - 210
  781. this.height2 = window.innerHeight -100
  782. })
  783. },
  784. methods: {
  785. // 获取基础数据列表S
  786. getBaseList (val, type) {
  787. this.tagNo = val
  788. this.$nextTick(() => {
  789. let strVal = ''
  790. if (val === 24) {
  791. strVal = this.searchData.workCenterNo
  792. }
  793. if (val === 5) {
  794. strVal = this.searchData.partNo
  795. }
  796. if (val === 26) {
  797. strVal = this.searchData.operatorName
  798. }
  799. if (val === 88) {
  800. strVal = this.searchData.resourceId
  801. }
  802. this.$refs.baseList.init(val, strVal)
  803. })
  804. },
  805. /* 列表方法的回调 */
  806. getBaseData (val) {
  807. if (this.tagNo === 24) {
  808. this.searchData.workCenterNo = val.WorkCenterNo
  809. } else if (this.tagNo === 5) {
  810. this.searchData.partNo = val.PartNo
  811. }
  812. if (this.tagNo === 26) {
  813. this.searchData.operatorName = val.OperatorName
  814. }
  815. if (this.tagNo === 88) {
  816. this.searchData.resourceId = val.ResourceID
  817. }
  818. },
  819. search () {
  820. getSfdcList(this.searchData).then(({data}) => {
  821. this.tableData = data.rows
  822. })
  823. },
  824. // 导出+动态列
  825. fields() {
  826. let json = "{"
  827. this.columnList.forEach((item, index) => {
  828. if (index == this.columnList.length - 1) {
  829. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  830. } else {
  831. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  832. }
  833. })
  834. json += "}"
  835. let s = eval("(" + json + ")")
  836. return s
  837. },
  838. createExportData() {
  839. // 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据
  840. return this.tableData;
  841. },
  842. getStrDate() {
  843. let dd = new Date();
  844. let Y = dd.getFullYear();
  845. let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//获取当前月份的日期,不足10补0
  846. let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//获取当前几号,不足10补0
  847. let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours();
  848. let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes();
  849. let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds();
  850. return Y + M + D + H + MM + S;
  851. },
  852. printCard(row){
  853. printDefectCard(row).then(({data}) => {
  854. let inList=[];
  855. inList.push(data.row)
  856. if(inList.length>0){
  857. printTransNoLabel(inList);
  858. }
  859. })
  860. },
  861. timeHistModel(row){
  862. getTimeHistListForSfdc(row).then(({data}) => {
  863. this.detailFlag=true
  864. this.detailList=data.rows
  865. })
  866. },
  867. tableRowClassName ({row, rowIndex}) {
  868. if ( row.csysScrapRate<row.scrapRate) {
  869. return 'false-row'
  870. }
  871. return ''
  872. },
  873. },
  874. created () {
  875. // this.getTableUserColumn()
  876. }
  877. }
  878. </script>
  879. <style >
  880. .input_left{
  881. text-align: left;
  882. }
  883. .input_reight{
  884. text-align: right;
  885. }
  886. /deep/ input::-webkit-inner-spin-button {
  887. -webkit-appearance: none !important;
  888. }
  889. input[type='number'] {
  890. -moz-appearance: textfield !important;
  891. }
  892. .sfdcTable .el-table .false-row {
  893. background-color: #e7d45e;
  894. color: #000207;
  895. }
  896. </style>