Browse Source

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

huangx 7 years ago
parent
commit
b524235f17
33 changed files with 351 additions and 268 deletions
  1. 2 2
      applications/commons/commons-server/src/main/resources/mapper/HomePageMapper.xml
  2. 1 1
      applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml
  3. 1 1
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml
  4. 13 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  5. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  6. 4 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  7. 3 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  8. 2 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutListMapper.xml
  9. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  10. 13 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  11. 8 0
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  12. 14 1
      frontend/saas-web/app/view/core/form/FormPanelController.js
  13. 13 14
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  14. 16 4
      frontend/saas-web/app/view/core/report/ReportPanelController.js
  15. 2 1
      frontend/saas-web/app/view/document/bom/FormPanel.js
  16. 1 1
      frontend/saas-web/app/view/document/customer/FormPanel.js
  17. 1 1
      frontend/saas-web/app/view/home/InfoCard.js
  18. 10 2
      frontend/saas-web/app/view/home/charts/SaleTrend.js
  19. 158 138
      frontend/saas-web/app/view/money/report/CustomerCheck.js
  20. 13 1
      frontend/saas-web/app/view/money/report/CustomerCheckModel.js
  21. 22 1
      frontend/saas-web/app/view/money/report/VendorCheck.js
  22. 14 1
      frontend/saas-web/app/view/money/report/VendorCheckModel.js
  23. 2 1
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  24. 2 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  25. 9 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  26. 2 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  27. 9 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  28. 4 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  29. 2 0
      frontend/saas-web/app/view/stock/make/FormPanel.js
  30. 2 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  31. 1 41
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  32. 2 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  33. 1 41
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

+ 2 - 2
applications/commons/commons-server/src/main/resources/mapper/HomePageMapper.xml

@@ -17,7 +17,7 @@
       (
 	  select concat('{"x":"其它","y":',ifnull(round((all_sum - five_sum)/10000,2),0),'}') other from (
 		(select sum(si_amount) all_sum from statsinfo  where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC')a,
-        (select sum(si_amount) five_sum from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC' ORDER BY si_amount desc limit 0,5) b)
+        (select sum(si_amount) five_sum from (select si_amount from  statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC' ORDER BY si_amount desc limit 0,5)e) b)
 	  ) b1
     </select>
 
@@ -72,7 +72,7 @@
     ) c)d,(
 
     select concat('{"x":"其它","y":',ifnull(round((all_sum - five_sum)/10000,2),0),'}') other from ( (select sum(si_amount) all_sum from statsinfo  where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE')a,
-    (select sum(si_amount) five_sum from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5)b))e)
+    ( select sum(si_amount) five_sum from (select si_amount from statsinfo where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='SALE' ORDER BY si_amount desc limit 0,5)f)b))e)
     </select>
 
     <select id="getSaleFutureData" parameterType="long" resultType="string">

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

@@ -251,7 +251,7 @@
       #{item.ca_text3,jdbcType=VARCHAR},
       #{item.ca_text4,jdbcType=VARCHAR},
       #{item.ca_text5,jdbcType=VARCHAR},
-      #{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{creatorName,jdbcType=VARCHAR}
+      #{item.creatorId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.creatorName,jdbcType=VARCHAR}
        )
     </foreach>
   </insert>

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

@@ -262,7 +262,7 @@
       #{item.updateTime,jdbcType=TIMESTAMP}, #{item.vc_text1,jdbcType=VARCHAR}, #{item.vc_text2,jdbcType=VARCHAR},
       #{item.vc_text3,jdbcType=VARCHAR}, #{item.vc_text4,jdbcType=VARCHAR}, #{item.vc_text5,jdbcType=VARCHAR},
       #{item.vc_default,jdbcType=VARCHAR},
-      #{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{creatorName,jdbcType=VARCHAR}
+      #{item.creatorId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.creatorName,jdbcType=VARCHAR}
       )
     </foreach>
   </insert>

