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
93 lines
2.9 KiB
<template>
|
|
<div class="detail-container">
|
|
<!-- 明细表格 -->
|
|
<el-table :data="detailList" border v-loading="loading" style="width: 100%;" :height="tableHeight">
|
|
<el-table-column label="序号" header-align="center" align="center" width="80">
|
|
<template slot-scope="scope">
|
|
{{ scope.$index + 1 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="orderRef2" label="PO行号" header-align="center" align="center" width="80"/>
|
|
<el-table-column prop="orderRef1" label="PO号" header-align="center" align="center" width="120" show-overflow-tooltip/>
|
|
<el-table-column prop="item" label="Item" header-align="center" align="left" min-width="100" show-overflow-tooltip/>
|
|
<el-table-column prop="aQty" label="订单数量" header-align="center" align="right" width="90"/>
|
|
<el-table-column prop="qty" label="此次验货数量" header-align="center" align="right" width="110"/>
|
|
<el-table-column prop="shipMothod" label="运输方式" header-align="center" align="center" width="100"/>
|
|
<el-table-column prop="crd" label="CRD" header-align="center" align="center" width="120"/>
|
|
<el-table-column prop="eta" label="ETA" header-align="center" align="center" width="120"/>
|
|
<el-table-column prop="status" label="状态" header-align="center" align="center" width="100" show-overflow-tooltip/>
|
|
<el-table-column prop="planner" label="Planner" header-align="center" align="left" min-width="120" show-overflow-tooltip/>
|
|
</el-table>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { getInspectionRequestDetailSubList } from '@/api/inspection/inspectionRequestHeader.js'
|
|
|
|
export default {
|
|
name: 'InspectionRequestDetailTab',
|
|
|
|
props: {
|
|
detailData: {
|
|
type: Object,
|
|
default: () => ({})
|
|
},
|
|
tableHeight: {
|
|
type: Number,
|
|
default: 400
|
|
}
|
|
},
|
|
|
|
data () {
|
|
return {
|
|
detailList: [],
|
|
loading: false
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
// 监听 detailData 变化,触发查询
|
|
detailData: {
|
|
handler (newVal) {
|
|
if (newVal && newVal.requestNo && newVal.site) {
|
|
this.loadDetailList()
|
|
} else {
|
|
this.detailList = []
|
|
}
|
|
},
|
|
deep: true,
|
|
immediate: true
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
// 加载明细列表(与新增弹窗「PO明细」同源,按 PO 行级展示)
|
|
loadDetailList () {
|
|
if (!this.detailData.requestNo || !this.detailData.site) {
|
|
this.detailList = []
|
|
return
|
|
}
|
|
|
|
this.loading = true
|
|
getInspectionRequestDetailSubList({
|
|
requestNo: this.detailData.requestNo,
|
|
site: this.detailData.site
|
|
}).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.detailList = (data.page && data.page.list) || []
|
|
}
|
|
this.loading = false
|
|
}).catch(() => {
|
|
this.loading = false
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.detail-container {
|
|
padding: 0;
|
|
background: #fff;
|
|
}
|
|
</style>
|