field = [
{
display: "工厂选择", name: "FactoryCode", type: "select", newline: false, validate: { required: true },
editor: {
url: 'getFactory',
valueField: 'id',
textField: 'text',
onSelected: function (value, text) {
$.ajax({
url: "getJiChuang?FactoryCode=" + value,
type: "POST",
dataType: "json",
success: function (data) {
if (data.length > 0) {
liger.get("JCCode").setData(data);
}
}
});
$.ajax({
url: "getGongXu?FactoryCode=" + value,
type: "POST",
dataType: "json",
success: function (data) {
if (data.length > 0) {
liger.get("GXCode").setData(data);
}
}
});
}
},
},
{
display: "工序选择", name: "GXCode", type: "select", newline: false, validate: { required: true },
editor: {
url: 'getGongXu?FactoryCode=@ViewBag.FactoryCode',
valueField: 'id',
textField: 'text',
autocomplete: true,
keySupport: true,
},
},
{
display: "机床选择", name: "JCCode", type: "select", newline: false, validate: { required: true },
editor: {
url: 'getJiChuang?FactoryCode=@ViewBag.FactoryCode',
valueField: 'id',
textField: 'text',
autocomplete: true,
keySupport: true,
},
},
{ display: "产线顺序", name: "Order", type: "int", newline: false, validate: { required: true }, },
{ display: "ID", name: "ID", type: "hidden", newline: false, },
];
相关文章
- 04-01select 框条件化初始数据并能筛选