Pārlūkot izejas kodu

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

rainco 7 gadi atpakaļ
vecāks
revīzija
d92681f21c

+ 1 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -26,6 +26,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_UNAUDITED(79304,"只能反审核已审核的单据"),
     BIZ_DELETE(79305,"只能删除未审核的单据"),
     BIZ_RELDELETE(79305,"存在关联单据,不允许删除"),
+    BIZ_RELCLOSE(79305,"存在关联单据,不允许禁用"),
     BIZ_RELDELETE_UPDATE(79306,"存在关联单据,不允许更新编号"),
     BIZ_RELDELETE_UPDATEPROD(79307,"存在关联单据,不允许更新"),
     BIZ_RELDELETE_DELETEPROD(79308,"存在关联单据,不允许删除"),

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java

@@ -187,7 +187,7 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             Long prodId = getMapper().selectByPrimaryKey(id).getBo_motherid();
             int count = getMapper().getCountFromMake(prodId);
             if (count > 0){
-                throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+                throw new BizException(BizExceptionCode.BIZ_RELCLOSE);
             }
 
             Bom bom = new Bom();

+ 3 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -121,11 +121,12 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (!product.getPr_code().equals(oldCode)){
                 validEnableUpdateCode(product.getId());
             }
-            //物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
-            validProductOperation(product.getId(), BizExceptionCode.BIZ_RELDELETE_UPDATEPROD);
 
             //明细数据有更新/插入动作
             if (productDetailList.size() > 0){
+                //物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
+                validProductOperation(product.getId(), BizExceptionCode.BIZ_RELDELETE_UPDATEPROD);
+
                 //找到原始单据,反过账并删除
                 String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
                 if (!StringUtils.isEmpty(inoutCode)) {

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/BomMapper.xml

@@ -273,7 +273,7 @@
     </where>
     ORDER BY BO_ID DESC
   </select>
-    <select id="getCountFromMake" parameterType="java.lang.Long">
+    <select id="getCountFromMake" parameterType="java.lang.Long" resultType="int">
         SELECT COUNT(*) FROM MAKE WHERE MA_PRODID = #{id}
     </select>
 </mapper>

+ 2 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -4,6 +4,8 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
 
     cls: 'x-detailgridfield',
 
+    sortableColumns: false,
+    enableColumnHide: false,
     border: 1,
     margin: '0 0 10 0', // formpanel的fieldDefaults未生效
     height: 245,

+ 0 - 5
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -226,11 +226,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
                         condition: JSON.stringify(condition)
                     });
     
-                },
-                load: function(store, records, successful, operation, eOpts) {
-                    store.each(function(d, i) {
-                        d.set('id', d.get('id') + '-' + i);
-                    });
                 }
             }
         });

+ 9 - 2
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -50,7 +50,8 @@ Ext.define('saas.view.home.charts.MonthSale', {
                     '#1E90FF',
                     '#B0E0E6'
                 ],
-                innerPadding: 0,
+                interactions: ['rotate', 'itemhighlight'],
+                innerPadding: 2,
                 legend: {
                     type: 'dom',
                     docked: 'right',
@@ -76,11 +77,17 @@ Ext.define('saas.view.home.charts.MonthSale', {
                         color: '#fff',
                         font: '12px Microsoft YaHei'
                     },
+                    style: {
+                        // lineWidth: 0,
+                        // strokeStyle: 'transparent',
+                        // fillStyle: 'transparent',
+                        // fillOpacity: 0
+                    },
                     // label: {
                     //     field: 'x',
                     //     renderer: me.onLabelRender
                     // },
-                    highlight: true,
+                    highlight: false,
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender

+ 1 - 0
frontend/saas-web/app/view/home/charts/MonthSale.scss

@@ -11,6 +11,7 @@
                 text-align: left;
 
                 .x-legend-item-marker {
+                    box-shadow: none;
                     border-radius: 50%;
                 }
             }

+ 84 - 11
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -71,15 +71,31 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     },
                 }],
                 series: [{
-                    type: 'line',
-                    smooth: true,
-                    title: '销售额',
-                    xField: 'x',
-                    yField: ['sale'],
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
-                    }
+                    },
+                    type: 'line',
+                    smooth: true,
+                    xField: 'x',
+                    yField: 'sale',
+                    marker: {
+                        radius: 0,
+                        lineWidth: 0
+                    },
+                    highlight: {
+                        fillStyle: '#53A8E2',
+                        fillOpacity: 1,
+                        strokeStyle: '#A3D0EE',
+                        radius: 5,
+                        lineWidth: 2,
+                    },
+                    style: {
+                        lineWidth: 2,
+                        fillStyle: '#53A8E2',
+                        fillOpacity: 0.1,
+                    },
+                    // renderer: me.onSeriesRenderer
                 }, {
                     type: 'line',
                     smooth: true,
@@ -89,21 +105,78 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
-                    }
-                }]
+                    },
+                    marker: {
+                        radius: 0,
+                        lineWidth: 0
+                    },
+                    highlight: {
+                        fillStyle: '#D54F65',
+                        fillOpacity: 1,
+                        strokeStyle: '#FF9BAC',
+                        radius: 5,
+                        lineWidth: 2,
+                    },
+                    style: {
+                        lineWidth: 2,
+                        fillStyle: '#D54F65',
+                        fillOpacity: 0.1,
+                    },
+                }],
+                listeners: {
+                    itemhighlightchange: me.itemhighlightchange
+                }
             }]
         });
 
         me.callParent(arguments);
     },
 
+    onSeriesRender: function (sprite, config, rendererData, index) {
+        var store = rendererData.store,
+            storeItems = store.getData().items,
+            currentRecord = storeItems[index],
+            previousRecord = (index > 0 ? storeItems[index-1] : currentRecord),
+            current = currentRecord && currentRecord.data['g1'],
+            previous = previousRecord && previousRecord.data['g1'],
+            isUp = current >= previous,
+            changes = {};
+
+        switch (config.type) {
+            case 'marker':
+                changes.strokeStyle = (isUp ? 'cornflowerblue' : 'tomato');
+                changes.fillStyle = (isUp ? 'aliceblue' : 'lightpink');
+                break;
+            case 'line':
+                changes.strokeStyle = (isUp ? 'cornflowerblue' : 'tomato');
+                changes.fillStyle = (isUp ? 'rgba(100, 149, 237, 0.4)' : 'rgba(255, 99, 71, 0.4)');
+                break;
+        }
+
+        return changes;
+    },
+
     onSeriesTooltipRender: function (tooltip, record, item) {
-        var title = item.series.getTitle();
-        tooltip.setHtml(record.get('x') + title + record.get(item.series.getYField()) + '万元');
+        tooltip.setHtml(record.get('x') + '月: ' + record.get(item.series.getYField()) + '万元');
     },
 
     categoryRender: function(axis, label, layoutContext, lastLabel) {
         return label + '月';
-    }
+    },
+
+    itemhighlightchange: function(chart, newHighlightItem, oldHighlightItem) {
+        debugger;
+        this.setSeriesLineWidth(newHighlightItem, 4);
+        this.setSeriesLineWidth(oldHighlightItem, 2);
+    },
+
+    setSeriesLineWidth: function (item, lineWidth) {
+        console.log('xxxx');
+        if (item) {
+            item.series.setStyle({
+                lineWidth: lineWidth
+            });
+        }
+    },
 
 });

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -126,7 +126,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                     queryMode : "local", 
                     store : null, 
                     valueField : "value", 
-                    xtype : "productDbfindTrigger"
+                    xtype : "productMultiDbfindTrigger"
                 }
             },{
                 text: 'model映射需要',