| | |
| | | <span>打印</span> |
| | | </span> |
| | | <span class="btn" style="margin-left: 15px"> |
| | | <el-button plain size="mini" style="margin-left: 15px" @click="deleteClick">删除</el-button> |
| | | <i class="el-icon-s-tools"></i> |
| | | <span>动作</span> |
| | | <!-- <el-button plain size="mini" style="margin-left: 15px" @click="deleteClick">删除</el-button> --> |
| | | </span> |
| | | <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | </div> |
| | |
| | | deleteWarehouse({ id: data.id }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("刪除成功"); |
| | | this.$message.success("刪除成功!"); |
| | | this.$emit("refresh"); |
| | | } |
| | | }else { |
| | | this.$message.warning(res.msg?res.msg:"刪除失败!") |
| | | } |
| | | }); |
| | | }, |
| | | // 编辑 |
| | |
| | | addWarehouse(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("添加成功"); |
| | | this.$message.success("添加成功!"); |
| | | this.$emit('refresh') |
| | | }else { |
| | | this.$message.warning(res.msg?res.msg:"添加失败!") |
| | | } |
| | | }); |
| | | } else { |
| | | updateWarehouse(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("编辑成功"); |
| | | this.$message.success("编辑成功!"); |
| | | this.$emit('refresh') |
| | | }else { |
| | | this.$message.warning(res.msg?res.msg:"编辑失败!") |
| | | } |
| | | }); |
| | | } |