Commit b4083949 authored by 吴春's avatar 吴春

编辑座位图有问题,提交

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