| | |
| | | { |
| | | title: '编辑', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | this.showAdd(row.id); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.states == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.goodsName + '"吗?').then(function () { |
| | | vm.$modal.confirm('确认要' + text + '"' + row.goodsName + '"物品吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.states = row.states == 1 ? 0 : 1 |
| | | updStatus(params).then(res => { |
| | |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.goodsName + '"的机构吗?') |
| | | .confirm('是否确认删除名称为"' + row.goodsName + '"的物品吗?') |
| | | .then(function () { |
| | | delGoods({id: row.id}).then((res) => { |
| | | }); |
| | |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | showAdd(id) { |
| | | this.editSetting.id = id; |
| | | this.editSetting.title = id?'编辑':'新增'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | showSpecs(row) { |
| | | this.specsSetting.id = row.id; |
| | | this.specsSetting.goodsTemplatesId = row.id; |
| | | this.specsSetting.show = true; |
| | | }, |
| | | // 查询table列表 |