1. 由于应收单携带收款单字段用的是收款计划页签携带到收款单源单明细页签,所以需要把自定义字段先配置在应收单明细字段和应收单收款计划页签字段
在应收单的明细添加字段F_QROW_Assistant
在应收单的收款计划添加字段F_QROW_Assistant1
在保存按钮上写服务插件:
import clr
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('Kingdee.BOS.App')
clr.AddReference('Kingdee.BOS.DataEntity')
from Kingdee.BOS import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *
from System import *
from Kingdee.BOS.App.Data import *
from Kingdee.BOS.Util import *
from Kingdee.BOS.Orm.DataEntity import *
def BeginOperationTransaction(e):
for bill in e.DataEntitys:
for item in bill["AP_PAYABLEENTRY"]:
maTerialId = str(item["MATERIALID_Id"]) #物料编码
orderNo = str(item["FORDERNUMBER"]) #订单号
orderSeq = str(item["ORDERENTRYID"]) #订单明细行内码
remark = str(item["F_QROW_Assistant_id"]) #明细页签字段_id
for planRow in bill["AP_PAYABLEPLAN"]:
pmaterialId = str(planRow["FMATERIALID_S"])
porderNo = str(planRow["ORDERBILLNO"])
porderentryId = str(planRow["FRECEIVABLEENTRYID"])
if orderNo == porderNo and orderSeq == porderentryId and remark != "None":
planRow["F_QROW_Assistant1_id"] = remark #收款计划页签字段_id
1. 应收单收款计划携带到收款单源单明细字段时,收款单的明细字段也需要携带:
源单明细配置字段,字段标识要加_SRC
明细配置字段,字段标识是源单明细字段标识+_E