更改表单显示状态(miniUI)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_33443020/article/details/83576709

 

<div field="status" headerAlign="center" allowSort="true" renderer="onCurrentStateRenderer">  申请状态 </div>

//js代码

var processState = {
            "0": "办理中",
            "1": "已完成",
                };
            //申请状态
             function onCurrentStateRenderer(e) {
            var s = "";
            if (e.row.status == 0) {
                s = '<a style="color:red;">' + processState[e.row.status] + '</a>';
            }
            else {
                s = '<a style="color:black;">' + processState[e.row.status] + '</a>';
            }
            return s;
        }

猜你喜欢

转载自blog.csdn.net/qq_33443020/article/details/83576709
今日推荐