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.

675 lines
21 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <div class="mod-config yzz">
  3. <!-- 查询条件 - rqrq -->
  4. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  5. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  6. <el-form-item label="工厂">
  7. <el-input v-model="searchData.site" style="width: 100px" disabled></el-input>
  8. </el-form-item>
  9. <el-form-item label="领料单号">
  10. <el-input v-model="searchData.notifyNo" style="width: 140px" clearable></el-input>
  11. </el-form-item>
  12. <el-form-item label="订单号">
  13. <el-input v-model="searchData.soorderNo" style="width: 140px" clearable></el-input>
  14. </el-form-item>
  15. <el-form-item label="订单类型">
  16. <el-select v-model="searchData.orderType" placeholder="请选择" style="width: 120px">
  17. <el-option label="全部" value=""></el-option>
  18. <el-option label="shoporder" value="shoporder"></el-option>
  19. <el-option label="shipment" value="shipment"></el-option>
  20. <el-option label="slittingorder" value="slittingorder"></el-option>
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item label="推送WCS">
  24. <el-select v-model="searchData.pushWmsFlag" placeholder="请选择" style="width: 100px">
  25. <el-option label="全部" value=""></el-option>
  26. <el-option label="是" value="Y"></el-option>
  27. <el-option label="否" value="N"></el-option>
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item label="立库取出">
  31. <el-select v-model="searchData.transportFlag" placeholder="请选择" style="width: 100px">
  32. <el-option label="全部" value=""></el-option>
  33. <el-option label="是" value="Y"></el-option>
  34. <el-option label="否" value="N"></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item :label="' '">
  38. <el-button type="primary" @click="searchTable()">查询</el-button>
  39. </el-form-item>
  40. </el-form>
  41. </el-form>
  42. <!-- 主表 - 申请单订单列表 - rqrq -->
  43. <el-table
  44. :data="dataList"
  45. @row-click="changeData"
  46. :height="height"
  47. border
  48. highlight-current-row
  49. ref="mainTable"
  50. v-loading="dataListLoading"
  51. style="width: 100%;">
  52. <el-table-column
  53. v-for="(item,index) in columnList1"
  54. :key="index"
  55. :sortable="item.columnSortable"
  56. :prop="item.columnProp"
  57. :header-align="item.headerAlign"
  58. :show-overflow-tooltip="item.showOverflowTooltip"
  59. :align="item.align"
  60. :fixed="item.fixed==''?false:item.fixed"
  61. :min-width="item.columnWidth"
  62. :label="item.columnLabel">
  63. <template slot-scope="scope">
  64. <!-- 推送WCS特殊显示 - rqrq -->
  65. <span v-if="item.columnProp === 'pushWmsFlag'" :style="{color: scope.row.pushWmsFlag === 'Y' ? '#67C23A' : '#909399'}">
  66. {{ scope.row.pushWmsFlag === 'Y' ? '是' : '否' }}
  67. </span>
  68. <!-- 立库取出特殊显示 - rqrq -->
  69. <span v-else-if="item.columnProp === 'transportFlag'" :style="{color: scope.row.transportFlag === 'Y' ? '#67C23A' : '#909399'}">
  70. {{ scope.row.transportFlag === 'Y' ? '是' : '否' }}
  71. </span>
  72. <!-- 订单类型特殊显示中文- rqrq -->
  73. <span v-else-if="item.columnProp === 'orderType'" :style="{color: getOrderTypeColor(scope.row.orderType), fontWeight: 'bold'}">
  74. {{ getOrderTypeText(scope.row.orderType) }}
  75. </span>
  76. <!-- 普通列显示 -->
  77. <span v-else-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. <!-- 分页 - rqrq -->
  82. <el-pagination
  83. @size-change="sizeChangeHandle"
  84. @current-change="currentChangeHandle"
  85. :current-page="pageIndex"
  86. :page-sizes="[20, 50, 100, 1000]"
  87. :page-size="pageSize"
  88. :total="totalPage"
  89. layout="total, sizes, prev, pager, next, jumper">
  90. </el-pagination>
  91. <!-- 明细表 - 预留标签清单 - rqrq -->
  92. <el-tabs style="font-size: 12px;min-height: 200px;margin-top:10px" class="customer-tab" v-model="activeName" type="border-card">
  93. <el-tab-pane label="预留标签清单" name="labelDetail">
  94. <el-table
  95. :data="detailList"
  96. :height="detailHeight"
  97. border
  98. v-loading="detailLoading"
  99. style="width: 100%;">
  100. <el-table-column
  101. v-for="(item,index) in columnList2"
  102. :key="index"
  103. :sortable="item.columnSortable"
  104. :prop="item.columnProp"
  105. :header-align="item.headerAlign"
  106. :show-overflow-tooltip="item.showOverflowTooltip"
  107. :align="item.align"
  108. :fixed="item.fixed==''?false:item.fixed"
  109. :min-width="item.columnWidth"
  110. :label="item.columnLabel">
  111. <template slot-scope="scope">
  112. <!-- 立库取出特殊显示 - rqrq -->
  113. <span v-if="item.columnProp === 'outWcsFlag'" :style="{color: scope.row.outWcsFlag === 'Y' ? '#67C23A' : '#909399'}">
  114. {{ scope.row.outWcsFlag === 'Y' ? '是' : '否' }}
  115. </span>
  116. <!-- 发料标志特殊显示 - rqrq -->
  117. <span v-else-if="item.columnProp === 'issureFlag'" :style="{color: scope.row.issureFlag === 'Y' ? '#67C23A' : '#909399'}">
  118. {{ scope.row.issureFlag === 'Y' ? '是' : '否' }}
  119. </span>
  120. <!-- 订单类型特殊显示中文- rqrq -->
  121. <span v-else-if="item.columnProp === 'orderType'" :style="{color: getOrderTypeColor(scope.row.orderType), fontWeight: 'bold'}">
  122. {{ getOrderTypeText(scope.row.orderType) }}
  123. </span>
  124. <!-- 普通列显示 -->
  125. <span v-else-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  126. </template>
  127. </el-table-column>
  128. </el-table>
  129. </el-tab-pane>
  130. </el-tabs>
  131. </div>
  132. </template>
  133. <script>
  134. import {
  135. searchNotifyOrderList,
  136. searchMaterialListDetail
  137. } from '@/api/automatedWarehouse/notifyDetailQuery.js'
  138. export default {
  139. name: 'notifyDetailQuery',
  140. data() {
  141. return {
  142. height: 200,
  143. detailHeight: 200,
  144. activeName: 'labelDetail',
  145. dataListLoading: false,
  146. detailLoading: false,
  147. dataList: [],
  148. detailList: [],
  149. currentRow: null,
  150. pageIndex: 1,
  151. pageSize: 50,
  152. totalPage: 0,
  153. searchData: {
  154. page: 1,
  155. limit: 50,
  156. site: this.$store.state.user.site,
  157. notifyNo: '',
  158. soorderNo: '',
  159. orderType: '',
  160. pushWmsFlag: '',
  161. transportFlag: ''
  162. },
  163. // 主表列配置 - rqrq
  164. columnList1: [
  165. {
  166. userId: this.$store.state.user.name,
  167. functionId: 801001,
  168. serialNumber: '801001Table1NotifyNo',
  169. tableId: '801001Table1',
  170. tableName: '申请单订单列表',
  171. columnProp: 'notifyNo',
  172. headerAlign: 'center',
  173. align: 'left',
  174. columnLabel: '领料单号',
  175. columnHidden: false,
  176. columnImage: false,
  177. columnSortable: true,
  178. sortLv: 0,
  179. status: true,
  180. fixed: '',
  181. columnWidth: 140,
  182. showOverflowTooltip: true
  183. },
  184. {
  185. userId: this.$store.state.user.name,
  186. functionId: 801001,
  187. serialNumber: '801001Table1ItemNo',
  188. tableId: '801001Table1',
  189. tableName: '申请单订单列表',
  190. columnProp: 'itemNo',
  191. headerAlign: 'center',
  192. align: 'right',
  193. columnLabel: '序号',
  194. columnHidden: false,
  195. columnImage: false,
  196. columnSortable: false,
  197. sortLv: 0,
  198. status: true,
  199. fixed: '',
  200. columnWidth: 60,
  201. showOverflowTooltip: true
  202. },
  203. {
  204. userId: this.$store.state.user.name,
  205. functionId: 801001,
  206. serialNumber: '801001Table1SoorderNo',
  207. tableId: '801001Table1',
  208. tableName: '申请单订单列表',
  209. columnProp: 'soorderNo',
  210. headerAlign: 'center',
  211. align: 'left',
  212. columnLabel: '订单号',
  213. columnHidden: false,
  214. columnImage: false,
  215. columnSortable: true,
  216. sortLv: 0,
  217. status: true,
  218. fixed: '',
  219. columnWidth: 140,
  220. showOverflowTooltip: true
  221. },
  222. {
  223. userId: this.$store.state.user.name,
  224. functionId: 801001,
  225. serialNumber: '801001Table1OrderType',
  226. tableId: '801001Table1',
  227. tableName: '申请单订单列表',
  228. columnProp: 'orderType',
  229. headerAlign: 'center',
  230. align: 'center',
  231. columnLabel: '订单类型',
  232. columnHidden: false,
  233. columnImage: false,
  234. columnSortable: false,
  235. sortLv: 0,
  236. status: true,
  237. fixed: '',
  238. columnWidth: 100,
  239. showOverflowTooltip: true
  240. },
  241. {
  242. userId: this.$store.state.user.name,
  243. functionId: 801001,
  244. serialNumber: '801001Table1FgPartNo',
  245. tableId: '801001Table1',
  246. tableName: '申请单订单列表',
  247. columnProp: 'fgPartNo',
  248. headerAlign: 'center',
  249. align: 'left',
  250. columnLabel: '工单物料',
  251. columnHidden: false,
  252. columnImage: false,
  253. columnSortable: false,
  254. sortLv: 0,
  255. status: true,
  256. fixed: '',
  257. columnWidth: 100,
  258. showOverflowTooltip: true
  259. },
  260. {
  261. userId: this.$store.state.user.name,
  262. functionId: 801001,
  263. serialNumber: '801001Table1ReleaseNo',
  264. tableId: '801001Table1',
  265. tableName: '申请单订单列表',
  266. columnProp: 'releaseNo',
  267. headerAlign: 'center',
  268. align: 'left',
  269. columnLabel: '发布号',
  270. columnHidden: false,
  271. columnImage: false,
  272. columnSortable: false,
  273. sortLv: 0,
  274. status: true,
  275. fixed: '',
  276. columnWidth: 80,
  277. showOverflowTooltip: true
  278. },
  279. {
  280. userId: this.$store.state.user.name,
  281. functionId: 801001,
  282. serialNumber: '801001Table1SequenceNo',
  283. tableId: '801001Table1',
  284. tableName: '申请单订单列表',
  285. columnProp: 'sequenceNo',
  286. headerAlign: 'center',
  287. align: 'left',
  288. columnLabel: '序号',
  289. columnHidden: false,
  290. columnImage: false,
  291. columnSortable: false,
  292. sortLv: 0,
  293. status: true,
  294. fixed: '',
  295. columnWidth: 80,
  296. showOverflowTooltip: true
  297. },
  298. {
  299. userId: this.$store.state.user.name,
  300. functionId: 801001,
  301. serialNumber: '801001Table1NeedDate',
  302. tableId: '801001Table1',
  303. tableName: '申请单订单列表',
  304. columnProp: 'needDate',
  305. headerAlign: 'center',
  306. align: 'center',
  307. columnLabel: '要求发料时间',
  308. columnHidden: false,
  309. columnImage: false,
  310. columnSortable: false,
  311. sortLv: 0,
  312. status: true,
  313. fixed: '',
  314. columnWidth: 130,
  315. showOverflowTooltip: true
  316. },
  317. {
  318. userId: this.$store.state.user.name,
  319. functionId: 801001,
  320. serialNumber: '801001Table1LocationNo',
  321. tableId: '801001Table1',
  322. tableName: '申请单订单列表',
  323. columnProp: 'locationNo',
  324. headerAlign: 'center',
  325. align: 'left',
  326. columnLabel: '配送站点',
  327. columnHidden: false,
  328. columnImage: false,
  329. columnSortable: false,
  330. sortLv: 0,
  331. status: true,
  332. fixed: '',
  333. columnWidth: 100,
  334. showOverflowTooltip: true
  335. },
  336. {
  337. userId: this.$store.state.user.name,
  338. functionId: 801001,
  339. serialNumber: '801001Table1AreaDesc',
  340. tableId: '801001Table1',
  341. tableName: '申请单订单列表',
  342. columnProp: 'areaDesc',
  343. headerAlign: 'center',
  344. align: 'left',
  345. columnLabel: '配送区域',
  346. columnHidden: false,
  347. columnImage: false,
  348. columnSortable: false,
  349. sortLv: 0,
  350. status: true,
  351. fixed: '',
  352. columnWidth: 100,
  353. showOverflowTooltip: true
  354. },
  355. {
  356. userId: this.$store.state.user.name,
  357. functionId: 801001,
  358. serialNumber: '801001Table1PushWmsFlag',
  359. tableId: '801001Table1',
  360. tableName: '申请单订单列表',
  361. columnProp: 'pushWmsFlag',
  362. headerAlign: 'center',
  363. align: 'center',
  364. columnLabel: '推送WCS',
  365. columnHidden: false,
  366. columnImage: false,
  367. columnSortable: false,
  368. sortLv: 0,
  369. status: true,
  370. fixed: '',
  371. columnWidth: 80,
  372. showOverflowTooltip: true
  373. },
  374. {
  375. userId: this.$store.state.user.name,
  376. functionId: 801001,
  377. serialNumber: '801001Table1TransportFlag',
  378. tableId: '801001Table1',
  379. tableName: '申请单订单列表',
  380. columnProp: 'transportFlag',
  381. headerAlign: 'center',
  382. align: 'center',
  383. columnLabel: '立库取出',
  384. columnHidden: false,
  385. columnImage: false,
  386. columnSortable: false,
  387. sortLv: 0,
  388. status: true,
  389. fixed: '',
  390. columnWidth: 80,
  391. showOverflowTooltip: true
  392. }
  393. ],
  394. // 明细表列配置 - rqrq
  395. columnList2: [
  396. {
  397. userId: this.$store.state.user.name,
  398. functionId: 801001,
  399. serialNumber: '801001Table2ItemNo',
  400. tableId: '801001Table2',
  401. tableName: '预留标签清单表',
  402. columnProp: 'itemNo',
  403. headerAlign: 'center',
  404. align: 'right',
  405. columnLabel: '订单序号',
  406. columnHidden: false,
  407. columnImage: false,
  408. columnSortable: false,
  409. sortLv: 0,
  410. status: true,
  411. fixed: '',
  412. columnWidth: 80,
  413. showOverflowTooltip: true
  414. },
  415. {
  416. userId: this.$store.state.user.name,
  417. functionId: 801001,
  418. serialNumber: '801001Table2BomItemNo',
  419. tableId: '801001Table2',
  420. tableName: '预留标签清单表',
  421. columnProp: 'bomItemNo',
  422. headerAlign: 'center',
  423. align: 'right',
  424. columnLabel: '订单物料行号',
  425. columnHidden: false,
  426. columnImage: false,
  427. columnSortable: false,
  428. sortLv: 0,
  429. status: true,
  430. fixed: '',
  431. columnWidth: 100,
  432. showOverflowTooltip: true
  433. },
  434. {
  435. userId: this.$store.state.user.name,
  436. functionId: 801001,
  437. serialNumber: '801001Table2ComponentPartNo',
  438. tableId: '801001Table2',
  439. tableName: '预留标签清单表',
  440. columnProp: 'componentPartNo',
  441. headerAlign: 'center',
  442. align: 'left',
  443. columnLabel: '物料号',
  444. columnHidden: false,
  445. columnImage: false,
  446. columnSortable: false,
  447. sortLv: 0,
  448. status: true,
  449. fixed: '',
  450. columnWidth: 120,
  451. showOverflowTooltip: true
  452. },
  453. {
  454. userId: this.$store.state.user.name,
  455. functionId: 801001,
  456. serialNumber: '801001Table2SerialNo',
  457. tableId: '801001Table2',
  458. tableName: '预留标签清单表',
  459. columnProp: 'serialNo',
  460. headerAlign: 'center',
  461. align: 'left',
  462. columnLabel: '标签号',
  463. columnHidden: false,
  464. columnImage: false,
  465. columnSortable: false,
  466. sortLv: 0,
  467. status: true,
  468. fixed: '',
  469. columnWidth: 150,
  470. showOverflowTooltip: true
  471. },
  472. {
  473. userId: this.$store.state.user.name,
  474. functionId: 801001,
  475. serialNumber: '801001Table2TaskRef',
  476. tableId: '801001Table2',
  477. tableName: '预留标签清单表',
  478. columnProp: 'taskRef',
  479. headerAlign: 'center',
  480. align: 'left',
  481. columnLabel: '立库任务号',
  482. columnHidden: false,
  483. columnImage: false,
  484. columnSortable: false,
  485. sortLv: 0,
  486. status: true,
  487. fixed: '',
  488. columnWidth: 120,
  489. showOverflowTooltip: true
  490. },
  491. {
  492. userId: this.$store.state.user.name,
  493. functionId: 801001,
  494. serialNumber: '801001Table2TaskItem',
  495. tableId: '801001Table2',
  496. tableName: '预留标签清单表',
  497. columnProp: 'taskItem',
  498. headerAlign: 'center',
  499. align: 'right',
  500. columnLabel: '立库任务行号',
  501. columnHidden: false,
  502. columnImage: false,
  503. columnSortable: false,
  504. sortLv: 0,
  505. status: true,
  506. fixed: '',
  507. columnWidth: 100,
  508. showOverflowTooltip: true
  509. },
  510. {
  511. userId: this.$store.state.user.name,
  512. functionId: 801001,
  513. serialNumber: '801001Table2TaskSeq',
  514. tableId: '801001Table2',
  515. tableName: '预留标签清单表',
  516. columnProp: 'taskSeq',
  517. headerAlign: 'center',
  518. align: 'right',
  519. columnLabel: '任务序号',
  520. columnHidden: false,
  521. columnImage: false,
  522. columnSortable: false,
  523. sortLv: 0,
  524. status: true,
  525. fixed: '',
  526. columnWidth: 80,
  527. showOverflowTooltip: true
  528. },
  529. {
  530. userId: this.$store.state.user.name,
  531. functionId: 801001,
  532. serialNumber: '801001Table2OrderType',
  533. tableId: '801001Table2',
  534. tableName: '预留标签清单表',
  535. columnProp: 'orderType',
  536. headerAlign: 'center',
  537. align: 'center',
  538. columnLabel: '订单类型',
  539. columnHidden: false,
  540. columnImage: false,
  541. columnSortable: false,
  542. sortLv: 0,
  543. status: true,
  544. fixed: '',
  545. columnWidth: 100,
  546. showOverflowTooltip: true
  547. },
  548. {
  549. userId: this.$store.state.user.name,
  550. functionId: 801001,
  551. serialNumber: '801001Table2OutWcsFlag',
  552. tableId: '801001Table2',
  553. tableName: '预留标签清单表',
  554. columnProp: 'outWcsFlag',
  555. headerAlign: 'center',
  556. align: 'center',
  557. columnLabel: '立库取出',
  558. columnHidden: false,
  559. columnImage: false,
  560. columnSortable: false,
  561. sortLv: 0,
  562. status: true,
  563. fixed: '',
  564. columnWidth: 80,
  565. showOverflowTooltip: true
  566. },
  567. ]
  568. }
  569. },
  570. mounted() {
  571. // 计算表格高度 - rqrq
  572. this.height = (window.innerHeight - 280) / 2
  573. this.detailHeight = (window.innerHeight - 280) / 2
  574. },
  575. methods: {
  576. // 获取订单类型颜色 - rqrq
  577. getOrderTypeColor(orderType) {
  578. switch (orderType) {
  579. case 'shoporder':
  580. return '#409EFF' // 蓝色
  581. case 'shipment':
  582. return '#67C23A' // 绿色
  583. case 'slittingorder':
  584. return '#E6A23C' // 橙色
  585. default:
  586. return '#909399' // 灰色
  587. }
  588. },
  589. // 获取订单类型中文文本 - rqrq
  590. getOrderTypeText(orderType) {
  591. switch (orderType) {
  592. case 'shoporder':
  593. return '生产订单'
  594. case 'shipment':
  595. return '销售发货'
  596. case 'slittingorder':
  597. return '分切订单'
  598. default:
  599. return orderType || '-'
  600. }
  601. },
  602. // 查询主表数据 - rqrq
  603. searchTable() {
  604. this.dataListLoading = true
  605. this.searchData.page = this.pageIndex
  606. this.searchData.limit = this.pageSize
  607. searchNotifyOrderList(this.searchData).then(({ data }) => {
  608. if (data && data.code === 0) {
  609. this.dataList = data.page.list
  610. this.totalPage = data.page.totalCount
  611. } else {
  612. this.dataList = []
  613. this.totalPage = 0
  614. }
  615. }).catch(() => {
  616. this.$message.error('查询失败')
  617. }).finally(() => {
  618. this.dataListLoading = false
  619. })
  620. },
  621. // 主表行点击事件 - rqrq
  622. changeData(row) {
  623. this.currentRow = JSON.parse(JSON.stringify(row))
  624. this.getDetailList()
  625. },
  626. // 查询明细数据 - rqrq
  627. getDetailList() {
  628. if (!this.currentRow) {
  629. this.detailList = []
  630. return
  631. }
  632. this.detailLoading = true
  633. const queryData = {
  634. site: this.currentRow.site,
  635. notifyNo: this.currentRow.notifyNo,
  636. itemNo: this.currentRow.itemNo
  637. }
  638. searchMaterialListDetail(queryData).then(({ data }) => {
  639. if (data && data.code === 0) {
  640. this.detailList = data.rows || []
  641. } else {
  642. this.detailList = []
  643. }
  644. }).catch(() => {
  645. this.$message.error('查询明细失败')
  646. }).finally(() => {
  647. this.detailLoading = false
  648. })
  649. },
  650. // 分页大小改变 - rqrq
  651. sizeChangeHandle(val) {
  652. this.pageSize = val
  653. this.pageIndex = 1
  654. this.searchTable()
  655. },
  656. // 当前页改变 - rqrq
  657. currentChangeHandle(val) {
  658. this.pageIndex = val
  659. this.searchTable()
  660. }
  661. }
  662. }
  663. </script>
  664. <style scoped>
  665. /deep/ .customer-tab .el-tabs__content {
  666. padding: 5px !important;
  667. }
  668. </style>