Browse Source

model字段补充/导出配置简化

zhuth 7 years ago
parent
commit
32ccc356b1

+ 32 - 1
frontend/saas-web/app/model/document/product.js

@@ -1,7 +1,38 @@
 Ext.define('saas.model.document.Product', {
     extend: 'saas.model.Base',
     fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pr_id', type: 'int' },
+        { name: 'pr_code', type: 'string' },
         { name: 'pr_detail', type: 'string' },
-        { name: 'pr_unit', type: 'string' }
+        { name: 'pr_spec', type: 'string' },
+        { name: 'pr_unit', type: 'string' },
+        { name: 'pr_kind', type: 'string' },
+        { name: 'pr_orispeccode', type: 'string' },
+        { name: 'pr_whid', type: 'int' },
+        { name: 'pr_whcode', type: 'string' },
+        { name: 'pr_whname', type: 'string' },
+        { name: 'pr_zxbzs', type: 'float' },
+        { name: 'pr_leadtime', type: 'float' },
+        { name: 'pr_brand', type: 'string' },
+        { name: 'pr_standardprice', type: 'float' },
+        { name: 'pr_purcprice', type: 'float' },
+        { name: 'pr_saleprice', type: 'float' },
+        { name: 'pr_vendid', type: 'int' },
+        { name: 'pr_vendcode', type: 'string' },
+        { name: 'pr_vendname', type: 'string' },
+        { name: 'pr_docdate', type: 'date' },
+        { name: 'pr_recordmanid', type: 'int' },
+        { name: 'pr_recordman', type: 'string' },
+        { name: 'pr_status', type: 'string' },
+        { name: 'pr_statuscode', type: 'string' },
+        { name: 'companyid', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'updatedate', type: 'date' },
+        { name: 'pr_text1', type: 'string' },
+        { name: 'pr_text2', type: 'string' },
+        { name: 'pr_text3', type: 'string' },
+        { name: 'pr_text4', type: 'string' },
+        { name: 'pr_text5', type: 'string' }
     ]
 });

+ 31 - 1
frontend/saas-web/app/model/document/productDTO.js

@@ -1,8 +1,38 @@
 Ext.define('saas.model.document.ProductDTO', {
     extend: 'saas.model.Base',
     fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pr_id', type: 'int' },
+        { name: 'pr_code', type: 'string' },
         { name: 'pr_detail', type: 'string' },
+        { name: 'pr_spec', type: 'string' },
         { name: 'pr_unit', type: 'string' },
-        { name: 'pr_spec', type: 'string' }
+        { name: 'pr_kind', type: 'string' },
+        { name: 'pr_orispeccode', type: 'string' },
+        { name: 'pr_whid', type: 'int' },
+        { name: 'pr_whcode', type: 'string' },
+        { name: 'pr_whname', type: 'string' },
+        { name: 'pr_zxbzs', type: 'float' },
+        { name: 'pr_leadtime', type: 'float' },
+        { name: 'pr_brand', type: 'string' },
+        { name: 'pr_standardprice', type: 'float' },
+        { name: 'pr_purcprice', type: 'float' },
+        { name: 'pr_saleprice', type: 'float' },
+        { name: 'pr_vendid', type: 'int' },
+        { name: 'pr_vendcode', type: 'string' },
+        { name: 'pr_vendname', type: 'string' },
+        { name: 'pr_docdate', type: 'date' },
+        { name: 'pr_recordmanid', type: 'int' },
+        { name: 'pr_recordman', type: 'string' },
+        { name: 'pr_status', type: 'string' },
+        { name: 'pr_statuscode', type: 'string' },
+        { name: 'companyid', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'updatedate', type: 'date' },
+        { name: 'pr_text1', type: 'string' },
+        { name: 'pr_text2', type: 'string' },
+        { name: 'pr_text3', type: 'string' },
+        { name: 'pr_text4', type: 'string' },
+        { name: 'pr_text5', type: 'string' }
     ]
 });

+ 21 - 3
frontend/saas-web/app/model/purchase/purchasedetail.js

