Index: ssts-web/src/main/webapp/disinfectsystem/invoice/materialInvoiceView.js =================================================================== diff -u -r27770 -r30032 --- ssts-web/src/main/webapp/disinfectsystem/invoice/materialInvoiceView.js (.../materialInvoiceView.js) (revision 27770) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/materialInvoiceView.js (.../materialInvoiceView.js) (revision 30032) @@ -343,11 +343,12 @@ id : 'materialInvoiceForm', frame : true, labelSeparator : ':', - bodyStyle : 'padding:5px 5px 0px 25px', - width : 800, + bodyStyle : 'padding:5px 10px 0px 10px', + width : 930, autoHeight : true, autoScroll : true, - labelAlign : 'left', + labelAlign : 'right', + labelWidth:60, items:[{ layout : 'column', items : [{ @@ -382,7 +383,6 @@ id:'serialNum', columnWidth : .33, layout : 'form', - labelWidth : 40, hidden : true, items : [{ xtype : 'textfield', @@ -396,9 +396,8 @@ anchor : '95%' }] },{ - columnWidth : .22, + columnWidth : .33, layout : 'form', - labelWidth : 50, items : [{ xtype : 'textfield', fieldLabel : '操作员', @@ -412,9 +411,8 @@ anchor : '95%' }] },{ - columnWidth : .28, + columnWidth : .33, layout : 'form', - labelWidth : 60, items : [{ xtype : 'datefield', fieldLabel : '发货时间', @@ -424,17 +422,16 @@ altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', // value : new Date(), editable: false, - anchor : '95%', + anchor : '90%', listeners : { render : function() { setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'sendTime'); //(发货时间,取服务器时间 cjr) } } }] }, { - columnWidth : .25, + columnWidth : .33, layout : 'form', - labelWidth : 40, items : [{ xtype : 'combo', fieldLabel : '仓库', @@ -447,7 +444,7 @@ forceSelection : true, allowBlank : false, triggerAction : 'all', - anchor : '95%', + anchor : '90%', listeners : { select : function(combo,record,index){ top.Ext.getCmp("sourceWarehouseId").setValue(record.data.id); @@ -457,15 +454,14 @@ } }] },{ - columnWidth : .24, + columnWidth : .33, layout : 'form', - labelWidth : 40, items : [{ xtype : 'combo', id : 'departSearch', name : 'departSearch', queryParam : 'spell', - fieldLabel : '科室', + fieldLabel : '申请科室', minChars : 0, valueField : 'id', displayField : 'name', @@ -476,18 +472,60 @@ hideTrigger : true, typeAhead : false, allowBlank : false, - anchor : '95%', + anchor : '90%', listeners : { select : function(combo , record , index){ top.Ext.getCmp('departCoding').setValue(record.data.id); top.Ext.getCmp('depart').setValue(record.data.name); + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getDefaultSettleAccountDepart.do', + params: { + orgUnitCode: record.data.id + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (!result.success) { + showResult(resultObj.errMsg); + return; + } + var orgUnitCode = result.data.orgUnitCode || ''; + var name = result.data.name || ''; + top.Ext.getCmp('settleAccountsDepartCoding').setValue(orgUnitCode); + top.Ext.getCmp('settleAccountsDepart').setValue(name); + } + }); } } }] + }, { + //结算科室编码 + xtype: 'hidden', + name: 'settleAccountsDepartCoding', + id: 'settleAccountsDepartCoding' },{ + columnWidth : .33, + layout : 'form', + items : [{ + xtype : 'combo', + id : 'settleAccountsDepart', + name : 'settleAccountsDepart', + queryParam : 'spell', + fieldLabel : '结算科室', + minChars : 0, + valueField : 'id', + displayField : 'name', + store : departJsonStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + allowBlank : false, + anchor : '90%' + }] + },{ columnWidth : 1, layout : 'form', - labelWidth : 50, items : [{ xtype : 'textarea', fieldLabel : '备注', @@ -579,7 +617,7 @@ }, {header : "删除",width : 20,menuDisabled : true,dataIndex : 'deleteButton', id:'expandColumn', renderer:renderDeleteButton} ]), - width : 950, + width : 910, height : 400, autoExpandColumn : 'expandColumn', clicksToEdit : 1,// 设置点击几次才可编辑 @@ -680,7 +718,7 @@ id : 'userecordName', name : 'userecordName', width : 200, - anchor : '95%', + anchor : '90%', emptyText : '点击选择使用记录', readOnly : true, listeners : { @@ -706,7 +744,7 @@ width : 40, regex: /^\d+$/, regexText:'只能输入数字', - anchor : '95%', + anchor : '90%', listeners : { specialkey : function(field, e) { if (e.getKey() == Ext.EventObject.ENTER) { @@ -1024,6 +1062,8 @@ top.Ext.getCmp("sendTime").setValue(Ext.util.Format.date(new Date(action.result.data.sendTime.time), 'Y-m-d H:i')); top.Ext.getCmp("sourceWarehouseName").setValue(action.result.data.sourceWarehouseName); top.Ext.getCmp("departSearch").setRawValue(action.result.data.depart); + top.Ext.getCmp("settleAccountsDepart").setRawValue(action.result.data.settleAccountsDepart); + top.Ext.getCmp("settleAccountsDepartCoding").setRawValue(action.result.data.settleAccountsDepartCoding); for(var i = 0 ;i < action.result.data.materialInvoiceItemList.length ;i++){ var materialName = action.result.data.materialInvoiceItemList[i].materialName; var materialInvoiceItem = new MaterialInvoiceItemRecord({