|
@@ -115,18 +115,24 @@ export default {
|
115
|
115
|
this.getList()
|
116
|
116
|
},
|
117
|
117
|
handleEdit (index, row) { // 编辑
|
118
|
|
- this.$router.push({ name: 'editGoodsSpec', query: {id: row.SpecId} })
|
|
118
|
+ this.$router.push({ name: 'editGoodsSpec', query: { id: row.SpecId } })
|
119
|
119
|
},
|
120
|
120
|
handleDelete (index, row) { // 删除
|
121
|
|
- console.log(index, row)
|
122
|
|
- this.$confirm('确认删除此渠道?', '提示', {
|
|
121
|
+ let name = '确认删除规格“' + row.SpecName + '”?'
|
|
122
|
+ this.$confirm(name, '提示', {
|
123
|
123
|
confirmButtonText: '确定',
|
124
|
124
|
cancelButtonText: '取消',
|
125
|
125
|
type: 'warning'
|
126
|
126
|
}).then(() => {
|
127
|
|
- this.$message({
|
128
|
|
- type: 'success',
|
129
|
|
- message: '删除成功!'
|
|
127
|
+ this.$ajax(this.$api.goodsManager.deleteGoodsSpec.url, {
|
|
128
|
+ method: this.$api.goodsManager.deleteGoodsSpec.method,
|
|
129
|
+ urlData: { id: row.SpecId }
|
|
130
|
+ }).then(res => {
|
|
131
|
+ this.$message({
|
|
132
|
+ type: 'success',
|
|
133
|
+ message: '删除成功!'
|
|
134
|
+ })
|
|
135
|
+ this.search()
|
130
|
136
|
})
|
131
|
137
|
}).catch(() => {
|
132
|
138
|
this.$message({
|