@@ -2,16 +2,34 @@ Ext.define('saas.model.purchase.Purchasedetail', {
     extend: 'saas.model.Base',
 
     fields: [
-        { name: 'pd_detno', type: 'int' },
         { name: 'id', type: 'int' },
+        { name: 'pd_id', type: 'int' },
+        { name: 'pd_puid', type: 'int' },
+        { name: 'pd_code', type: 'string' },
+        { name: 'pd_detno', type: 'int' },
+        { name: 'pd_prodid', type: 'int' },
         { name: 'pd_prodcode', type: 'string' },
+        { name: 'pd_unit', type: 'string' },
         { name: 'pd_qty', type: 'float' },
         { name: 'pd_yqty', type: 'float' },
         { name: 'pd_price', type: 'float' },
-        { name: 'pd_taxrate', type: 'float' },
+        { name: 'pd_taxprice', type: 'float' },
         { name: 'pd_total', type: 'float' },
+        { name: 'pd_taxrate', type: 'float' },
+        { name: 'pd_taxtotal', type: 'float' },
+        { name: 'pd_acceptqty', type: 'float' },
         { name: 'pd_delivery', type: 'date' },
-        { name: 'pd_taxtotal', type: 'float' }
+        { name: 'pd_salecode', type: 'string' },
+        { name: 'pd_saledetno', type: 'int' },
+        { name: 'pd_sdid', type: 'int' },
+        { name: 'companyid', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'updatedate', type: 'date' },
+        { name: 'pd_text1', type: 'string' },
+        { name: 'pd_text2', type: 'string' },
+        { name: 'pd_text3', type: 'string' },
+        { name: 'pd_text4', type: 'string' },
+        { name: 'pd_text5', type: 'string' }
     ],
     //一对一映射
     associations: [{ type: 'hasOne', model: 'saas.model.document.ProductDTO', associationKey: 'ProductDTO'}]

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

@@ -42,6 +42,8 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 fields: me.getFields(),
                 autoLoad: true,
                 pageSize: 15,
+                exportPageSize: 5000,
+                exportNumber: 1,
                 data: [],
                 proxy: {
                     type: 'ajax',
@@ -271,20 +273,11 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     },
     onExport: function (me) {
         var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
-        grid.ownerCt.setLoading(true);
-        grid.store.exportPageSize = 5000;
-        grid.store.exportNumber = 1;
-        grid.store.load(function(records, operation, success) {
-            grid.saveDocumentAs({
-                type: 'xlsx',
-                title: grid.addTitle + '列表',
-                fileName: grid.addTitle + '列表.xlsx'
-            });
-            grid.store.exportPageSize = null;
-            grid.store.exportNumber = null;
-            grid.store.load(function(records, operation, success) {
-                grid.ownerCt.setLoading(false);
-            });
+
+        grid.saveDocumentAs({
+            type: 'xlsx',
+            title: grid.addTitle + '列表',
+            fileName: grid.addTitle + '列表.xlsx'
         });
     },
     onCloseOrder:function(me){

+ 3 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -154,6 +154,8 @@ Ext.define('saas.view.core.report.ReportPanel', {
             fields: me.getFields(),
             autoLoad: true,
             pageSize: 15,
+            exportPageSize: 5000,
+            exportNumber: 1,
             data: [],
             proxy: {
                 type: 'ajax',
@@ -194,7 +196,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                     Ext.apply(store.proxy.extraParams, {
                         number: store.exportNumber?store.exportNumber:op._page,
                         size: store.exportPageSize?store.exportPageSize:store.pageSize,
-                        mode: 'MAIN',
+                        mode: 'DETAIL',
                         condition: JSON.stringify(condition)
                     });
     

+ 5 - 1
frontend/saas-web/app/view/core/report/ReportPanelController.js

@@ -19,11 +19,15 @@ Ext.define('saas.view.core.report.ReportPanelController', {
     },
 
     exportTo: function(btn){
+        var me = this,
+        reportPanel = me.getView(),
+        grid = reportPanel.getListGrid();
+
         var cfg = Ext.merge({
             title: 'Grid export demo',
             fileName: 'GridExport' + '.' + (btn.cfg.ext || btn.cfg.type)
         }, btn.cfg);
 
-        this.getView().saveDocumentAs(cfg);
+        grid.saveDocumentAs(cfg);
     }
 });

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

@@ -20,7 +20,7 @@ Ext.define('saas.view.purchase.report.Purchase', {
 
     reportColumns: [{
         text: 'id',
-        dataIndex: 'id',
+        dataIndex: 'pu_id',
         hidden: true
     }, {
         text: '采购单号',
@@ -29,28 +29,28 @@ Ext.define('saas.view.purchase.report.Purchase', {
         width: 200
     }, {
         text: '供应商编号',
-        dataIndex: 'PU_VENDCODE',
+        dataIndex: 'pu_vendcode',
         width: 200
     }, {
         text: '供应商名称',
-        dataIndex: 'PU_VENDNAME',
+        dataIndex: 'pu_vendname',
         width: 200
     }, {
         text: '业务状态',
-        dataIndex: 'PU_STATUS'
+        dataIndex: 'pu_status'
     }, {
         text: '采购员',
-        dataIndex: 'PU_BUYERNAME'
+        dataIndex: 'pu_buyername'
     }, {
         text: '单据日期',
         xtype: 'datecolumn',
         dataIndex: 'pu_date'
     }, {
         text: '序号',
-        dataIndex: 'PD_DETNO'
+        dataIndex: 'pd_detno'
     }, {
         text: '物料编号',
-        dataIndex: 'pr_code'
+        dataIndex: 'pd_prodcode'
     }, {
         text: '物料名称',
         dataIndex: 'pr_detail'
@@ -65,28 +65,28 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pr_unit'
     }, {
         text: '采购数量',
-        dataIndex: 'PD_QTY'
+        dataIndex: 'pd_qty'
     }, {
         text: '单价',
-        dataIndex: 'PD_PRICE'
+        dataIndex: 'pd_price'
     }, {
         text: '税率',
-        dataIndex: 'PD_TAXRATE'
+        dataIndex: 'pd_taxrate'
     }, {
         text: '金额',
-        dataIndex: 'PD_TOTAL'
+        dataIndex: 'pd_total'
     }, {
         text: '不含税单价',
         dataIndex: 'rbd_remark'
     }, {
         text: '不含税金额',
-        dataIndex: 'PD_TAXPRICE'
+        dataIndex: 'pd_taxprice'
     }, {
         text: '收货数量',
-        dataIndex: 'PD_YQTY'
+        dataIndex: 'pd_yqty'
     }, {
         text: '收货金额',
-        dataIndex: 'PD_TOTAL'
+        dataIndex: 'pd_total'
     }, {
         text: '备注'
     }]