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.

1230 lines
39 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
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
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==='ISSUE'" @click="closeNotifyModel(scope.row)">关闭</a>
  107. <a type="text" size="small" v-if="scope.row.status==='CLOSED'" @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==='ISSUE'" @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==='ISSUE'" @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. searchNotifyHeaderNew
  254. , searchNotifyOrderListNew
  255. , searchNotifyMaterialListNew
  256. , searchSumNotifyMaterialListNew
  257. , deleteNotifySOSPlus
  258. , updateNotifyStatusNew
  259. , deleteNotifyMaterial
  260. , searchNotifyLogNew
  261. , searchNotifyLogCloseNew
  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: '701002Table1EnteredDate',
  375. tableId: "701002Table1",
  376. tableName: "领料申请主表",
  377. columnProp: "enteredDate",
  378. headerAlign: "center",
  379. align: "center",
  380. columnLabel: "录入时间",
  381. columnHidden: false,
  382. columnImage: false,
  383. columnSortable: false,
  384. sortLv: 0,
  385. status: true,
  386. fixed: '',
  387. columnWidth: 120
  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: '701002Table1ConfirmStatus',
  443. tableId: "701002Table1",
  444. tableName: "领料申请主表",
  445. columnProp: "confirmStatus",
  446. headerAlign: "center",
  447. align: "center",
  448. columnLabel: "确认状态",
  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: '701002Table1WcsPushFlag',
  460. tableId: "701002Table1",
  461. tableName: "领料申请主表",
  462. columnProp: "pushWcsFlag",
  463. headerAlign: "center",
  464. align: "left",
  465. columnLabel: "推送WCS",
  466. columnHidden: false,
  467. columnImage: false,
  468. columnSortable: false,
  469. sortLv: 0,
  470. status: true,
  471. fixed: '',
  472. columnWidth: 80
  473. },{
  474. userId: this.$store.state.user.name,
  475. functionId: 701002,
  476. serialNumber: '701002Table1Remark',
  477. tableId: "701002Table1",
  478. tableName: "领料申请主表",
  479. columnProp: "remark",
  480. headerAlign: "center",
  481. align: "left",
  482. columnLabel: "备注",
  483. columnHidden: false,
  484. columnImage: false,
  485. columnSortable: false,
  486. sortLv: 0,
  487. status: true,
  488. fixed: '',
  489. columnWidth: 200
  490. },
  491. ],
  492. columnList2:[
  493. {
  494. userId: this.$store.state.user.name,
  495. functionId: 701002,
  496. serialNumber: '701002Table2ItemNo',
  497. tableId: "701002Table2",
  498. tableName: "申请单派工单明细表",
  499. columnProp: "itemNo",
  500. headerAlign: "center",
  501. align: "right",
  502. columnLabel: "序号",
  503. columnHidden: false,
  504. columnImage: false,
  505. columnSortable: false,
  506. sortLv: 0,
  507. status: true,
  508. fixed: '',
  509. columnWidth: 40
  510. },
  511. {
  512. userId: this.$store.state.user.name,
  513. functionId: 701002,
  514. serialNumber: '701002Table2NeedDate',
  515. tableId: "701002Table2",
  516. tableName: "领料申请派工单子表",
  517. columnProp: 'needDate',
  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: 80,
  528. }, {
  529. userId: this.$store.state.user.name,
  530. functionId: 701002,
  531. serialNumber: '701002Table2SOOrderNo',
  532. tableId: "701002Table2",
  533. tableName: "申请单派工单明细表",
  534. columnProp: "soorderNo",
  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: 120
  545. }, {
  546. userId: this.$store.state.user.name,
  547. functionId: 701002,
  548. serialNumber: '701002Table2FGPartNo',
  549. tableId: "701002Table2",
  550. tableName: "申请单派工单明细表",
  551. columnProp: "fgPartNo",
  552. headerAlign: "center",
  553. align: "left",
  554. columnLabel: "工单物料",
  555. columnHidden: false,
  556. columnImage: false,
  557. columnSortable: false,
  558. sortLv: 0,
  559. status: true,
  560. fixed: '',
  561. columnWidth: 80
  562. }, {
  563. userId: this.$store.state.user.name,
  564. functionId: 701002,
  565. serialNumber: '701002Table2ReleaseNo',
  566. tableId: "701002Table2",
  567. tableName: "申请单派工单明细表",
  568. columnProp: "releaseNo",
  569. headerAlign: "center",
  570. align: "left",
  571. columnLabel: "发布号",
  572. columnHidden: false,
  573. columnImage: false,
  574. columnSortable: false,
  575. sortLv: 0,
  576. status: true,
  577. fixed: '',
  578. columnWidth: 80
  579. }, {
  580. userId: this.$store.state.user.name,
  581. functionId: 701002,
  582. serialNumber: '701002Table2SequenceNo',
  583. tableId: "701002Table2",
  584. tableName: "申请单派工单明细表",
  585. columnProp: "sequenceNo",
  586. headerAlign: "center",
  587. align: "left",
  588. columnLabel: "序号",
  589. columnHidden: false,
  590. columnImage: false,
  591. columnSortable: false,
  592. sortLv: 0,
  593. status: true,
  594. fixed: '',
  595. columnWidth: 80
  596. }
  597. ],
  598. columnList3:[
  599. {
  600. userId: this.$store.state.user.name,
  601. functionId: 701002,
  602. serialNumber: '701002Table3ItemNo',
  603. tableId: "701002Table3",
  604. tableName: "申请单材料明细表",
  605. columnProp: "itemNo",
  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: '701002Table3ComponentPartNo',
  620. tableId: "701002Table3",
  621. tableName: "申请单材料明细表",
  622. columnProp: "componentPartNo",
  623. headerAlign: "center",
  624. align: "center",
  625. columnLabel: "材料编码",
  626. columnHidden: false,
  627. columnImage: false,
  628. columnSortable: false,
  629. sortLv: 0,
  630. status: true,
  631. fixed: '',
  632. columnWidth: 100
  633. },{
  634. userId: this.$store.state.user.name,
  635. functionId: 701002,
  636. serialNumber: '701002Table3NeedDate',
  637. tableId: "701002Table3",
  638. tableName: "申请单材料明细表",
  639. columnProp: "needDate",
  640. headerAlign: "center",
  641. align: "center",
  642. columnLabel: "需求时间",
  643. columnHidden: false,
  644. columnImage: false,
  645. columnSortable: false,
  646. sortLv: 0,
  647. status: true,
  648. fixed: '',
  649. columnWidth: 110
  650. },{
  651. userId: this.$store.state.user.name,
  652. functionId: 701002,
  653. serialNumber: '701002Table3QtyToIssue',
  654. tableId: "701002Table3",
  655. tableName: "申请单材料明细表",
  656. columnProp: "qtyToIssue",
  657. headerAlign: "center",
  658. align: "right",
  659. columnLabel: "申请数量",
  660. columnHidden: false,
  661. columnImage: false,
  662. columnSortable: false,
  663. sortLv: 0,
  664. status: true,
  665. fixed: '',
  666. columnWidth: 80
  667. },{
  668. userId: this.$store.state.user.name,
  669. functionId: 701002,
  670. serialNumber: '701002Table3QtyToIssueOriginal',
  671. tableId: "701002Table3",
  672. tableName: "申请单材料明细表",
  673. columnProp: "qtyToIssueOriginal",
  674. headerAlign: "center",
  675. align: "right",
  676. columnLabel: "已发数量",
  677. columnHidden: false,
  678. columnImage: false,
  679. columnSortable: false,
  680. sortLv: 0,
  681. status: true,
  682. fixed: '',
  683. columnWidth: 80
  684. },{
  685. userId: this.$store.state.user.name,
  686. functionId: 701002,
  687. serialNumber: '701002Table3IssueType',
  688. tableId: "701002Table3",
  689. tableName: "申请单材料明细表",
  690. columnProp: "issueType",
  691. headerAlign: "center",
  692. align: "right",
  693. columnLabel: "类型",
  694. columnHidden: false,
  695. columnImage: false,
  696. columnSortable: false,
  697. sortLv: 0,
  698. status: true,
  699. fixed: '',
  700. columnWidth: 80
  701. },{
  702. userId: this.$store.state.user.name,
  703. functionId: 701002,
  704. serialNumber: '701002Table3Remark',
  705. tableId: "701002Table3",
  706. tableName: "申请单材料明细表",
  707. columnProp: "remark",
  708. headerAlign: "center",
  709. align: "left",
  710. columnLabel: "备注",
  711. columnHidden: false,
  712. columnImage: false,
  713. columnSortable: false,
  714. sortLv: 0,
  715. status: true,
  716. fixed: '',
  717. columnWidth: 160
  718. },{
  719. userId: this.$store.state.user.name,
  720. functionId: 701002,
  721. serialNumber: '701002Table3SOOrderNo',
  722. tableId: "701002Table3",
  723. tableName: "申请单材料明细表",
  724. columnProp: "soorderNo",
  725. headerAlign: "center",
  726. align: "left",
  727. columnLabel: "生产订单",
  728. columnHidden: false,
  729. columnImage: false,
  730. columnSortable: false,
  731. sortLv: 0,
  732. status: true,
  733. fixed: '',
  734. columnWidth: 120
  735. },{
  736. userId: this.$store.state.user.name,
  737. functionId: 701002,
  738. serialNumber: '701002Table3BOMItemNo',
  739. tableId: "701002Table3",
  740. tableName: "申请单材料明细表",
  741. columnProp: "bomitemNo",
  742. headerAlign: "center",
  743. align: "right",
  744. columnLabel: "BOM序号",
  745. columnHidden: false,
  746. columnImage: false,
  747. columnSortable: false,
  748. sortLv: 0,
  749. status: true,
  750. fixed: '',
  751. columnWidth: 80
  752. },
  753. ],
  754. columnList4:[
  755. {
  756. userId: this.$store.state.user.name,
  757. functionId: 701002,
  758. serialNumber: '701002Table4IssueType',
  759. tableId: "701002Table4",
  760. tableName: "申请单材料明细表",
  761. columnProp: "issueType",
  762. headerAlign: "center",
  763. align: "center",
  764. columnLabel: "类型",
  765. columnHidden: false,
  766. columnImage: false,
  767. columnSortable: false,
  768. sortLv: 0,
  769. status: true,
  770. fixed: '',
  771. columnWidth: 100
  772. },
  773. {
  774. userId: this.$store.state.user.name,
  775. functionId: 701002,
  776. serialNumber: '701002Table4ComponentPartNo',
  777. tableId: "701002Table4",
  778. tableName: "申请单材料明细表",
  779. columnProp: "componentPartNo",
  780. headerAlign: "center",
  781. align: "center",
  782. columnLabel: "材料编码",
  783. columnHidden: false,
  784. columnImage: false,
  785. columnSortable: false,
  786. sortLv: 0,
  787. status: true,
  788. fixed: '',
  789. columnWidth: 100
  790. },{
  791. userId: this.$store.state.user.name,
  792. functionId: 701002,
  793. serialNumber: '701002Table4PartDesc',
  794. tableId: "701002Table4",
  795. tableName: "申请单材料明细表",
  796. columnProp: "partDesc",
  797. headerAlign: "center",
  798. align: "left",
  799. columnLabel: "材料名称",
  800. columnHidden: false,
  801. columnImage: false,
  802. columnSortable: false,
  803. sortLv: 0,
  804. status: true,
  805. fixed: '',
  806. columnWidth: 130
  807. },{
  808. userId: this.$store.state.user.name,
  809. functionId: 701002,
  810. serialNumber: '701002Table4QtyToIssue',
  811. tableId: "701002Table4",
  812. tableName: "申请单材料明细表",
  813. columnProp: "qtyToIssue",
  814. headerAlign: "center",
  815. align: "right",
  816. columnLabel: "合计申请数量",
  817. columnHidden: false,
  818. columnImage: false,
  819. columnSortable: false,
  820. sortLv: 0,
  821. status: true,
  822. fixed: '',
  823. columnWidth: 80
  824. },{
  825. userId: this.$store.state.user.name,
  826. functionId: 701002,
  827. serialNumber: '701002Table4QtyToIssueOriginal',
  828. tableId: "701002Table4",
  829. tableName: "申请单材料明细表",
  830. columnProp: "qtyToIssueOriginal",
  831. headerAlign: "center",
  832. align: "right",
  833. columnLabel: "合计已发数量",
  834. columnHidden: false,
  835. columnImage: false,
  836. columnSortable: false,
  837. sortLv: 0,
  838. status: true,
  839. fixed: '',
  840. columnWidth: 80
  841. },
  842. ],
  843. // 导出 start
  844. exportData: [],
  845. exportName: '发料申请单'+this.dayjs().format('YYYYMMDDHHmmss'),
  846. exportHeader: ["发料申请单"],
  847. exportFooter: [],
  848. // 导出 end
  849. orderDetailData:{
  850. orderNo:'',
  851. seqNo:'',
  852. locationNo:'',
  853. qtyrequired:'',
  854. issureQty:0,
  855. partDesc:'',
  856. partNo:'',
  857. resourceId:'',
  858. resourceDesc:'',
  859. needDate:'',
  860. itemDesc:'',
  861. workCenterNo:'',
  862. itemNo:0,
  863. materialType:'BOM物料',
  864. },
  865. chooseSOSModalFlag: false,
  866. chooseSOSData: {
  867. orderno: '',
  868. seqno: '',
  869. sResourceid: '',
  870. startDate: '',
  871. endDate: '',
  872. },
  873. chooseOrderModalFlag: false,
  874. chooseOrderData: {
  875. page: 1,
  876. limit: 100,
  877. orderNo: '',
  878. status: '',
  879. date3: '',
  880. date4: '',
  881. statusList: '',
  882. },
  883. chooseOrderList: [],
  884. chooseOperationModalFlag: false,
  885. chooseOperationData: {
  886. orderNo: '',
  887. site: '',
  888. itemDesc: ''
  889. },
  890. chooseOperationList: [],
  891. chooseResourceModalFlag: false,
  892. chooseResourceData: {
  893. site: '',
  894. workCenterNo: '',
  895. resourceID: '',
  896. resourceDesc: '',
  897. },
  898. chooseResourceList: [],
  899. chooseSOSList: [],
  900. choosePartModalFlag: false,
  901. choosePartData: {
  902. site: '',
  903. sourceBu: '',
  904. partNo: '',
  905. partDesc: '',
  906. spec: '',
  907. },
  908. choosePartList: [],
  909. }
  910. },
  911. mounted () {
  912. this.$nextTick(() => {
  913. this.height = (window.innerHeight- 315) / 2
  914. })
  915. },
  916. created () {
  917. },
  918. methods: {
  919. // 每页数
  920. sizeChangeHandle (val) {
  921. this.pageSize = val
  922. this.searchTable()
  923. },
  924. // 当前页
  925. currentChangeHandle (val) {
  926. this.pageIndex = val
  927. this.searchTable()
  928. },
  929. tabClick (tab, event) {
  930. // 刷新列表数据
  931. this.refreshCurrentTabTable()
  932. },
  933. changeData(row){
  934. this.currentRow = JSON.parse(JSON.stringify(row));
  935. this.refreshCurrentTabTable ();
  936. },
  937. refreshCurrentTabTable(){
  938. if(this.currentRow===''||this.currentRow===null){
  939. this.currentRow={site:'',notifyNo:''}
  940. }
  941. if(this.activeName==='detail'){
  942. searchNotifyOrderListNew(this.currentRow).then(({data}) => {
  943. //区分请求成功和失败的状况
  944. if (data && data.code == 0) {
  945. this.dataList2 = data.rows
  946. } else {
  947. this.dataList2 = [];
  948. }
  949. });
  950. }else if(this.activeName==='sub'){
  951. searchNotifyMaterialListNew(this.currentRow).then(({data}) => {
  952. //区分请求成功和失败的状况
  953. if (data && data.code == 0) {
  954. this.dataList3 = data.rows
  955. } else {
  956. this.dataList3 = [];
  957. }
  958. });
  959. }else if(this.activeName==='change'){
  960. searchNotifyLogNew(this.currentRow).then(({data}) => {
  961. //区分请求成功和失败的状况
  962. if (data && data.code == 0) {
  963. this.dataList5 = data.rows
  964. } else {
  965. this.dataList5 = [];
  966. }
  967. });
  968. }else if(this.activeName==='close'){
  969. searchNotifyLogCloseNew(this.currentRow).then(({data}) => {
  970. //区分请求成功和失败的状况
  971. if (data && data.code == 0) {
  972. this.dataList6 = data.rows
  973. } else {
  974. this.dataList6 = [];
  975. }
  976. });
  977. }else {
  978. searchSumNotifyMaterialListNew(this.currentRow).then(({data}) => {
  979. //区分请求成功和失败的状况
  980. if (data && data.code == 0) {
  981. this.dataList4 = data.rows
  982. } else {
  983. this.dataList4 = [];
  984. }
  985. });
  986. }
  987. },
  988. searchTable(){
  989. this.searchData.limit = this.pageSize
  990. this.searchData.page = this.pageIndex
  991. searchNotifyHeaderNew(this.searchData).then(({data}) => {
  992. //区分请求成功和失败的状况
  993. if (data && data.code == 0) {
  994. this.dataList = data.page.list
  995. this.pageIndex = data.page.currPage
  996. this.pageSize = data.page.pageSize
  997. this.totalPage = data.page.totalCount
  998. } else {
  999. this.dataList = [];
  1000. }
  1001. });
  1002. },
  1003. closeNotifyModel(row){
  1004. this.closeData.site=row.site
  1005. this.closeData.notifyNo=row.notifyNo
  1006. this.closeData.closeRemark=''
  1007. this.closeModalFlag=true
  1008. },
  1009. closeNotify(){
  1010. if(this.closeData.closeRemark==null||this.closeData.closeRemark===''){
  1011. this.$alert("必须输入关闭原因", '错误', {
  1012. confirmButtonText: '确定'
  1013. })
  1014. return false;
  1015. }
  1016. let inData={
  1017. site:this.closeData.site,
  1018. notifyNo:this.closeData.notifyNo,
  1019. closeRemark:this.closeData.closeRemark,
  1020. username:this.$store.state.user.name,
  1021. status:'已关闭',
  1022. }
  1023. updateNotifyStatusNew(inData).then(({data}) => {
  1024. if (data && data.code === 0) {
  1025. this.closeModalFlag=false
  1026. this.searchTable()
  1027. this.$message({
  1028. message: '操作成功',
  1029. type: 'success',
  1030. duration: 1500,
  1031. onClose: () => {}
  1032. })
  1033. } else {
  1034. this.$alert(data.msg, '错误', {
  1035. confirmButtonText: '确定'
  1036. })
  1037. }
  1038. })
  1039. },
  1040. openNotify(row){
  1041. this.$confirm('确认打开?', '提示', {
  1042. confirmButtonText: '确定',
  1043. cancelButtonText: '取消',
  1044. type: 'warning'
  1045. }).then(() => {
  1046. let inData={
  1047. site:row.site,
  1048. notifyNo:row.notifyNo,
  1049. status:'ISSUE',
  1050. }
  1051. updateNotifyStatusNew(inData).then(({data}) => {
  1052. if (data && data.code === 0) {
  1053. this.searchTable()
  1054. this.$message({
  1055. message: '操作成功',
  1056. type: 'success',
  1057. duration: 1500,
  1058. onClose: () => {}
  1059. })
  1060. } else {
  1061. this.$alert(data.msg, '错误', {
  1062. confirmButtonText: '确定'
  1063. })
  1064. }
  1065. })
  1066. })
  1067. },
  1068. deleteNotifyMaterial(row){
  1069. this.$confirm('确认删除?', '提示', {
  1070. confirmButtonText: '确定',
  1071. cancelButtonText: '取消',
  1072. type: 'warning'
  1073. }).then(() => {
  1074. deleteNotifyMaterial(row).then(({data}) => {
  1075. if (data && data.code === 0) {
  1076. this.refreshCurrentTabTable()
  1077. this.$message({
  1078. message: '操作成功',
  1079. type: 'success',
  1080. duration: 1500,
  1081. onClose: () => {}
  1082. })
  1083. } else {
  1084. this.$alert(data.msg, '错误', {
  1085. confirmButtonText: '确定'
  1086. })
  1087. }
  1088. })
  1089. })
  1090. },
  1091. deleteNotifySOSPlus(row){
  1092. this.$confirm('确认删除?', '提示', {
  1093. confirmButtonText: '确定',
  1094. cancelButtonText: '取消',
  1095. type: 'warning'
  1096. }).then(() => {
  1097. deleteNotifySOSPlus(row).then(({data}) => {
  1098. if (data && data.code === 0) {
  1099. this.refreshCurrentTabTable()
  1100. this.$message({
  1101. message: '操作成功',
  1102. type: 'success',
  1103. duration: 1500,
  1104. onClose: () => {}
  1105. })
  1106. } else {
  1107. this.$alert(data.msg, '错误', {
  1108. confirmButtonText: '确定'
  1109. })
  1110. }
  1111. })
  1112. })
  1113. },
  1114. //导出excel
  1115. async createExportData() {
  1116. this.searchData.limit = -1
  1117. this.searchData.page = 1
  1118. const {data} = await searchNotifyHeaderNew(this.searchData)
  1119. return data.page.list;
  1120. },
  1121. startDownload() {
  1122. // this.exportData = this.dataList
  1123. },
  1124. finishDownload() {
  1125. },
  1126. fields() {
  1127. let json = "{"
  1128. this.columnList1.forEach((item, index) => {
  1129. if (index == this.columnList1.length - 1) {
  1130. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1131. } else {
  1132. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1133. }
  1134. })
  1135. json += "}"
  1136. let s = eval("(" + json + ")")
  1137. return s
  1138. },
  1139. tableRowClassName ({row, rowIndex}) {
  1140. if (row.qtyToIssueOriginal<row.qtyToIssue&&new Date(row.needDate)<new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
  1141. return 'error-row'
  1142. }
  1143. return ''
  1144. },
  1145. },
  1146. }
  1147. </script>
  1148. <style scoped>
  1149. /deep/ .el-form-item--medium .el-form-item__content {
  1150. height: auto;
  1151. }
  1152. .disabled {
  1153. cursor: not-allowed !important;
  1154. color: #C0C4CC !important;
  1155. pointer-events: none;
  1156. }
  1157. .text-right >>> .el-input__inner {
  1158. text-align: right !important;
  1159. }
  1160. .text-right >>> .el-input-number__input {
  1161. text-align: right !important;
  1162. }
  1163. .single-line-multi-select >>> .el-select__tags {
  1164. display: flex;
  1165. flex-wrap: nowrap;
  1166. overflow: hidden;
  1167. white-space: nowrap;
  1168. max-width: 100%;
  1169. }
  1170. .single-line-multi-select >>> .el-tag {
  1171. flex-shrink: 0;
  1172. max-width: 100px;
  1173. overflow: hidden;
  1174. text-overflow: ellipsis;
  1175. white-space: nowrap;
  1176. }
  1177. .single-line-multi-select >>> .el-select__input {
  1178. flex-shrink: 0;
  1179. min-width: 30px;
  1180. }
  1181. </style>