Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Theater
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴春
Theater
Commits
b6e85fd7
Commit
b6e85fd7
authored
Mar 05, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
座位图修改
parent
1793a385
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
12 deletions
+44
-12
TheaterSeat.cshtml
...ll.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
+44
-12
No files found.
EheMall.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
View file @
b6e85fd7
...
...
@@ -350,7 +350,7 @@
* 生成楼行对象
*/
self
.
CreateLouRow
=
function
(
index
,
array
)
{
var
dataRow
=
{
rowIndex
:
(
index
+
1
+
'排'
),
rowOriIndex
:
index
+
1
,
houseType
:
1
,
ColumnArray
:
[]
};
var
dataRow
=
{
rowIndex
:
(
index
+
1
+
'排'
),
rowOriIndex
:
index
+
1
,
houseType
:
1
,
ColumnArray
:
[]
,
HasValue
:
true
};
for
(
var
j
=
0
;
j
<
array
.
length
;
j
++
)
{
var
dataColumn
=
{
col
:
array
[
j
],
...
...
@@ -371,10 +371,10 @@
self
.
CreateTangRow
=
function
(
index
,
lourow
,
array
)
{
var
dataRow
=
{};
if
(
index
+
1
>
lourow
)
{
dataRow
=
{
rowIndex
:
((
index
+
1
-
lourow
)
+
'排'
),
rowOriIndex
:
index
+
1
,
houseType
:
3
,
ColumnArray
:
[]
};
dataRow
=
{
rowIndex
:
((
index
+
1
-
lourow
)
+
'排'
),
rowOriIndex
:
index
+
1
,
houseType
:
3
,
ColumnArray
:
[]
,
HasValue
:
true
};
}
else
{
dataRow
=
{
rowIndex
:
(
index
+
1
+
'排'
),
rowOriIndex
:
index
+
1
,
houseType
:
3
,
ColumnArray
:
[]
};
dataRow
=
{
rowIndex
:
(
index
+
1
+
'排'
),
rowOriIndex
:
index
+
1
,
houseType
:
3
,
ColumnArray
:
[]
,
HasValue
:
true
};
}
for
(
var
j
=
0
;
j
<
array
.
length
;
j
++
)
{
var
dataColumn
=
{
...
...
@@ -395,7 +395,7 @@
};
self
.
reSeat
=
function
(
dataRowIndex
,
isAdd
,
houseType
)
{
var
dataList
=
SeatData
();
var
col_input
=
$
(
"#col_input"
).
val
();
var
newObj
=
self
.
cloneTwo
(
SeatData
()[
dataRowIndex
]);
if
(
newObj
!=
null
&&
newObj
.
rowOriIndex
)
{
...
...
@@ -507,8 +507,6 @@
newObjArray
.
push
({
ID
:
i
,
Value
:
1
});
}
}
this
.
console
.
log
(
"singleArray"
,
singleArray
);
this
.
console
.
log
(
"doubleArray"
,
doubleArray
);
var
doubleIndex
=
0
;
var
singleIndex
=
0
;
if
(
doubleArray
!=
null
&&
doubleArray
.
length
>
0
)
{
...
...
@@ -541,15 +539,15 @@
if
(
newObj
.
noLenth
==
newObj
.
ColumnArray
.
length
&&
isAdd
==
1
)
{
newObj
.
rowIndex
=
""
;
SeatData
.
replace
(
SeatData
()[
dataRowIndex
],
newObj
);
var
subindex
=
dataRowIndex
;
//楼厢
if
(
houseType
==
1
)
{
for
(
var
i
=
dataRowIndex
;
i
<
lourow
;
i
++
)
{
var
tempData
=
self
.
cloneTwo
(
SeatData
()[
i
]);
if
(
tempData
.
rowIndex
!=
""
)
{
var
subindex
=
self
.
CreateNum
(
i
,
1
);
tempData
.
rowIndex
=
(
subindex
+
"排"
);
SeatData
.
replace
(
SeatData
()[
i
],
tempData
);
subindex
++
;
}
}
}
...
...
@@ -558,21 +556,21 @@
for
(
var
i
=
dataRowIndex
;
i
<
(
tangrow
+
lourow
);
i
++
)
{
var
tempData
=
self
.
cloneTwo
(
SeatData
()[
i
]);
if
(
tempData
.
rowIndex
!=
""
)
{
var
subindex
=
self
.
CreateNum
(
i
,
1
);
tempData
.
rowIndex
=
(
subindex
-
lourow
)
+
"排"
;
SeatData
.
replace
(
SeatData
()[
i
],
tempData
);
subindex
++
;
}
}
}
}
else
if
(
isAdd
==
0
&&
newObj
.
rowIndex
==
""
)
{
newObj
.
rowIndex
=
(
dataRowIndex
+
1
)
+
"排"
;
newObj
.
rowIndex
=
(
dataRowIndex
+
1
)
+
"排"
;
SeatData
.
replace
(
SeatData
()[
dataRowIndex
],
newObj
);
if
(
houseType
==
1
)
{
for
(
var
i
=
dataRowIndex
+
1
;
i
<
lourow
;
i
++
)
{
var
tempData
=
self
.
cloneTwo
(
SeatData
()[
i
]);
if
(
tempData
.
rowIndex
!=
""
)
{
var
newIndex
=
i
+
1
;
var
newIndex
=
self
.
CreateNum
(
i
,
3
)
;
tempData
.
rowIndex
=
newIndex
+
"排"
;
SeatData
.
replace
(
SeatData
()[
i
],
tempData
);
}
...
...
@@ -582,7 +580,7 @@
for
(
var
i
=
dataRowIndex
;
i
<
(
tangrow
+
lourow
);
i
++
)
{
var
tempData
=
self
.
cloneTwo
(
SeatData
()[
i
]);
if
(
tempData
.
rowIndex
!=
""
)
{
var
newIndex
=
i
+
1
;
var
newIndex
=
self
.
CreateNum
(
i
,
3
)
;
tempData
.
rowIndex
=
(
newIndex
-
lourow
)
+
"排"
;
SeatData
.
replace
(
SeatData
()[
i
],
tempData
);
}
...
...
@@ -595,6 +593,33 @@
}
};
/**
* 生成行号
*/
self
.
CreateNum
=
function
(
index
,
type
)
{
var
num
=
0
;
var
dataList
=
SeatData
();
if
(
type
==
1
)
{
for
(
var
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
if
(
dataList
[
i
].
houseType
==
1
)
{
if
(
i
<=
index
&&
dataList
[
i
].
HasValue
)
{
num
++
;
}
}
}
}
else
{
for
(
var
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
if
(
dataList
[
i
].
houseType
==
3
)
{
if
(
i
<=
index
&&
dataList
[
i
].
HasValue
)
{
num
++
;
}
}
}
}
return
num
;
};
/**
* 用做ko更新数组某一项数据时的克隆,无需重新清空并绑定整个列表
*/
...
...
@@ -705,6 +730,13 @@
});
var
newRowIndex
=
parentRowIndex
-
1
;
SeatData
()[
newRowIndex
].
noLenth
=
$
(
rowObj
).
find
(
".noSeat"
).
length
;
if
(
SeatData
()[
newRowIndex
].
noLenth
>
0
)
{
SeatData
()[
newRowIndex
].
HasValue
=
!
(
SeatData
()[
newRowIndex
].
noLenth
==
SeatData
()[
newRowIndex
].
ColumnArray
.
length
);
}
else
{
SeatData
()[
newRowIndex
].
HasValue
=
true
;
}
self
.
reSeat
(
newRowIndex
,
isAdd
,
parentHouseType
);
if
(
SeatData
()[
newRowIndex
].
noLenth
>
0
&&
isAdd
==
1
)
{
$
(
".row_input"
).
each
(
function
(
x
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment