商品管理:删除提示语优化和添加弹框固定

beta
路明慧 1 year ago
parent f88b5f404c
commit fb44e1b479
  1. 8
      jianshui-ui/src/views/platform/product_info/index.vue

@ -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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="商品编码" prop="productCode"> <el-form-item label="商品编码" prop="productCode">
<el-input v-model="form.productCode" placeholder="请输入商品编码" /> <el-input v-model="form.productCode" placeholder="请输入商品编码" />
@ -256,6 +256,8 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
//
productCodes: [],
// //
single: true, single: true,
// //
@ -351,6 +353,7 @@ export default {
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.productCodes = selection.map(item => item.productCode)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -393,7 +396,8 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; 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); return delProduct_info(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();

Loading…
Cancel
Save