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.

1179 lines
37 KiB

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