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
e5c1761b
Commit
e5c1761b
authored
Jan 31, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
座位表修改
parent
784bcedd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
34 deletions
+11
-34
TheaterSeat.cshtml
...ll.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
+11
-34
No files found.
EheMall.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
View file @
e5c1761b
...
...
@@ -352,8 +352,9 @@
self
.
reSeat
=
function
(
dataRowIndex
)
{
var
dataList
=
SeatData
();
var
newObj
=
self
.
clone
(
SeatData
()[
dataRowIndex
]);
var
col_input
=
$
(
"#col_input"
).
val
();
var
newObj
=
self
.
clone
(
SeatData
()[
dataRowIndex
]);
if
(
newObj
.
noLenth
>
0
)
{
var
middleIndex
=
col_input
%
2
==
1
?
parseInt
(
col_input
/
2
)
+
1
:
parseInt
(
col_input
/
2
);
...
...
@@ -361,7 +362,7 @@
var
rightArray
=
[];
var
leftArray
=
[];
var
newColumnArray
=
[];
for
(
var
i
=
0
;
i
<
newObj
.
ColumnArray
.
length
;
i
++
)
{
//单数列
...
...
@@ -403,10 +404,10 @@
}
}
}
leftArray
.
reverse
();
var
leftIndex
=
1
;
var
leftNewArray
=
[];
for
(
var
i
=
0
;
i
<
leftArray
.
length
;
i
++
)
for
(
var
i
=
leftArray
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
leftArray
[
i
]
!=
"No"
)
{
leftNewArray
.
push
(
leftIndex
*
2
);
...
...
@@ -428,36 +429,13 @@
rightNewArray
.
push
(
"No"
);
}
}
console
.
log
(
"rightArray"
,
rightNewArray
);
console
.
log
(
"leftArray"
,
leftNewArray
);
newObj
.
myArr
=
leftNewArray
.
concat
(
rightNewArray
);
var
newArray
=
leftNewArray
.
reverse
();
newObj
.
myArr
=
newArray
.
concat
(
rightNewArray
);
for
(
var
k
=
0
;
k
<
newObj
.
ColumnArray
.
length
;
k
++
)
{
newObj
.
ColumnArray
[
k
].
col
=
newObj
.
myArr
[
k
];
}
SeatData
.
replace
(
SeatData
()[
dataRowIndex
],
newObj
);
}
SeatData
.
replace
(
SeatData
()[
dataRowIndex
],
newObj
);
//for (var i = 0; i
<
dataList
.
length
;
i
++
)
{
// var jiArr = [];
// var ouArr = [];
// if (dataList[i].noLenth > 0) {
// var newObj = self.clone(SeatData()[i]);
// for (var j = 0; j
<
newObj
.
noLenth
;
j
++
)
{
// if (j % 2 == 0) {
// ouArr.push(j + 1);
// } else {
// jiArr.push(j + 1);
// }
// }
// jiArr.reverse();
// newObj.myArr = jiArr.concat(ouArr);
// var _index = 0;
// for (var k = 0; k
<
newObj
.
ColumnArray
.
length
;
k
++
)
{
// if (newObj.ColumnArray[k].SeatClassStr != 'noSeat') {
// newObj.ColumnArray[k].col = newObj.myArr[_index];
// _index++;
// }
// }
// SeatData.replace(SeatData()[i], newObj);
// }
//}
}
//用做ko更新数组某一项数据时的克隆,无需重新清空并绑定整个列表
...
...
@@ -706,7 +684,6 @@
}
})
})
});
</script>
</body>
...
...
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