Commit 7bd16f7c by 吕明尚

更改套餐列表,房间列表

parent 4dac456e
......@@ -298,19 +298,20 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
let name;
const ids = row.id || this.ids;
this.getRoomPackList(ids);
var roomId = roomPackList[0].roomId;
getRoom(roomId).then(response => {
name = response.data.name;
this.$modal.confirm("当前套餐下有"+name+"房间,请确认删除").then((result) =>{
getRoomPack(row.id).then(response => {
let roomnNameStr = `是否确认删除${row.name}的数据?`
if(response.data.length>0){
let str = response.data.map(item=>item.roomName).join("、")
roomnNameStr = `是否确认删除${row.name}数据及其关联的房间${str}下的绑定套餐?`
}
this.$modal.confirm(roomnNameStr).then((result) =>{
return delPack(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
});
},
/** 导出按钮操作 */
handleExport() {
......
......@@ -129,7 +129,7 @@
<el-table-column label="套餐" align="center" prop="packIds" >
<template slot-scope="scope">
<div v-if="scope.row.packIds" style="display: flex;flex-wrap: wrap;width: 100%;">
<dict-tag style="margin: 0 3px;" v-for="(item ,k) in packList" :key="k" :options="packIds" :value="item.name+'-'+'时段'+item.packaStartPeriod+'-'+item.packaEndPeriod"/>
<dict-tag style="margin: 0 3px;" v-for="(item ,k) in scope.row.packIds" :key="k" :options="packList" :value="item"/>
</div>
</template>
</el-table-column>
......@@ -300,7 +300,10 @@ export default {
created() {
this.onGetAllStoreList()
this.onPackList()
this.getList();
},
mounted() {
console.log(this.dict)
},
methods: {
onChange(e){
......@@ -318,7 +321,23 @@ export default {
},
onPackList(){
query().then(res => {
this.packList = res.data
this.packList = res.data.map(obj=>{
return {
...obj,
raw:{
dictSort: 1,
dictValue: "1",
listClass : "primary",
cssClass:''
},
value: obj.id.toString(),
label: obj.name,
}
})
console.log(this.packList,9090999)
this.getList();
})
},
......@@ -329,7 +348,8 @@ export default {
this.roomList = response.rows.map(item=>{
return {
...item,
facilities: item.facilities? item.facilities.split(","): []
facilities: item.facilities? item.facilities.split(","): [],
packIds: item.packIds? item.packIds.split(","): []
}
});
this.total = response.total;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment