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
486a8f14
Commit
486a8f14
authored
Mar 04, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
座位图修改
parent
65772c55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
47 deletions
+101
-47
TheaterSeat.cshtml
...ll.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
+101
-47
No files found.
EheMall.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
View file @
486a8f14
...
...
@@ -410,72 +410,128 @@
var
flag
=
col_input
%
2
==
1
?
true
:
false
;
var
rightArray
=
[];
var
leftArray
=
[];
for
(
var
i
=
0
;
i
<
newObj
.
ColumnArray
.
length
;
i
++
)
{
//单数列
if
(
flag
)
{
if
((
i
+
1
)
<
middleIndex
)
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
leftArray
.
push
(
'0'
);
var
leftCount
=
0
;
var
rightCount
=
0
;
var
shopType
=
2
;
var
leftNewArray
=
[];
var
rightNewArray
=
[];
var
newArray
=
[];
var
resultArray
=
[];
if
(
shopType
==
1
)
{
for
(
var
i
=
0
;
i
<
newObj
.
ColumnArray
.
length
;
i
++
)
{
//单数列
if
(
flag
)
{
if
((
i
+
1
)
<
middleIndex
)
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
leftArray
.
push
(
'0'
);
}
else
{
leftArray
.
push
(
i
+
1
);
leftCount
++
;
}
}
else
{
leftArray
.
push
(
i
+
1
);
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
rightArray
.
push
(
'0'
);
}
else
{
rightArray
.
push
(
i
+
1
);
rightCount
++
;
}
}
}
//双数列
else
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
rightArray
.
push
(
'0'
);
if
((
i
+
1
)
<=
middleIndex
)
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
leftArray
.
push
(
'0'
);
}
else
{
leftArray
.
push
(
i
+
1
);
leftCount
++
;
}
}
else
{
rightArray
.
push
(
i
+
1
);
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
rightArray
.
push
(
'0'
);
}
else
{
rightArray
.
push
(
i
+
1
);
rightCount
++
;
}
}
}
}
//双数列
else
{
if
((
i
+
1
)
<=
middleIndex
)
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
leftArray
.
push
(
'0'
);
}
else
{
leftArray
.
push
(
i
+
1
);
}
var
leftIndex
=
1
;
for
(
var
i
=
leftArray
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
leftArray
[
i
]
!=
"0"
)
{
leftNewArray
.
push
(
leftIndex
*
2
);
leftIndex
++
;
}
else
{
leftNewArray
.
push
(
"0"
);
}
}
var
rightIndex
=
1
;
for
(
var
i
=
0
;
i
<
rightArray
.
length
;
i
++
)
{
if
(
rightArray
[
i
]
!=
"0"
)
{
rightNewArray
.
push
((
rightIndex
*
2
-
1
));
rightIndex
++
;
}
else
{
rightNewArray
.
push
(
"0"
);
}
}
newArray
=
leftNewArray
.
reverse
();
resultArray
=
newArray
.
concat
(
rightNewArray
);
}
else
{
var
singleArray
=
[];
var
doubleArray
=
[];
var
newObjArray
=
[];
var
chooseIndex
=
1
;
for
(
var
i
=
0
;
i
<
newObj
.
ColumnArray
.
length
;
i
++
)
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
newObjArray
.
push
({
ID
:
i
,
Value
:
0
});
}
else
{
if
(
newObj
.
ColumnArray
[
i
].
SeatClassStr
==
'noSeat'
)
{
rightArray
.
push
(
'0'
);
if
(
i
%
2
==
0
)
{
singleArray
.
push
(
chooseIndex
);
}
else
{
rightArray
.
push
(
i
+
1
);
doubleArray
.
push
(
chooseIndex
);
}
chooseIndex
++
;
newObjArray
.
push
({
ID
:
i
,
Value
:
1
});
}
}
}
var
leftIndex
=
1
;
var
leftNewArray
=
[];
for
(
var
i
=
leftArray
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
leftArray
[
i
]
!=
"0"
)
{
leftNewArray
.
push
(
leftIndex
*
2
);
leftIndex
++
;
}
else
{
leftNewArray
.
push
(
"0"
);
}
}
var
rightIndex
=
1
;
var
rightNewArray
=
[];
for
(
var
i
=
0
;
i
<
rightArray
.
length
;
i
++
)
{
if
(
rightArray
[
i
]
!=
"0"
)
{
rightNewArray
.
push
((
rightIndex
*
2
-
1
));
rightIndex
++
;
var
doubleIndex
=
0
;
var
singleIndex
=
0
;
if
(
doubleArray
!=
null
&&
doubleArray
.
length
>
0
)
{
doubleIndex
=
doubleArray
.
length
-
1
;
}
else
{
rightNewArray
.
push
(
"0"
);
for
(
var
i
=
0
;
i
<
newObjArray
.
length
;
i
++
)
{
if
(
newObjArray
[
i
].
Value
==
1
)
{
if
(
doubleIndex
>=
0
)
{
resultArray
.
push
(
doubleArray
[
doubleIndex
]);
doubleIndex
--
;
}
else
{
if
(
singleIndex
<
singleArray
.
length
)
{
resultArray
.
push
(
singleArray
[
singleIndex
]);
singleIndex
++
;
}
}
}
else
{
resultArray
.
push
(
"0"
);
}
}
}
var
newArray
=
leftNewArray
.
reverse
();
var
resultArray
=
newArray
.
concat
(
rightNewArray
);
for
(
var
k
=
0
;
k
<
newObj
.
ColumnArray
.
length
;
k
++
)
{
newObj
.
ColumnArray
[
k
].
col
=
resultArray
[
k
];
}
...
...
@@ -507,7 +563,6 @@
}
}
}
}
else
if
(
isAdd
==
0
&&
newObj
.
rowIndex
==
""
)
{
newObj
.
rowIndex
=
(
dataRowIndex
+
1
)
+
"排"
;
...
...
@@ -532,7 +587,6 @@
}
}
}
}
else
{
SeatData
.
replace
(
SeatData
()[
dataRowIndex
],
newObj
);
...
...
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