...
|
...
|
@@ -55,6 +55,16 @@ var Bll = { |
|
|
module: null,
|
|
|
sorts: [],
|
|
|
orderBys: [],
|
|
|
sizeIdOrder : function(sizeId, orderBy) {
|
|
|
this.sizeId = sizeId;
|
|
|
this.orderBy = orderBy;
|
|
|
this.getSizeId = function() {
|
|
|
return this.sizeId;
|
|
|
};
|
|
|
this.getOrderBy = function() {
|
|
|
return this.orderBy;
|
|
|
};
|
|
|
},
|
|
|
getOrderBy: function () {
|
|
|
common.util.__ajax({
|
|
|
url: '/erpproduct/sortsize/ajax/index',
|
...
|
...
|
@@ -67,7 +77,7 @@ var Bll = { |
|
|
var list = res.data.list;
|
|
|
list.forEach(function (x) {
|
|
|
if (x.orderBy != 0) {
|
|
|
Bll.orderBys.push(x.orderBy);
|
|
|
Bll.orderBys.push(new Bll.sizeIdOrder(x.sizeId, x.orderBy));
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -103,7 +113,8 @@ var Bll = { |
|
|
var flag = true;
|
|
|
if (Bll.orderBys.length > 0) {
|
|
|
for (var i = 0; i < Bll.orderBys.length; i++) {
|
|
|
if (Bll.orderBys[i] == Bll.module.orderBy) {
|
|
|
var item = Bll.orderBys[i];
|
|
|
if (item.getOrderBy() == Bll.module.orderBy && item.getSizeId() != Bll.module.sizeId) {
|
|
|
flag = false;
|
|
|
common.util.__tip("排序值不可重复", "warning");
|
|
|
break;
|
...
|
...
|
|