Index: ssts-web/src/main/webapp/disinfectsystem/labelTemplateDesign/printCustomDesign.js =================================================================== diff -u -r24657 -r27108 --- ssts-web/src/main/webapp/disinfectsystem/labelTemplateDesign/printCustomDesign.js (.../printCustomDesign.js) (revision 24657) +++ ssts-web/src/main/webapp/disinfectsystem/labelTemplateDesign/printCustomDesign.js (.../printCustomDesign.js) (revision 27108) @@ -169,6 +169,17 @@ function insertImplantAmountText(){ LODOP.ADD_PRINT_TEXTA('implantAmountText', '2mm', '2mm', '10mm', '6mm', '植入物数量:'); } + +// 插入内置属性 +function builtInPropsList(name){ + var propName = name; + getLODOP2(); + var vName = 'obj.'+propName; + var value = obj[propName]; + LODOP.ADD_PRINT_TEXTA(propName, '2mm', '2mm', '30mm', '6mm', value); + LODOP.SET_PRINT_STYLEA(0, "ContentVName", vName);// 设置内容参数的变量名 +} + function insertTableToLodop(tableConfig){ // alert(tableConfig) if(tableConfig == null){ @@ -473,11 +484,11 @@ xtype:'fieldset', id: 'builtInProps', layout:'column', - title: '内置属性', + title: '插入内置属性', defaultType: 'textfield', columnWidth : 1, items : [] - } ], + }], // tbar : [], buttons : [ { text : '表格设计器', @@ -535,15 +546,23 @@ } function createCheckbox(prop){ - var ccombo = Ext4.create('Ext4.form.Checkbox', { + var ccombo = { + xtype : 'button', + text : prop.displayName, + id: 'cmp_'+prop.propName, + handler : function() { + builtInPropsList(prop.propName); + } + } + /* var ccombo = Ext4.create('Ext4.form.Checkbox', { id: 'cmp_'+prop.propName, name : 'cmp_'+prop.propName, - boxLabel : prop.displayName, + boxLabel : prop.displayName, checked: getBuiltInPropCheckedState(prop.propName), handler : function(checkbox,checked) { addOrRemove(checked,prop.propName); } - }); + }); */ return ccombo; } }