| | |
| | | import OperaGoodsWindow from '@/components/business/OperaGoodsWindow' |
| | | import selectProduct from '@/components/business/selectProduct' |
| | | import { brand, baseCategory, importExcel } from '@/api/system/common.js' |
| | | import { updateStatusById, queryById, exportDoc, batchUpdateDisableById } from '@/api/business/goods.js' |
| | | import { updateStatus, queryById, exportDoc } from '@/api/business/goods.js' |
| | | export default { |
| | | name: 'Goods', |
| | | extends: BaseTable, |
| | |
| | | brandId: '' |
| | | }, |
| | | ids: '', |
| | | idList: [], |
| | | categoryList: [], |
| | | brandList: [], |
| | | statusList: [ |
| | |
| | | handleSelectionChange(e) { |
| | | let arr = e.map(item => item.id) |
| | | this.ids = arr.join(',') |
| | | this.idList = arr; |
| | | console.log(this.ids) |
| | | }, |
| | | // 批量上下架 |
| | |
| | | this.$message.warning({ message: '至少选择一项内容' }) |
| | | return |
| | | } |
| | | batchUpdateDisableById({ |
| | | ids: this.ids, |
| | | updateStatus({ |
| | | idList: this.idList, |
| | | status: type |
| | | }).then(res => { |
| | | this.$message.success({ message: res }) |
| | | this.$tip.apiSuccess('操作成功'); |
| | | // this.$message.success({ message:res.message }) |
| | | this.search() |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | changeStatus(item) { |
| | | updateDisableById({ |
| | | id: item.id, |
| | | updateStatus({ |
| | | idList: [item.id], |
| | | status: item.status |
| | | }).then(res => { |
| | | this.$tip.apiSuccess('更新成功') |