Browse Source

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

guq 7 years ago
parent
commit
936d24868b

+ 6 - 6
frontend/saas-web/Readme.md

@@ -66,10 +66,10 @@ viewModel: view.core.form.FormPanelModel
 | codeField | 编号字段 | √ | "pu_code" |
 | statusField | 状态字段 | √ | "pu_status" |
 | statusCodeField | 状态码字段 | √ |  "pu_statuscode" |
-| readUrl | 取数接口 | √ | basePath + "purchase/purchase/read" |
-| saveUrl | 保存接口 | √ | basePath + "purchase/purchase/save" |
-| auditUrl | 审核接口 | √ | basePath + "purchase/purchase/audit" |
-| deleteUrl | 删除接口 | √ | basePath + "purchase/purchase/delete" |
+| readUrl | 取数接口 | √ | "/api/purchase/purchase/read" |
+| saveUrl | 保存接口 | √ | "/api/purchase/purchase/save" |
+| auditUrl | 审核接口 | √ | "/api/purchase/purchase/audit" |
+| deleteUrl | 删除接口 | √ | "/api/purchase/purchase/delete" |
 | toolBtns | 自定义按钮 | x | [ Button ] |
 | defaultItems | 界面字段 | √ | [ Field ]|
 
@@ -92,7 +92,7 @@ viewModel: view.core.form.FormPanelModel
 | storeModel | grid model | √ | "saas.model.purchase.purchasedetail" |
 | detnoColumn | 序号列,配置该项后无需再columns定义序号列 | √ | "pud_detno" |
 | columns[i].ignore | 是否忽略,为真时在调用保存方法时不会取到该列值 | x | true |
-| deleteDetailUrl | 删除明细接口 | √ | basePath + "purchase/purchase/deleteItem" |
+| deleteDetailUrl | 删除明细接口 | √ | "/api/purchase/purchase/deleteItem" |
 - 需要根据columns在models文件夹下添加storeModel对应的Model
 
 ---
@@ -140,7 +140,7 @@ viewModel: view.core.query.QueryPanelModel
 | addTitle | 单据名称,新增tab标题 | √ | "采购单" |
 | addXtype | 主从表单据xtype | √ | "purchase-purchase-formpanel" |
 | defaultCondition | 默认条件 | x | "pu_class='采购单'" |
-| baseVastUrl | 查询列表接口 | √ | basePath + "purchase/purchase/" |
+| baseVastUrl | 查询列表接口 | √ | "/api/purchase/purchase/" |
 | baseColumn | 基础列配置 | √ | [ Column ] |
 | relativeColumn | 关联列设置 | x | [ Column ] |
 

+ 1 - 1
frontend/saas-web/app.json

@@ -316,7 +316,7 @@
             "delay": 250
         },
         "server": {
-            "basePath": "http://192.168.0.181:8570",
+            "basePath": "http://192.168.0.181:8560",
             "urlPattern": "^\/api\/"
         }
     },

+ 8 - 6
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -34,7 +34,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.money.FundTransfer',
         detnoColumn:  'ftd_detno',
