Index: ssts-web/src/main/webapp/ext/fontSize15/styles/common.css =================================================================== diff -u -r35914 -r36154 --- ssts-web/src/main/webapp/ext/fontSize15/styles/common.css (.../common.css) (revision 35914) +++ ssts-web/src/main/webapp/ext/fontSize15/styles/common.css (.../common.css) (revision 36154) @@ -502,4 +502,9 @@ #printerSettingBox-body { overflow-y: auto !important; overflow-x: hidden; +} + +/* SZSLGZXYY-16:bbar居中*/ +#signImgWin .x-toolbar table { + margin: 0 auto !important; } \ No newline at end of file Index: ssts-web/src/main/webapp/ext/fontSize12/styles/common.css =================================================================== diff -u -r35937 -r36154 --- ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 35937) +++ ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 36154) @@ -583,4 +583,9 @@ #printerSettingBox-body { overflow-y: auto !important; overflow-x: hidden; +} + +/* SZSLGZXYY-16:bbar居中*/ +#signImgWin .x-toolbar table { + margin: 0 auto !important; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js =================================================================== diff -u -r35548 -r36154 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js (.../invoiceView.js) (revision 35548) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceView.js (.../invoiceView.js) (revision 36154) @@ -2404,9 +2404,237 @@ } grid.dwrReload(); +} +var invoiceSignDetailRecord = Ext.data.Record.create([ + {name : 'tousseName'}, + {name : 'barcode'}, + {name : 'id'}, + {name : 'amount'} +]); + +var invoiceSignDetailStore = new Ext.data.Store({ + reader: new Ext.data.JsonReader({ + fields: [ + {name : 'tousseName'}, + {name : 'barcode'}, + {name : 'id'}, + {name : 'amount'} + ] + }) +}); + +//SZSLGZXYY-16:手写签名 +function ShowSignImg(signRecordIds,id){ + var invoiceSignDetailStoreCm = new top.Ext.grid.ColumnModel([ + {header : "物品名称",dataIndex : 'tousseName',width : 190}, + {header : "器械包条码",dataIndex :'barcode',width : 80}, + {header : "数量",dataIndex : 'amount',width : 50, menuDisabled: true,id:"amount"} + ]); + + var grid = new top.Ext.grid.GridPanel({ + store: invoiceSignDetailStore, + cm: invoiceSignDetailStoreCm, + width: 560, + height: 200, + stripeRows: true, + viewConfig: { + forceFit: true + } + }) + + var idsArr = signRecordIds.split(';'); + + var form = new top.Ext.FormPanel({ + frame : true, + border : 0, + labelSeparator : ':', + bodyStyle : 'padding:5px 5px 0px 5px', + labelAlign:'left', + layout : 'form', + autoScroll : true, + height:500, + items : [{ + layout : 'column', + autoHeight:true, + items : [{ + xtype:'hidden', + id:'hiddenPage', + name:'hiddenPage' + },{ + xtype:'hidden', + id:'hiddenTotalPage', + name:'hiddenTotalPage' + },{ + columnWidth : .99, + layout : 'form', + labelWidth:70, + items : [{ + xtype : 'textfield', + id:'signUserName', + fieldLabel : '签收用户', + readOnly: true, + anchor: '99%', + cls: 'fieldReadOnlyNoRemove' + }] + }] + },{ + layout : 'column', + autoHeight:true, + items : [{ + columnWidth : .99, + layout : 'form', + labelWidth:70, + items : [{ + xtype : 'textfield', + fieldLabel : '签收明细', + readOnly: true, + anchor: '99%', + cls: 'fieldReadOnlyNoRemove' + }] + }] + },{ + layout : 'column', + autoHeight:true, + items : [grid] + },{ + layout : 'column', + autoHeight:true, + items : [{ + columnWidth : .99, + layout : 'form', + labelWidth:70, + items : [{ + xtype : 'textfield', + fieldLabel : '签名图片', + readOnly: true, + anchor: '99%', + cls: 'fieldReadOnlyNoRemove' + }] + }] + },{ + layout : 'column', + items : [{ + xtype: 'box', + id: 'browseImage', + fieldLabel: "预览图片", + autoEl: { + id: 'imageBrowse', + tag: 'img', + src: '', + style: 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);display: none;margin:0 auto', + complete: 'off' + } + }] + }] + }); + + var toolbarPage = new top.Ext.Toolbar.TextItem({ + text : '第1页' + }); + + var toolbarTotalPage = new top.Ext.Toolbar.TextItem({ + text : '共0页' + }); + + signImgWin = new top.Ext.Window({ + title:'手写签名记录', + layout : 'fit', + width : 600, + height : 550, + modal : true, + border : false, + plain : true, + id:'signImgWin', + bbar : [{ + xtype : 'button', + text : '<<', + tooltip :"上一页", + handler : function(){ + var page = top.Ext.getCmp('hiddenPage').getValue(); + if (page - 1 <= 0) { + showResult('已是第一页'); + return; + } + top.Ext.getCmp('hiddenPage').setValue(page - 1); + invoiceSignDetailForPage(idsArr[page-2],id); + var element = top.Ext.get(toolbarPage.el); + element.update('第' + (page - 1) + '页'); + } + },toolbarPage, + toolbarTotalPage, + { + xtype : 'button', + text : '>>', + tooltip :"下一页", + handler : function() { + var page = top.Ext.getCmp('hiddenPage').getValue(); + var totalPage = top.Ext.getCmp('hiddenTotalPage').getValue(); + if (parseInt(page) + 1 > totalPage) { + showResult('已是最后一页'); + return; + } + top.Ext.getCmp('hiddenPage').setValue(parseInt(page) + 1); + invoiceSignDetailForPage(idsArr[page],id); + var element = top.Ext.get(toolbarPage.el); + element.update('第' + (parseInt(page) + 1) + '页'); + } + }], + items:[form] + }); + + signImgWin.show(); + + if(idsArr.length > 0){ + var signRecordId = idsArr[0]; + var element = top.Ext.get(toolbarTotalPage.el); + element.update('共' + idsArr.length + '页'); + invoiceSignDetailForPage(signRecordId,id); + top.Ext.getCmp('hiddenPage').setValue(1); + top.Ext.getCmp('hiddenTotalPage').setValue(idsArr.length); + } } +function invoiceSignDetailForPage(signRecordId,id){ + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/signRecordAction!getSignDetailBySignRecordId.do', + params: { signRecordId: signRecordId,invoiceId: id }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if(result.success){ + top.Ext.getCmp('signUserName').setValue(result.signUserName); + if(result.data && result.data.length > 0){ + invoiceSignDetailStore.removeAll() + for (var i = 0; i < result.data.length; ++i) { + var recordData = new invoiceSignDetailRecord({ + tousseName: result.data[i].tousseName, + barcode: result.data[i].barcode, + id: result.data[i].id, + amount: result.data[i].amount + }); + invoiceSignDetailStore.add(recordData); + } + } + var url = WWWROOT + '/disinfectSystem/baseData/showImageAction!getImage.do?objectId='+signRecordId+'&page=1&imageType='+encodeURIComponent("PDA端签收签名(竖屏版)")+'&showSourceImg=true' + '&time=' + new Date().getTime(); + var imageBrowse = top.Ext.get('imageBrowse'); + var img = imageBrowse.dom; + imageBrowse.parent().dom.style.height = '220PX' + img.src = url; + img.onload = function () { + if (img.width > img.height) { + img.style.height = '100%'; + img.style.width = 'auto'; + } else { + img.style.height = 'auto'; + img.style.width = '100%'; + } + img.style.display = 'block'; + }; + } + } + }) +} + /** * 创建过滤的tbar(自适应各个分辨率). */ @@ -2755,6 +2983,13 @@ { header: "签收人", width: 70, dataIndex: 'receiptor', hidden: receiptorHidden }, { header: "签收时间", width: 120, dataIndex: 'receiptingTime', renderer: myDateFormatByMinute, hidden: receiptingTimeHidden }, { header: "签收状态", width: 100, dataIndex: 'signStatus', hidden: signStatusHidden }, + { header: "手写签名", width: 100, hidden: !sstsConfig.enableHandwrittenSignatureFunction,renderer: function (v, p, record) { + var buttonGroup = ""; + if(record.data.handwrittenSignatureSignRecordId !== ''){ + buttonGroup += ""; + } + return buttonGroup; + } }, { header: "结算科室", width: 100, dataIndex: 'settleAccountsDepart', hidden: settleAccountsDepartHidden }, { header: "仓库", width: 100, dataIndex: 'warehouseName', id: 'warehouseName', hidden: warehouseNameHidden }, { header: "总价", width: 70, dataIndex: 'totalPrice', align: 'right', renderer: formartPrice, hidden: totalPriceHidden } @@ -2786,6 +3021,7 @@ { name: 'signStatus' }, { name: 'personInCharge' }, { name: 'invoicePlanSerialNumber' }, + { name: 'handwrittenSignatureSignRecordId' }, { name: 'warehouseName' }, { name: 'applicant' }, { name: 'personInChargeCode' },