...
|
...
|
@@ -216,7 +216,9 @@ |
|
|
editMaxSortId: $('#editMaxSortId'),
|
|
|
editMidSortId: $('#editMidSortId'),
|
|
|
editSeriesId: $('#editSeriesId'),
|
|
|
imageUpload: $('#imageUpload')
|
|
|
imageUpload: $('#imageUpload'),
|
|
|
keyword: $('#keyword'),
|
|
|
colorSizeTable: $('#colorSizeTable')
|
|
|
};
|
|
|
},
|
|
|
initFormData: function(detail) {
|
...
|
...
|
@@ -231,6 +233,7 @@ |
|
|
this.dom.editMaxSortId.combobox('select', detail.maxSortId);
|
|
|
this.dom.editMidSortId.combobox('select', detail.midSortId);
|
|
|
this.dom.editSeriesId.combobox('select', detail.seriesId);
|
|
|
this.dom.keyword.textbox('setValue', detail.keyWords);
|
|
|
$('input[name=gender]').eq(detail.gender - 1).attr('checked','true');
|
|
|
$('.group-color li[data-id=' + detail.colorId + ']').addClass('actived');
|
|
|
|
...
|
...
|
@@ -250,7 +253,7 @@ |
|
|
width: 460
|
|
|
});
|
|
|
|
|
|
$('#keyword').textbox({
|
|
|
this.dom.keyword.textbox({
|
|
|
width: 700
|
|
|
});
|
|
|
|
...
|
...
|
@@ -334,7 +337,7 @@ |
|
|
required: true,
|
|
|
missingMessage: "最高价不能为空"
|
|
|
});
|
|
|
$('#colorSizeTable').myDatagrid({
|
|
|
this.dom.colorSizeTable.myDatagrid({
|
|
|
fit: false,
|
|
|
fitColumns: true,
|
|
|
autoRowHeight: true,
|
...
|
...
|
@@ -586,7 +589,7 @@ |
|
|
gender: +$('input[name="gender"]:checked').val(),
|
|
|
goodsName: $('.goods-name').length>0 && $('.goods-name').textbox('getValue') || '',
|
|
|
imageUrlList: imageUrlList,
|
|
|
keyWords: $('#keyword').textbox('getValue'),
|
|
|
keyWords: that.dom.keyword.textbox('getValue'),
|
|
|
maxPrice: that.dom.editMaxPrice.textbox('getValue'),
|
|
|
maxSortId: +that.dom.editMaxSortId.combobox('getValue'),
|
|
|
midSortId: +that.dom.editMidSortId.combobox('getValue'),
|
...
|
...
|
@@ -656,14 +659,20 @@ |
|
|
dataType: "json",
|
|
|
type: "POST",
|
|
|
data: JSON.stringify(ajaxData),
|
|
|
success: function(data) {
|
|
|
that.submitFlag = false;
|
|
|
success: function(ret) {
|
|
|
$.messager.progress("close");
|
|
|
$.messager.alert('操作提示', '提交成功!');
|
|
|
window.location.href = contextPath + "/html/product/productList.html";
|
|
|
that.submitFlag = false;
|
|
|
|
|
|
if (ret && ret.code == 200) {
|
|
|
$.messager.alert('操作提示', '提交成功!');
|
|
|
window.location.href = contextPath + "/html/product/productList.html";
|
|
|
} else {
|
|
|
$.messager.alert('操作提示', ret.message || '提交失败');
|
|
|
}
|
|
|
},
|
|
|
error: function(err) {
|
|
|
that.submitFlag = false;
|
|
|
$.messager.progress("close");
|
|
|
$.messager.alert('操作提示', err.message || '提交失败');
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -673,10 +682,10 @@ |
|
|
mergeCells: function() {
|
|
|
this.colorSizeTableData.total = this.colorSizeTableData.rows.length;
|
|
|
|
|
|
$('#colorSizeTable').datagrid('loadData', this.colorSizeTableData);
|
|
|
$('#colorSizeTable').datagrid('mergeCells', {index: 0, field: 'colorName', rowspan: this.colorSizeTableData.total});
|
|
|
$('#colorSizeTable').datagrid('mergeCells', {index: 0, field: 'goodsName', rowspan: this.colorSizeTableData.total});
|
|
|
$('#colorSizeTable').datagrid('resize');
|
|
|
this.dom.colorSizeTable.datagrid('loadData', this.colorSizeTableData);
|
|
|
this.dom.colorSizeTable.datagrid('mergeCells', {index: 0, field: 'colorName', rowspan: this.colorSizeTableData.total});
|
|
|
this.dom.colorSizeTable.datagrid('mergeCells', {index: 0, field: 'goodsName', rowspan: this.colorSizeTableData.total});
|
|
|
this.dom.colorSizeTable.datagrid('resize');
|
|
|
},
|
|
|
getUrlParam: function(name) {
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
...
|
...
|
|