Commit b4083949 authored by 吴春's avatar 吴春

编辑座位图有问题,提交

parent 220e6d1c
......@@ -138,7 +138,7 @@ namespace EheMall.Web.Areas.Admin.Controllers
}
TSList.Add(new
{
houseType = iTheaterSeatFloor,
rowIndex = RowName == "" ? item.ToString() : RowName,
rowOriIndex = item,
......@@ -146,23 +146,28 @@ namespace EheMall.Web.Areas.Admin.Controllers
});
}
ViewBag.TSListStr = JsonConvert.SerializeObject(TSList);
ViewBag.RowCount = RowList.Count;
ViewBag.ColCount = totalCol;
//获取楼层类型
var floorList = Helpers.EnumHelper.GetEnumList(typeof(Models.Enums.TheaterSeatFloorEnum));
List<SelectListItem> FList = new List<SelectListItem>();
foreach (var item in floorList)
{
if (item.Value == "3")
{
FList.Add(new SelectListItem() { Text = item.Key, Value = item.Value, Selected = true });
}
else
{
FList.Add(new SelectListItem() { Text = item.Key, Value = item.Value });
}
}
ViewBag.FloorList = FList;
int RowCount= TheaterSeatList.Where(x => x.iTheaterSeatFloor == TheaterSeatFloorEnum.Loft).Max(x => x.iRow);
ViewBag.RowCount = RowCount;
ViewBag.ColCount = TheaterSeatList.Where(x => x.iTheaterSeatFloor == TheaterSeatFloorEnum.Loft).Max(x => x.iCol);
ViewBag.TangRowCount = (TheaterSeatList.Where(x => x.iTheaterSeatFloor == TheaterSeatFloorEnum.NaveAisle).Max(x => x.iRow)- RowCount);
ViewBag.TangColCount = TheaterSeatList.Where(x => x.iTheaterSeatFloor == TheaterSeatFloorEnum.NaveAisle).Max(x => x.iCol);
////获取楼层类型
//var floorList = Helpers.EnumHelper.GetEnumList(typeof(Models.Enums.TheaterSeatFloorEnum));
//List<SelectListItem> FList = new List<SelectListItem>();
//foreach (var item in floorList)
//{
// if (item.Value == "3")
// {
// FList.Add(new SelectListItem() { Text = item.Key, Value = item.Value, Selected = true });
// }
// else
// {
// FList.Add(new SelectListItem() { Text = item.Key, Value = item.Value });
// }
//}
//ViewBag.FloorList = FList;
return PartialView();
}
......
......@@ -231,8 +231,8 @@
</div>
</div>
<div style="width:100%;text-align: center;">
<input type="text" class="seats_input" id="row_input" value="@ViewBag.RowCount" />
<input type="text" class="seats_input" id="col_input" value="@ViewBag.ColCount" />
<input type="text" class="seats_input" id="row_input" value="0" />
<input type="text" class="seats_input" id="col_input" value="0" />
<select class="SelectType">
<option value='1'>楼厢</option>
<option value='3'>堂厢</option>
......@@ -249,21 +249,24 @@
//有数据初始化
var arr =@Html.Raw(ViewBag.TSListStr);
var lourow = 0;//楼厢行
var loucol = 0;//楼厢列
var tangrow = 0;//堂厢行
var tangcol = 0;//堂厢列
var lourow = parseInt('@ViewBag.RowCount');//楼厢行
var loucol = parseInt('@ViewBag.ColCount');//楼厢列
var tangrow = parseInt('@ViewBag.TangRowCount');//堂厢行
var tangcol = parseInt('@ViewBag.TangColCount');//堂厢列
var into = 0;
arr.forEach(function (x) {
into += 1;
console.log(x,'xxxxx');
SeatData.push(x);
});
console.log(into,'info');
function MyViewModel() {
var self = this;
//定义数组对象
// self.SeatData = ko.observableArray([]);
self.InitSeat = function () {
console.log(SeatData(), 'seatdata');
console.log(11);
SeatData().length = 0;
if ($(".SelectType").val() == "3") {
......
......@@ -50,7 +50,7 @@
<div class="chooseBtn">
<div class="rightCenter" style="margin-top:10px;">总价</div>
<div class="btnContent">
<div><span style="font-size:14px;">¥</span><span class="tPrice totalPrice"></span></div>
<div><span style="font-size:14px;">¥</span><span class="tPrice totalPrice">0</span></div>
<input type="button" class="sureBtn" value="确认" />
</div>
</div>
......@@ -154,7 +154,8 @@
layer.msg(data.message, {
icon: 1,//提示的样式
end: function () {
window.location.reload();
location.href = '@Url.Action("Index")';
//window.location.reload();
}
});
} else {
......
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