Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js =================================================================== diff -u -r31243 -r31260 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 31243) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 31260) @@ -541,7 +541,9 @@ } }, {header : "待发",dataIndex : 'count',width : 50, menuDisabled: true}, - {header : '加急',id : 'urgentAmount',dataIndex : 'urgentAmount',width : 50,value : 0, menuDisabled: true,renderer:getDefaultAmount} + {header : '加急',id : 'urgentAmount',dataIndex : 'urgentAmount',width : 50,value : 0, menuDisabled: true, renderer : function(v, p, record){ + return renderFunction(v, p, record, '加急'); + }}, ]); var rightGrid = new Ext.grid.EditorGridPanel({ Index: ssts-web/src/main/webapp/common/common.css =================================================================== diff -u -r31187 -r31260 --- ssts-web/src/main/webapp/common/common.css (.../common.css) (revision 31187) +++ ssts-web/src/main/webapp/common/common.css (.../common.css) (revision 31260) @@ -25,7 +25,7 @@ /*黄绿*/ .my_row_yellowGreen div{ - background-color: #99ff00 !important; + background-color: #99ff00 !important; } /*绿*/ @@ -68,6 +68,14 @@ background-color: #000000 !important; } +.my_row_color .x-grid3-cell-inner { + padding: 0; +} + +.my_row_color .x-grid3-cell-inner .item { + padding: 3px 3px 3px 5px; +} + .tousse_instance_background_yellow { background-color:yellow !important; } @@ -202,4 +210,8 @@ } .tousseName_background_1 { background: #BFEFFF !important; +} +/* GDSZYY-91:灰色 */ +.gridRowColor td{ + background: #eee !important; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r31195 -r31260 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 31195) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 31260) @@ -73,39 +73,6 @@ currentScanMode = sstsConfig.invoicePageScanMode; } -function getDefaultAmount(v,p,record){ - if (v==null || v.length <= 0){ - return 0; - }else{ - return v; - } -} -function formatScannedAmount(v,p,record){ - var tousseAmount = 0; - if (v==null || v.length <= 0){ - tousseAmount = 0; - }else{ - tousseAmount = v; - } - var goodsType = record.get('goodsType'); - var isCleanedEntirely = record.get('isCleanedEntirely'); - var scannedMaterialAmount = record.get('scannedMaterialAmount'); - if (scannedMaterialAmount == null){ - scannedMaterialAmount = 0; - } - if((goodsType == '消毒物品') && (isCleanedEntirely == '否')){ - return tousseAmount+'('+scannedMaterialAmount+')'; - }else{ - return tousseAmount; - } -} -function formatStorage(v,p,record){ - if (v==null || v.length <= 0){ - return ''; - }else{ - return v; - } -} function sayGoods(record){ if(record && record.data){ speaker.speak(record.data.showTousseName + ",数量为" + record.data.count); @@ -183,6 +150,140 @@ } } +function getNewBackgroundColor(record){ + var rowClassName = ''; + var rowColor = ''; + //误差数量=已扫数量-待发数量 + if(record.data.errorAmount < 0){ + rowClassName = 'my_row_red'; + if(sstsConfig.backgroudColorConfigOfInvoiceGoodsList + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.overFulled + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.overFulled.className + ){ + rowClassName = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.overFulled.className; + rowColor = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.overFulled.color || ''; + } + }else if(record.data.errorAmount > 0 && record.data.errorAmount < record.data.count){ + rowClassName = 'my_row_blue'; + //已扫码但是未扫满的背景色 + if(sstsConfig.backgroudColorConfigOfInvoiceGoodsList + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanBeforeFull + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanBeforeFull.className + ){ + //由配置项自定义颜色 + rowClassName = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanBeforeFull.className; + rowColor = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanBeforeFull.color || ''; + } + }else if(record.data.errorAmount == 0){ + //扫码扫满的背景色 + rowClassName = 'my_row_green'; + if(sstsConfig.backgroudColorConfigOfInvoiceGoodsList + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanFulled + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanFulled.className + ){ + //由配置项自定义颜色 + rowClassName = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanFulled.className; + rowColor = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.scanFulled.color || ''; + } + }else{ + //加急 + if(record.json.maxUrgentLevel && record.json.maxUrgentLevel.colorCode !== ''){ + rowClassName = 'my_row_red'; + rowClassName = getClassNameForColor(record.json.maxUrgentLevel.colorCode,'_info'); + return { + rowClassName:rowClassName, + rowColor:rowColor + }; + } + //未扫码的背景色 + if(sstsConfig.colorChangeRuleOfInvoicPlanToSendGoodsList == '2'){ + if(record.json.status == '已灭菌'){ + rowClassName = 'my_row_blue'; + if(sstsConfig.backgroudColorConfigOfInvoiceGoodsList + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.sterilizedColor + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.sterilizedColor.className + ){ + rowClassName = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.sterilizedColor.className; + rowColor = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.sterilizedColor.color || ''; + } + }else { + rowClassName = 'my_row_yellow'; + if(sstsConfig.backgroudColorConfigOfInvoiceGoodsList + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.unsterilizedColor + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.unsterilizedColor.className + ){ + rowClassName = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.unsterilizedColor.className; + rowColor = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.unsterilizedColor.color || ''; + } + } + }else { + //判断是否全是今天申请的;如果同一种物品,内含今天申请的和非今天申请的,则为黄色,不然为白色(无底色) + if(record.json.beforeToday == true){ + rowClassName = 'my_row_yellow'; + if(sstsConfig.backgroudColorConfigOfInvoiceGoodsList + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.beforeToday + && sstsConfig.backgroudColorConfigOfInvoiceGoodsList.beforeToday.className + ){ + //由配置项自定义颜色 + rowClassName = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.beforeToday.className; + rowColor = sstsConfig.backgroudColorConfigOfInvoiceGoodsList.beforeToday.color || ''; + } + } + if(record.json.beforeToday == false){ + rowClassName = 'my_row_white'; + } + } + } + return { + rowClassName:rowClassName, + rowColor:rowColor + }; +} + +function renderFunction(v, p, record, name){ + var rowColor = getNewBackgroundColor(record).rowColor || ''; + var content = ''; + if(name == '紧急程度'){ + if(sstsConfig.enableUrgentFunction && record.json.maxUrgentLevel && record.json.maxUrgentLevel.colorCode != undefined){ + content = record.json.maxUrgentLevel.name; + }else { + content == ''; + } + }else if(name == '加急' || name == '误差' || name == '库存'){ + if (v == null || v.length <= 0){ + content == (name == '库存')?'':0 + }else{ + content == v; + } + }else if(name == '实发'){ + var tousseAmount = 0; + if (v ==null || v.length <= 0){ + tousseAmount = 0; + }else{ + tousseAmount = v; + } + var goodsType = record.get('goodsType'); + var isCleanedEntirely = record.get('isCleanedEntirely'); + var scannedMaterialAmount = record.get('scannedMaterialAmount'); + if (scannedMaterialAmount == null){ + scannedMaterialAmount = 0; + } + if((goodsType == '消毒物品') && (isCleanedEntirely == '否')){ + content == tousseAmount+'('+scannedMaterialAmount+')'; + }else{ + content == tousseAmount; + } + }else { + content = v || ''; + } + + if(rowColor == ''){ + return '