|
|
|
@ -198,7 +198,7 @@ |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<!-- 添加或修改商品信息对话框 --> |
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
|
|
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
|
|
<el-form-item label="商品编码" prop="productCode"> |
|
|
|
|
<el-input v-model="form.productCode" placeholder="请输入商品编码" /> |
|
|
|
@ -256,6 +256,8 @@ export default { |
|
|
|
|
loading: true, |
|
|
|
|
// 选中数组 |
|
|
|
|
ids: [], |
|
|
|
|
//选中商品编码 |
|
|
|
|
productCodes: [], |
|
|
|
|
// 非单个禁用 |
|
|
|
|
single: true, |
|
|
|
|
// 非多个禁用 |
|
|
|
@ -351,6 +353,7 @@ export default { |
|
|
|
|
// 多选框选中数据 |
|
|
|
|
handleSelectionChange(selection) { |
|
|
|
|
this.ids = selection.map(item => item.id) |
|
|
|
|
this.productCodes = selection.map(item => item.productCode) |
|
|
|
|
this.single = selection.length!==1 |
|
|
|
|
this.multiple = !selection.length |
|
|
|
|
}, |
|
|
|
@ -393,7 +396,8 @@ export default { |
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
|
handleDelete(row) { |
|
|
|
|
const ids = row.id || this.ids; |
|
|
|
|
this.$modal.confirm('是否确认删除商品信息编号为"' + ids + '"的数据项?').then(function() { |
|
|
|
|
const codes = row.productCode || this.productCodes; |
|
|
|
|
this.$modal.confirm('是否确认删除商品编码为"' + codes + '"的数据项?').then(function() { |
|
|
|
|
return delProduct_info(ids); |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList(); |
|
|
|
|