Commit 1793a385 authored by 黄奎's avatar 黄奎

剧院座位图修改

parent 486a8f14
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</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="10" /> <input type="text" class="seats_input" id="row_input" value="10" />
<input type="text" class="seats_input" id="col_input" value="20" /> <input type="text" class="seats_input" id="col_input" value="10" />
<select class="SelectType"> <select class="SelectType">
<option value='1'>楼厢</option> <option value='1'>楼厢</option>
<option value='3'>堂厢</option> <option value='3'>堂厢</option>
...@@ -507,7 +507,8 @@ ...@@ -507,7 +507,8 @@
newObjArray.push({ID:i,Value:1}); newObjArray.push({ID:i,Value:1});
} }
} }
this.console.log("singleArray", singleArray);
this.console.log("doubleArray", doubleArray);
var doubleIndex = 0; var doubleIndex = 0;
var singleIndex = 0; var singleIndex = 0;
if (doubleArray != null && doubleArray.length > 0) { if (doubleArray != null && doubleArray.length > 0) {
...@@ -515,12 +516,12 @@ ...@@ -515,12 +516,12 @@
} }
for (var i = 0; i < newObjArray.length; i++) { for (var i = 0; i < newObjArray.length; i++) {
if (newObjArray[i].Value == 1) { if (newObjArray[i].Value == 1) {
if (doubleIndex >= 0) { if (doubleIndex >= 0 && doubleArray != null && doubleArray.length>0) {
resultArray.push(doubleArray[doubleIndex]); resultArray.push(doubleArray[doubleIndex]);
doubleIndex--; doubleIndex--;
} }
else { else {
if (singleIndex < singleArray.length) { if (singleIndex < singleArray.length && singleArray != null && singleArray.length > 0) {
resultArray.push(singleArray[singleIndex]); resultArray.push(singleArray[singleIndex]);
singleIndex++; singleIndex++;
} }
......
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