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.

1178 lines
38 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 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 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 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 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="80"-->
  80. <!-- fixed="left"-->
  81. <!-- label="操作">-->
  82. <!-- <template slot-scope="scope">-->
  83. <!-- <a type="text" size="small" v-if="scope.row.status==='已下达'" @click="closeNotify(scope.row)">结束</a>-->
  84. <!-- <a type="text" size="small" v-if="scope.row.status==='已关闭'" @click="openNotify(scope.row)">打开</a>-->
  85. <!-- </template>-->
  86. <!-- </el-table-column>-->
  87. </el-table>
  88. <el-pagination
  89. @size-change="sizeChangeHandle"
  90. @current-change="currentChangeHandle"
  91. :current-page="pageIndex"
  92. :page-sizes="[20, 50, 100, 1000]"
  93. :page-size="pageSize"
  94. :total="totalPage"
  95. layout="total, sizes, prev, pager, next, jumper">
  96. </el-pagination>
  97. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  98. <el-tab-pane label="派工单明细" name="detail">
  99. <el-table
  100. :data="dataList2"
  101. :height="height"
  102. border
  103. v-loading="dataListLoading"
  104. style="width: 100%; ">
  105. <el-table-column
  106. v-for="(item,index) in columnList2" :key="index"
  107. :sortable="item.columnSortable"
  108. :prop="item.columnProp"
  109. :header-align="item.headerAlign"
  110. :show-overflow-tooltip="item.showOverflowTooltip"
  111. :align="item.align"
  112. :fixed="item.fixed==''?false:item.fixed"
  113. :min-width="item.columnWidth"
  114. :label="item.columnLabel">
  115. <template slot-scope="scope">
  116. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  117. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  118. style="width: 100px; height: 80px"/></span>
  119. </template>
  120. </el-table-column>
  121. <!-- <el-table-column-->
  122. <!-- header-align="center"-->
  123. <!-- align="center"-->
  124. <!-- width="80"-->
  125. <!-- fixed="left"-->
  126. <!-- label="操作">-->
  127. <!-- <template slot-scope="scope">-->
  128. <!-- <a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifySOSPlus(scope.row)">删除</a>-->
  129. <!-- </template>-->
  130. <!-- </el-table-column>-->
  131. </el-table>
  132. </el-tab-pane>
  133. <el-tab-pane label="材料明细" name="sub">
  134. <el-table
  135. :data="dataList3"
  136. :height="height"
  137. border
  138. v-loading="dataListLoading"
  139. style="width: 100%; ">
  140. <!-- <el-table-column-->
  141. <!-- header-align="center"-->
  142. <!-- align="center"-->
  143. <!-- width="80"-->
  144. <!-- fixed="left"-->
  145. <!-- label="操作">-->
  146. <!-- <template slot-scope="scope">-->
  147. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  148. <!-- </template>-->
  149. <!-- </el-table-column>-->
  150. <el-table-column
  151. v-for="(item,index) in columnList3" :key="index"
  152. :sortable="item.columnSortable"
  153. :prop="item.columnProp"
  154. :header-align="item.headerAlign"
  155. :show-overflow-tooltip="item.showOverflowTooltip"
  156. :align="item.align"
  157. :fixed="item.fixed==''?false:item.fixed"
  158. :min-width="item.columnWidth"
  159. :label="item.columnLabel">
  160. <template slot-scope="scope">
  161. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  162. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  163. style="width: 100px; height: 80px"/></span>
  164. </template>
  165. </el-table-column>
  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" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a>-->
  174. <!-- </template>-->
  175. <!-- </el-table-column>-->
  176. </el-table>
  177. </el-tab-pane>
  178. <el-tab-pane label="材料汇总" name="sum">
  179. <el-table
  180. :data="dataList4"
  181. :height="height"
  182. border
  183. v-loading="dataListLoading"
  184. style="width: 100%; ">
  185. <!-- <el-table-column-->
  186. <!-- header-align="center"-->
  187. <!-- align="center"-->
  188. <!-- width="80"-->
  189. <!-- fixed="left"-->
  190. <!-- label="操作">-->
  191. <!-- <template slot-scope="scope">-->
  192. <!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>-->
  193. <!-- </template>-->
  194. <!-- </el-table-column>-->
  195. <el-table-column
  196. v-for="(item,index) in columnList4" :key="index"
  197. :sortable="item.columnSortable"
  198. :prop="item.columnProp"
  199. :header-align="item.headerAlign"
  200. :show-overflow-tooltip="item.showOverflowTooltip"
  201. :align="item.align"
  202. :fixed="item.fixed==''?false:item.fixed"
  203. :min-width="item.columnWidth"
  204. :label="item.columnLabel">
  205. <template slot-scope="scope">
  206. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  207. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  208. style="width: 100px; height: 80px"/></span>
  209. </template>
  210. </el-table-column>
  211. </el-table>
  212. </el-tab-pane>
  213. </el-tabs>
  214. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  215. </div>
  216. </template>
  217. <script>
  218. import {
  219. searchNotifyHeader
  220. ,searchNotifyOrderList
  221. ,searchNotifyMaterialList
  222. ,searchSumNotifyMaterialList
  223. ,deleteNotifySOSPlus
  224. ,updateNotifyStatus
  225. ,deleteNotifyMaterial
  226. }from "@/api/orderIssure/soIssueNotify.js"
  227. import Chooselist from '@/views/modules/common/Chooselist'
  228. export default {
  229. components: {
  230. Chooselist
  231. },
  232. data() {
  233. return {
  234. height:200,
  235. modelFlag:false,
  236. activeName: 'detail',
  237. dataList: [],
  238. dataList2: [],
  239. dataList3: [],
  240. dataList4: [],
  241. addOrUpdateVisible:false,
  242. searchData: {
  243. page: 1,
  244. limit: 100,
  245. site:this.$store.state.user.site,
  246. userName: '',
  247. notifyNo: '',
  248. issueFlag: '',
  249. issueResult: '',
  250. startDate: this.dayjs().format("YYYY-MM-DD"),
  251. endDate: this.dayjs().format("YYYY-MM-DD"),
  252. sql: " and a.status='已下达' and (issueFlag='N' or issueResult='部分发料' ) ",
  253. },
  254. exportList:[],
  255. pageIndex: 1,
  256. pageSize: 100,
  257. totalPage: 0,
  258. dataListLoading: false,
  259. currentRow:'',
  260. headerData:'',
  261. columnList1:[
  262. {
  263. userId: this.$store.state.user.name,
  264. functionId: 701003,
  265. serialNumber: '701003Table1NotifyNo',
  266. tableId: "701003Table1",
  267. tableName: "领料申请主表",
  268. columnProp: "notifyNo",
  269. headerAlign: "center",
  270. align: "center",
  271. columnLabel: "申请单单号",
  272. columnHidden: false,
  273. columnImage: false,
  274. columnSortable: false,
  275. sortLv: 0,
  276. status: true,
  277. fixed: '',
  278. columnWidth: 100
  279. },{
  280. userId: this.$store.state.user.name,
  281. functionId: 701003,
  282. serialNumber: '701003Table1NotifyDate',
  283. tableId: "701003Table1",
  284. tableName: "领料申请主表",
  285. columnProp: "notifyDate",
  286. headerAlign: "center",
  287. align: "center",
  288. columnLabel: "申请日期",
  289. columnHidden: false,
  290. columnImage: false,
  291. columnSortable: false,
  292. sortLv: 0,
  293. status: true,
  294. fixed: '',
  295. columnWidth: 100
  296. },{
  297. userId: this.$store.state.user.name,
  298. functionId: 701003,
  299. serialNumber: '701003Table1UserName',
  300. tableId: "701003Table1",
  301. tableName: "领料申请主表",
  302. columnProp: "userName",
  303. headerAlign: "center",
  304. align: "left",
  305. columnLabel: "申请账号",
  306. columnHidden: false,
  307. columnImage: false,
  308. columnSortable: false,
  309. sortLv: 0,
  310. status: true,
  311. fixed: '',
  312. columnWidth: 100
  313. },{
  314. userId: this.$store.state.user.name,
  315. functionId: 701003,
  316. serialNumber: '701003Table1UserName',
  317. tableId: "701003Table1",
  318. tableName: "领料申请主表",
  319. columnProp: "userDisplay",
  320. headerAlign: "center",
  321. align: "left",
  322. columnLabel: "申请人姓名",
  323. columnHidden: false,
  324. columnImage: false,
  325. columnSortable: false,
  326. sortLv: 0,
  327. status: true,
  328. fixed: '',
  329. columnWidth: 100
  330. },{
  331. userId: this.$store.state.user.name,
  332. functionId: 701003,
  333. serialNumber: '701003Table1IssueFlag',
  334. tableId: "701003Table1",
  335. tableName: "领料申请主表",
  336. columnProp: "issueFlag",
  337. headerAlign: "center",
  338. align: "center",
  339. columnLabel: "是否领料",
  340. columnHidden: false,
  341. columnImage: false,
  342. columnSortable: false,
  343. sortLv: 0,
  344. status: true,
  345. fixed: '',
  346. columnWidth: 60
  347. },{
  348. userId: this.$store.state.user.name,
  349. functionId: 701003,
  350. serialNumber: '701003Table1IssueResult',
  351. tableId: "701003Table1",
  352. tableName: "领料申请主表",
  353. columnProp: "issueResult",
  354. headerAlign: "center",
  355. align: "left",
  356. columnLabel: "领料结果",
  357. columnHidden: false,
  358. columnImage: false,
  359. columnSortable: false,
  360. sortLv: 0,
  361. status: true,
  362. fixed: '',
  363. columnWidth: 120
  364. // },{
  365. // userId: this.$store.state.user.name,
  366. // functionId: 701003,
  367. // serialNumber: '701003Table1PlanIssueDate',
  368. // tableId: "701003Table1",
  369. // tableName: "领料申请主表",
  370. // columnProp: "planIssueDate",
  371. // headerAlign: "center",
  372. // align: "left",
  373. // columnLabel: "计划领料日期",
  374. // columnHidden: false,
  375. // columnImage: false,
  376. // columnSortable: false,
  377. // sortLv: 0,
  378. // status: true,
  379. // fixed: '',
  380. // columnWidth: 100
  381. // },{
  382. // userId: this.$store.state.user.name,
  383. // functionId: 701003,
  384. // serialNumber: '701003Table1RealIssueDate',
  385. // tableId: "701003Table1",
  386. // tableName: "领料申请主表",
  387. // columnProp: "realIssueDate",
  388. // headerAlign: "center",
  389. // align: "left",
  390. // columnLabel: "实际领料日期",
  391. // columnHidden: false,
  392. // columnImage: false,
  393. // columnSortable: false,
  394. // sortLv: 0,
  395. // status: true,
  396. // fixed: '',
  397. // columnWidth: 100
  398. },{
  399. userId: this.$store.state.user.name,
  400. functionId: 701003,
  401. serialNumber: '701003Table1Status',
  402. tableId: "701003Table1",
  403. tableName: "领料申请主表",
  404. columnProp: "status",
  405. headerAlign: "center",
  406. align: "left",
  407. columnLabel: "状态",
  408. columnHidden: false,
  409. columnImage: false,
  410. columnSortable: false,
  411. sortLv: 0,
  412. status: true,
  413. fixed: '',
  414. columnWidth: 80
  415. },{
  416. userId: this.$store.state.user.name,
  417. functionId: 701003,
  418. serialNumber: '701003Table1Remark',
  419. tableId: "701003Table1",
  420. tableName: "领料申请主表",
  421. columnProp: "remark",
  422. headerAlign: "center",
  423. align: "left",
  424. columnLabel: "备注",
  425. columnHidden: false,
  426. columnImage: false,
  427. columnSortable: false,
  428. sortLv: 0,
  429. status: true,
  430. fixed: '',
  431. columnWidth: 200
  432. },
  433. ],
  434. columnList2:[
  435. {
  436. userId: this.$store.state.user.name,
  437. functionId: 701003,
  438. serialNumber: '701003Table2ItemNo',
  439. tableId: "701003Table2",
  440. tableName: "申请单派工单明细表",
  441. columnProp: "itemNo",
  442. headerAlign: "center",
  443. align: "right",
  444. columnLabel: "序号",
  445. columnHidden: false,
  446. columnImage: false,
  447. columnSortable: false,
  448. sortLv: 0,
  449. status: true,
  450. fixed: '',
  451. columnWidth: 40
  452. },{
  453. userId: this.$store.state.user.name,
  454. functionId: 701003,
  455. serialNumber: '701003Table2SOOrderNo',
  456. tableId: "701003Table2",
  457. tableName: "申请单派工单明细表",
  458. columnProp: "sOOrderNo",
  459. headerAlign: "center",
  460. align: "left",
  461. columnLabel: "生产订单",
  462. columnHidden: false,
  463. columnImage: false,
  464. columnSortable: false,
  465. sortLv: 0,
  466. status: true,
  467. fixed: '',
  468. columnWidth: 120
  469. },{
  470. userId: this.$store.state.user.name,
  471. functionId: 701003,
  472. serialNumber: '701003Table2OpsItemNo',
  473. tableId: "701003Table2",
  474. tableName: "申请单派工单明细表",
  475. columnProp: "opsItemNo",
  476. headerAlign: "center",
  477. align: "right",
  478. columnLabel: "工序",
  479. columnHidden: false,
  480. columnImage: false,
  481. columnSortable: false,
  482. sortLv: 0,
  483. status: true,
  484. fixed: '',
  485. columnWidth: 50
  486. },{
  487. userId: this.$store.state.user.name,
  488. functionId: 701003,
  489. serialNumber: '701003Table2ItemDesc',
  490. tableId: "701003Table2",
  491. tableName: "申请单派工单明细表",
  492. columnProp: "itemDesc",
  493. headerAlign: "center",
  494. align: "left",
  495. columnLabel: "工序名称",
  496. columnHidden: false,
  497. columnImage: false,
  498. columnSortable: false,
  499. sortLv: 0,
  500. status: true,
  501. fixed: '',
  502. columnWidth: 120
  503. },{
  504. userId: this.$store.state.user.name,
  505. functionId: 701003,
  506. serialNumber: '701003Table2SeqNo',
  507. tableId: "701003Table2",
  508. tableName: "申请单派工单明细表",
  509. columnProp: "seqNo",
  510. headerAlign: "center",
  511. align: "left",
  512. columnLabel: "派工单号",
  513. columnHidden: false,
  514. columnImage: false,
  515. columnSortable: false,
  516. sortLv: 0,
  517. status: true,
  518. fixed: '',
  519. columnWidth: 150
  520. }, {
  521. userId: this.$store.state.user.name,
  522. functionId: 701003,
  523. serialNumber: '701003Table2FGPartNo',
  524. tableId: "701003Table2",
  525. tableName: "申请单派工单明细表",
  526. columnProp: "fGPartNo",
  527. headerAlign: "center",
  528. align: "left",
  529. columnLabel: "派工单物料",
  530. columnHidden: false,
  531. columnImage: false,
  532. columnSortable: false,
  533. sortLv: 0,
  534. status: true,
  535. fixed: '',
  536. columnWidth: 80
  537. }, {
  538. userId: this.$store.state.user.name,
  539. functionId: 701003,
  540. serialNumber: '701003Table2PartDesc',
  541. tableId: "701003Table2",
  542. tableName: "申请单派工单明细表",
  543. columnProp: "partDesc",
  544. headerAlign: "center",
  545. align: "left",
  546. columnLabel: "物料名称",
  547. columnHidden: false,
  548. columnImage: false,
  549. columnSortable: false,
  550. sortLv: 0,
  551. status: true,
  552. fixed: '',
  553. columnWidth: 200
  554. },
  555. {
  556. userId: this.$store.state.user.name,
  557. functionId: 701003,
  558. serialNumber: '701003Table2LocationNo',
  559. tableId: "701003Table2",
  560. tableName: "领料申请派工单子表",
  561. columnProp: 'locationNo',
  562. headerAlign: "center",
  563. align: "left",
  564. columnLabel: '库位编码',
  565. columnHidden: false,
  566. columnImage: false,
  567. columnSortable: false,
  568. sortLv: 0,
  569. status: true,
  570. fixed: '',
  571. columnWidth: 80,
  572. },
  573. {
  574. userId: this.$store.state.user.name,
  575. functionId: 701003,
  576. serialNumber: '701003Table2NeedDate',
  577. tableId: "701003Table2",
  578. tableName: "领料申请派工单子表",
  579. columnProp: 'needDate',
  580. headerAlign: "center",
  581. align: "left",
  582. columnLabel: '要求发料时间',
  583. columnHidden: false,
  584. columnImage: false,
  585. columnSortable: false,
  586. sortLv: 0,
  587. status: true,
  588. fixed: '',
  589. columnWidth: 80,
  590. },
  591. {
  592. userId: this.$store.state.user.name,
  593. functionId: 701003,
  594. serialNumber: '701003Table2IssureQty',
  595. tableId: "701003Table2",
  596. tableName: "申请单派工单明细表",
  597. columnProp: "issureQty",
  598. headerAlign: "center",
  599. align: "right",
  600. columnLabel: "发料数量",
  601. columnHidden: false,
  602. columnImage: false,
  603. columnSortable: false,
  604. sortLv: 0,
  605. status: true,
  606. fixed: '',
  607. columnWidth: 80
  608. },
  609. ],
  610. columnList3:[
  611. {
  612. userId: this.$store.state.user.name,
  613. functionId: 701003,
  614. serialNumber: '701003Table3ItemNo',
  615. tableId: "701003Table3",
  616. tableName: "申请单材料明细表",
  617. columnProp: "itemNo",
  618. headerAlign: "center",
  619. align: "right",
  620. columnLabel: "申请单序号",
  621. columnHidden: false,
  622. columnImage: false,
  623. columnSortable: false,
  624. sortLv: 0,
  625. status: true,
  626. fixed: '',
  627. columnWidth: 80
  628. },{
  629. userId: this.$store.state.user.name,
  630. functionId: 701003,
  631. serialNumber: '701003Table3IssueType',
  632. tableId: "701003Table3",
  633. tableName: "申请单材料明细表",
  634. columnProp: "issueType",
  635. headerAlign: "center",
  636. align: "right",
  637. columnLabel: "类型",
  638. columnHidden: false,
  639. columnImage: false,
  640. columnSortable: false,
  641. sortLv: 0,
  642. status: true,
  643. fixed: '',
  644. columnWidth: 80
  645. },{
  646. userId: this.$store.state.user.name,
  647. functionId: 701003,
  648. serialNumber: '701003Table3SOOrderNo',
  649. tableId: "701003Table3",
  650. tableName: "申请单材料明细表",
  651. columnProp: "orderNo",
  652. headerAlign: "center",
  653. align: "left",
  654. columnLabel: "生产订单",
  655. columnHidden: false,
  656. columnImage: false,
  657. columnSortable: false,
  658. sortLv: 0,
  659. status: true,
  660. fixed: '',
  661. columnWidth: 120
  662. },{
  663. userId: this.$store.state.user.name,
  664. functionId: 701003,
  665. serialNumber: '701003Table3OpsItemNo',
  666. tableId: "701003Table3",
  667. tableName: "申请单材料明细表",
  668. columnProp: "opsItemNo",
  669. headerAlign: "center",
  670. align: "right",
  671. columnLabel: "工序",
  672. columnHidden: false,
  673. columnImage: false,
  674. columnSortable: false,
  675. sortLv: 0,
  676. status: true,
  677. fixed: '',
  678. columnWidth: 50
  679. },{
  680. userId: this.$store.state.user.name,
  681. functionId: 701003,
  682. serialNumber: '701003Table3SeqNo',
  683. tableId: "701003Table3",
  684. tableName: "申请单材料明细表",
  685. columnProp: "seqNo",
  686. headerAlign: "center",
  687. align: "left",
  688. columnLabel: "派工单号",
  689. columnHidden: false,
  690. columnImage: false,
  691. columnSortable: false,
  692. sortLv: 0,
  693. status: true,
  694. fixed: '',
  695. columnWidth: 150
  696. },{
  697. userId: this.$store.state.user.name,
  698. functionId: 701003,
  699. serialNumber: '701003Table3LocationNo',
  700. tableId: "701003Table3",
  701. tableName: "申请单材料明细表",
  702. columnProp: "locationNo",
  703. headerAlign: "center",
  704. align: "left",
  705. columnLabel: "机台",
  706. columnHidden: false,
  707. columnImage: false,
  708. columnSortable: false,
  709. sortLv: 0,
  710. status: true,
  711. fixed: '',
  712. columnWidth: 80
  713. },{
  714. userId: this.$store.state.user.name,
  715. functionId: 701003,
  716. serialNumber: '701003Table3BOMItemNo',
  717. tableId: "701003Table3",
  718. tableName: "申请单材料明细表",
  719. columnProp: "bOMItemNo",
  720. headerAlign: "center",
  721. align: "right",
  722. columnLabel: "BOM序号",
  723. columnHidden: false,
  724. columnImage: false,
  725. columnSortable: false,
  726. sortLv: 0,
  727. status: true,
  728. fixed: '',
  729. columnWidth: 80
  730. },{
  731. userId: this.$store.state.user.name,
  732. functionId: 701003,
  733. serialNumber: '701003Table3ComponentPartNo',
  734. tableId: "701003Table3",
  735. tableName: "申请单材料明细表",
  736. columnProp: "componentPartNo",
  737. headerAlign: "center",
  738. align: "center",
  739. columnLabel: "材料编码",
  740. columnHidden: false,
  741. columnImage: false,
  742. columnSortable: false,
  743. sortLv: 0,
  744. status: true,
  745. fixed: '',
  746. columnWidth: 100
  747. },{
  748. userId: this.$store.state.user.name,
  749. functionId: 701003,
  750. serialNumber: '701003Table3PartDesc',
  751. tableId: "701003Table3",
  752. tableName: "申请单材料明细表",
  753. columnProp: "partDesc",
  754. headerAlign: "center",
  755. align: "left",
  756. columnLabel: "材料名称",
  757. columnHidden: false,
  758. columnImage: false,
  759. columnSortable: false,
  760. sortLv: 0,
  761. status: true,
  762. fixed: '',
  763. columnWidth: 130
  764. },{
  765. userId: this.$store.state.user.name,
  766. functionId: 701003,
  767. serialNumber: '701003Table3QtyToIssue',
  768. tableId: "701003Table3",
  769. tableName: "申请单材料明细表",
  770. columnProp: "qtyToIssue",
  771. headerAlign: "center",
  772. align: "right",
  773. columnLabel: "申请数量",
  774. columnHidden: false,
  775. columnImage: false,
  776. columnSortable: false,
  777. sortLv: 0,
  778. status: true,
  779. fixed: '',
  780. columnWidth: 80
  781. },{
  782. userId: this.$store.state.user.name,
  783. functionId: 701003,
  784. serialNumber: '701003Table3QtyToIssueOriginal',
  785. tableId: "701003Table3",
  786. tableName: "申请单材料明细表",
  787. columnProp: "qtyToIssueOriginal",
  788. headerAlign: "center",
  789. align: "right",
  790. columnLabel: "已发数量",
  791. columnHidden: false,
  792. columnImage: false,
  793. columnSortable: false,
  794. sortLv: 0,
  795. status: true,
  796. fixed: '',
  797. columnWidth: 80
  798. },
  799. ],
  800. columnList4:[
  801. {
  802. userId: this.$store.state.user.name,
  803. functionId: 701003,
  804. serialNumber: '701003Table3IssueType',
  805. tableId: "701003Table4",
  806. tableName: "申请单材料明细表",
  807. columnProp: "issueType",
  808. headerAlign: "center",
  809. align: "center",
  810. columnLabel: "类型",
  811. columnHidden: false,
  812. columnImage: false,
  813. columnSortable: false,
  814. sortLv: 0,
  815. status: true,
  816. fixed: '',
  817. columnWidth: 100
  818. },
  819. {
  820. userId: this.$store.state.user.name,
  821. functionId: 701003,
  822. serialNumber: '701003Table3ComponentPartNo',
  823. tableId: "701003Table4",
  824. tableName: "申请单材料明细表",
  825. columnProp: "componentPartNo",
  826. headerAlign: "center",
  827. align: "center",
  828. columnLabel: "材料编码",
  829. columnHidden: false,
  830. columnImage: false,
  831. columnSortable: false,
  832. sortLv: 0,
  833. status: true,
  834. fixed: '',
  835. columnWidth: 100
  836. },{
  837. userId: this.$store.state.user.name,
  838. functionId: 701003,
  839. serialNumber: '701003Table3PartDesc',
  840. tableId: "701003Table4",
  841. tableName: "申请单材料明细表",
  842. columnProp: "partDesc",
  843. headerAlign: "center",
  844. align: "left",
  845. columnLabel: "材料名称",
  846. columnHidden: false,
  847. columnImage: false,
  848. columnSortable: false,
  849. sortLv: 0,
  850. status: true,
  851. fixed: '',
  852. columnWidth: 130
  853. },{
  854. userId: this.$store.state.user.name,
  855. functionId: 701003,
  856. serialNumber: '701003Table3QtyToIssue',
  857. tableId: "701003Table4",
  858. tableName: "申请单材料明细表",
  859. columnProp: "qtyToIssue",
  860. headerAlign: "center",
  861. align: "right",
  862. columnLabel: "合计申请数量",
  863. columnHidden: false,
  864. columnImage: false,
  865. columnSortable: false,
  866. sortLv: 0,
  867. status: true,
  868. fixed: '',
  869. columnWidth: 80
  870. },{
  871. userId: this.$store.state.user.name,
  872. functionId: 701003,
  873. serialNumber: '701003Table3QtyToIssueOriginal',
  874. tableId: "701003Table4",
  875. tableName: "申请单材料明细表",
  876. columnProp: "qtyToIssueOriginal",
  877. headerAlign: "center",
  878. align: "right",
  879. columnLabel: "合计已发数量",
  880. columnHidden: false,
  881. columnImage: false,
  882. columnSortable: false,
  883. sortLv: 0,
  884. status: true,
  885. fixed: '',
  886. columnWidth: 80
  887. },
  888. ],
  889. dataRole: {
  890. partTypeDesc: [
  891. {
  892. required: true,
  893. message: ' ',
  894. trigger: 'change'
  895. }
  896. ],
  897. partName: [
  898. {
  899. required: true,
  900. message: ' ',
  901. trigger: 'change'
  902. }
  903. ],
  904. },
  905. // 导出 start
  906. exportData: [],
  907. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  908. exportHeader: ["发料申请单"],
  909. exportFooter: [],
  910. // 导出 end
  911. }
  912. },
  913. mounted () {
  914. this.$nextTick(() => {
  915. this.height = (window.innerHeight- 260) / 2
  916. this.searchTable()
  917. })
  918. },
  919. // watch: {
  920. // searchData: {
  921. // deep: true,
  922. // handler: function (newV, oldV) {
  923. // this.searchData.partNo = this.searchData.partNo.toUpperCase()
  924. // }
  925. // },
  926. // },
  927. methods: {
  928. // 获取基础数据列表S
  929. getBaseList (val, type) {
  930. this.tagNo = val
  931. this.tagNo1 = type
  932. this.$nextTick(() => {
  933. let strVal = ''
  934. if (val === 1013) {
  935. if(type==23) {
  936. strVal = this.modelData.supplierId
  937. }
  938. }
  939. this.$refs.baseList.init(val, strVal)
  940. })
  941. },
  942. /* 列表方法的回调 */
  943. getBaseData (val) {
  944. if (this.tagNo === 23) {
  945. if(this.tagNo1==1) {
  946. this.modelData.supplierId = val.SupplierID
  947. this.modelData.supplierName = val.SupplierName
  948. }
  949. }
  950. },
  951. // 每页数
  952. sizeChangeHandle (val) {
  953. this.pageSize = val
  954. this.pageIndex = 1
  955. this.searchTable()
  956. },
  957. // 当前页
  958. currentChangeHandle (val) {
  959. this.pageIndex = val
  960. this.searchTable()
  961. },
  962. tabClick (tab, event) {
  963. // 刷新列表数据
  964. this.refreshCurrentTabTable()
  965. },
  966. changeData(row){
  967. this.currentRow = JSON.parse(JSON.stringify(row));
  968. this.headerData=row;
  969. this.refreshCurrentTabTable ();
  970. },
  971. refreshCurrentTabTable(){
  972. if(this.currentRow===''||this.currentRow===null){
  973. this.currentRow={site:'',notifyNo:''}
  974. }
  975. if(this.activeName==='detail'){
  976. searchNotifyOrderList(this.currentRow).then(({data}) => {
  977. //区分请求成功和失败的状况
  978. if (data && data.code == 0) {
  979. this.dataList2 = data.rows
  980. } else {
  981. this.dataList2 = [];
  982. }
  983. });
  984. }else if(this.activeName==='sub'){
  985. searchNotifyMaterialList(this.currentRow).then(({data}) => {
  986. //区分请求成功和失败的状况
  987. if (data && data.code == 0) {
  988. this.dataList3 = data.rows
  989. } else {
  990. this.dataList3 = [];
  991. }
  992. });
  993. }else {
  994. searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
  995. //区分请求成功和失败的状况
  996. if (data && data.code == 0) {
  997. this.dataList4 = data.rows
  998. } else {
  999. this.dataList4 = [];
  1000. }
  1001. });
  1002. }
  1003. },
  1004. searchTable(){
  1005. this.searchData.limit = this.pageSize
  1006. this.searchData.page = this.pageIndex
  1007. searchNotifyHeader(this.searchData).then(({data}) => {
  1008. //区分请求成功和失败的状况
  1009. if (data && data.code == 0) {
  1010. this.dataList = data.page.list
  1011. this.pageIndex = data.page.currPage
  1012. this.pageSize = data.page.pageSize
  1013. this.totalPage = data.page.totalCount
  1014. if(this.dataList.length>0){
  1015. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  1016. this.changeData(this.dataList[0])
  1017. }else {
  1018. this.changeData(null)
  1019. }
  1020. } else {
  1021. this.dataList = [];
  1022. }
  1023. });
  1024. },
  1025. closeNotify(row){
  1026. this.$confirm('确认关闭?', '提示', {
  1027. confirmButtonText: '确定',
  1028. cancelButtonText: '取消',
  1029. type: 'warning'
  1030. }).then(() => {
  1031. let inData={
  1032. site:row.site,
  1033. notifyNo:row.notifyNo,
  1034. status:'已关闭',
  1035. }
  1036. updateNotifyStatus(inData).then(({data}) => {
  1037. if (data && data.code === 0) {
  1038. this.searchTable()
  1039. this.$message({
  1040. message: '操作成功',
  1041. type: 'success',
  1042. duration: 1500,
  1043. onClose: () => {}
  1044. })
  1045. } else {
  1046. this.$alert(data.msg, '错误', {
  1047. confirmButtonText: '确定'
  1048. })
  1049. }
  1050. })
  1051. })
  1052. },
  1053. openNotify(row){
  1054. this.$confirm('确认打开?', '提示', {
  1055. confirmButtonText: '确定',
  1056. cancelButtonText: '取消',
  1057. type: 'warning'
  1058. }).then(() => {
  1059. let inData={
  1060. site:row.site,
  1061. notifyNo:row.notifyNo,
  1062. status:'已下达',
  1063. }
  1064. updateNotifyStatus(inData).then(({data}) => {
  1065. if (data && data.code === 0) {
  1066. this.searchTable()
  1067. this.$message({
  1068. message: '操作成功',
  1069. type: 'success',
  1070. duration: 1500,
  1071. onClose: () => {}
  1072. })
  1073. } else {
  1074. this.$alert(data.msg, '错误', {
  1075. confirmButtonText: '确定'
  1076. })
  1077. }
  1078. })
  1079. })
  1080. },
  1081. deleteNotifyMaterial(row){
  1082. this.$confirm('确认删除?', '提示', {
  1083. confirmButtonText: '确定',
  1084. cancelButtonText: '取消',
  1085. type: 'warning'
  1086. }).then(() => {
  1087. deleteNotifyMaterial(row).then(({data}) => {
  1088. if (data && data.code === 0) {
  1089. this.refreshCurrentTabTable()
  1090. this.$message({
  1091. message: '操作成功',
  1092. type: 'success',
  1093. duration: 1500,
  1094. onClose: () => {}
  1095. })
  1096. } else {
  1097. this.$alert(data.msg, '错误', {
  1098. confirmButtonText: '确定'
  1099. })
  1100. }
  1101. })
  1102. })
  1103. },
  1104. deleteNotifySOSPlus(row){
  1105. this.$confirm('确认删除?', '提示', {
  1106. confirmButtonText: '确定',
  1107. cancelButtonText: '取消',
  1108. type: 'warning'
  1109. }).then(() => {
  1110. deleteNotifySOSPlus(row).then(({data}) => {
  1111. if (data && data.code === 0) {
  1112. this.refreshCurrentTabTable()
  1113. this.$message({
  1114. message: '操作成功',
  1115. type: 'success',
  1116. duration: 1500,
  1117. onClose: () => {}
  1118. })
  1119. } else {
  1120. this.$alert(data.msg, '错误', {
  1121. confirmButtonText: '确定'
  1122. })
  1123. }
  1124. })
  1125. })
  1126. },
  1127. //导出excel
  1128. //导出excel
  1129. async createExportData() {
  1130. this.searchData.limit = -1
  1131. this.searchData.page = 1
  1132. await searchNotifyHeader(this.searchData).then(({data}) => {
  1133. this.exportList= data.page.list;
  1134. })
  1135. return this.exportList;
  1136. },
  1137. startDownload() {
  1138. // this.exportData = this.dataList
  1139. },
  1140. finishDownload() {
  1141. },
  1142. fields() {
  1143. let json = "{"
  1144. this.columnList1.forEach((item, index) => {
  1145. if (index == this.columnList1.length - 1) {
  1146. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1147. } else {
  1148. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1149. }
  1150. })
  1151. json += "}"
  1152. let s = eval("(" + json + ")")
  1153. return s
  1154. },
  1155. },
  1156. }
  1157. </script>
  1158. <style scoped>
  1159. </style>