单据头&单据体字段批改原创
金蝶云社区-云社区用户9nxm0141
云社区用户9nxm0141
103人赞赏了该文章 490次浏览 未经作者许可,禁止转载编辑于2024年06月24日 18:26:38

1、列表注册批改插件

import clr

clr.AddReference('Kingdee.BOS')

clr.AddReference('Kingdee.BOS.Core')

from Kingdee.BOS.Core import *

from Kingdee.BOS.Core.Bill import *

from Kingdee.BOS.Core.Bill.PlugIn import *


def BarItemClick(e):

    if e.BarItemKey=="批改按钮标识":  # 根据实际添加的按钮标识填写

        if this.ListView.CurrentSelectedRowInfo is None:

            this.View.ShowErrMessage("请选择数据行")

            return

        param=BillShowParameter()

        param.FormId=FormIdConst.BD_BulkEdit

        this.View.ShowForm(param)


2、单据上对应字段的“功能控制”勾选允许批改


3、如果为单据体字段,“功能控制”中允许批改不能勾选,需通过元数据进行修改,单据体找到对应的字段,在功能控制中勾选或者取消其他选项(目的是为了在xml中能出现)

1)关闭修改界面

2)选择单据,点击右上角的“打开增量XML”

3)找到对应字段的控制值,将值改到最大,65151,参考下面的描述,因为无字段的标识,需要根据字段的类型猜,或者设置一个配置一个

   </QtyField>

        <QtyField action="edit" oid="1111f750-ec05-4204-b765-ea69d19715b8" ElementType="22" ElementStyle="0">

          <FunControlExt>1</FunControlExt>

          <FunControl>65151</FunControl>

        </QtyField>

        <BaseDataField action="edit" oid="c9441258-a303-483d-8d0f-723a0f43e7c6" ElementType="13" ElementStyle="0">

          <FunControlExt>1</FunControlExt>

          <FunControl>64591</FunControl>

        </BaseDataField>

        <AmountField action="edit" oid="29ca3a04029e49cbb70a0becfdbee9aa" ElementType="21" ElementStyle="0">

          <FunControl>65151</FunControl>

        </AmountField>

4、注意事项

此批改无法校验所有的业务逻辑,慎用!!!


赞 103