值更新事件的字符串拼接
金蝶云社区-YYZZ
YYZZ
2人赞赏了该文章 5,172次浏览 未经作者许可,禁止转载编辑于2015年11月18日 11:54:40

某个基础资料字段的字更新事件如图(以下值已保证不为空):


后台插件调用BillViewService.SetItemValueByNumber(fieldKey, fieldValue, rowIndex)为该基础资料赋值时报错:unsupported operand type(s) for +: 'str' and 'NoneType'

为排除+影响,修改如图


此时报错:'ascii' codec can't decode byte 0 in position 0: ordinal not in range

将上图str()方法改为repr()后 可以正常通过,但是被赋值字段编码混乱