|
@@ -55,7 +55,7 @@
|
|
|
<!-- <el-table-column prop="detail" label="详情"> </el-table-column> -->
|
|
<!-- <el-table-column prop="detail" label="详情"> </el-table-column> -->
|
|
|
<!-- <el-table-column prop="type" label="套餐类型" :formatter="typeFormatter"> </el-table-column> -->
|
|
<!-- <el-table-column prop="type" label="套餐类型" :formatter="typeFormatter"> </el-table-column> -->
|
|
|
<el-table-column prop="categoryName" label="套餐类型"> </el-table-column>
|
|
<el-table-column prop="categoryName" label="套餐类型"> </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" fixed="right" min-width="220">
|
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" min-width="280">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<el-button @click="move($index, -1)" :disabled="$index == 0" type="success" size="mini" plain
|
|
<el-button @click="move($index, -1)" :disabled="$index == 0" type="success" size="mini" plain
|
|
|
>上移</el-button
|
|
>上移</el-button
|
|
@@ -68,8 +68,8 @@
|
|
|
plain
|
|
plain
|
|
|
>下移</el-button
|
|
>下移</el-button
|
|
|
>
|
|
>
|
|
|
- <el-button type="warning" plain @click="takeoff(row, false)">上架</el-button>
|
|
|
|
|
- <el-button type="warning" plain @click="takeoff(row, true)">下架</el-button>
|
|
|
|
|
|
|
+ <el-button type="warning" plain v-if="row.offShelf" @click="takeoff(row, false)">上架</el-button>
|
|
|
|
|
+ <el-button type="danger" plain v-else @click="takeoff(row, true)">下架</el-button>
|
|
|
<el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
<el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
<!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
|
|
<!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
|
|
|
</template>
|
|
</template>
|
|
@@ -289,14 +289,20 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
takeoff(row, take) {
|
|
takeoff(row, take) {
|
|
|
- this.$http.post(
|
|
|
|
|
- '/package/save',
|
|
|
|
|
- {
|
|
|
|
|
- ...row,
|
|
|
|
|
- offShelf: take
|
|
|
|
|
- },
|
|
|
|
|
- { body: 'json' }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post(
|
|
|
|
|
+ '/package/save',
|
|
|
|
|
+ {
|
|
|
|
|
+ ...row,
|
|
|
|
|
+ offShelf: take
|
|
|
|
|
+ },
|
|
|
|
|
+ { body: 'json' }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(_ => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ this.getData();
|
|
|
|
|
+ this.$message.success('成功');
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|