...
|
...
|
@@ -21,15 +21,12 @@ var g = new common.grid({ |
|
|
modelName: common.util.__input('content-filter1'),
|
|
|
englishName: common.util.__input('content-filter2'),
|
|
|
status: common.util.__input('status-filter'),
|
|
|
startTime: $('#starttime').val(),
|
|
|
endTime: $('#endtime').val(),
|
|
|
modelType: parseInt($("#aa").val())
|
|
|
};
|
|
|
},
|
|
|
|
|
|
//列表显示
|
|
|
columns: [
|
|
|
{display:"ID",name:"id"},
|
|
|
{display: "姓名", name: "modelName"},
|
|
|
{display: "英文名", name: "englishName"},
|
|
|
{
|
...
|
...
|
@@ -37,7 +34,7 @@ var g = new common.grid({ |
|
|
return '<img src="' + item.avatar + '" width="100" height="60"/>'
|
|
|
}
|
|
|
},//图片显示
|
|
|
{display: "国籍", name: "nationality" },
|
|
|
{display: "国籍", name: "nationality"},
|
|
|
{display: "身高", name: "height"},
|
|
|
{display: "体重", name: "weight"},
|
|
|
{
|
...
|
...
|
@@ -66,14 +63,15 @@ var g = new common.grid({ |
|
|
}
|
|
|
},
|
|
|
{
|
|
|
display: "状态", name: "status",render: function (item) {
|
|
|
if (item.status == 1) {
|
|
|
return status = "启用"
|
|
|
}
|
|
|
else {
|
|
|
return status = "禁用"
|
|
|
}
|
|
|
display: "状态", name: "status", render: function (item) {
|
|
|
if (item.status == 1) {
|
|
|
return "启用"
|
|
|
}
|
|
|
else {
|
|
|
return "禁用"
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
...
|
...
|
@@ -102,6 +100,46 @@ var Bll = { |
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
//验证身高
|
|
|
e.on("validate", function () {
|
|
|
var height = $.trim($("#height").val());
|
|
|
if (height>250) {
|
|
|
return "身高值应小于250"
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
//验证体重
|
|
|
e.on("validate", function () {
|
|
|
var weight = $.trim($("#weight").val());
|
|
|
if (weight>200) {
|
|
|
return "体重值应小于200"
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
//验证胸围
|
|
|
e.on("validate", function () {
|
|
|
var Bust = $.trim($("#Bust").val());
|
|
|
if (Bust>200) {
|
|
|
return "胸围值应小于200"
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
//验证腰围
|
|
|
e.on("validate", function () {
|
|
|
var waist = $.trim($("#waist").val());
|
|
|
if (waist>200) {
|
|
|
return "腰围值应小于200"
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
//验证臀围
|
|
|
e.on("validate", function () {
|
|
|
var hips = $.trim($("#hips").val());
|
|
|
if (hips>200) {
|
|
|
return "臀围值应小于200"
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
var a = common.dialog.confirm(hint,
|
|
|
common.util.__template2($("#template").html(), item),
|
|
|
function () {
|
...
|
...
|
@@ -110,9 +148,14 @@ var Bll = { |
|
|
option.data.status = 1;//模特状态,默认启用
|
|
|
option.data.height = parseInt($("#height").val());//模特身高
|
|
|
option.data.weight = parseInt($("#weight").val());//模特体重
|
|
|
option.data.status = parseInt($("#status").val());//模特状态,默认启用
|
|
|
if (item.__state == 'add') {
|
|
|
option.data.status = 1;//模特状态,默认启用
|
|
|
}
|
|
|
else {
|
|
|
option.data.status = parseInt($("#status").val());//模特状态,默认启用
|
|
|
}
|
|
|
option.data.vitalStatistics = $("#Bust").val() + '|' + $("#waist").val() + "|" + $("#hips").val();//模特三围,拼接字符串
|
|
|
//console.log("option.data", option.data);
|
|
|
console.log("option.data", option.data);
|
|
|
//option.debug = true;//调试状态
|
|
|
option.success = function (res) {
|
|
|
//判断接口请求状态
|
...
|
...
|
@@ -138,7 +181,7 @@ var Bll = { |
|
|
//添加模特--点击事件
|
|
|
$('#add-content').on('click', function () {
|
|
|
var item = {
|
|
|
"__state":"add"
|
|
|
"__state": "add"
|
|
|
};
|
|
|
Bll.toast('/shotManage/model/addModel', item, "添加模特");
|
|
|
});
|
...
|
...
|
@@ -150,7 +193,7 @@ var STATUS = { |
|
|
//修改模特--点击事件
|
|
|
$(document).on('click', '.update', function () {
|
|
|
var item = g.rows[$(this).data("index")];
|
|
|
item.__state="update";
|
|
|
item.__state = "update";
|
|
|
var a = item.vitalStatistics.split(/[,|/]/g);
|
|
|
item.Bust = a[0];
|
|
|
item.waist = a[1];
|
...
|
...
|
|