<template>
|
<el-dialog :visible.sync="isShow" :title="title" width="800px" :modal-append-to-body="false"
|
:close-on-click-modal="false">
|
<div class="commodityInfo-style">
|
<list-condition-template ref="table" :tableData="tableData" :isShowPage="false">
|
<template slot="columns">
|
<el-table-column label="商品主编码" prop="spuNum" width="150px" show-overflow-tooltip>
|
</el-table-column>
|
<el-table-column label="商品名称" prop="spuName" min-width="150px" show-overflow-tooltip>
|
</el-table-column>
|
<el-table-column label="规格型号" prop="spec" width="100px" show-overflow-tooltip>
|
</el-table-column>
|
<el-table-column label="单位" prop="unit" width="100px" show-overflow-tooltip>
|
</el-table-column>
|
<el-table-column label="调拨数量" prop="transferStock" width="100px" show-overflow-tooltip>
|
</el-table-column>
|
</template>
|
</list-condition-template>
|
</div>
|
<div slot="footer" class="dialog-footer">
|
<el-button size="mini" @click="isShow = false">关闭</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
|
<script>
|
export default {
|
name: "commodityInfoDialog",
|
props: {
|
dialogVisible: {
|
type: Boolean,
|
default: false
|
},
|
title: {
|
type: String,
|
default: ''
|
}
|
},
|
data() {
|
return {
|
isShow: false,
|
tableData: [],
|
}
|
},
|
watch: {
|
/**
|
* 监控外部显示变量变化
|
* 传递到dialog组件
|
*/
|
dialogVisible: function (newShow, oldShow) {
|
this.isShow = newShow
|
},
|
/**
|
* 监控内部显示属性变化
|
* 传递到外部调用变量
|
*/
|
isShow: function (newDialogShow, oldDialogShow) {
|
this.$emit('update:dialogVisible', newDialogShow)
|
if (!newDialogShow) {
|
this.initData();
|
}
|
}
|
},
|
methods: {
|
lookInventoryGoods(data) {
|
this.tableData = data;
|
},
|
initData() {
|
this.tableData = [];
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.commodityInfo-style {
|
.main-b-style {
|
padding: 0 !important;
|
}
|
}
|
</style>
|