+ 13 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -9,6 +9,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.ProdInOutFormDTO;
 import com.usoftchina.saas.purchase.po.ProdInOutList;
 import com.usoftchina.saas.purchase.service.ProdInOutService;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -130,7 +131,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        return Result.success(prodInOutService.batchAudit(baseDTOs));
+        String mess = prodInOutService.batchAudit(baseDTOs);
+        if (StringUtils.hasLength(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**
@@ -141,7 +147,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        return Result.success(prodInOutService.batchUnAudit(baseDTOs));
+        String mess = prodInOutService.batchUnAudit(baseDTOs);
+        if (StringUtils.hasText(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java

@@ -36,4 +36,6 @@ public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
     Integer validateVendor(@Param("id") Long id);
 
     Integer validateProduct(@Param("id") Long id);
+
+    void updateDelivery(@Param("id")Long id);
 }

+ 4 - 6
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -15,7 +15,6 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
-import com.usoftchina.saas.document.api.ProductApi;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.page.PageRequest;
@@ -51,8 +50,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     @Autowired
     private PurchaseListMapper purchaseListMapper;
     @Autowired
-    private ProductApi productApi;
-    @Autowired
     private MaxnumberService maxnumberService;
     @Autowired
     private ProdInOutMapper prodInOutMapper;
@@ -143,7 +140,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 detail.setPd_puid(pu_id);
                 detail.setPd_code(pu_code);
                 detail.setPd_yqty(new Double(0));
-                detail.setPd_delivery(item.getPd_delivery()==null?purchase.getPu_delivery():item.getPd_delivery());
+//                detail.setPd_delivery(item.getPd_delivery()==null?purchase.getPu_delivery():item.getPd_delivery());
                 detail.setCompanyId(companyId);
                 detail.setCreatorId(userId);
                 detail.setCreateTime(new Date());
@@ -169,7 +166,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             PurchaseDetail detail = BeanMapper.map(item, PurchaseDetail.class);
             detail.setPd_puid(pu_id);
             detail.setPd_code(pu_code);
-            detail.setPd_delivery(item.getPd_delivery()==null?purchase.getPu_delivery():item.getPd_delivery());
+//            detail.setPd_delivery(item.getPd_delivery()==null?purchase.getPu_delivery():item.getPd_delivery());
             detail.setUpdaterId(userId);
             detail.setUpdateTime(new Date());
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
@@ -190,7 +187,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             purchasedetailMapper.batchUpdate(updateDetails);
         }
         baseDTO = getBaseDTOById(pu_id);
-
+        //明细需求日期为空时==主表交货日期
+        getMapper().updateDelivery(pu_id);
         //计算金额,未税单价,未税金额等
         calcPurchase(pu_id);
         //日志

+ 3 - 0
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -439,6 +439,9 @@
     select count(1) from purchasedetail left join product on PD_PRODID=pr_id where  pd_puid=#{id} and pr_statuscode='CLOSE';
   </select>
 
+  <update id="updateDelivery" parameterType="long">
+    update purchasedetail set PD_DELIVERY = (select PU_DELIVERY from purchase where pu_id=#{id}) where pd_puid=#{id} and PD_DELIVERY is null
+  </update>
 
 
 </mapper>

+ 2 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -69,6 +69,8 @@
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+    <result column="pi_prstatus" jdbcType="VARCHAR" property="pi_prstatus" />
+    <result column="pi_prstatuscode" jdbcType="VARCHAR" property="pi_prstatuscode" />
   </resultMap>
 
 

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -166,4 +166,6 @@ public class ProdInOutList extends CommonBaseEntity{
     private String pr_text2;
     private String pr_text3;
     private String pr_text4;
+    private String pi_prstatus;
+    private String pi_prstatuscode;
 }

+ 13 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java

@@ -9,6 +9,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.storage.dto.ProdInOutFormDTO;
 import com.usoftchina.saas.storage.po.ProdInOutList;
 import com.usoftchina.saas.storage.service.ProdInOutService;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -131,8 +132,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        String res = prodInOutService.batchAudit(baseDTOs);
-        return Result.success(res);
+        String mess = prodInOutService.batchAudit(baseDTOs);
+        if (StringUtils.hasLength(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**
@@ -143,8 +148,12 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        String res = prodInOutService.batchUnAudit(baseDTOs);
-        return Result.success(res);
+        String mess = prodInOutService.batchUnAudit(baseDTOs);
+        if (StringUtils.hasText(mess)){
+            return Result.error(mess);
+        }else {
+            return Result.success(mess);
+        }
     }
 
     /**

+ 8 - 0
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -18,6 +18,9 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     },
     //输入值之后进行模糊查询
     doQuery: function(queryString, forceAll, rawQuery) {
+        if(!this.fireEvent('beforequery', this)) {
+            return;
+        };
     	queryString = queryString || '';
     	var me = this;
     	if(me.lastQueryValue!=queryString){
@@ -308,6 +311,11 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
         return true;
     },
 
+    setValue: function(v) {
+        this.callParent(arguments);
+        this.publishState('value', v);
+    },
+
     getValue: function(f) {
         var me = this,val = me.rawToValue(me.processRawValue(me.getRawValue()));
         me.value = val;

+ 14 - 1
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -16,7 +16,9 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var me = this,
         form = me.getView(),
         xtype = form.xtype,
-        _config = form._config,
+        _config = {
+            initId: form.initId,
+        },
         currentTab = saas.util.BaseUtil.getCurrentTab();
         
         var view = {
@@ -60,6 +62,17 @@ Ext.define('saas.view.core.form.FormPanelController', {
         // 单据状态为录入状态(未审核)
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
+        //录入人,录入日期,审核人,审核日期清空
+        main['creatorId'] = null;
+        main['creatorName'] = null;
+        main['createTime'] = null;
+        main['updaterId'] = null;
+        main['updaterName'] = null;
+        main['updateTime'] = null;
+        main[form._auditmanField] = null;
+        main[form._auditdateField] = null;
+
+
 
         for(var k in main) {
             // 主表日期改为当前日期

+ 13 - 14
frontend/saas-web/app/view/core/query/QueryFormPanel.js

@@ -81,20 +81,19 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
             }
         },
         beforerender: function(form) {
-            // var fiels = form.getForm().getFields();
-            // fiels.each(function(f) {
-            //     console.log(f, f.on);
-            //     f.on && f.on({
-            //         keydown: {
-            //             // fn: 'onQuery',
-            //             fn: function(th, e, eOpts) {
-            //                 if(e.keyCode == 13) {
-            //                     form.up('core-query-querypanel').getController().onQuery()
-            //                 }
-            //             }
-            //         }
-            //     });
-            // });
+            var fiels = form.getForm().getFields();
+            fiels.each(function(f) {
+                f.enableKeyEvents = true;
+                f.on && f.on({
+                    keydown: {
+                        fn: function(th, e, eOpts) {
+                            if(e.keyCode == 13) {
+                                form.up('core-query-querypanel').getController().onQuery()
+                            }
+                        }
+                    }
+                });
+            });
         }
     }
 

+ 16 - 4
frontend/saas-web/app/view/core/report/ReportPanelController.js

@@ -45,9 +45,21 @@ Ext.define('saas.view.core.report.ReportPanelController', {
         });
     },
     printHtml: function(html){
-        var d = window.open("", "print");
-        d.document.write(html);
-        d.document.close();
-        d.print();
+        var iframe=document.getElementById("saas-print-iframe");
+        if(!iframe){
+            iframe = document.createElement('IFRAME');
+            var doc = null;
+            iframe.setAttribute("id", "saas-print-iframe");
+            iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;');
+            document.body.appendChild(iframe);
+            doc = iframe.contentWindow.document;
+            doc.write(html);
+            doc.close();
+            iframe.contentWindow.focus();
+        }
+        iframe.contentWindow.print();
+        if (navigator.userAgent.indexOf("MSIE") > 0){
+            document.body.removeChild(iframe);
+        }
     },
 });

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

@@ -160,7 +160,8 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 0,
-                    minValue:0
+                    minValue:0,
+                    maxLength: 10
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 1 - 1
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -159,7 +159,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         name : "cu_sellername", 
         fieldLabel : "业务员", 
         editable:false,
-        allowBlank : true, 
+        allowBlank : false, 
         columnWidth : 0.25
     },{
         xtype : "hidden", 

+ 1 - 1
frontend/saas-web/app/view/home/InfoCard.js

@@ -71,7 +71,7 @@ Ext.define('saas.view.home.InfoCard', {
                 unauditship: {
                     title: '未审核出货',
                     color: 'default',
-                    viewType: 'purchase-purchasein-querypanel',
+                    viewType: 'sale-saleout-querypanel',
                     condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'出货单\' and prodinout.companyId=' + companyId
                 }
             },

+ 10 - 2
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -67,7 +67,7 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                 }],
                 series: [{
                     type: 'line',
-                    smooth: true,
+                    // smooth: true,
                     title: '销售额',
                     xField: 'x',
                     yField: 'sale',
@@ -100,7 +100,7 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     // renderer: me.onSeriesRenderer
                 }, {
                     type: 'line',
-                    smooth: true,
+                    // smooth: true,
                     title: '销售回款',
                     xField: 'x',
                     yField: 'saleback',
@@ -131,6 +131,14 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                         fillOpacity: 0.1,
                     },
                 }],
+                legend: {
+                    type: 'dom',
+                    docked: 'top',
+                    padding: 0,
+                    bodyPadding: 0,
+                    border: 0,
+                    cls: 'x-monthio-legend'
+                },
                 listeners: {
                     itemhighlightchange: me.itemhighlightchange
                 }

+ 158 - 138
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -11,15 +11,15 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
     listUrl: '/api/money/report/customercheck',
     defaultCondition: null,
     reportTitle: '客户对账单',
-    QueryWidth:0.2,
-    autoLoad:false,
+    QueryWidth: 0.2,
+    autoLoad: false,
     //筛选:客户、日期(必填)
-    searchItems: [ {
+    searchItems: [{
         xtype: 'customerDbfindTrigger',
         name: 'pi_custname',
         fieldLabel: '客户名称',
         columnWidth: 0.2,
-        allowBlank:false,
+        allowBlank: false,
     }, {
         xtype: 'monthdatefield',
         name: 'ym',
@@ -32,141 +32,161 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
         columnWidth: 0.4
     }],
 
-    reportColumns: [
-        {
-            text: 'id',
-            dataIndex: 'pi_id',
-            hidden: true
-        }, {
-            text: '单号',
-            dataIndex: 'pi_inoutno',
-            width: 150
-        }, {
-            text: '单据类型',
-            dataIndex: 'pi_class',
-            width: 110
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype: 'datecolumn',
-            width: 110
-        }, {
-            text: '序号',
-            dataIndex: 'pd_pdno',
-            xtype: 'numbercolumn',
-            width: 80
-        },{
-            text: '物料编号',
-            width: 150,
-            dataIndex: 'pr_code'
-        }, {
-            text: '物料名称',
-            dataIndex: 'pr_detail',
-            width: 200
-        }, {
-            text: '物料规格',
-            dataIndex: 'pr_spec',
-            width: 150
-        }, {
-            text: '单位',
-            dataIndex: 'pd_unit',
-            width: 80
-        }, {
-            text: '数量',
-            xtype: 'numbercolumn',
-            dataIndex: 'qty',
-            xtype: 'numbercolumn',
-            width: 110
-        }, {
-            text: '单价',
-            dataIndex: 'pd_orderprice',
-            xtype: 'numbercolumn',
-            width: 110
-        }, {
-            text: '税率',
-            dataIndex: 'pd_taxrate',
-            xtype: 'numbercolumn',
-            width: 80
-        }, {
-            text: '金额',
-            xtype: 'numbercolumn',
-            width: 110,
-            dataIndex: 'pd_total',
-            xtype: 'numbercolumn',
-            // renderer : function(v) {
-            //     var arr = (v + '.').split('.');
-            //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            //     var format = '0,000.' + xr.join();
-            //     return Ext.util.Format.number(v, format);
-            // },
-            // summaryType: 'sum',
-            // summaryRenderer: function(v) {
-            //     var arr = (v + '.').split('.');
-            //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            //     var format = '0,000.' + xr.join();
-            //     return Ext.util.Format.number(v, format);
-            // }
-        }, {
-            text: '不含税单价',
-            width: 110,
-            dataIndex: 'pd_netprice',
-            xtype: 'numbercolumn'
-        }, {
-            text: '不含税金额',
-            width: 110,
-            xtype: 'numbercolumn',
-            dataIndex: 'pd_nettotal',
-            xtype: 'numbercolumn',
-            // renderer : function(v) {
-            //     var arr = (v + '.').split('.');
-            //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            //     var format = '0,000.' + xr.join();
-            //     return Ext.util.Format.number(v, format);
-            // },
-            // summaryType: 'sum',
-            // summaryRenderer: function(v) {
-            //     var arr = (v + '.').split('.');
-            //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            //     var format = '0,000.' + xr.join();
-            //     return Ext.util.Format.number(v, format);
-            // }
-        }, {
-            text: '备注',
-            dataIndex: 'pd_remark',
-            width: 250
-        }, {
-            text: '期初应付',
-            dataIndex: 'beginamount',
-            hidden: true,
-            width: 0,
-            summaryType: 'cus',
-        }, {
-            text: '本期发生',
-            dataIndex: 'nowamount',
-            hidden: true,
-            width: 0,
-            summaryType: 'cus',
-        }, {
-            text: '本期付款',
-            dataIndex: 'nowpay',
-            hidden: true,
-            width: 0,
-            summaryType: 'cus',
-        }, {
-            text: '本期结余',
-            dataIndex: 'nowbalance',
-            hidden: true,
-            width: 0,
-            summaryType: 'cus',
-        }],
-        applyParams: function(p) {
-            var me = this,
+    reportColumns: [{
+        text: 'id',
+        dataIndex: 'pi_id',
+        hidden: true
+    }, {
+        text: '单号',
+        dataIndex: 'pi_inoutno',
+        width: 150
+    }, {
+        text: '单据类型',
+        dataIndex: 'pi_class',
+        width: 110
+    }, {
+        text: '单据日期',
+        dataIndex: 'pi_date',
+        xtype: 'datecolumn',
+        width: 110
+    }, {
+        text: '序号',
+        dataIndex: 'pd_pdno',
+        xtype: 'numbercolumn',
+        width: 80
+    }, {
+        text: '物料编号',
+        width: 150,
+        dataIndex: 'pr_code'
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail',
+        width: 200
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec',
+        width: 150
+    }, {
+        text: '单位',
+        dataIndex: 'pd_unit',
+        width: 80
+    }, {
+        text: '数量',
+        xtype: 'numbercolumn',
+        dataIndex: 'qty',
+        xtype: 'numbercolumn',
+        width: 110
+    }, {
+        text: '单价',
+        dataIndex: 'pd_orderprice',
+        xtype: 'numbercolumn',
+        width: 110
+    }, {
+        text: '税率',
+        dataIndex: 'pd_taxrate',
+        xtype: 'numbercolumn',
+        width: 80
+    }, {
+        text: '金额',
+        xtype: 'numbercolumn',
+        width: 110,
+        dataIndex: 'pd_total',
+        xtype: 'numbercolumn',
+        // renderer : function(v) {
+        //     var arr = (v + '.').split('.');
+        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+        //     var format = '0,000.' + xr.join();
+        //     return Ext.util.Format.number(v, format);
+        // },
+        // summaryType: 'sum',
+        // summaryRenderer: function(v) {
+        //     var arr = (v + '.').split('.');
+        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+        //     var format = '0,000.' + xr.join();
+        //     return Ext.util.Format.number(v, format);
+        // }
+    }, {
+        text: '不含税单价',
+        width: 110,
+        dataIndex: 'pd_netprice',
+        xtype: 'numbercolumn'
+    }, {
+        text: '不含税金额',
+        width: 110,
+        xtype: 'numbercolumn',
+        dataIndex: 'pd_nettotal',
+        xtype: 'numbercolumn',
+        // renderer : function(v) {
+        //     var arr = (v + '.').split('.');
+        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+        //     var format = '0,000.' + xr.join();
+        //     return Ext.util.Format.number(v, format);
+        // },
+        // summaryType: 'sum',
+        // summaryRenderer: function(v) {
+        //     var arr = (v + '.').split('.');
+        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+        //     var format = '0,000.' + xr.join();
+        //     return Ext.util.Format.number(v, format);
+        // }
+    }, {
+        text: '备注',
+        dataIndex: 'pd_remark',
+        width: 250
+    }, {
+        text: '期初应付',
+        dataIndex: 'beginamount',
+        hidden: true,
+        width: 0,
+        summaryType: 'cus',
+    }, {
+        text: '本期发生',
+        dataIndex: 'nowamount',
+        hidden: true,
+        width: 0,
+        summaryType: 'cus',
+    }, {
+        text: '本期付款',
+        dataIndex: 'nowpay',
+        hidden: true,
+        width: 0,
+        summaryType: 'cus',
+    }, {
+        text: '本期结余',
+        dataIndex: 'nowbalance',
+        hidden: true,
+        width: 0,
+        summaryType: 'cus',
+    }],
+
+    listeners: {
+        afterrender: function(panel) {
+            panel.setLoadButtonDisabled(true);
+        },
+    },
+
+    setLoadButtonDisabled: function (disabled) {
+        var panel = this,
+            grid = panel.down('grid'),
+            p = grid.down('pagingtoolbar'),
+            bs = p.query('button'),
+            loadButton = Ext.Array.findBy(bs, function (b) {
+                return b.iconCls == 'x-tbar-loading';
+            });
+
+        if (loadButton) {
+            loadButton.setDisabled(disabled);
+        }
+    },
+
+    applyParams: function (p) {
+        var me = this,
             viewModel = me.getViewModel(),
             formData = viewModel.get('form'),
             ym = formData.ym;
-    
-            return Ext.Object.merge(p, {
-                ym: ym
-            });
-        }
+
+        return Ext.Object.merge(p, {
+            ym: ym
+        });
+    }
 });

+ 13 - 1
frontend/saas-web/app/view/money/report/CustomerCheckModel.js

@@ -1,4 +1,16 @@
 Ext.define('saas.view.money.report.CustomerCheckModel', {
     extend: 'saas.view.core.report.ReportPanelModel',
-    alias: 'viewmodel.money-report-customercheck'
+    alias: 'viewmodel.money-report-customercheck',
+
+    formulas: {
+        pi_custname_change: {
+            bind: '{form.pi_custname}',
+            get: function(v) {
+                var me = this,
+                panel = me.getView();
+
+                panel.setLoadButtonDisabled(!v);
+            }
+        }
+    }
 });

+ 22 - 1
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -19,7 +19,7 @@ Ext.define('saas.view.money.report.VendorCheck', {
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
         columnWidth: 0.2,
-        allowBlank:false,
+        allowBlank:false
     }, {
         xtype: 'monthdatefield',
         name: 'ym',
@@ -164,6 +164,27 @@ Ext.define('saas.view.money.report.VendorCheck', {
         width: 0,
         summaryType: 'cus',
     }],
+
+    listeners: {
+        afterrender: function(panel) {
+            panel.setLoadButtonDisabled(true);
+        },
+    },
+
+    setLoadButtonDisabled: function (disabled) {
+        var panel = this,
+            grid = panel.down('grid'),
+            p = grid.down('pagingtoolbar'),
+            bs = p.query('button'),
+            loadButton = Ext.Array.findBy(bs, function (b) {
+                return b.iconCls == 'x-tbar-loading';
+            });
+
+        if (loadButton) {
+            loadButton.setDisabled(disabled);
+        }
+    },
+
     applyParams: function(p) {
         var me = this,
         viewModel = me.getViewModel(),

+ 14 - 1
frontend/saas-web/app/view/money/report/VendorCheckModel.js

@@ -1,4 +1,17 @@
 Ext.define('saas.view.money.report.VendorCheckModel', {
     extend: 'saas.view.core.report.ReportPanelModel',
-    alias: 'viewmodel.money-report-vendorcheck'
+    alias: 'viewmodel.money-report-vendorcheck',
+
+    formulas: {
+        pi_vendname_change: {
+            bind: '{form.pi_vendname}',
+            get: function(v) {
+                var me = this,
+                panel = me.getView();
+
+                panel.setLoadButtonDisabled(!v);
+            }
+        }
+    }
+
 });

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

@@ -14,8 +14,9 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
      _codeField: 'pu_code',
      _statusField: 'pu_status',
      _statusCodeField: 'pu_statuscode',
+     _auditmanField: 'pu_auditman',
+     _auditdateField:'pu_auditdate',
      _relationColumn: 'pd_puid',
-
      _readUrl:'/api/purchase/purchase/read',
      _saveUrl:'/api/purchase/purchase/save',
      _auditUrl:'/api/purchase/purchase/audit',

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

@@ -14,7 +14,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
     _statusCodeField: 'pi_statuscode',
-    
+    _auditmanField: 'pi_auditman',
+    _auditdateField:'pi_auditdate',
     _relationColumn: 'pd_piid',
     _readUrl:'/api/purchase/prodinout/read',
     _saveUrl:'/api/purchase/prodinout/save',

+ 9 - 0
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -110,6 +110,15 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         // 单据状态为录入状态(未审核)
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
+        //录入人,录入日期,审核人,审核日期清空
+        main['creatorId'] = null;
+        main['creatorName'] = null;
+        main['createTime'] = null;
+        main['updaterId'] = null;
+        main['updaterName'] = null;
+        main['updateTime'] = null;
+        main[form._auditmanField] = null;
+        main[form._auditdateField] = null;
 
         for(var k in main) {
             // 主表日期改为当前日期

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

@@ -14,7 +14,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
     _statusCodeField: 'pi_statuscode',
-    
+    _auditmanField: 'pi_auditman',
+    _auditdateField:'pi_auditdate',
     _relationColumn: 'pd_piid',
     _readUrl:'/api/purchase/prodinout/read',
     _saveUrl:'/api/purchase/prodinout/save',

+ 9 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -112,6 +112,15 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
         // 单据状态为录入状态(未审核)
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
+        //录入人,录入日期,审核人,审核日期清空
+        main['creatorId'] = null;
+        main['creatorName'] = null;
+        main['createTime'] = null;
+        main['updaterId'] = null;
+        main['updaterName'] = null;
+        main['updateTime'] = null;
+        main[form._auditmanField] = null;
+        main[form._auditdateField] = null;
 
         for(var k in main) {
             // 主表日期改为当前日期

+ 4 - 0
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -172,6 +172,10 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 150
+        }, {
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 150
         }, {
             text: '出货数量',
             dataIndex: 'pd_outqty',

+ 2 - 0
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -14,6 +14,8 @@ Ext.define('saas.view.stock.make.FormPanel', {
      _codeField: 'ma_code',
      _statusField: 'ma_status',
      _statusCodeField: 'ma_statuscode',
+     _auditmanField: 'ma_auditman',
+     _auditdateField:'ma_auditdate',
      _relationColumn: 'mm_maid',
 
      _readUrl:'/api/storage/make/read',

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

@@ -15,7 +15,8 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
     _statusCodeField: 'pi_statuscode',
-    
+    _auditmanField: 'pi_auditman',
+    _auditdateField:'pi_auditdate',
     _relationColumn: 'pd_piid',
     _readUrl:'/api/storage/prodinout/read',
     _saveUrl:'/api/storage/prodinout/save',

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

@@ -82,45 +82,5 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                 },
             },
         });
-    },
-    initCopyData: function(formData) {
-        var me = this;
-        var form = this.getView();
-        var detailCount = form.detailCount;
-        var main = formData.main;
-        var auditTexts = form.auditTexts;
-
-        // 单号、id清空
-        main[form._idField] = 0;
-        main[form._codeField] = '';
-
-        // 单据状态为录入状态(未审核)
-        main[form._statusCodeField] = auditTexts.unAuditCode;
-        main[form._statusField] = auditTexts.unAuditText;
-        main['pi_auditman'] = '';
-        main['pi_auditdate'] = null;
-        for(var k in main) {
-            // 主表日期改为当前日期
-            if(saas.util.BaseUtil.isDateString(main[k])) {
-                main[k] = Ext.Date.format(new Date, 'Y-m-d H:i:s');
-            }
-        }
-
-        for(var j = 0; j < detailCount; j++) {
-            var detail = formData['detail' + j];
-            for(var x = 0; x < detail.length; x ++) {
-                var d = detail[x];
-
-                for(var k in d) {
-                    // 从表id清空
-                    delete d['id'];
-                    // 从表日期清空
-                    if(saas.util.BaseUtil.isDateString(d[k])) {
-                        d[k] = '';
-                    }
-                }
-            }
-        }
-        return me.myInitCopyData(formData);;
-    }    
+    }
 });

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

@@ -14,7 +14,8 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
     _statusCodeField: 'pi_statuscode',
-
+    _auditmanField: 'pi_auditman',
+    _auditdateField:'pi_auditdate',
     _relationColumn: 'pd_piid',
     _readUrl: '/api/storage/prodinout/read',
     _saveUrl: '/api/storage/prodinout/save',

+ 1 - 41
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -103,45 +103,5 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
             renderTo: this.ownerCmp.ownerCt.getEl()
         }).show();
 
-    },
-    initCopyData: function(formData) {
-        var me = this;
-        var form = this.getView();
-        var detailCount = form.detailCount;
-        var main = formData.main;
-        var auditTexts = form.auditTexts;
-
-        // 单号、id清空
-        main[form._idField] = 0;
-        main[form._codeField] = '';
-
-        // 单据状态为录入状态(未审核)
-        main[form._statusCodeField] = auditTexts.unAuditCode;
-        main[form._statusField] = auditTexts.unAuditText;
-        main['pi_auditman'] = '';
-        main['pi_auditdate'] = null;
-        for(var k in main) {
-            // 主表日期改为当前日期
-            if(saas.util.BaseUtil.isDateString(main[k])) {
-                main[k] = Ext.Date.format(new Date, 'Y-m-d H:i:s');
-            }
-        }
-
-        for(var j = 0; j < detailCount; j++) {
-            var detail = formData['detail' + j];
-            for(var x = 0; x < detail.length; x ++) {
-                var d = detail[x];
-
-                for(var k in d) {
-                    // 从表id清空
-                    delete d['id'];
-                    // 从表日期清空
-                    if(saas.util.BaseUtil.isDateString(d[k])) {
-                        d[k] = '';
-                    }
-                }
-            }
-        }
-        return me.myInitCopyData(formData);;
-    }     
+    }
 });