Browse Source

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

zhoudw 7 years ago
parent
commit
3409549435
22 changed files with 728 additions and 51 deletions
  1. 2 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersMapper.java
  2. 2 5
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java
  3. 13 0
      applications/commons/commons-server/src/main/resources/mapper/MaxnumbersMapper.xml
  4. 1 1
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java
  5. 1 1
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  6. 1 0
      frontend/saas-web/app/view/core/form/FormPanel.js
  7. 12 0
      frontend/saas-web/app/view/core/form/FormPanelController.js
  8. 27 17
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  9. 1 1
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  10. 453 0
      frontend/saas-web/app/view/core/report/ReportPanel.js
  11. 29 0
      frontend/saas-web/app/view/core/report/ReportPanelController.js
  12. 4 0
      frontend/saas-web/app/view/core/report/ReportPanelModel.js
  13. 94 0
      frontend/saas-web/app/view/purchase/report/Purchase.js
  14. 4 0
      frontend/saas-web/app/view/purchase/report/PurchaseController.js
  15. 4 0
      frontend/saas-web/app/view/purchase/report/PurchaseModel.js
  16. 66 0
      frontend/saas-web/app/view/sale/report/SaleIn.js
  17. 4 0
      frontend/saas-web/app/view/sale/report/SaleInController.js
  18. 4 0
      frontend/saas-web/app/view/sale/report/SaleInModel.js
  19. 0 8
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  20. 0 8
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  21. 0 8
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  22. 6 2
      frontend/saas-web/resources/json/navigation.json

+ 2 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersMapper.java

