|
@@ -94,20 +94,12 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
label="备注">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="配料清单">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="materialDetails(scope.row.coId)">查看</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
label="对应图纸">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="drawDetails(scope.row.coId)">查看</el-button>
|
|
|
+ <el-button :disabled="!scope.row.proDrawings || scope.row.proDrawings.length === 0" type="text" size="small" @click="drawDetails(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -115,7 +107,7 @@
|
|
|
align="center"
|
|
|
label="对应工艺">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="techDetails(scope.row.coId)">查看</el-button>
|
|
|
+ <el-button :disabled="!scope.row.techId" type="text" size="small" @click="techDetails(scope.row.techId)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -142,6 +134,8 @@
|
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
|
|
<detail v-if="detailVisible" ref="detail"/>
|
|
|
+ <crafts-detail v-if="craftsVisible" ref="craftsDetail"/>
|
|
|
+ <product-draw-detail v-if="drawVisible" ref="drawDetail"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -150,15 +144,22 @@
|
|
|
import Detail from './product-detail'
|
|
|
import { getDictList } from '@/api/dict'
|
|
|
import { getProductList } from '@/api/product'
|
|
|
+ import CraftsDetail from './crafts-detail'
|
|
|
+ import ProductDrawDetail from './product-draw-detail'
|
|
|
export default {
|
|
|
name: 'product-management',
|
|
|
components: {
|
|
|
- AddOrUpdate, Detail
|
|
|
+ ProductDrawDetail,
|
|
|
+ CraftsDetail,
|
|
|
+ AddOrUpdate,
|
|
|
+ Detail
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
addOrUpdateVisible: false,
|
|
|
detailVisible: false,
|
|
|
+ craftsVisible: false,
|
|
|
+ drawVisible: false,
|
|
|
dataForm: {},
|
|
|
dataList: [],
|
|
|
pageIndex: 1,
|
|
@@ -283,20 +284,19 @@
|
|
|
this.$refs.detail.init(id)
|
|
|
})
|
|
|
},
|
|
|
- // 配料清单
|
|
|
- materialDetails (id) {
|
|
|
- // todo
|
|
|
- this.$message.warning('未找到相关内容')
|
|
|
- },
|
|
|
// 对应图纸
|
|
|
- drawDetails (id) {
|
|
|
- // todo
|
|
|
- this.$message.warning('未找到相关内容')
|
|
|
+ drawDetails (row) {
|
|
|
+ this.drawVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.drawDetail.init(row.proDrawings)
|
|
|
+ })
|
|
|
},
|
|
|
// 对应工艺
|
|
|
techDetails (id) {
|
|
|
- // todo
|
|
|
- this.$message.warning('未找到相关内容')
|
|
|
+ this.craftsVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.craftsDetail.init(id)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|