Authored by 王钱钧

修改品牌款型功能bug

@@ -159,7 +159,7 @@ var util = { @@ -159,7 +159,7 @@ var util = {
159 // console.log(params); 159 // console.log(params);
160 //.match(/(\w+)+/g) 160 //.match(/(\w+)+/g)
161 for (var i in params) { 161 for (var i in params) {
162 - var aps = params[i].split(/\+|\-|\*|\/|\=|\!|\~|'|"/g); 162 + var aps = params[i].split(/\+|\-|\*|\/|\=|\!|\~|'|"|\|/g);
163 for (var j in aps) { 163 for (var j in aps) {
164 var ap = aps[j].replace(/^\s+|\s+$/, ''); 164 var ap = aps[j].replace(/^\s+|\s+$/, '');
165 // console.log(":" + ap + ":"); 165 // console.log(":" + ap + ":");
@@ -52,7 +52,8 @@ var g = new common.grid({ @@ -52,7 +52,8 @@ var g = new common.grid({
52 brandId: common.util.__input("brand"), 52 brandId: common.util.__input("brand"),
53 type: common.util.__input("models-type"), 53 type: common.util.__input("models-type"),
54 status: common.util.__input("status"), 54 status: common.util.__input("status"),
55 - bannarImg: common.util.__input("bannarImg") 55 + bannarImg: common.util.__input("bannarImg"),
  56 + id: common.util.__input("id")
56 }; 57 };
57 }, 58 },
58 columns: [{ 59 columns: [{
@@ -90,7 +91,7 @@ var g = new common.grid({ @@ -90,7 +91,7 @@ var g = new common.grid({
90 }, { 91 }, {
91 display: '状态', 92 display: '状态',
92 render: function(item) { 93 render: function(item) {
93 - return '<p>'+TypeEnum.enum[item.status] +'<p>'; 94 + return '<p>'+StatusEnum.enum[item.status] +'<p>';
94 } 95 }
95 }, { 96 }, {
96 display: '操作', 97 display: '操作',
@@ -134,7 +135,7 @@ $(document).on('click', '.edit-class-btn', function () { @@ -134,7 +135,7 @@ $(document).on('click', '.edit-class-btn', function () {
134 function attributeOp(prefix, url, item) { 135 function attributeOp(prefix, url, item) {
135 136
136 var a = new common.edit(".confirm"); 137 var a = new common.edit(".confirm");
137 - common.dialog.confirm(prefix + "款型系列", common.util.__template($("#template").html(), item), function () { 138 + common.dialog.confirm(prefix + "款型系列", common.util.__template2($("#template").html(), item), function () {
138 139
139 return a.submit(url, function (option) { 140 return a.submit(url, function (option) {
140 option.data.categoryId = item.categoryId; 141 option.data.categoryId = item.categoryId;
@@ -84,8 +84,8 @@ @@ -84,8 +84,8 @@
84 </label> 84 </label>
85 85
86 <div class="col-md-6"> 86 <div class="col-md-6">
87 - <select name="shop" id="shopsId" value="{shopsId}" tabindex="-1" title="" class="form-control height40">  
88 - <option value="-1">{shopsName}</option> 87 + <select name="shop" id="shopsId" value="[[shopsId]]" tabindex="-1" title="" class="form-control height40">
  88 + <option value="[[shopsId||'-1']]">[[shopsName||"请选择店铺"]]</option>
89 </select> 89 </select>
90 </div> 90 </div>
91 </div> 91 </div>
@@ -96,8 +96,8 @@ @@ -96,8 +96,8 @@
96 </label> 96 </label>
97 97
98 <div class="col-md-6"> 98 <div class="col-md-6">
99 - <select name="shop" id="brandId" value="{brandId}" tabindex="-1" title="" class="form-control height40">  
100 - <option value="-1">{brandName}</option> 99 + <select name="shop" id="brandId" value="[[brandId]]" tabindex="-1" title="" class="form-control height40">
  100 + <option value="[[brandId||'-1']]">[[brandName||"请选择品牌"]]</option>
101 </select> 101 </select>
102 </div> 102 </div>
103 </div> 103 </div>
@@ -108,7 +108,7 @@ @@ -108,7 +108,7 @@
108 </label> 108 </label>
109 109
110 <div class="panel-col"> 110 <div class="panel-col">
111 - <select name="type" id="type" tabindex="-1" title="" class="form-control height40"> 111 + <select name="type" id="type" value="[[type]]" tabindex="-1" title="" class="form-control height40">
112 <option value="-1">类型</option> 112 <option value="-1">类型</option>
113 <option value="1">品牌款型</option> 113 <option value="1">品牌款型</option>
114 <option value="2">品牌系列</option> 114 <option value="2">品牌系列</option>
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 </label> 123 </label>
124 124
125 <div class="col-md-6"> 125 <div class="col-md-6">
126 - <input id="seriesName" value="{seriesName}" class="form-control width300" type="text" placeholder="款型系列名称"> 126 + <input id="seriesName" value="[[seriesName]]" class="form-control width300" type="text" placeholder="款型系列名称">
127 </div> 127 </div>
128 </div> 128 </div>
129 129
@@ -131,7 +131,7 @@ @@ -131,7 +131,7 @@
131 <div class="form-group"> 131 <div class="form-group">
132 <label for="bannarImg" class="col-sm-3 control-label">banner图片:</label> 132 <label for="bannarImg" class="col-sm-3 control-label">banner图片:</label>
133 <div class="col-sm-6" id="colorUrlBox"> 133 <div class="col-sm-6" id="colorUrlBox">
134 - <input type="file" id="bannarImg" name="bannarImg"> 134 + <input type="file" id="bannarImg" name="bannarImg" value="[[bannarImg]]">
135 </div> 135 </div>
136 </div> 136 </div>
137 137
@@ -142,10 +142,12 @@ @@ -142,10 +142,12 @@
142 </label> 142 </label>
143 143
144 <div class="col-md-6"> 144 <div class="col-md-6">
145 - <input id="orderBy" value="{orderBy}" class="form-control width300" type="text" placeholder="排序"> 145 + <input id="orderBy" value="[[orderBy]]" class="form-control width300" type="text" placeholder="排序">
146 </div> 146 </div>
147 </div> 147 </div>
148 148
  149 + <input id="id" hidden="ture" value="[[id]]" />
  150 +
149 151
150 152
151 </form> 153 </form>