Authored by zhaoqing

商品vip设置

@@ -145,9 +145,7 @@ var g = new common.grid({ @@ -145,9 +145,7 @@ var g = new common.grid({
145 display: "状态", 145 display: "状态",
146 render: function (item) { 146 render: function (item) {
147 var HtmArr = []; 147 var HtmArr = [];
148 - if(item.productVipStatus == 0){  
149 - HtmArr.push('<label>跟随店铺</label>');  
150 - }else if(item.productVipStatus == 1){ 148 + if(item.productVipStatus == 1){
151 HtmArr.push('<label>开启</label>'); 149 HtmArr.push('<label>开启</label>');
152 }else{ 150 }else{
153 HtmArr.push('<label>关闭</label>'); 151 HtmArr.push('<label>关闭</label>');
@@ -158,16 +156,9 @@ var g = new common.grid({ @@ -158,16 +156,9 @@ var g = new common.grid({
158 display: '操作', 156 display: '操作',
159 render: function (item) { 157 render: function (item) {
160 var HtmArr = []; 158 var HtmArr = [];
161 - if(item.productVipStatus == 0){  
162 - HtmArr.push('<label><input name="'+item.productSKN+'" type="radio" value="1" onclick="changeStatus('+item.productSKN+',1)"/>开启</label>');  
163 - HtmArr.push('<label><input name="'+item.productSKN+'" type="radio" value="2" onclick="changeStatus('+item.productSKN+',2)"/>关闭</label>');  
164 - }else if(item.productVipStatus == 1){  
165 - HtmArr.push('<label><input name="'+item.productSKN+'" type="radio" value="0" onclick="changeStatus('+item.productSKN+',0)"/>跟随店铺</label>');  
166 - HtmArr.push('<label><input name="'+item.productSKN+'" type="radio" value="2" onclick="changeStatus('+item.productSKN+',2)"/>关闭</label>');  
167 - }else{  
168 - HtmArr.push('<label><input name="'+item.productSKN+'" type="radio" value="0" onclick="changeStatus('+item.productSKN+',0)"/>跟随店铺</label>');  
169 - HtmArr.push('<label><input name="'+item.productSKN+'" type="radio" value="1" onclick="changeStatus('+item.productSKN+',1)"/>开启</label>');  
170 - } 159 + HtmArr.push('<a onclick="changeStatus('+item.productSKN+',0)" href="javascript:;" class="btn btn-primary">跟随店铺</a>');
  160 + HtmArr.push('<a onclick="changeStatus('+item.productSKN+',1)" href="javascript:;" class="btn btn-info">开启</a>');
  161 + HtmArr.push('<a onclick="changeStatus('+item.productSKN+',2)" href="javascript:;" class="btn btn-danger">关闭</a>');
171 return HtmArr.join(''); 162 return HtmArr.join('');
172 } 163 }
173 }] 164 }]