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.

934 lines
30 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  4. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  5. <el-form-item :label="'申请单号'">
  6. <el-input v-model="searchData.notifyNo" style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'申请账号'">
  9. <el-input v-model="searchData.userName" style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'申请单日期'">
  12. <el-date-picker
  13. style="width: 120px"
  14. v-model="searchData.startDate"
  15. type="date"
  16. value-format="yyyy-MM-dd"
  17. placeholder="选择日期">
  18. </el-date-picker>
  19. </el-form-item>
  20. <el-form-item style="margin-top: 23px;">
  21. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  22. </el-form-item>
  23. <el-form-item :label="' '">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.endDate"
  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-button type="primary" @click="searchTable()">查询</el-button>
  34. <download-excel
  35. :fields="fields()"
  36. :data="exportData"
  37. type="xls"
  38. :name="exportName"
  39. :header="exportHeader"
  40. :footer="exportFooter"
  41. :fetch="createExportData"
  42. :before-generate="startDownload"
  43. :before-finish="finishDownload"
  44. worksheet="导出信息"
  45. class="el-button el-button--primary el-button--medium">
  46. {{ '导出' }}
  47. </download-excel>
  48. </el-form-item>
  49. </el-form>
  50. </el-form>
  51. <el-table
  52. :data="dataList"
  53. @row-click="changeData"
  54. :height="height"
  55. border
  56. highlight-current-row
  57. ref="mainTable"
  58. v-loading="dataListLoading"
  59. style="width: 100%; ">
  60. <el-table-column
  61. v-for="(item,index) in columnList1" :key="index"
  62. :sortable="item.columnSortable"
  63. :prop="item.columnProp"
  64. :header-align="item.headerAlign"
  65. :show-overflow-tooltip="item.showOverflowTooltip"
  66. :align="item.align"
  67. :fixed="item.fixed==''?false:item.fixed"
  68. :min-width="item.columnWidth"
  69. :label="item.columnLabel">
  70. <template slot-scope="scope">
  71. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  72. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  73. style="width: 100px; height: 80px"/></span>
  74. </template>
  75. </el-table-column>
  76. <!-- <el-table-column-->
  77. <!-- header-align="center"-->
  78. <!-- align="center"-->
  79. <!-- width="150"-->
  80. <!-- fixed="left"-->
  81. <!-- label="操作">-->
  82. <!-- <template slot-scope="scope">-->
  83. <!-- <a type="text" size="small" @click="updateModel(scope.row)">编辑</a>-->
  84. <!-- <a type="text" size="small" @click="deleteData(scope.row)">删除</a>-->
  85. <!-- <a type="text" size="small" @click="scanRoll(scope.row)">扫描</a>-->
  86. <!-- </template>-->
  87. <!-- </el-table-column>-->
  88. </el-table>
  89. <el-pagination
  90. @size-change="sizeChangeHandle"
  91. @current-change="currentChangeHandle"
  92. :current-page="pageIndex"
  93. :page-sizes="[20, 50, 100, 1000]"
  94. :page-size="pageSize"
  95. :total="totalPage"
  96. layout="total, sizes, prev, pager, next, jumper">
  97. </el-pagination>
  98. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  99. <el-tab-pane label="派工单明细" name="detail">
  100. <el-table
  101. :data="dataList2"
  102. :height="height"
  103. border
  104. v-loading="dataListLoading"
  105. style="width: 100%; ">
  106. <el-table-column
  107. v-for="(item,index) in columnList2" :key="index"
  108. :sortable="item.columnSortable"
  109. :prop="item.columnProp"
  110. :header-align="item.headerAlign"
  111. :show-overflow-tooltip="item.showOverflowTooltip"
  112. :align="item.align"
  113. :fixed="item.fixed==''?false:item.fixed"
  114. :min-width="item.columnWidth"
  115. :label="item.columnLabel">
  116. <template slot-scope="scope">
  117. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  118. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  119. style="width: 100px; height: 80px"/></span>
  120. </template>
  121. </el-table-column>
  122. </el-table>
  123. </el-tab-pane>
  124. <el-tab-pane label="材料明细" name="sub">
  125. <el-table
  126. :data="dataList3"
  127. :height="height"
  128. border
  129. v-loading="dataListLoading"
  130. style="width: 100%; ">
  131. <!-- <el-table-column-->
  132. <!-- header-align="center"-->
  133. <!-- align="center"-->
  134. <!-- width="80"-->
  135. <!-- fixed="left"-->
  136. <!-- label="操作">-->
  137. <!-- <template slot-scope="scope">-->
  138. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  139. <!-- </template>-->
  140. <!-- </el-table-column>-->
  141. <el-table-column
  142. v-for="(item,index) in columnList3" :key="index"
  143. :sortable="item.columnSortable"
  144. :prop="item.columnProp"
  145. :header-align="item.headerAlign"
  146. :show-overflow-tooltip="item.showOverflowTooltip"
  147. :align="item.align"
  148. :fixed="item.fixed==''?false:item.fixed"
  149. :min-width="item.columnWidth"
  150. :label="item.columnLabel">
  151. <template slot-scope="scope">
  152. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  153. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  154. style="width: 100px; height: 80px"/></span>
  155. </template>
  156. </el-table-column>
  157. </el-table>
  158. </el-tab-pane>
  159. <el-tab-pane label="材料汇总" name="sum">
  160. <el-table
  161. :data="dataList4"
  162. :height="height"
  163. border
  164. v-loading="dataListLoading"
  165. style="width: 100%; ">
  166. <!-- <el-table-column-->
  167. <!-- header-align="center"-->
  168. <!-- align="center"-->
  169. <!-- width="80"-->
  170. <!-- fixed="left"-->
  171. <!-- label="操作">-->
  172. <!-- <template slot-scope="scope">-->
  173. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  174. <!-- </template>-->
  175. <!-- </el-table-column>-->
  176. <el-table-column
  177. v-for="(item,index) in columnList4" :key="index"
  178. :sortable="item.columnSortable"
  179. :prop="item.columnProp"
  180. :header-align="item.headerAlign"
  181. :show-overflow-tooltip="item.showOverflowTooltip"
  182. :align="item.align"
  183. :fixed="item.fixed==''?false:item.fixed"
  184. :min-width="item.columnWidth"
  185. :label="item.columnLabel">
  186. <template slot-scope="scope">
  187. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  188. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  189. style="width: 100px; height: 80px"/></span>
  190. </template>
  191. </el-table-column>
  192. </el-table>
  193. </el-tab-pane>
  194. </el-tabs>
  195. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  196. </div>
  197. </template>
  198. <script>
  199. import {
  200. searchNotifyHeader
  201. ,searchNotifyOrderList
  202. ,searchNotifyMaterialList
  203. ,searchSumNotifyMaterialList
  204. }from "@/api/orderIssure/soIssueNotify.js"
  205. import Chooselist from '@/views/modules/common/Chooselist'
  206. export default {
  207. components: {
  208. Chooselist
  209. },
  210. data() {
  211. return {
  212. height:200,
  213. modelFlag:false,
  214. activeName: 'detail',
  215. dataList: [],
  216. dataList2: [],
  217. dataList3: [],
  218. dataList4: [],
  219. addOrUpdateVisible:false,
  220. searchData: {
  221. page: 1,
  222. limit: 100,
  223. site:this.$store.state.user.site,
  224. userName: '',
  225. notifyNo: '',
  226. startDate: '',
  227. endDate: '',
  228. },
  229. exportList:[],
  230. pageIndex: 1,
  231. pageSize: 100,
  232. totalPage: 0,
  233. dataListLoading: false,
  234. currentRow:'',
  235. headerData:'',
  236. columnList1:[
  237. {
  238. userId: this.$store.state.user.name,
  239. functionId: 701002,
  240. serialNumber: '701002Table1NotifyNo',
  241. tableId: "701002Table1",
  242. tableName: "领料申请主表",
  243. columnProp: "notifyNo",
  244. headerAlign: "center",
  245. align: "center",
  246. columnLabel: "发料单号",
  247. columnHidden: false,
  248. columnImage: false,
  249. columnSortable: false,
  250. sortLv: 0,
  251. status: true,
  252. fixed: '',
  253. columnWidth: 100
  254. },{
  255. userId: this.$store.state.user.name,
  256. functionId: 701002,
  257. serialNumber: '701002Table1NotifyDate',
  258. tableId: "701002Table1",
  259. tableName: "领料申请主表",
  260. columnProp: "notifyDate",
  261. headerAlign: "center",
  262. align: "center",
  263. columnLabel: "申请时间",
  264. columnHidden: false,
  265. columnImage: false,
  266. columnSortable: false,
  267. sortLv: 0,
  268. status: true,
  269. fixed: '',
  270. columnWidth: 100
  271. },{
  272. userId: this.$store.state.user.name,
  273. functionId: 701002,
  274. serialNumber: '701002Table1UserName',
  275. tableId: "701002Table1",
  276. tableName: "领料申请主表",
  277. columnProp: "userName",
  278. headerAlign: "center",
  279. align: "left",
  280. columnLabel: "申请账号",
  281. columnHidden: false,
  282. columnImage: false,
  283. columnSortable: false,
  284. sortLv: 0,
  285. status: true,
  286. fixed: '',
  287. columnWidth: 100
  288. },{
  289. userId: this.$store.state.user.name,
  290. functionId: 701002,
  291. serialNumber: '701002Table1UserName',
  292. tableId: "701002Table1",
  293. tableName: "领料申请主表",
  294. columnProp: "userDisplay",
  295. headerAlign: "center",
  296. align: "left",
  297. columnLabel: "申请人姓名",
  298. columnHidden: false,
  299. columnImage: false,
  300. columnSortable: false,
  301. sortLv: 0,
  302. status: true,
  303. fixed: '',
  304. columnWidth: 100
  305. },{
  306. userId: this.$store.state.user.name,
  307. functionId: 701002,
  308. serialNumber: '701002Table1IssueFlag',
  309. tableId: "701002Table1",
  310. tableName: "领料申请主表",
  311. columnProp: "issueFlag",
  312. headerAlign: "center",
  313. align: "center",
  314. columnLabel: "是否领料",
  315. columnHidden: false,
  316. columnImage: false,
  317. columnSortable: false,
  318. sortLv: 0,
  319. status: true,
  320. fixed: '',
  321. columnWidth: 60
  322. },{
  323. userId: this.$store.state.user.name,
  324. functionId: 701002,
  325. serialNumber: '701002Table1IssueResult',
  326. tableId: "701002Table1",
  327. tableName: "领料申请主表",
  328. columnProp: "issueResult",
  329. headerAlign: "center",
  330. align: "left",
  331. columnLabel: "领料结果",
  332. columnHidden: false,
  333. columnImage: false,
  334. columnSortable: false,
  335. sortLv: 0,
  336. status: true,
  337. fixed: '',
  338. columnWidth: 120
  339. },{
  340. userId: this.$store.state.user.name,
  341. functionId: 701002,
  342. serialNumber: '701002Table1PlanIssueDate',
  343. tableId: "701002Table1",
  344. tableName: "领料申请主表",
  345. columnProp: "planIssueDate",
  346. headerAlign: "center",
  347. align: "left",
  348. columnLabel: "计划领料日期",
  349. columnHidden: false,
  350. columnImage: false,
  351. columnSortable: false,
  352. sortLv: 0,
  353. status: true,
  354. fixed: '',
  355. columnWidth: 100
  356. },{
  357. userId: this.$store.state.user.name,
  358. functionId: 701002,
  359. serialNumber: '701002Table1RealIssueDate',
  360. tableId: "701002Table1",
  361. tableName: "领料申请主表",
  362. columnProp: "realIssueDate",
  363. headerAlign: "center",
  364. align: "left",
  365. columnLabel: "实际领料日期",
  366. columnHidden: false,
  367. columnImage: false,
  368. columnSortable: false,
  369. sortLv: 0,
  370. status: true,
  371. fixed: '',
  372. columnWidth: 100
  373. },{
  374. userId: this.$store.state.user.name,
  375. functionId: 701002,
  376. serialNumber: '701002Table1Status',
  377. tableId: "701002Table1",
  378. tableName: "领料申请主表",
  379. columnProp: "status",
  380. headerAlign: "center",
  381. align: "left",
  382. columnLabel: "状态",
  383. columnHidden: false,
  384. columnImage: false,
  385. columnSortable: false,
  386. sortLv: 0,
  387. status: true,
  388. fixed: '',
  389. columnWidth: 80
  390. },{
  391. userId: this.$store.state.user.name,
  392. functionId: 701002,
  393. serialNumber: '701002Table1Remark',
  394. tableId: "701002Table1",
  395. tableName: "领料申请主表",
  396. columnProp: "remark",
  397. headerAlign: "center",
  398. align: "left",
  399. columnLabel: "备注",
  400. columnHidden: false,
  401. columnImage: false,
  402. columnSortable: false,
  403. sortLv: 0,
  404. status: true,
  405. fixed: '',
  406. columnWidth: 200
  407. },
  408. ],
  409. columnList2:[
  410. {
  411. userId: this.$store.state.user.name,
  412. functionId: 701002,
  413. serialNumber: '701002Table2ItemNo',
  414. tableId: "701002Table2",
  415. tableName: "申请单派工单明细表",
  416. columnProp: "itemNo",
  417. headerAlign: "center",
  418. align: "right",
  419. columnLabel: "申请单序号",
  420. columnHidden: false,
  421. columnImage: false,
  422. columnSortable: false,
  423. sortLv: 0,
  424. status: true,
  425. fixed: '',
  426. columnWidth: 60
  427. },{
  428. userId: this.$store.state.user.name,
  429. functionId: 701002,
  430. serialNumber: '701002Table2SOOrderNo',
  431. tableId: "701002Table2",
  432. tableName: "申请单派工单明细表",
  433. columnProp: "sOOrderNo",
  434. headerAlign: "center",
  435. align: "left",
  436. columnLabel: "生产订单",
  437. columnHidden: false,
  438. columnImage: false,
  439. columnSortable: false,
  440. sortLv: 0,
  441. status: true,
  442. fixed: '',
  443. columnWidth: 120
  444. },{
  445. userId: this.$store.state.user.name,
  446. functionId: 701002,
  447. serialNumber: '701002Table2OpsItemNo',
  448. tableId: "701002Table2",
  449. tableName: "申请单派工单明细表",
  450. columnProp: "opsItemNo",
  451. headerAlign: "center",
  452. align: "right",
  453. columnLabel: "工序",
  454. columnHidden: false,
  455. columnImage: false,
  456. columnSortable: false,
  457. sortLv: 0,
  458. status: true,
  459. fixed: '',
  460. columnWidth: 50
  461. },{
  462. userId: this.$store.state.user.name,
  463. functionId: 701002,
  464. serialNumber: '701002Table2ItemDesc',
  465. tableId: "701002Table2",
  466. tableName: "申请单派工单明细表",
  467. columnProp: "itemDesc",
  468. headerAlign: "center",
  469. align: "left",
  470. columnLabel: "工序名称",
  471. columnHidden: false,
  472. columnImage: false,
  473. columnSortable: false,
  474. sortLv: 0,
  475. status: true,
  476. fixed: '',
  477. columnWidth: 120
  478. },{
  479. userId: this.$store.state.user.name,
  480. functionId: 701002,
  481. serialNumber: '701002Table2SeqNo',
  482. tableId: "701002Table2",
  483. tableName: "申请单派工单明细表",
  484. columnProp: "seqNo",
  485. headerAlign: "center",
  486. align: "left",
  487. columnLabel: "派工单号",
  488. columnHidden: false,
  489. columnImage: false,
  490. columnSortable: false,
  491. sortLv: 0,
  492. status: true,
  493. fixed: '',
  494. columnWidth: 150
  495. }, {
  496. userId: this.$store.state.user.name,
  497. functionId: 701002,
  498. serialNumber: '701002Table2FGPartNo',
  499. tableId: "701002Table2",
  500. tableName: "申请单派工单明细表",
  501. columnProp: "fGPartNo",
  502. headerAlign: "center",
  503. align: "left",
  504. columnLabel: "派工单物料",
  505. columnHidden: false,
  506. columnImage: false,
  507. columnSortable: false,
  508. sortLv: 0,
  509. status: true,
  510. fixed: '',
  511. columnWidth: 80
  512. }, {
  513. userId: this.$store.state.user.name,
  514. functionId: 701002,
  515. serialNumber: '701002Table2PartDesc',
  516. tableId: "701002Table2",
  517. tableName: "申请单派工单明细表",
  518. columnProp: "partDesc",
  519. headerAlign: "center",
  520. align: "left",
  521. columnLabel: "物料名称",
  522. columnHidden: false,
  523. columnImage: false,
  524. columnSortable: false,
  525. sortLv: 0,
  526. status: true,
  527. fixed: '',
  528. columnWidth: 120
  529. }, {
  530. userId: this.$store.state.user.name,
  531. functionId: 701002,
  532. serialNumber: '701002Table2IssureQty',
  533. tableId: "701002Table2",
  534. tableName: "申请单派工单明细表",
  535. columnProp: "issureQty",
  536. headerAlign: "center",
  537. align: "right",
  538. columnLabel: "发料数量",
  539. columnHidden: false,
  540. columnImage: false,
  541. columnSortable: false,
  542. sortLv: 0,
  543. status: true,
  544. fixed: '',
  545. columnWidth: 80
  546. },
  547. ],
  548. columnList3:[
  549. {
  550. userId: this.$store.state.user.name,
  551. functionId: 701002,
  552. serialNumber: '701002Table3ItemNo',
  553. tableId: "701002Table3",
  554. tableName: "申请单材料明细表",
  555. columnProp: "itemNo",
  556. headerAlign: "center",
  557. align: "right",
  558. columnLabel: "申请单序号",
  559. columnHidden: false,
  560. columnImage: false,
  561. columnSortable: false,
  562. sortLv: 0,
  563. status: true,
  564. fixed: '',
  565. columnWidth: 80
  566. },{
  567. userId: this.$store.state.user.name,
  568. functionId: 701002,
  569. serialNumber: '701002Table3SOOrderNo',
  570. tableId: "701002Table3",
  571. tableName: "申请单材料明细表",
  572. columnProp: "orderNo",
  573. headerAlign: "center",
  574. align: "left",
  575. columnLabel: "生产订单",
  576. columnHidden: false,
  577. columnImage: false,
  578. columnSortable: false,
  579. sortLv: 0,
  580. status: true,
  581. fixed: '',
  582. columnWidth: 120
  583. },{
  584. userId: this.$store.state.user.name,
  585. functionId: 701002,
  586. serialNumber: '701002Table3OpsItemNo',
  587. tableId: "701002Table3",
  588. tableName: "申请单材料明细表",
  589. columnProp: "opsItemNo",
  590. headerAlign: "center",
  591. align: "right",
  592. columnLabel: "工序",
  593. columnHidden: false,
  594. columnImage: false,
  595. columnSortable: false,
  596. sortLv: 0,
  597. status: true,
  598. fixed: '',
  599. columnWidth: 50
  600. },{
  601. userId: this.$store.state.user.name,
  602. functionId: 701002,
  603. serialNumber: '701002Table3SeqNo',
  604. tableId: "701002Table3",
  605. tableName: "申请单材料明细表",
  606. columnProp: "seqNo",
  607. headerAlign: "center",
  608. align: "left",
  609. columnLabel: "派工单号",
  610. columnHidden: false,
  611. columnImage: false,
  612. columnSortable: false,
  613. sortLv: 0,
  614. status: true,
  615. fixed: '',
  616. columnWidth: 150
  617. },{
  618. userId: this.$store.state.user.name,
  619. functionId: 701002,
  620. serialNumber: '701002Table3BOMItemNo',
  621. tableId: "701002Table3",
  622. tableName: "申请单材料明细表",
  623. columnProp: "bOMItemNo",
  624. headerAlign: "center",
  625. align: "right",
  626. columnLabel: "BOM序号",
  627. columnHidden: false,
  628. columnImage: false,
  629. columnSortable: false,
  630. sortLv: 0,
  631. status: true,
  632. fixed: '',
  633. columnWidth: 80
  634. },{
  635. userId: this.$store.state.user.name,
  636. functionId: 701002,
  637. serialNumber: '701002Table3ComponentPartNo',
  638. tableId: "701002Table3",
  639. tableName: "申请单材料明细表",
  640. columnProp: "componentPartNo",
  641. headerAlign: "center",
  642. align: "center",
  643. columnLabel: "材料编码",
  644. columnHidden: false,
  645. columnImage: false,
  646. columnSortable: false,
  647. sortLv: 0,
  648. status: true,
  649. fixed: '',
  650. columnWidth: 100
  651. },{
  652. userId: this.$store.state.user.name,
  653. functionId: 701002,
  654. serialNumber: '701002Table3PartDesc',
  655. tableId: "701002Table3",
  656. tableName: "申请单材料明细表",
  657. columnProp: "partDesc",
  658. headerAlign: "center",
  659. align: "left",
  660. columnLabel: "材料名称",
  661. columnHidden: false,
  662. columnImage: false,
  663. columnSortable: false,
  664. sortLv: 0,
  665. status: true,
  666. fixed: '',
  667. columnWidth: 130
  668. },{
  669. userId: this.$store.state.user.name,
  670. functionId: 701002,
  671. serialNumber: '701002Table3QtyToIssue',
  672. tableId: "701002Table3",
  673. tableName: "申请单材料明细表",
  674. columnProp: "qtyToIssue",
  675. headerAlign: "center",
  676. align: "right",
  677. columnLabel: "申请数量",
  678. columnHidden: false,
  679. columnImage: false,
  680. columnSortable: false,
  681. sortLv: 0,
  682. status: true,
  683. fixed: '',
  684. columnWidth: 80
  685. },
  686. ],
  687. columnList4:[
  688. {
  689. userId: this.$store.state.user.name,
  690. functionId: 701002,
  691. serialNumber: '701002Table3ComponentPartNo',
  692. tableId: "701002Table4",
  693. tableName: "申请单材料明细表",
  694. columnProp: "componentPartNo",
  695. headerAlign: "center",
  696. align: "center",
  697. columnLabel: "材料编码",
  698. columnHidden: false,
  699. columnImage: false,
  700. columnSortable: false,
  701. sortLv: 0,
  702. status: true,
  703. fixed: '',
  704. columnWidth: 100
  705. },{
  706. userId: this.$store.state.user.name,
  707. functionId: 701002,
  708. serialNumber: '701002Table3PartDesc',
  709. tableId: "701002Table4",
  710. tableName: "申请单材料明细表",
  711. columnProp: "partDesc",
  712. headerAlign: "center",
  713. align: "left",
  714. columnLabel: "材料名称",
  715. columnHidden: false,
  716. columnImage: false,
  717. columnSortable: false,
  718. sortLv: 0,
  719. status: true,
  720. fixed: '',
  721. columnWidth: 130
  722. },{
  723. userId: this.$store.state.user.name,
  724. functionId: 701002,
  725. serialNumber: '701002Table3QtyToIssue',
  726. tableId: "701002Table4",
  727. tableName: "申请单材料明细表",
  728. columnProp: "qtyToIssue",
  729. headerAlign: "center",
  730. align: "right",
  731. columnLabel: "合计申请数量",
  732. columnHidden: false,
  733. columnImage: false,
  734. columnSortable: false,
  735. sortLv: 0,
  736. status: true,
  737. fixed: '',
  738. columnWidth: 80
  739. },{
  740. userId: this.$store.state.user.name,
  741. functionId: 701002,
  742. serialNumber: '701002Table3QtyToIssueOriginal',
  743. tableId: "701002Table4",
  744. tableName: "申请单材料明细表",
  745. columnProp: "qtyToIssueOriginal",
  746. headerAlign: "center",
  747. align: "right",
  748. columnLabel: "合计已发数量",
  749. columnHidden: false,
  750. columnImage: false,
  751. columnSortable: false,
  752. sortLv: 0,
  753. status: true,
  754. fixed: '',
  755. columnWidth: 80
  756. },
  757. ],
  758. dataRole: {
  759. partTypeDesc: [
  760. {
  761. required: true,
  762. message: ' ',
  763. trigger: 'change'
  764. }
  765. ],
  766. partName: [
  767. {
  768. required: true,
  769. message: ' ',
  770. trigger: 'change'
  771. }
  772. ],
  773. },
  774. // 导出 start
  775. exportData: [],
  776. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  777. exportHeader: ["发料申请单"],
  778. exportFooter: [],
  779. // 导出 end
  780. }
  781. },
  782. mounted () {
  783. this.$nextTick(() => {
  784. this.height = (window.innerHeight- 260) / 2
  785. })
  786. },
  787. methods: {
  788. // 获取基础数据列表S
  789. getBaseList (val, type) {
  790. this.tagNo = val
  791. this.tagNo1 = type
  792. this.$nextTick(() => {
  793. let strVal = ''
  794. if (val === 1013) {
  795. if(type==23) {
  796. strVal = this.modelData.supplierId
  797. }
  798. }
  799. this.$refs.baseList.init(val, strVal)
  800. })
  801. },
  802. /* 列表方法的回调 */
  803. getBaseData (val) {
  804. if (this.tagNo === 23) {
  805. if(this.tagNo1==1) {
  806. this.modelData.supplierId = val.SupplierID
  807. this.modelData.supplierName = val.SupplierName
  808. }
  809. }
  810. },
  811. // 每页数
  812. sizeChangeHandle (val) {
  813. this.pageSize = val
  814. this.pageIndex = 1
  815. this.searchTable()
  816. },
  817. // 当前页
  818. currentChangeHandle (val) {
  819. this.pageIndex = val
  820. this.searchTable()
  821. },
  822. tabClick (tab, event) {
  823. // 刷新列表数据
  824. this.refreshCurrentTabTable()
  825. },
  826. changeData(row){
  827. this.currentRow = JSON.parse(JSON.stringify(row));
  828. this.headerData=row;
  829. this.refreshCurrentTabTable ();
  830. },
  831. refreshCurrentTabTable(){
  832. if(this.currentRow===''||this.currentRow===null){
  833. this.currentRow={site:'',notifyNo:''}
  834. }
  835. if(this.activeName==='detail'){
  836. searchNotifyOrderList(this.currentRow).then(({data}) => {
  837. //区分请求成功和失败的状况
  838. if (data && data.code == 0) {
  839. this.dataList2 = data.rows
  840. } else {
  841. this.dataList2 = [];
  842. }
  843. });
  844. }else if(this.activeName==='sub'){
  845. searchNotifyMaterialList(this.currentRow).then(({data}) => {
  846. //区分请求成功和失败的状况
  847. if (data && data.code == 0) {
  848. this.dataList3 = data.rows
  849. } else {
  850. this.dataList3 = [];
  851. }
  852. });
  853. }else {
  854. searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
  855. //区分请求成功和失败的状况
  856. if (data && data.code == 0) {
  857. this.dataList3 = data.rows
  858. } else {
  859. this.dataList3 = [];
  860. }
  861. });
  862. }
  863. },
  864. searchTable(){
  865. this.searchData.limit = this.pageSize
  866. this.searchData.page = this.pageIndex
  867. searchNotifyHeader(this.searchData).then(({data}) => {
  868. //区分请求成功和失败的状况
  869. if (data && data.code == 0) {
  870. this.dataList = data.page.list
  871. this.pageIndex = data.page.currPage
  872. this.pageSize = data.page.pageSize
  873. this.totalPage = data.page.totalCount
  874. if(this.dataList.length>0){
  875. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  876. this.changeData(this.dataList[0])
  877. }else {
  878. this.changeData(null)
  879. }
  880. } else {
  881. this.dataList = [];
  882. }
  883. });
  884. },
  885. //导出excel
  886. //导出excel
  887. async createExportData() {
  888. this.searchData.limit = -1
  889. this.searchData.page = 1
  890. await searchNotifyHeader(this.searchData).then(({data}) => {
  891. this.exportList= data.page.list;
  892. })
  893. return this.exportList;
  894. },
  895. startDownload() {
  896. // this.exportData = this.dataList
  897. },
  898. finishDownload() {
  899. },
  900. fields() {
  901. let json = "{"
  902. this.columnList1.forEach((item, index) => {
  903. if (index == this.columnList1.length - 1) {
  904. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  905. } else {
  906. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  907. }
  908. })
  909. json += "}"
  910. let s = eval("(" + json + ")")
  911. return s
  912. },
  913. },
  914. }
  915. </script>
  916. <style scoped>
  917. </style>