-        _deleteDetailUrl:'/api/fundtransfer/deleteItem/',
+        deleteDetailUrl:'/api/fundtransfer/deleteItem/',
         columnWidth : 1,
         columns : [
             {
@@ -44,7 +44,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 width:0
             }, {
                 text : "期间", 
-                dataIndex : "ftd_ym ", 
+                dataIndex : "ftd_ym", 
                 editor : {
                     xtype : "numberfield"
                 },
@@ -58,7 +58,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
             }, {
                 text : "转出账户编号", 
                 dataIndex : "ftd_bankcode", 
-                width : 0
+                width :0
             }, {
                 text : "转出账户", 
                 width : 200.0, 
@@ -85,7 +85,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
             }, {
                 text : "转入账户编号", 
                 dataIndex : "ftd_inbankcode", 
-                width : 0
+                width :0
             }, {
                 text : "转入账户", 
                 width : 200.0, 
@@ -119,7 +119,10 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
             }, {
                 text : "结算方式号", 
                 dataIndex : "ftd_paycode", 
-                width : 0
+                width : 100,
+                editor:{
+                    xtype: ''  
+                }
             }, {
                 text : "结算方式", 
                 width : 200.0, 
@@ -144,7 +147,6 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 dataIndex : "ftd_remark",
                 width : 120.0, 
                 items : null,
-                ignore:true,
                 flex : 1.0,
                 editor : {
                     xtype : ""

+ 29 - 41
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -8,78 +8,66 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
     viewName: 'money-fundtransfer-querypanel',
     
     queryFormItems: [{
-        xtype: 'hidden',
-        name: 'or_id',
-        fieldLabel: 'ID',
-        allowBlank: true,
-        columnWidth: 0
-    }, {
-        xtype : 'hidden',
-        name : 'or_custid', 
-        fieldLabel : '客户ID'
-   }, {
-        xtype: 'hidden',
-        name: 'or_custcode',
-        fieldLabel: '客户编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'or_custname',
-        fieldLabel: '客户名称'
-    }, {
-        xtype : 'hidden',
-        name : 'or_bankid', 
-        fieldLabel : '账户ID'
-     }, {
-        xtype: 'hidden',
-        name: 'or_bankcode',
-        fieldLabel: '账户编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'or_bankname',
-        fieldLabel: '账户名称'
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "ft_date", 
+        fieldLabel : "单据日期"
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
-        idField: 'or_id',
-        codeField: 'or_code',
+        idField: 'id',
+        codeField: 'ft_code',
         addTitle: '其它收入单',
         addXtype: 'money-fundtransfer-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/fundtransfer/',
         baseColumn: [{
             text: 'id',
-            dataIndex: 'or_id',
+            dataIndex: 'id',
             width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'or_code',
+            dataIndex: 'ft_code',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'or_status',
+            dataIndex: 'ft_status',
             width: 120
         }, {
             text: '录入人',
-            dataIndex: 'or_recorder',
+            dataIndex: 'ft_recorder',
             width: 120
         }, {
             text: '单据日期',
-            dataIndex: 'or_date',
+            dataIndex: 'ft_date',
             xtype: 'datecolumn',
             width: 200
         }, {
-            text: '客户名称',
-            dataIndex: 'or_custname',
+            text: '期间',
+            dataIndex: 'ftd_ym',
+            xtype : "numbercolumn", 
+            width: 120
+        }, {
+            text: '转出账户',
+            dataIndex: 'ftd_bankname',
+            width: 120
+        }, {
+            text: '转入账户',
+            dataIndex: 'ftd_inbankname',
             width: 120
         }, {
             text: '金额',
-            dataIndex: 'or_amount',
-            xtype: 'numbercolumn',
+            dataIndex: 'ftd_nowbalance',
+            xtype : "numbercolumn",
+            width: 120
+        }, {
+            text: '结算方式',
+            dataIndex: 'ftd_paymethod',
             width: 120
         }, {
             text: '备注',
-            dataIndex: 'or_remark',
+            dataIndex: 'ft_remark',
             width: 250,
             flex: 1
         }],

+ 1 - 2
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -17,7 +17,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
      _relationColumn: 'ord_orid',
      _readUrl:'/api/money/othreceipts/read/',
      _saveUrl:'/api/money/othreceipts/save',
-     _deleteUrl:'/api/money/othreceipts/delete/', 
+     _deleteUrl:'/api/money/othreceipts/delete/',  
      initId:0,
 
     defaultItems: [{
@@ -137,7 +137,6 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 dataIndex : "ord_remark",
                 width : 120.0, 
                 items : null,
-                ignore:true,
                 flex : 1.0,
                 editor : {
                     xtype : ""

+ 5 - 6
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -40,22 +40,21 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
-        idField: 'or_id',
+        idField: 'id',
         codeField: 'or_code',
         addTitle: '其它收入单',
         addXtype: 'money-othreceipts-formpanel',
         defaultCondition:'',
-       // baseVastUrl: '/api/money/othreceipts/',
-        baseVastUrl: 'http://192.168.253.129:8940/othreceipts/',
+        baseVastUrl: '/api/money/othreceipts/',
         baseColumn: [{
             text: 'id',
-            dataIndex: 'or_id',
-            width: 0,
+            dataIndex: 'id',
+            width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
             dataIndex: 'or_code',
-            width: 120
+            width: 150
         }, {
             text: '单据状态',
             dataIndex: 'or_status',

+ 4 - 2
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -17,7 +17,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
      _relationColumn: 'osd_orid',
      _readUrl:'/api/money/othspendings/read/',
      _saveUrl:'/api/money/othspendings/save',
-     _deleteUrl:'/api/money/othspendings/delete/',
+     _deleteUrl:'/api/money/othspendings/delete/', 
      initId:0,
 
     defaultItems: [{
@@ -137,7 +137,9 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 dataIndex : "osd_remark",
                 width : 120.0, 
                 items : null,
-                ignore:true,
+                editor : {
+                    xtype : ""
+                },
                 flex : 1.0,
             }
         ]

+ 3 - 3
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -40,7 +40,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
-        idField: 'os_id',
+        idField: 'id',
         codeField: 'os_code',
         addTitle: '其它支出单',
         addXtype: 'money-othspendings-formpanel',
@@ -48,8 +48,8 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         baseVastUrl: '/api/money/othspendings/',
         baseColumn: [{
             text: 'id',
-            dataIndex: 'os_id',
-            width: 0,
+            dataIndex: 'id',
+            width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

+ 1 - 0
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -18,6 +18,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     _readUrl: '/api/money/paybalance/read/',
     _saveUrl: '/api/money/paybalance/save/',
     _auditUrl: '/api/money/paybalance/audit/',
+    _unAuditUrl: 'api/money/paybalance/unAudit/',
     _deleteUrl: '/api/money/paybalance/delete/',
 
     // _readUrl: 'http://192.168.253.129:8940/money/paybalance/read/',

+ 3 - 3
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -19,8 +19,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _readUrl:'/api/purchase/prodinout/read/',
     _saveUrl:'/api/purchase/prodinout/save',
     _auditUrl:'/api/purchase/prodinout/audit',
-    _deleteUrl:'/api/purchase/prodinout/delete',
-    _baseVastUrl:'/api/purchase/prodinout/',
+    _unAuditUrl:'/api/purchase/prodinout/unAudit/',
+    _deleteUrl:'/api/purchase/prodinout/delete/',
     _turnOutUrl:'/api/purchase/prodinout/turnProdOut/',
 
     // _relationColumn: 'pd_piid',
@@ -106,7 +106,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
         // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
-        deleteDetailUrl:'/api/purchase/prodinout/deleteDetail/',
+        deleteDetailUrl:'api/purchase/prodinout/deleteDetail/',
         detnoColumn:  'pd_pdno',
         columns : [
             {

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -19,7 +19,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _readUrl:'/api/purchase/prodinout/read/',
     _saveUrl:'/api/purchase/prodinout/save',
     _auditUrl:'/api/purchase/prodinout/audit',
-    _unAuditUrl:'/api/purchase/prodinout/unAudit',
+    _unAuditUrl:'/api/purchase/prodinout/unAudit/',
     _deleteUrl:'/api/purchase/prodinout/delete/',
 
     // _relationColumn: 'pd_piid',
@@ -101,7 +101,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
         // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
-        deleteDetailUrl:'/api/purchase/prodinout/deleteDetail/',
+        deleteDetailUrl:'api/purchase/prodinout/deleteDetail/',
         detnoColumn:  'pd_pdno',
         columns : [
             {

+ 1 - 2
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -124,8 +124,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 dataIndex : "sd_price", 
                 width : 120.0, 
                 xtype : "numbercolumn",
-                items : null,
-                summaryType: 'sum'
+                items : null
             }, 
             {
                 text : "税率", 

+ 24 - 7
frontend/saas-web/app/view/sale/sale/QueryPanel.js

@@ -80,11 +80,19 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             width: 0,
             xtype: 'numbercolumn'
         }, {
-            text: '单据编号',
+            text: '销售单号',
             dataIndex: 'sa_code',
             width: 120
         }, {
-            text: '单据状态',
+            text: '客户编号',
+            dataIndex: 'sa_cucode',
+            width: 120
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '业务状态',
             dataIndex: 'sa_status',
             width: 120
         }, {
@@ -92,16 +100,25 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             dataIndex: 'sa_recorddate',
             xtype: 'datecolumn',
             width: 200
-        }, {
-            text: '客户名称',
-            dataIndex: 'sa_cuname',
-            width: 120
         }, {
             text: '金额',
             dataIndex: 'sa_total',
             xtype: 'numbercolumn',
             width: 120
-        }],
+        }, {
+            text: '制单人',
+            dataIndex: 'sa_recorder',
+            width: 120
+        }, {
+            text: '审核人',
+            dataIndex: 'sa_auditman',
+            width: 120
+        }, {
+            text: '收货地址',
+            dataIndex: 'sa_toplace',
+            width: 120
+        }
+    ],
         relativeColumn: [ {
             text: 'id',
             dataIndex: 'sa_id',

+ 32 - 0
frontend/saas-web/overrides/data/Connection.js

@@ -0,0 +1,32 @@
+/**
+ * 在 ajax request 前修改url,增加服务端`basePath`
+ * `basePath`在`app.json`配置
+ */
+Ext.define('saas.override.data.Connection', {
+    override: 'Ext.data.Connection',
+ 
+    urlRegexp: /(http|ftp|https):\/\//,
+
+    privates: {
+        setupServerOptions: function(options) {
+            var serverOptions = Ext.manifest.server, originUrl = options.url;
+            if (serverOptions && serverOptions.basePath && !this.urlRegexp.test(originUrl) &&
+              (!serverOptions.urlPattern || new RegExp(serverOptions.urlPattern).test(originUrl))) {
+                Ext.apply(options, {
+                    url: serverOptions.basePath + (originUrl.indexOf('/') == 0 ? '' : '/') + originUrl,
+                    headers: {
+                        'Authorization': ' '
+                    }
+                });
+            }
+        }
+    },
+
+    request: function(options) {
+        if (options && options.url) {
+            this.setupServerOptions(options);
+        }
+        return this.callParent([options]);
+    }
+ });
+