DELETE FROM t_bas_kingscriptlib WHERE FID = 1758839113320007680
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758839113320007680,13466739,{ts'2023-08-24  00:00:00'},5,'3',{ts'2023-08-24  00:00:00'},'import { BillShowParameter } from "@cosmic/bos-framework/plugin/bill/index";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 显示单据：传入自定义参数
plugin.onBeforeShowBill(event => {

    let showParameter = event.getParameter() as BillShowParameter;
    showParameter.setCustomParam("myparam", "paramvalue");
})

export { plugin }
','显示单据：传入自定义参数',13466739,'listplugin5')
GO
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758839554879555584
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758839554879555584,13466739,{ts'2023-08-24  00:00:00'},6,'3',{ts'2023-08-24  00:00:00'},' ','点击超链接：打开界面',13466739,'listplugin6')
GO
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758839821905725440
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758839821905725440,13466739,{ts'2023-08-24  00:00:00'},7,'3',{ts'2023-08-24  00:00:00'},'import { QFilter } from "@cosmic/bos-core/orm";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 常用过滤面板取数：增加取数条件
plugin.onFilterColumnSetFilter(event => {
    
    if ("org.name" == event.getFieldName()) {
        event.addCustomQFilter(new QFilter("number", "=", "00"));
    }
})

export { plugin }
','常用过滤面板取数：增加取数条件',13466739,'listplugin7')
GO
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758840084787922944
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758840084787922944,13466739,{ts'2023-08-24  00:00:00'},8,'3',{ts'2023-08-24  00:00:00'},'import { QFilter } from "@cosmic/bos-core/orm";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 过滤容器打开F7列表：添加过滤条件
plugin.onFilterContainerBeforeF7Select(event => {
    let fieldName = event.getFieldName();
    if("org.id" == fieldName) {
        // fieldName为"org.id"，不是"org.name"
        event.getQfilters().add(new QFilter("number", "=", "00"));
    }
})

export { plugin }
','过滤容器打开F7列表：添加过滤条件',13466739,'listplugin8')
GO
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758840374186510336
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758840374186510336,13466739,{ts'2023-08-24  00:00:00'},9,'3',{ts'2023-08-24  00:00:00'},'import { CommonFilterColumn } from "@cosmic/bos-framework/control/index";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 过滤容器初始化：添加常用过滤选项
plugin.onFilterContainerInit(event => {

    let filterColumn = new CommonFilterColumn("billstatus")
    event.addFilterColumn(filterColumn);
    
})

export { plugin }
','过滤容器初始化：添加常用过滤选项',13466739,'listplugin9')
GO 
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758840609856059392
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758840609856059392,13466739,{ts'2023-08-24  00:00:00'},10,'3',{ts'2023-08-24  00:00:00'},'import { SchemeFilterColumn } from "@cosmic/bos-framework/control/index";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 过滤容器初始化：添加方案过滤选项
plugin.onFilterContainerInit(event => {

    let filterColumn = new SchemeFilterColumn("combofield")
    event.addFilterColumn(filterColumn);

})

export { plugin }
','过滤容器初始化：添加方案过滤选项',13466739,'listplugin10')
GO
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758837717346584576
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758837717346584576,13466739,{ts'2023-08-24  00:00:00'},1,'3',{ts'2023-08-24  00:00:00'},'import { QFilter } from "@cosmic/bos-core/orm";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 设置过滤条件：增加新条件
plugin.onSetFilter(event => {
    event.addCustomQFilter(new QFilter("combofield", "=", "1"));
})

export {plugin }
','过滤取数前：增加新条件',13466739,'listplugin1')
GO
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758838019034482688
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758838019034482688,13466739,{ts'2023-08-24  00:00:00'},2,'3',{ts'2023-08-24  00:00:00'},'import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 设置过滤条件：设置排序字段
plugin.onSetFilter(event => {
    event.setOrderBy("bizdate desc,billno desc")
})

export { plugin }
','过滤取数前：设置排序字段',13466739,'listplugin2')
GO 
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758838337315047424
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758838337315047424,13466739,{ts'2023-08-24  00:00:00'},3,'3',{ts'2023-08-24  00:00:00'},'import { ListColumn } from "@cosmic/bos-framework/control/index";
import { LocaleString } from "@cosmic/bos-framework/model/index";
import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";
import { IListColumn } from "@cosmic/bos-internal-sdk/kd/bos/list";


let plugin = new ListPlugin()


// 创建列：动态添加列
plugin.onBeforeCreateListColumns(event => {

    // 动态添加列：把单据字段动态显示到列表
    let col = createListColumn("create.name", "创建人")
    event.addListColumn(col)
    
})


/**
 * 创建列对象返回
 */
 function createListColumn (key : string, caption : string): IListColumn {

    let col = new ListColumn()

    col.setCaption(new LocaleString(caption))
    col.setKey(key)
    col.setListFieldKey(key)        // 和单据字段关联：key需与实体字段对应，否则会显示不出来
    col.setFieldName(key)

    return col;
}

export { plugin }
','创建列前：动态添加自定义列',13466739,'listplugin3')
GO 
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758838658657449984
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758838658657449984,13466739,{ts'2023-08-24  00:00:00'},4,'3',{ts'2023-08-24  00:00:00'},'import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 打包数据前：批量调整字段值
plugin.onBeforePackageData(event => {

    for (let row of event.getPageData()) {
        row.set("textfield", "text");
    }

})

export { plugin }
','打包数据前：批量调整字段值',13466739,'listplugin4')
GO 
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758841002350643200
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758841002350643200,13466739,{ts'2023-08-24  00:00:00'},11,'3',{ts'2023-08-24  00:00:00'},'import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 过滤容器点击查询：追加快捷条件
plugin.onFilterContainerSearchClick(event => {
    // 添加快速过滤条件：文本字段 包含 搜索文本
    event.addFastFilter("billno", "A");
})

export { plugin }','过滤容器点击查询：追加快捷条件',13466739,'listplugin11')
GO 
DELETE FROM t_bas_kingscriptlib WHERE FID = 1758841239874078720
GO
INSERT INTO t_bas_kingscriptlib(FID,FMODIFIER,FCREATETIME,FSEQ,FSCRIPTTYPE,FMODIFYTIME,FCODE,FCOMMENT,FCREATER,FNUMBER) VALUES (1758841239874078720,13466739,{ts'2023-08-24  00:00:00'},12,'3',{ts'2023-08-24  00:00:00'},'import { ListPlugin } from "@cosmic/bos-framework/plugin/list/ListPlugin";

let plugin = new ListPlugin()

// 列表打包字段到前端，调整单元格显示值
plugin.onPackageData( event => {

    let colKey = event.getColKey()
    if ("textfield" == colKey && "text" == event.getFormatValue()) {
        event.setFormatValue("格式化内容");
    } 
})

export { plugin }
','列表打包字段到前端，调整单元格显示值',13466739,'listplugin12')
GO 
