用友股份-LE支持服务业务本部产品方案--《增加盘点时到可以自动带出盘点后内容》建立日期:2013-12-10修改日期:xxxx-xx-xx文档属性:客户文控编号:LE-DY-CP-2013-1027文档控制创建记录适用范围审阅人日期审阅签字所属部门发布范围内部员工伙伴客户发布人姓名所属部门发布时间日期作者所属部门邮件地址版本2013-12-10用友NC产品支持部V1。0版本领域模块备注目录增加盘点时到可以自动带出盘点后内容................................................................4一、业务需求描述....................................................................................................4二、解决方案............................................................................................................4增加盘点时到可以自动带出盘点后内容一、业务需求描述要求:点菜单“增加”项后,不再作其它操作,在生成的盘点表中:自动填写盘点后的项目使用部门编码(盘点后)=使用部门编码(盘点前)使用部门名称(盘点后)=使用部门名称(盘点前)管理部门编码(盘点后)=管理部门编码(盘点前)管理部门名称(盘点后)=管理部门名称(盘点前)责任人编码(盘点后)=责任人编码(盘点前)责任人名称(盘点后)=责任人名称(盘点前)设备状态编码(盘点后)=设备状态编码(盘点前)设备状态名称(盘点后)=设备状态名称(盘点前)位置编码(盘点后)=位置编码(盘点前)位置名称(盘点后)=位置名称(盘点前)二、解决方案通过在单据模版中设置公式来满足上述要求,具体操作如下:1、打开二次开发工具----〉模版管理----〉单据模版初始化,见到如下界面:2、在右侧单据模版中类型选择设备盘点(4A35),点击“显示模版”3、在已定义模版的列表框中只有一个系统定义的标准模版,选中该模版,点击右侧的“复制按钮(C)”按钮,在弹出的窗口中输入模版标题与模版名称后,点“确定”,这样就创建了新的模版,列表框中原来的模版图标变成了文件夹的图标,下挂了一个刚才创建的新模版。对这个新创建的模版进行修改,再分配给用户使用就能到达上面的要求。切记不要直接在系统提供的标准模版上直接修改,否则一旦出错就没法恢复。4、选择新创建的模版,点击“修改”进入模版修改界面如下5、在表体中找到要修改的列(见上图的红色框),选中该列,在右侧选择高级属性页签,会看到列表中有“显示公式”的行,点击该行“值”列,看到列右侧有一个放大镜的小图标,点击该图标,弹出公式编辑的窗口如下,修改左上角的公式即可。具体修改内容见下表:8/10公式修改:模版表体中选择的列右侧显示属性页签中的“项目主键”的内容右侧高级属性页签中的“显示公式”的原内容右侧高级属性页签中的显示公式修改后的内容管理部门管理部门主键(盘点后)fk_mandept_afterfk_mandept_after_code->getColValue(bd_deptdoc,deptcode,pk_deptdoc,fk_mandept_after);fk_mandept_after_name->getColValue(bd_deptdoc,deptname,pk_deptdoc,fk_mandept_after)fk_mandept_after->iif(fk_mandept_after==null,fk_mandept_before,fk_mandept_after);fk_mandept_after_code->getColValue(bd_deptdoc,deptcode,pk_deptdoc,fk_mandept_after);fk_mandept_after_name->getColValue(bd_deptdoc,deptname,pk_deptdoc,fk_mandept_after)使用部门使用部门主键(盘点后)fk_usedept_afterfk_usedept_after_code->getColValue(bd_deptdoc,deptcode,pk_deptdoc,fk_usedept_after);fk_usedept_after_name->getColValue(bd_deptdoc,deptname,pk_deptdoc,fk_usedept_after)fk_usedept_after->iif(fk_usedept_after==null,fk_usedept_before,fk_usedept_after);fk_usedept_after_code->getColValue(bd_deptdoc,deptcode,pk_deptdoc,fk_usedept_after);fk_usedept_after_name->getColValue(bd_deptdoc,deptname,pk_deptdoc,fk_usedept_after)责任人责任人assetuser_afterassetuser_after_code->getColValue(bd_psndoc,psncode,pk_psndoc,asseassetuser_after->iif(assetuser_after==null,assetuser_before,ass9/10(盘点后)tuser_after);assetuser_after_name->getColValue(bd_psndoc,psnname,pk_psndoc,assetuser_after)etuser_after);assetuser_after_code->getColValue(bd_psndoc,psncode,pk_psndoc,assetuser_after);assetuser_after_name->getColValue(bd_psndoc,psnname,pk_psndoc,assetuser_after)设备状态设备状态主键(盘点后)fk_usingstatus_afterfk_usingstatus_after_code->getColValue(pam_status,status_code,pk_status,fk_usingstatus_after);fk_usingstatus_after_name->getColValue(pam_status,status_name,pk_status,fk_usingstatus_after)fk_usingstatus_after->iif(fk_usingstatus_after==null,fk_usingstatus_before,fk_usingstatus_after);fk_usingstatus_after_code->getColValue(pam_status,status_code,pk_status,fk_usingstatus_after);fk_usingstatus_after_name->getColValue(pam_status,status_name,pk_status,fk_usingstatus_after)位置位置主键(盘点后)position_afterposition_after_code->getColValue(pam_location,location_code,pk_location,position_after);position_after_name->getColValue(pam_location,location_name,pk_location,position_after)position_after->iif(position_after==null,position_before,position_after);position_after_code->getColValue(pam_location,location_code,pk_location,position_after);position_after_name->getColValue(pam_location,location_name,pk_location,position_after)10/106、模版修改后进行保存。再分配给用户使用。用户再新增盘点单时就会按照模版中的配置生成盘点数据。注意公司级用户,需要将集团级的模版进行复制生成公司级的模版,再对公司级的模版进行用户分配才有作用。