|
@@ -37,7 +37,11 @@
|
|
|
<e-desc title="物料清单明细">
|
|
|
<el-table
|
|
|
:data="productDetails"
|
|
|
+ row-key="productId"
|
|
|
border
|
|
|
+ :indent='20'
|
|
|
+ lazy
|
|
|
+ :load="loadingData"
|
|
|
style="width: 100%;">
|
|
|
<el-table-column
|
|
|
label="序号"
|
|
@@ -48,7 +52,7 @@
|
|
|
<el-table-column
|
|
|
prop="productName"
|
|
|
header-align="center"
|
|
|
- align="center"
|
|
|
+ align="left"
|
|
|
width="160"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="物料名称">
|
|
@@ -162,10 +166,7 @@
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="技术文件">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-for="(item, index) in scope.row.attachList" style="display: inline">
|
|
|
- <span v-if="index > 0">,</span>
|
|
|
- <a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
- </div>
|
|
|
+ <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -297,7 +298,8 @@
|
|
|
</span>
|
|
|
<!-- 文件预览 -->
|
|
|
<preview-component v-if="previewVisible" ref="preview"/>
|
|
|
- <product-draw-detail v-if="drawVisible" ref="drawDetail" @onChose="onChose"/>
|
|
|
+ <product-draw-detail-dialog v-if="drawVisible" ref="drawDetail"/>
|
|
|
+ <attach-detail-dialog v-if="attachVisible" ref="attachDetail"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -306,14 +308,17 @@
|
|
|
import EDescItem from '../common/e-desc-item'
|
|
|
import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
import { getOrderDetail } from '@/api/sale'
|
|
|
+ import { getChildren } from '@/api/product'
|
|
|
import uploadComponent from '../common/upload-component'
|
|
|
import ApproveComponent from '../common/approve-component'
|
|
|
import PreviewComponent from '@/views/modules/common/preview-component'
|
|
|
- import ProductDrawDetail from '@/views/modules/tech/product-draw-detail'
|
|
|
+ import ProductDrawDetailDialog from '@/views/modules/tech/product-draw-detail-dialog'
|
|
|
+ import AttachDetailDialog from '@/views/modules/common/attach-detail-dialog'
|
|
|
export default {
|
|
|
name: 'order-detail',
|
|
|
components: {
|
|
|
- ProductDrawDetail,
|
|
|
+ AttachDetailDialog,
|
|
|
+ ProductDrawDetailDialog,
|
|
|
PreviewComponent,
|
|
|
EDesc,
|
|
|
EDescItem,
|
|
@@ -332,7 +337,8 @@ export default {
|
|
|
activeNo: 0,
|
|
|
stepList: [],
|
|
|
logList: [],
|
|
|
- drawVisible: false
|
|
|
+ drawVisible: false,
|
|
|
+ attachVisible: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -404,6 +410,22 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.preview.init(fileName, url)
|
|
|
})
|
|
|
+ },
|
|
|
+ loadingData (row, treeNode, resolve) {
|
|
|
+ getChildren(row.productId).then(({data}) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ resolve(data.data)
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 物料技术文件
|
|
|
+ attachDetails (row) {
|
|
|
+ this.attachVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.attachDetail.init(row.attachList)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|