|
|
|
@ -1,38 +1,40 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<div style="padding: 15px 25px;"> |
|
|
|
|
<el-descriptions class="margin-top" :column="3" border style="margin-top: 50px"> |
|
|
|
|
<div style=""> |
|
|
|
|
<div style="padding: 15px 0;" v-for="(item,index) in tableModel" :key="index"> |
|
|
|
|
<p style="font-size: 18px;" v-if="!flag">辅料信息</p> |
|
|
|
|
<p style="font-size: 16px;margin-bottom: 0" v-if="flag">辅料{{index+1}}信息</p> |
|
|
|
|
<el-descriptions class="margin-top" :column="3" border style="margin: 30px 0"> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-receiving"></i>类型id</template> |
|
|
|
|
{{tableModel.typeId}} |
|
|
|
|
{{item.typeId}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-coin"></i>编号</template> |
|
|
|
|
{{tableModel.nums}} |
|
|
|
|
{{item.nums}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-postcard"></i>名称</template> |
|
|
|
|
{{tableModel.contents}} |
|
|
|
|
{{item.contents}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-copy-document"></i>图片</template> |
|
|
|
|
{{tableModel.picture}} |
|
|
|
|
{{item.picture}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-price-tag"></i>材质</template> |
|
|
|
|
{{tableModel.material}} |
|
|
|
|
{{item.material}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-files"></i>规格</template> |
|
|
|
|
{{tableModel.specs}} |
|
|
|
|
{{item.specs}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-takeaway-box"></i>库存量</template> |
|
|
|
|
{{tableModel.store}} |
|
|
|
|
{{item.store}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
<el-descriptions-item> |
|
|
|
|
<template slot="label"><i class="el-icon-location-outline"></i>供货商</template> |
|
|
|
|
{{tableModel.supplierInfo}} |
|
|
|
|
{{item.supplierInfo}} |
|
|
|
|
</el-descriptions-item> |
|
|
|
|
</el-descriptions> |
|
|
|
|
</div> |
|
|
|
@ -42,7 +44,30 @@ |
|
|
|
|
<script> |
|
|
|
|
export default { |
|
|
|
|
name: 'processFabric', |
|
|
|
|
props:['model','fabricId'], |
|
|
|
|
// props:['model','fabricId'], |
|
|
|
|
props:{ |
|
|
|
|
model:{ |
|
|
|
|
type: Array, |
|
|
|
|
default: function () { |
|
|
|
|
return [ |
|
|
|
|
{ |
|
|
|
|
contents: "MZN600-287-800", |
|
|
|
|
createBy: null, |
|
|
|
|
createTime: null, |
|
|
|
|
id: "1458996032118022146", |
|
|
|
|
material: "厚", |
|
|
|
|
nums: "MZN600-287-800", |
|
|
|
|
picture: "12", |
|
|
|
|
specs: "21", |
|
|
|
|
store: 21, |
|
|
|
|
supplierInfo: "河南驻马店", |
|
|
|
|
typeId: "12", |
|
|
|
|
updateBy: null, |
|
|
|
|
updateTime: null,} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
img:'',//图片地址 |
|
|
|
@ -50,6 +75,7 @@ |
|
|
|
|
mp4:'',//视频地址 |
|
|
|
|
tableModel:[], |
|
|
|
|
id:'', |
|
|
|
|
flag:true, |
|
|
|
|
visible: false, |
|
|
|
|
confirmLoading: false, |
|
|
|
|
validatorRules: { |
|
|
|
@ -62,16 +88,29 @@ |
|
|
|
|
//正确给 cData 赋值的 方法 |
|
|
|
|
model: function(newVal,oldVal){ |
|
|
|
|
this.tableModel= newVal |
|
|
|
|
// 设置默认值 |
|
|
|
|
if(newVal == null){ |
|
|
|
|
this.tableModel = [ |
|
|
|
|
{ |
|
|
|
|
contents: "MZN600-287-800", |
|
|
|
|
createBy: null, |
|
|
|
|
createTime: null, |
|
|
|
|
id: "1458996032118022146", |
|
|
|
|
material: "厚", |
|
|
|
|
nums: "MZN600-287-800", |
|
|
|
|
picture: "12", |
|
|
|
|
specs: "21", |
|
|
|
|
store: 21, |
|
|
|
|
supplierInfo: "河南驻马店", |
|
|
|
|
typeId: "12", |
|
|
|
|
updateBy: null, |
|
|
|
|
updateTime: null,} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
if(this.tableModel.length == 1){ |
|
|
|
|
this.flag = false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
fabricId: function(newVal,oldVal){ |
|
|
|
|
this.id = newVal |
|
|
|
|
this.$http.get('/accessories/zyAccessories/queryById?id='+this.id).then( |
|
|
|
|
res=>{ |
|
|
|
|
//问题:对应辅料id查不到数据 |
|
|
|
|
console.log(this.id) |
|
|
|
|
console.log(res.result) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getTableModel(){ |
|
|
|
|