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.

98 lines
3.4 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="poNo" label="PO号" header-align="center" align="center" min-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="shipMethod" 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="qcOperator" label="QC" header-align="center" align="center" width="100" show-overflow-tooltip/>
  18. <el-table-column prop="eta" label="ETA" header-align="center" align="center" width="110"/>
  19. <el-table-column prop="planner" label="Planner" header-align="center" align="left" min-width="110" show-overflow-tooltip/>
  20. <el-table-column prop="approveQty" label="实际验货数量" header-align="center" align="right" width="110"/>
  21. <el-table-column prop="samplingQty" label="抽样数" header-align="center" align="right" width="90"/>
  22. <el-table-column prop="passQty" label="抽样合格数" header-align="center" align="right" width="100"/>
  23. <el-table-column prop="inspectionResultQc" label="检验结果" header-align="center" align="center" width="110" show-overflow-tooltip/>
  24. <el-table-column prop="inspectionRemark" label="验货结果备注" header-align="center" align="left" min-width="160" show-overflow-tooltip/>
  25. </el-table>
  26. </div>
  27. </template>
  28. <script>
  29. import { getInspectionResultList } from '@/api/inspection/inspectionRequestHeader.js'
  30. export default {
  31. name: 'InspectionResultTab',
  32. props: {
  33. detailData: {
  34. type: Object,
  35. default: () => ({})
  36. },
  37. tableHeight: {
  38. type: Number,
  39. default: 400
  40. }
  41. },
  42. data () {
  43. return {
  44. detailList: [],
  45. loading: false
  46. }
  47. },
  48. watch: {
  49. // 监听 detailData 变化,触发查询
  50. detailData: {
  51. handler (newVal) {
  52. if (newVal && newVal.requestNo && newVal.site) {
  53. this.loadDetailList()
  54. } else {
  55. this.detailList = []
  56. }
  57. },
  58. deep: true,
  59. immediate: true
  60. }
  61. },
  62. methods: {
  63. // 加载明细列表
  64. loadDetailList () {
  65. if (!this.detailData.requestNo || !this.detailData.site) {
  66. this.detailList = []
  67. return
  68. }
  69. this.loading = true
  70. getInspectionResultList({
  71. requestNo: this.detailData.requestNo,
  72. site: this.detailData.site
  73. }).then(({ data }) => {
  74. if (data.code === 0) {
  75. this.detailList = data.list || []
  76. }
  77. this.loading = false
  78. }).catch(() => {
  79. this.loading = false
  80. })
  81. }
  82. }
  83. }
  84. </script>
  85. <style scoped lang="scss">
  86. .detail-container {
  87. padding: 0;
  88. background: #fff;
  89. }
  90. </style>