Authored by weiqingting

完善

@@ -102,21 +102,20 @@ var Order = { @@ -102,21 +102,20 @@ var Order = {
102 var e = this.e, 102 var e = this.e,
103 d = Order.Data, 103 d = Order.Data,
104 c = Order.Common; 104 c = Order.Common;
105 - var i = 0,  
106 - key; 105 + var i = 0;
107 106
108 e.$total.html('0.00'); 107 e.$total.html('0.00');
109 e.$statistics.slice(3, 5).hide(); 108 e.$statistics.slice(3, 5).hide();
110 e.$statistics.slice(0, 5).find('em').html('0.00'); 109 e.$statistics.slice(0, 5).find('em').html('0.00');
111 110
112 - for (key in d) { 111 + $.each(d, function(key) {
113 if (d.hasOwnProperty(key)) { 112 if (d.hasOwnProperty(key)) {
114 if (d[key]) { 113 if (d[key]) {
115 e.$statistics.eq(i).show().find('em').html(c.strFixed(d[key])); 114 e.$statistics.eq(i).show().find('em').html(c.strFixed(d[key]));
116 } 115 }
117 } 116 }
118 i++; 117 i++;
119 - } 118 + });
120 e.$total.html(c.strFixed(c.calucate())); 119 e.$total.html(c.strFixed(c.calucate()));
121 120
122 } 121 }