|
@@ -1,7 +1,7 @@
|
|
|
<!-- 产品管理 -->
|
|
|
<template>
|
|
|
<div class="product-management">
|
|
|
- <template v-if="!addOrUpdateVisible && !detailVisible && !craftsVisible && !drawVisible">
|
|
|
+ <template v-if="!addOrUpdateVisible && !attachVisible && !detailVisible && !craftsVisible && !drawVisible && !changeVisible">
|
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
|
|
|
<el-form-item label="名称">
|
|
|
<el-input v-model="dataForm.productName" placeholder="产品名称" clearable/>
|
|
@@ -47,7 +47,7 @@
|
|
|
prop="productName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="120"
|
|
|
+ min-width="140"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
label="产品名称">
|
|
|
</el-table-column>
|
|
@@ -55,6 +55,7 @@
|
|
|
prop="productType"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
+ min-width="120"
|
|
|
:formatter="typeFormat"
|
|
|
label="产品类别">
|
|
|
</el-table-column>
|
|
@@ -62,6 +63,7 @@
|
|
|
prop="isCompose"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
+ min-width="120"
|
|
|
:formatter="composeFormat"
|
|
|
label="是否组合产品">
|
|
|
</el-table-column>
|
|
@@ -74,26 +76,30 @@
|
|
|
label="来源">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="createTime"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="160"
|
|
|
- label="创建时间">
|
|
|
+ min-width="140"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ label="更改说明">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.noticeChangeRecord?scope.row.noticeChangeRecord.description:''}}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="creatorName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="100"
|
|
|
- label="创建人">
|
|
|
+ label="更改单">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.noticeChangeRecord || !scope.row.noticeChangeRecord.attachList || scope.row.noticeChangeRecord.attachList.length === 0" type="text" size="small" @click="changeDetails(scope.row)">查看</el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="notes"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="180"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- label="备注">
|
|
|
+ label="技术文件">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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
|
|
|
header-align="center"
|
|
@@ -111,6 +117,28 @@
|
|
|
<el-button :disabled="!scope.row.techId" type="text" size="small" @click="techDetails(scope.row.techId)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="createTime"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="160"
|
|
|
+ label="创建时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="creatorName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="100"
|
|
|
+ label="创建人">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="notes"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="180"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ label="备注">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
fixed="right"
|
|
|
header-align="center"
|
|
@@ -138,6 +166,8 @@
|
|
|
<detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
|
|
|
<crafts-detail v-if="craftsVisible" ref="craftsDetail" @onChose="onChose"/>
|
|
|
<product-draw-detail v-if="drawVisible" ref="drawDetail" @onChose="onChose"/>
|
|
|
+ <attach-detail v-if="changeVisible" ref="changeDetail" @onChose="onChose"/>
|
|
|
+ <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -148,9 +178,11 @@
|
|
|
import { getProductList } from '@/api/product'
|
|
|
import CraftsDetail from './crafts-detail'
|
|
|
import ProductDrawDetail from './product-draw-detail'
|
|
|
- export default {
|
|
|
+ import AttachDetail from '../common/attach-detail'
|
|
|
+export default {
|
|
|
name: 'product-management',
|
|
|
components: {
|
|
|
+ AttachDetail,
|
|
|
ProductDrawDetail,
|
|
|
CraftsDetail,
|
|
|
AddOrUpdate,
|
|
@@ -159,9 +191,11 @@
|
|
|
data () {
|
|
|
return {
|
|
|
addOrUpdateVisible: false,
|
|
|
+ attachVisible: false,
|
|
|
detailVisible: false,
|
|
|
craftsVisible: false,
|
|
|
drawVisible: false,
|
|
|
+ changeVisible: false,
|
|
|
dataForm: {},
|
|
|
dataList: [],
|
|
|
pageIndex: 1,
|
|
@@ -180,9 +214,11 @@
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
this.addOrUpdateVisible = false
|
|
|
+ this.attachVisible = false
|
|
|
this.detailVisible = false
|
|
|
this.craftsVisible = false
|
|
|
this.drawVisible = false
|
|
|
+ this.changeVisible = false
|
|
|
},
|
|
|
// 获取产品类别字典
|
|
|
getTypeList () {
|
|
@@ -306,6 +342,20 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.craftsDetail.init(id)
|
|
|
})
|
|
|
+ },
|
|
|
+ // 产品更改通知单
|
|
|
+ changeDetails (row) {
|
|
|
+ this.changeVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.changeDetail.init(row.noticeChangeRecord.attachList)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 附件
|
|
|
+ attachDetails (row) {
|
|
|
+ this.attachVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.attachDetail.init(row.attachList)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|