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.

93 lines
2.9 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div class="detail-container">
  3. <!-- 明细表格 -->
  4. <el-table :data="detailList" border v-loading="loading" style="width: 100%;" :height="tableHeight">
  5. <el-table-column label="序号" header-align="center" align="center" width="80">
  6. <template slot-scope="scope">
  7. {{ scope.$index + 1 }}
  8. </template>
  9. </el-table-column>
  10. <el-table-column prop="orderRef2" label="PO行号" header-align="center" align="center" width="80"/>
  11. <el-table-column prop="orderRef1" label="PO号" header-align="center" align="center" width="120" show-overflow-tooltip/>
  12. <el-table-column prop="item" label="Item" header-align="center" align="left" min-width="100" show-overflow-tooltip/>
  13. <el-table-column prop="aQty" label="订单数量" header-align="center" align="right" width="90"/>
  14. <el-table-column prop="qty" label="此次验货数量" header-align="center" align="right" width="110"/>
  15. <el-table-column prop="shipMothod" label="运输方式" header-align="center" align="center" width="100"/>
  16. <el-table-column prop="crd" label="CRD" header-align="center" align="center" width="120"/>
  17. <el-table-column prop="eta" label="ETA" header-align="center" align="center" width="120"/>
  18. <el-table-column prop="status" label="状态" header-align="center" align="center" width="100" show-overflow-tooltip/>
  19. <el-table-column prop="planner" label="Planner" header-align="center" align="left" min-width="120" show-overflow-tooltip/>
  20. </el-table>
  21. </div>
  22. </template>
  23. <script>
  24. import { getInspectionRequestDetailSubList } from '@/api/inspection/inspectionRequestHeader.js'
  25. export default {
  26. name: 'InspectionRequestDetailTab',
  27. props: {
  28. detailData: {
  29. type: Object,
  30. default: () => ({})
  31. },
  32. tableHeight: {
  33. type: Number,
  34. default: 400
  35. }
  36. },
  37. data () {
  38. return {
  39. detailList: [],
  40. loading: false
  41. }
  42. },
  43. watch: {
  44. // 监听 detailData 变化,触发查询
  45. detailData: {
  46. handler (newVal) {
  47. if (newVal && newVal.requestNo && newVal.site) {
  48. this.loadDetailList()
  49. } else {
  50. this.detailList = []
  51. }
  52. },
  53. deep: true,
  54. immediate: true
  55. }
  56. },
  57. methods: {
  58. // 加载明细列表(与新增弹窗「PO明细」同源,按 PO 行级展示)
  59. loadDetailList () {
  60. if (!this.detailData.requestNo || !this.detailData.site) {
  61. this.detailList = []
  62. return
  63. }
  64. this.loading = true
  65. getInspectionRequestDetailSubList({
  66. requestNo: this.detailData.requestNo,
  67. site: this.detailData.site
  68. }).then(({ data }) => {
  69. if (data.code === 0) {
  70. this.detailList = (data.page && data.page.list) || []
  71. }
  72. this.loading = false
  73. }).catch(() => {
  74. this.loading = false
  75. })
  76. }
  77. }
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. .detail-container {
  82. padding: 0;
  83. background: #fff;
  84. }
  85. </style>