@@ -33,4 +33,6 @@ public interface MaxnumbersMapper extends CommonBaseMapper<Maxnumbers>{
     int updateByPrimaryKey(Maxnumbers record);
 
     List<Maxnumbers> getListDataByCondition(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+    Maxnumbers selectByCaller(@Param("caller")String caller, @Param("companyId") Long companyId);
 }

+ 2 - 5
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java

@@ -246,11 +246,8 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
     * @Date: 2018/10/19
     */
     private Maxnumbers getMaxnumbers(String caller) {
-        MaxnumbersExample example = new MaxnumbersExample();
-        MaxnumbersExample.Criteria cta = example.createCriteria();
-        cta.andCompanyIdEqualTo(BaseContextHolder.getCompanyId());
-        cta.andMn_callerEqualTo(caller);
-        return maxnumbersMapper.selectByExample(example);
+       Long companyId = BaseContextHolder.getCompanyId();
+        return maxnumbersMapper.selectByCaller(caller, companyId);
     }
     /**
     * @Description

+ 13 - 0
applications/commons/commons-server/src/main/resources/mapper/MaxnumbersMapper.xml

@@ -12,6 +12,7 @@
     <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="mn_rule" property="mn_rule" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Example_Where_Clause" >
     <where >
@@ -292,4 +293,16 @@
         </where>
         ORDER BY MN_ID DESC
     </select>
+  <select id="selectByCaller" resultMap="BaseResultMap">
+    SELECT * FROM MAXNUMBERS
+    <where>
+      <if test="caller">
+        and mn_caller=#{caller}
+      </if>
+      <if test="companyId">
+        and COMPANYID=#{companyId}
+      </if>
+    </where>
+    ORDER BY MN_ID DESC
+  </select>
 </mapper>

+ 1 - 1
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java

@@ -111,7 +111,7 @@ public class VendorList implements Serializable {
 
     private String vc_name;
 
-    private Integer vc_tel;
+    private String vc_tel;
 
     private String vc_qq;
 

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

@@ -81,7 +81,7 @@
         <result column="vc_veid" property="vc_veid" jdbcType="INTEGER" />
         <result column="vc_detno" property="vc_detno" jdbcType="INTEGER" />
         <result column="vc_name" property="vc_name" jdbcType="VARCHAR" />
-        <result column="vc_tel" property="vc_tel" jdbcType="INTEGER" />
+        <result column="vc_tel" property="vc_tel" jdbcType="VARCHAR" />
         <result column="vc_qq" property="vc_qq" jdbcType="VARCHAR" />
         <result column="vc_email" property="vc_email" jdbcType="VARCHAR" />
         <result column="vc_text1" property="vc_text1" jdbcType="VARCHAR" />

+ 1 - 0
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -122,6 +122,7 @@ Ext.define('saas.view.core.form.FormPanel', {
             width: 150,
             cls: 'x-codeeditor',
             hidden: true,
+            allowBlank: false,
             bind: {
                 value: '{' + me._codeField + '}',
                 hidden: '{!base.codeEditable}'

+ 12 - 0
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -123,6 +123,18 @@ Ext.define('saas.view.core.form.FormPanelController', {
         viewModel = me.getViewModel(),
         modelData = viewModel.getData();
 
+        var dirty = form.isDirty();
+
+        if(dirty) {
+            showConfirm('提示', '表单数据有修改,是否先保存修改?')
+            .then(function(yes) {
+                if(yes == 'yes') {
+                    me.onSave();
+                }
+            });
+            return;
+        }
+
         var valid = form.isValid();
 
         if(!valid) {

+ 27 - 17
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -224,6 +224,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         if(!me.editable) {
             return;
         }
+
         var detnoColumn = me.detnoColumn,
         store = me.getStore(),
         records = store.getData().items,
@@ -232,24 +233,33 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         });
 
         var id = selectedRecord.data.id;
-        if(id&&id!=0&&(typeof id) == 'number'){
-            me.BaseUtil.request({
-                url: me.deleteDetailUrl+id,
-                params: '',
-                method: 'POST',
-            })
-            .then(function() {
-                store.remove(selectedRecord);
-                me.fireEvent('validChange');
-                //解析参数
-                showToast('删除成功');
+
+        if(id&&id!=0&&(typeof id) == 'number') {
+            showConfirm('警告', '确定删除该条明细')
+            .then(function(yes) {
+                if(yes == 'yes') {
+                    me.BaseUtil.request({
+                        url: me.deleteDetailUrl+id,
+                        params: '',
+                        method: 'POST',
+                    })
+                    .then(function() {
+                        store.remove(selectedRecord);
+                        me.fireEvent('validChange');
+                        //解析参数
+                        showToast('删除成功');
+                    })
+                    .catch(function() {
+                        me.fireEvent('validChange');
+                        //失败
+                        showToast('删除失败');
+                    });
+                }else {
+                    throw new Error();
+                }
             })
-            .catch(function() {
-                me.fireEvent('validChange');
-                //失败
-                showToast('删除失败');
-            });
-        }else{
+            .catch()
+        }else {
             store.remove(selectedRecord);
             me.fireEvent('validChange');
         }

+ 1 - 1
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -63,7 +63,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                                 }
                             }else {
                                 console.error('exception: ', response.responseJson);
-                                showToast('exception:' + response.responseJson);
+                                showToast('请求错误:' + response.responseJson);
                             }
                         }
                     }

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

@@ -0,0 +1,453 @@
+Ext.define('saas.view.core.report.ReportPanel', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'core-report-reportpanel',
+
+    controller: 'core-report-reportpanel',
+    viewModel: 'core-report-reportpanel',
+
+    requires: [
+        'Ext.grid.plugin.Exporter'
+    ],
+
+    layout: 'vbox',
+    autoScroll: true,
+    border: 1,
+    bodyPadding: 5,
+
+    groupField: null, // 分组字段
+    listUrl: null, // 列表查询URL
+    defaultCondition: null, // 默认查询条件
+    searchItems: [], // 查询字段
+
+    initComponent: function() {
+        var me = this;
+
+        var store = me.initStore();
+
+        Ext.apply(me, {
+            items: [{
+                xtype: 'form',
+                width: '100%',
+                layout: 'column',
+                defaults:{
+                    margin: '0 5 5 0',
+                    labelAlign: 'right',
+                    labelWidth: 90,
+                    columnWidth: 0.25,
+                },
+                items: me.initSearchItems(),
+                dockedItems: [{
+                    xtype: 'toolbar',
+                    dock: 'bottom',
+                    items: ['->', {
+                        xtype: 'button',
+                        text: '查询',
+                        handler: 'onQuery'
+                    }, '->']
+                }]
+            }, {
+                xtype: 'grid',
+                width: '100%',
+                flex: 1,
+                border: 1,
+                plugins: {
+                    gridexporter: true
+                },
+                features: [{
+                    ftype: 'groupingsummary',
+                    hideGroupedHeader: false,
+                    enableGroupingMenu: false,
+                    collapsible: false
+                }, {
+                    ftype: 'summary',
+                    dock: 'bottom'
+                }],
+                store: store,
+                columns: me.initColumns(),
+                dockedItems: [{
+                    xtype: 'toolbar',
+                    dock: 'top',
+                    items: ['->', {
+                        xtype: 'button',
+                        text: '导出为...',
+                        menu: {
+                            defaults: {
+                                handler: 'exportTo'
+                            },
+                            items: [{
+                                text: 'Excel xlsx',
+                                cfg: {
+                                    type: 'excel07',
+                                    ext: 'xlsx'
+                                }
+                            }, {
+                                text: 'Excel xlsx (include groups)',
+                                cfg: {
+                                    type: 'excel07',
+                                    ext: 'xlsx',
+                                    includeGroups: true,
+                                    includeSummary: true
+                                }
+                            }, {
+                                text: 'Excel xml',
+                                cfg: {
+                                    type: 'excel03',
+                                    ext: 'xml'
+                                }
+                            }, {
+                                text: 'Excel xml (include groups)',
+                                cfg: {
+                                    includeGroups: true,
+                                    includeSummary: true
+                                }
+                            }, {
+                                text: 'CSV',
+                                cfg: {
+                                    type: 'csv'
+                                }
+                            }, {
+                                text: 'TSV',
+                                cfg: {
+                                    type: 'tsv',
+                                    ext: 'csv'
+                                }
+                            }, {
+                                text: 'HTML',
+                                cfg: {
+                                    type: 'html'
+                                }
+                            }, {
+                                text: 'HTML (include groups)',
+                                cfg: {
+                                    type: 'html',
+                                    includeGroups: true,
+                                    includeSummary: true
+                                }
+                            }]
+                        }
+                    }]
+                }, {
+                    style: {
+                        'border-top': '1px solid #35baf6 !important'
+                    },
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    store: store
+                }],
+            }]
+        });
+
+        me.callParent(arguments);
+    },
+
+    getListGrid: function() {
+        var me = this,
+        grid = me.items.items[1];
+
+        return grid;
+    },
+
+    initStore: function() {
+        var me = this;
+        var store = Ext.create('Ext.data.Store', {
+            fields: me.getFields(),
+            autoLoad: true,
+            pageSize: 15,
+            data: [],
+            proxy: {
+                type: 'ajax',
+                url: me.listUrl,
+                timeout: 8000,
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total',
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                showToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            showToast('请求错误:' + response.responseJson);
+                        }
+                    }
+                }
+            },
+            listeners: {
+                beforeload: function (store, op) {
+                    condition = me.getConditions(),
+                    defaultCondition = me.defaultCondition;
+    
+                    if(defaultCondition) {
+                        condition.push({
+                            type: 'condition',
+                            value: defaultCondition
+                        });
+                    }
+                    Ext.apply(store.proxy.extraParams, {
+                        number: store.exportNumber?store.exportNumber:op._page,
+                        size: store.exportPageSize?store.exportPageSize:store.pageSize,
+                        mode: 'MAIN',
+                        condition: JSON.stringify(condition)
+                    });
+    
+                }
+            }
+        });
+
+        if(me.groupField) {
+            store.setGrouper({
+                property: me.groupField
+            });
+        }
+
+        return store;
+    },
+
+    getFields: function() {
+        var me = this;
+        return me.reportColumns.filter(function(c) {
+            return !!c.dataIndex;
+        }).map(function(c) {
+            return c.dataIndex;
+        });
+    },
+
+    initColumns: function() {
+        var me = this,
+        columns = me.reportColumns;
+
+        Ext.Array.each(columns, function(c) {
+            Ext.applyIf(c, {
+                width: 120
+            });
+
+            if(c.xtype == 'datecolumn') {
+                Ext.applyIf(c, {
+                    format: 'Y-m-d'
+                })
+            }
+        })
+
+        return columns;
+    },
+
+    initSearchItems: function() {
+        var me = this,
+        items = me.searchItems,
+        viewModel = me.getViewModel();
+
+        Ext.Array.each(items, function(item) {
+            var bind = item.bind,
+            name = item.name,
+            ignore = item.ignore,
+            defaultValue = item.defaultValue;
+
+            if(item.xtype == 'numberfield') {
+                Ext.applyIf(item, {
+                    hideTrigger: true, // 隐藏trigger
+                    mouseWheelEnabled: false // 取消滚轮事件
+                });
+            }
+            // 设置model绑定
+            if(!ignore) {
+                if(bind) {
+                    if(!Ext.isString(bind)) {
+                        bind = name;
+                        Ext.apply(bind, {
+                            value: '{form.' + bind + '}'
+                        });
+                    }else {
+                        bind = name;
+                        item.bind = '{form.' + bind + '}';
+                    }
+                }else {
+                    bind = name;
+                    item.bind = '{form.' + bind + '}';
+                }
+                // 设置默认值
+                if(defaultValue) {
+                    viewModel.set('form.' + bind, defaultValue);
+                }
+            }
+        });
+
+        return items;
+    },
+
+    initToolBarItems: function () {
+        var me = this;
+
+        return ['->', {
+            ui: 'default-toolbar',
+            xtype: 'button',
+            text: '导出为...',
+            menu: {
+                defaults: {
+                    handler: 'exportTo'
+                },
+                items: [{
+                    text: 'Excel xlsx',
+                    cfg: {
+                        type: 'excel07',
+                        ext: 'xlsx'
+                    }
+                }, {
+                    text: 'Excel xlsx (include groups)',
+                    cfg: {
+                        type: 'excel07',
+                        ext: 'xlsx',
+                        includeGroups: true,
+                        includeSummary: true
+                    }
+                }, {
+                    text: 'Excel xml',
+                    cfg: {
+                        type: 'excel03',
+                        ext: 'xml'
+                    }
+                }, {
+                    text: 'Excel xml (include groups)',
+                    cfg: {
+                        includeGroups: true,
+                        includeSummary: true
+                    }
+                }, {
+                    text: 'CSV',
+                    cfg: {
+                        type: 'csv'
+                    }
+                }, {
+                    text: 'TSV',
+                    cfg: {
+                        type: 'tsv',
+                        ext: 'csv'
+                    }
+                }, {
+                    text: 'HTML',
+                    cfg: {
+                        type: 'html'
+                    }
+                }, {
+                    text: 'HTML (include groups)',
+                    cfg: {
+                        type: 'html',
+                        includeGroups: true,
+                        includeSummary: true
+                    }
+                }]
+            }
+        }]
+    },
+
+    getConditions: function() {
+        var me = this,
+        formItems = me.searchItems,
+        viewModel = me.getViewModel(),
+        viewModelData = viewModel.getData(),
+        bindItems = viewModelData['form'],
+        condition,
+        conditions = [];
+
+        for(k in bindItems) {
+            var item = Ext.Array.findBy(formItems, function(i) {
+                return i.name == k;
+            });
+            var field = item.name,
+            func = item.getCondition,
+            value = bindItems[k],
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        }
+
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+});

+ 29 - 0
frontend/saas-web/app/view/core/report/ReportPanelController.js

@@ -0,0 +1,29 @@
+Ext.define('saas.view.core.report.ReportPanelController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.core-report-reportpanel',
+
+    requires: [
+        'Ext.exporter.text.CSV',
+        'Ext.exporter.text.TSV',
+        'Ext.exporter.text.Html',
+        'Ext.exporter.excel.Xml',
+        'Ext.exporter.excel.Xlsx'
+    ],
+
+    onQuery: function (btn) {
+        var me = this,
+        reportPanel = me.getView(),
+        grid = reportPanel.getListGrid();
+
+        grid.store.loadPage(1);
+    },
+
+    exportTo: function(btn){
+        var cfg = Ext.merge({
+            title: 'Grid export demo',
+            fileName: 'GridExport' + '.' + (btn.cfg.ext || btn.cfg.type)
+        }, btn.cfg);
+
+        this.getView().saveDocumentAs(cfg);
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/core/report/ReportPanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.core.report.ReportPanelModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.core-report-reportpanel'
+});

+ 94 - 0
frontend/saas-web/app/view/purchase/report/Purchase.js

@@ -0,0 +1,94 @@
+Ext.define('saas.view.purchase.report.Purchase', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'purchase-report-purchase',
+
+    controller: 'purchase-report-purchase',
+    viewModel: 'purchase-report-purchase',
+
+    viewName: 'purchase-report-purchase',
+
+    groupField: null,
+    listUrl: '/api/purchase/purchase/list',
+    defaultCondition: null,
+
+    searchItems: [{
+        xtype: 'condatefield',
+        name: 'pu_date',
+        fieldLabel: '单据日期',
+        columnWidth: 0.5
+    }],
+
+    reportColumns: [{
+        text: 'id',
+        dataIndex: 'id',
+        hidden: true
+    }, {
+        text: '采购单号',
+        dataIndex: 'pu_code',
+        summaryType: 'count',
+        width: 200
+    }, {
+        text: '供应商编号',
+        dataIndex: 'PU_VENDCODE',
+        width: 200
+    }, {
+        text: '供应商名称',
+        dataIndex: 'PU_VENDNAME',
+        width: 200
+    }, {
+        text: '业务状态',
+        dataIndex: 'PU_STATUS'
+    }, {
+        text: '采购员',
+        dataIndex: 'PU_BUYERNAME'
+    }, {
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'pu_date'
+    }, {
+        text: '序号',
+        dataIndex: 'PD_DETNO'
+    }, {
+        text: '物料编号',
+        dataIndex: 'pr_code'
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail'
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '品牌',
+        dataIndex: 'pr_brand'
+    }, {
+        text: '单位',
+        dataIndex: 'pr_unit'
+    }, {
+        text: '采购数量',
+        dataIndex: 'PD_QTY'
+    }, {
+        text: '单价',
+        dataIndex: 'PD_PRICE'
+    }, {
+        text: '税率',
+        dataIndex: 'PD_TAXRATE'
+    }, {
+        text: '金额',
+        dataIndex: 'PD_TOTAL'
+    }, {
+        text: '不含税单价',
+        dataIndex: 'rbd_remark'
+    }, {
+        text: '不含税金额',
+        dataIndex: 'PD_TAXPRICE'
+    }, {
+        text: '收货数量',
+        dataIndex: 'PD_YQTY'
+    }, {
+        text: '收货金额',
+        dataIndex: 'PD_TOTAL'
+    }, {
+        text: '备注'
+    }]
+
+});

+ 4 - 0
frontend/saas-web/app/view/purchase/report/PurchaseController.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.purchase.report.PurchaseController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.purchase-report-purchase'
+});

+ 4 - 0
frontend/saas-web/app/view/purchase/report/PurchaseModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.purchase.report.PurchaseModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.purchase-report-purchase'
+});

+ 66 - 0
frontend/saas-web/app/view/sale/report/SaleIn.js

@@ -0,0 +1,66 @@
+Ext.define('saas.view.sale.report.SaleIn', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'sale-report-salein',
+
+    controller: 'sale-report-salein',
+    viewModel: 'sale-report-salein',
+
+    viewName: 'sale-report-salein',
+
+    groupField: 'rb_custname',
+    listUrl: '/api/money/recbalance/list',
+    defaultCondition: null,
+
+    searchItems: [{
+        xtype: 'condatefield',
+        name: 'rb_date',
+        fieldLabel: '日期',
+        columnWidth: 0.5
+    }],
+
+    reportColumns: [{
+        text: 'id',
+        dataIndex: 'id',
+        hidden: true
+    }, {
+        text: '收款单号',
+        dataIndex: 'rb_code',
+        summaryType: 'count',
+        width: 200
+    }, {
+        text: '客户编号',
+        dataIndex: 'rb_custcode',
+        width: 200
+    }, {
+        text: '客户名称',
+        dataIndex: 'rb_custname',
+        width: 200
+    }, {
+        text: '业务员',
+        dataIndex: 'rb_manname'
+    }, {
+        text: '日期',
+        dataIndex: 'rb_date',
+        xtype: 'datecolumn'
+    }, {
+        text: '来源单号',
+        dataIndex: 'rbd_slcode'
+    }, {
+        text: '类型',
+        dataIndex: 'rbd_slkind'
+    }, {
+        text: '销售金额',
+        dataIndex: 'rbd_amount'
+    }, {
+        text: '本次收款',
+        dataIndex: 'rbd_nowbalance'
+    }, {
+        text: '应收余额'
+    }, {
+        text: '回款比例'
+    }, {
+        text: '备注',
+        dataIndex: 'rbd_remark'
+    }]
+
+});

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleInController.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.report.SaleInController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.sale-report-salein'
+});

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleInModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.report.SaleInModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.sale-report-salein'
+});

+ 0 - 8
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -184,10 +184,6 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "含税金额", 
                 dataIndex : "sd_total", 
                 width : 120.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length)).fill('0');
@@ -205,10 +201,6 @@ Ext.define('saas.view.sale.sale.FormPanel', {
             {
                 text : "未税金额", 
                 dataIndex : "sd_nettotal",
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length)).fill('0');

+ 0 - 8
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -174,10 +174,6 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "含税金额", 
                 dataIndex : "pd_ordertotal", 
                 width : 120.0, 
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length)).fill('0');
@@ -205,10 +201,6 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             {
                 text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length)).fill('0');

+ 0 - 8
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -185,10 +185,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 text : "含税金额", 
                 dataIndex : "pd_ordertotal", 
                 width : 120.0, 
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length)).fill('0');
@@ -216,10 +212,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
             {
                 text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 2
-                },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length)).fill('0');

+ 6 - 2
frontend/saas-web/resources/json/navigation.json

@@ -27,7 +27,9 @@
     }, {
         "text": "报表",
         "items": [{
-            "text": "采购明细表"
+            "id": "purchase",
+            "text": "采购明细表",
+            "viewType": "purchase-report-purchase"
         }, {
             "text": "采购付款一览表"
         }]
@@ -63,7 +65,9 @@
         "items": [{
             "text": "销售明细表"
         }, {
-            "text": "销售收款一览表"
+            "id": "salein",
+            "text": "销售收款一览表",
+            "viewType": "sale-report-salein"
         }, {
             "text": "销售利润表"
         }]