bootstraptable表头添加自定义搜索框(带文本,下拉,弹窗多选搜索)

}, {

width: ‘100px’,

title: ‘’,

colspan: 1,

rowspan: 1

}, {

width: ‘90px’,

title: ‘’ +

‘’ +

‘订单’ +

‘市场’ +

‘’

}, {

width: ‘90px’,

title: ‘’,

colspan: 1,

rowspan: 1

}, {

width: ‘180px’,

title: ‘’,

colspan: 1,

rowspan: 1

}, {

width: ‘90px’,

title: ‘’,

colspan: 1,

rowspan: 1

}, {

width: ‘80px’,

title: ‘’,

colspan: 1,

rowspan: 1

}, {

width: ‘70px’,

title: ‘’,

colspan: 1,

rowspan: 1

},

{

width: ‘90px’,

title: ‘’,

colspan: 1,

rowspan: 1

}, {

width: ‘300px’,

title: ‘’ +

‘包含’ +

‘不包含’,

colspan: 1,

rowspan: 1

}],

[{

field: ‘state’,

checkbox: true,

align: ‘center’,

valign: ‘middle’,

width: 20

}, {

width: ‘90px’,

title: ‘开卡日期’,

field: ‘tCreateTime’,

formatter: function (value, item, index) {

return value.substr(0, 10);

}

}, {

width: ‘90px’,

title: ‘卡号’,

field: ‘sCardNo’

}, {

width: ‘90px’,

title: ‘批号’,

field: ‘sMaterialLot’

}, {

width: ‘100px’,

title: ‘客户’,

field: ‘sCustomerFullName’

}, {

width: ‘90px’,

title: ‘订单类型’,

field: ‘orderType’

}, {

width: ‘90px’,

title: ‘经营方式’,

field: ‘operationMode’

}, {

width: ‘180px’,

title: ‘品种信息’,

field: ‘sMaterialName’

}, {

width: ‘110px’,

title: ‘色号/色名’,

formatter: function (value, item, index) {

return item.sColorNo + “
” + item.sColorName;

}

}, {

width: ‘80px’,

title: ‘颜色’,

formatter: function (value, item, index) {

return “

”;

}

}, {

width: ‘70px’,

field: ‘nPlanOutputQty’,

title: ‘计划米数’

},

{

width: ‘90px’,

title: ‘配方组合’,

formatter: function (value, item, index) {

return item.sChemicalGroup;

}

}, {

width: ‘300px’,

title: ‘前处理工序进度’,

formatter: function (value, item, index) {

var _sWorkingProcedureName = “”;

for (var i = 0; i < item.CardNoProgressTrack_ProgressList.length; i++) {

(function (j) {

if (item.CardNoProgressTrack_ProgressList[j].bIsCurrent == 1) {

_sWorkingProcedureName += “”;

} else if (item.CardNoProgressTrack_ProgressList[j].bIsComplete == 1) {

_sWorkingProcedureName += “”;

} else if (item.CardNoProgressTrack_ProgressList[j].bIsComplete == 0) {

_sWorkingProcedureName += “”;

}

_sWorkingProcedureName += item.CardNoProgressTrack_ProgressList[j].sWorkingProcedureName;

_sWorkingProcedureName += “-”;

})(i)

}

if (_sWorkingProcedureName.length > 0) {

_sWorkingProcedureName = _sWorkingProcedureName.substr(0, _sWorkingProcedureName.length - 1);

}

return _sWorkingProcedureName;

}

}]

]

});

}, “json”);

}

//初始化过滤下拉内容

function InitFilter(data) {

var operationMode_arry = [‘’];

var colorSeries_arry = [‘’];

var sChemicalGroup_arry = [‘’];

for (var i = 0; i < data.length; i++) {

if (operationMode_arry.indexOf(data[i].operationMode) == -1 && data[i].operationMode != null) {

operationMode_arry.push(data[i].operationMode);

};

if (colorSeries_arry.indexOf(data[i].colorSeries) == -1 && data[i].colorSeries != null) {

colorSeries_arry.push(data[i].colorSeries);

};

if (sChemicalGroup_arry.indexOf(data[i].sChemicalGroup) == -1 && data[i].sChemicalGroup != null) {

sChemicalGroup_arry.push(data[i].sChemicalGroup);

};

}

var operationMode_option = “”;

for (var i = 0; i < operationMode_arry.length; i++) {

operationMode_option += ‘’ + operationMode_arry[i] + ‘’;

}

$(“#operationMode”).append(operationMode_option);

var colorSeries_option = “”;

for (var i = 0; i < colorSeries_arry.length; i++) {

colorSeries_option += ‘’ + colorSeries_arry[i] + ‘’;

}

$(“#colorSeries”).append(colorSeries_option);

var sChemicalGroup_option = ‘’;

for (var i = 0; i < sChemicalGroup_arry.length; i++) {

sChemicalGroup_option += ‘’ + sChemicalGroup_arry[i] + ‘’;

}

$(“#sChemicalGroup”).append(sChemicalGroup_option);

}

//刷新列表

function Refresh() {

$table_queryParams = queryParams();

$.post(“/CommonModule/PM_CardNoProgressTrack/GetList”, queryParams(), function (result, resultState) {

$table.bootstrapTable(‘load’, result);

}, “json”);

}

//多选弹窗

function WorkProcedureIn() {

var index = layer.open({

btn: [‘确认’, ‘取消’], //按钮

yes: function (index, layero) {

var data = parent.$(“#layui-layer-iframe” + index)[0].contentWindow.getData();

WorkProcedureIn_arry = [];

for (var i = 0; i < data.length; i++) {

WorkProcedureIn_arry.push(data[i].Name);

}

Refresh();

layer.close(index);

}, btn2: function (index, layero) {

layer.close(index);

},

type: 2,

title: ‘工序’,

area: [‘300px’, ‘500px’],

shadeClose: true, //开启遮罩关闭

content: ‘/CommonModule/PM_CardNoProgressTrack/WorkProcedureList’,

success: function (layero, index) {

parent.$(“#layui-layer-iframe” + index)[0].contentWindow.setSelections(WorkProcedureIn_arry);

}

});

}

3、弹窗代码

  • 11
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值