Browse Source

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	frontend/saas-web/app/view/core/form/FormPanel.js
#	frontend/saas-web/app/view/core/form/field/DetailGridField.js
zhouy 7 years ago
parent
commit
ebb4e049b8
30 changed files with 926 additions and 223 deletions
  1. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 6 6
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  3. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  4. 30 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  5. 5 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  6. 28 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  7. 5 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  8. 30 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  9. 2 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  10. 29 1
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  11. 2 2
      frontend/saas-web/app/view/core/form/FormPanel.js
  12. 1 1
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  13. 30 13
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  14. 0 2
      frontend/saas-web/app/view/core/report/ReportPanel.js
  15. 4 1
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  16. 25 0
      frontend/saas-web/app/view/main/Main.scss
  17. 46 11
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  18. 35 21
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  19. 34 24
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  20. 1 1
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  21. 0 17
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  22. 40 30
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  23. 80 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  24. 0 17
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  25. 40 32
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  26. 80 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  27. 224 37
      frontend/saas-web/app/view/sys/guide/FormPanel.js
  28. 145 0
      frontend/saas-web/overrides/form/field/Number.js
  29. BIN
      frontend/saas-web/resources/images/guide/end.png
  30. BIN
      frontend/saas-web/resources/images/guide/information.png

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

@@ -38,6 +38,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
 
     //采购 70000-71999
     PURCCHECKIN_POST_ERROR(70000,""),
+    PURCHASE_UNAUDIT_ERROR(72006,"采购订单已转采购验收单,无法反审核"),
+
 
     //销售
     SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),

+ 6 - 6
applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml

@@ -75,9 +75,9 @@
       <if test="ftd_detno != null" >
         ftd_detno,
       </if>
-      <!--<if test="ft_date != null" >-->
-        <!--ftd_ym,-->
-      <!--</if>-->
+      <if test="ft_date != null" >
+        ftd_ym,
+      </if>
       <if test="ftd_bankid != null" >
         ftd_bankid,
       </if>
@@ -140,9 +140,9 @@
       <if test="ftd_detno != null" >
         #{ftd_detno,jdbcType=INTEGER},
       </if>
-      <!--<if test="ft_date != null" >-->
-        <!--CONVERT(date_format(#{ft_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),-->
-      <!--</if>-->
+      <if test="ft_date != null" >
+        CONVERT(date_format(#{ft_date,jdbcType=TIMESTAMP},'%Y%m'),SIGNED),
+      </if>
       <if test="ftd_bankid != null" >
         #{ftd_bankid,jdbcType=INTEGER},
       </if>

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

@@ -26,4 +26,6 @@ public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
                                    @Param("companyId") Long companyId);
 
     String selectCodeById(Long id);
+
+    Integer checkTurnInstatus(Long id);
 }

+ 30 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -144,4 +144,34 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Long pd_ioid;
 
+    //private ProductDTO productDTO;
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
+
 }

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

@@ -498,6 +498,11 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     @Transactional
     private void singleUnAudit(Long id) {
         Purchase purchase = new Purchase();
+        //检查是否已转验收单
+        Integer num = getMapper().checkTurnInstatus(id);
+        if (num > 0) {
+            throw new BizException(BizExceptionCode.PURCHASE_UNAUDIT_ERROR);
+        }
         //生成更新对象
         purchase.setId(id);
         purchase.setPu_status(Status.UNAUDITED.getDisplay());

+ 28 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -71,7 +71,34 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-
+    <result column="pr_id" property="pr_id"/>
+    <result column="pr_code" property="pr_code"/>
+    <result column="pr_detail" property="pr_detail"/>
+    <result column="pr_spec" property="pr_spec"/>
+    <result column="pr_unit" property="pr_unit"/>
+    <result column="pr_kind" property="pr_kind"/>
+    <result column="pr_orispeccode" property="pr_orispeccode"/>
+    <result column="pr_whid" property="pr_whid"/>
+    <result column="pr_whcode" property="pr_whcode"/>
+    <result column="pr_whname" property="pr_whname"/>
+    <result column="pr_zxbzs" property="pr_zxbzs"/>
+    <result column="pr_leadtime" property="pr_leadtime"/>
+    <result column="pr_brand" property="pr_brand"/>
+    <result column="pr_standardprice" property="pr_standardprice"/>
+    <result column="pr_purcprice" property="pr_purcprice"/>
+    <result column="pr_saleprice" property="pr_saleprice"/>
+    <result column="pr_vendid" property="pr_vendid"/>
+    <result column="pr_vendname" property="pr_vendname"/>
+    <result column="pr_vendcode" property="pr_vendcode"/>
+    <result column="pr_docdate" property="pr_docdate"/>
+    <result column="pr_recordmanid" property="pr_recordmanid"/>
+    <result column="pr_recordman" property="pr_recordman"/>
+    <result column="pr_status" property="pr_status"/>
+    <result column="pr_statuscode" property="pr_statuscode"/>
+    <result column="pr_text1" property="pr_text1"/>
+    <result column="pr_text2" property="pr_text2"/>
+    <result column="pr_text3" property="pr_text3"/>
+    <result column="pr_text4" property="pr_text4"/>
   </resultMap>
 
   <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">

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

@@ -422,4 +422,9 @@
   <select id="selectCodeById" resultType="string" parameterType="long">
     select pu_code from purchase where pu_id=#{id}
   </select>
+
+  <select id="checkTurnInstatus" resultType="int" >
+    select count(1) from purchasedetail where PD_PUID=#{id} and PD_YQTY !=0;
+</select>
+
 </mapper>

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

@@ -145,4 +145,34 @@ public class ProdInOutList extends CommonBaseEntity{
     private Double pi_nettotal;
 
     private String pi_remark;
+
+    //private ProductDTO productDTO;
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
 }

+ 2 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java

@@ -77,9 +77,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             con = "1=1";
         }
         if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
-            list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
-        } else {
             list = prodInOutListMapper.selectProdInOutBycondition(con,companyId);
+        } else {
+            list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
         }
         return list;
     }

+ 29 - 1
applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -73,12 +73,40 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-
+    <result column="pr_id" property="pr_id"/>
+    <result column="pr_code" property="pr_code"/>
+    <result column="pr_detail" property="pr_detail"/>
+    <result column="pr_spec" property="pr_spec"/>
+    <result column="pr_unit" property="pr_unit"/>
+    <result column="pr_kind" property="pr_kind"/>
+    <result column="pr_orispeccode" property="pr_orispeccode"/>
+    <result column="pr_whid" property="pr_whid"/>
+    <result column="pr_whcode" property="pr_whcode"/>
+    <result column="pr_whname" property="pr_whname"/>
+    <result column="pr_zxbzs" property="pr_zxbzs"/>
+    <result column="pr_leadtime" property="pr_leadtime"/>
+    <result column="pr_brand" property="pr_brand"/>
+    <result column="pr_standardprice" property="pr_standardprice"/>
+    <result column="pr_purcprice" property="pr_purcprice"/>
+    <result column="pr_saleprice" property="pr_saleprice"/>
+    <result column="pr_vendid" property="pr_vendid"/>
+    <result column="pr_vendname" property="pr_vendname"/>
+    <result column="pr_vendcode" property="pr_vendcode"/>
+    <result column="pr_docdate" property="pr_docdate"/>
+    <result column="pr_recordmanid" property="pr_recordmanid"/>
+    <result column="pr_recordman" property="pr_recordman"/>
+    <result column="pr_status" property="pr_status"/>
+    <result column="pr_statuscode" property="pr_statuscode"/>
+    <result column="pr_text1" property="pr_text1"/>
+    <result column="pr_text2" property="pr_text2"/>
+    <result column="pr_text3" property="pr_text3"/>
+    <result column="pr_text4" property="pr_text4"/>
   </resultMap>
 
 
   <select id="selectProdInOutListByCondition"  resultMap="BaseResultMap">
     select  *  from prodinout left join prodiodetail on pi_id = pd_piid
+    left join product on pd_prodcode=pr_code
     <where>
       <if test="con != null">
         ${con}

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

@@ -21,10 +21,10 @@ Ext.define('saas.view.core.form.FormPanel', {
     initId: 0,
     layout: 'column',
     autoScroll: true,
-    bodyPadding: 0,
+    bodyPadding: 5,
 
     fieldDefaults: {
-        margin: '0 0 10 0',
+        margin: '0 5 5 0',
         labelAlign: 'right',
         labelWidth: 90,
         columnWidth: 0.25,

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

@@ -7,7 +7,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     cls: 'x-detailgridfield',
 
     border: 1,
-    margin: '0 0 10 0', // formpanel的fieldDefaults未生效
+    margin: '0 5 5 0', // formpanel的fieldDefaults未生效
     height: 245,
     columnWidth : 1.0, 
 

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

@@ -288,19 +288,36 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     },
     onExport: function (me) {
         var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
-
-        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) {
-            });
+        //导出接口权限设置
+        var _url = grid.baseVastUrl.substring(0,grid.baseVastUrl.length-1);
+        var lastIndex = _url.lastIndexOf('/');
+        var caller = _url.substring(lastIndex);
+        var url = '/api/commons'+caller+'/export';
+        grid.BaseUtil.request({
+            url: url,
+            params: '',
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                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) {
+                    });
+                });
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            showToast('导出失败: ' + res.message);
         });
     },
     onCloseOrder:function(me){

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

@@ -303,8 +303,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
             }
         });
 
-        viewModel.notify();
-
         return items;
     },
 

+ 4 - 1
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -77,7 +77,10 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             xtype: 'numbercolumn',
             dataIndex : "ve_promisedays", 
             width : 120.0, 
-            align:'end'
+            align:'end', 
+            renderer : function(v) {
+                return Ext.util.Format.number(v, '0');
+            }
         }, {
             text : "纳税人识别号", 
             dataIndex : "ve_nsrzh", 

+ 25 - 0
frontend/saas-web/app/view/main/Main.scss

@@ -156,6 +156,23 @@ $treelist-nav-ui: (
     font: 400 16px/17px 'Microsoft YaHei';
 }
 
+.x-gudie-information{
+    width: 64px;
+    height: 64px;
+    background: url(../../../../resources/images/guide/information.png) 0 0 no-repeat;
+}
+
+.x-gudie-end{
+    width: 64px;
+    height: 64px;
+    background: url(../../../../resources/images/guide/end.png) 0 0 no-repeat;
+}
+
+.x-guide-background{
+    background-size: 100% 100% !important;
+    background: url(../../../../resources/images/guide/background.png) no-repeat;
+}
+
 .x-grid-checkcolumn-btn {
 	margin-top: -1px;
     width: 34px;
@@ -213,3 +230,11 @@ body > .x-mask {
     background-size: 16px 16px;
     background-position: center;
 } 
+.x-guide-mask{
+    -webkit-filter: grayscale(100%);
+    -moz-filter: grayscale(100%);
+    -ms-filter: grayscale(100%);
+    -o-filter: grayscale(100%);
+    filter: grayscale(100%);
+    filter: gray;
+}

+ 46 - 11
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -116,7 +116,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 120
         },{
             text: '单据日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pu_date',
             xtype: 'datecolumn',
             width: 200
         }, {
@@ -143,24 +143,32 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 100,
             hidden: true
         }, {
-            text: '单据编号',
+            text: '采购单号',
             dataIndex: 'pu_code',
             width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pu_vendcode',
+            width: 120
+        },{
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
         }, {
             text: '审核状态',
             dataIndex: 'pu_status',
             width: 120
+        },{
+            text: '业务状态',
+            dataIndex: 'pu_acceptstatus',
+            width: 120
         }, {
             text: '单据日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pu_date',
             xtype: 'datecolumn',
             width: 200
         }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '采购序号',
+            text: '序号',
             dataIndex: 'pd_detno',
             xtype: 'numbercolumn',
             width: 120
@@ -168,19 +176,46 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
+        },{
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        }, {
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
         }, {
-            text: '数量',
+            text: '单位',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '采购数量',
             dataIndex: 'pd_qty',
             xtype: 'numbercolumn',
             width: 120
         }, {
+            text: '交货日期',
+            dataIndex: 'pd_delivery',
+            xtype: 'datecolumn',
+            width: 200
+        },{
             text: '单价',
             dataIndex: 'pd_price',
             xtype: 'numbercolumn',
             width: 120
         }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype: 'numbercolumn',
+            width: 120
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype: 'numbercolumn',
+            width: 120
+        },{
+            text: '备注',
+            dataIndex: 'pu_remark',
             xtype: 'numbercolumn',
             width: 120
         }]

+ 35 - 21
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -115,6 +115,10 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             text: '审核状态',
             dataIndex: 'pi_status',
             width: 120
+        },{
+            text: '供应商编号',
+            dataIndex: 'pi_vendcode',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
@@ -139,47 +143,52 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
+            width: 200
+        },{
             text: '审核状态',
             dataIndex: 'pi_status',
             width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
-            width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pi_vendcode',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
             width: 120
         },{
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
             width: 120
         },{
-            text: '验收数量',
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -188,8 +197,13 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
             width: 120
         }]

+ 34 - 24
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -143,51 +143,56 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
+            width: 200
+        },{
             text: '审核状态',
             dataIndex: 'pi_status',
             width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
-            width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pi_vendcode',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
             width: 120
         },{
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
             width: 120
         },{
-            text: '验收数量',
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -196,10 +201,15 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
         }]
     }
 });

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

@@ -247,7 +247,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         addTitle: 'BOM资料',
                         //放大镜赋值设置
                         dbfinds:[{
-                            from:'id',to:'ma_prodid'
+                            from:'bo_motherid',to:'ma_prodid'
                         },{
                             from:'bo_mothercode',to:'ma_prodcode'
                         },{

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

@@ -49,23 +49,6 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
-    }, {
-        xtype : "hidden", 
-        name : "pi_vendid", 
-        bind : "{pi_vendid}", 
-        fieldLabel : "供应商ID", 
-        allowBlank : true, 
-        columnWidth : 0.0
-    },{
-        xtype: 'hidden',
-        name: 'pi_vendcode',
-        bind: '{pi_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
     },{
         xtype : "hidden", 
         name : "pi_custid", 

+ 40 - 30
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -30,15 +30,15 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         columnWidth: 0.5
     }, {
         xtype: 'textfield',
-        name: 'pi_vendcode',
-        fieldLabel: '供应商编号',
+        name: 'pi_custcode',
+        fieldLabel: '客户编号',
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        fieldLabel: '供应商名称',
+        name: 'pi_custname',
+        fieldLabel: '客户名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
@@ -128,51 +128,56 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
-            text: '审核状态',
-            dataIndex: 'pi_status',
-            width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
             width: 200
         },{
-            text: '供应商名称',
-            dataIndex: 'pi_vendname',
+            text: '审核状态',
+            dataIndex: 'pi_status',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '客户编号',
+            dataIndex: 'pi_custcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '客户名称',
+            dataIndex: 'pi_custname',
             width: 120
         },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '验收数量',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        },{
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
+            width: 120
+        },{
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -181,10 +186,15 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
         }]
     }
 });

+ 80 - 2
frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js

@@ -90,6 +90,8 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
+                            from:'pr_detail',to:'pr_detail',
+                        },{
                             from:'pr_code',to:'pd_prodcode',
                         }, {
                             from:'pr_detail',to:'pr_detail'
@@ -101,7 +103,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         }],
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
+                            emptyText:'输入物料编号或名称',
                             xtype : "textfield", 
                             name : "search", 
                             width: 200,
@@ -179,7 +181,83 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                     }) ;   
 
                 }
-            }
+            },
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        dataUrl: '/api/document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds: [{
+                            from: 'id',to: 'pi_custid',ignore:true
+                        }, {
+                            from: 'cu_code',to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',to: 'pi_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
+                        }],
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],
+                        dbColumns:[{
+                            "text": "客户ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
+                            "text": "客户编号",
+                            "dataIndex": "cu_code",
+                            "width": 200,
+                        }, {
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
+                            "dataIndex": "cu_name",
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        }]
+                    });
+
+                }
+            },            
         });
 
     }

+ 0 - 17
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -47,23 +47,6 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         readOnly: true,
         allowBlank: true,
         columnWidth: 0.25
-    }, {
-        xtype: "hidden",
-        name: "pi_vendid",
-        bind: "{pi_vendid}",
-        fieldLabel: "供应商ID",
-        allowBlank: true,
-        columnWidth: 0.0
-    }, {
-        xtype: 'hidden',
-        name: 'pi_vendcode',
-        bind: '{pi_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
     }, {
         xtype: "hidden",
         name: "pi_custid",

+ 40 - 32
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -30,17 +30,15 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         columnWidth: 0.5
     }, {
         xtype: 'textfield',
-        name: 'pi_vendcode',
-        bind: '{pi_vendcode}',
-        fieldLabel: '供应商编号',
+        name: 'pi_custcode',
+        fieldLabel: '客户编号',
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        bind: '{pi_vendname}',
-        fieldLabel: '供应商名称',
+        name: 'pi_custname',
+        fieldLabel: '客户名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
@@ -130,51 +128,56 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
-            text: '审核状态',
-            dataIndex: 'pi_status',
-            width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
             width: 200
         },{
-            text: '供应商名称',
-            dataIndex: 'pi_vendname',
+            text: '审核状态',
+            dataIndex: 'pi_status',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '客户编号',
+            dataIndex: 'pi_custcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '客户名称',
+            dataIndex: 'pi_custname',
             width: 120
         },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '验收数量',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        },{
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
+            width: 120
+        },{
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -183,10 +186,15 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
         }]
     }
 });

+ 80 - 2
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -90,6 +90,8 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
+                            from:'pr_detail',to:'pr_detail',
+                        },{
                             from:'pr_code',to:'pd_prodcode',
                         }, {
                             from:'pr_detail',to:'pr_detail'
@@ -101,7 +103,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         }],
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
+                            emptyText:'输入物料编号或名称',
                             xtype : "textfield", 
                             name : "search", 
                             width: 200,
@@ -179,7 +181,83 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                     }) ;   
 
                 }
-            }
+            },
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        dataUrl: '/api/document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds: [{
+                            from: 'id',to: 'pi_custid',ignore:true
+                        }, {
+                            from: 'cu_code',to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',to: 'pi_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
+                        }],
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],
+                        dbColumns:[{
+                            "text": "客户ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
+                            "text": "客户编号",
+                            "dataIndex": "cu_code",
+                            "width": 200,
+                        }, {
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
+                            "dataIndex": "cu_name",
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        }]
+                    });
+
+                }
+            },             
         });
 
     }

+ 224 - 37
frontend/saas-web/app/view/sys/guide/FormPanel.js

@@ -4,80 +4,267 @@ Ext.define('saas.view.sys.guide.FormPanel', {
 
     layout:'fit',
 
-    cls:'x-guide-background',
-
-    // bodyStyle: {
-    //     background: 'url(resources/images/guide/background.png)'
-    // },
+    bodyCls:'x-guide-background',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    dataUrl:'/api/commons/init/check',
 
     initComponent: function () {
         var me = this;
+        showInformation = function(type,value) {
+			me.showInformation(type,value)
+		}
 		var view = new Ext.DataView({
             style:"margin:7% 0 7% 0;",
+            store : Ext.create('Ext.data.Store', {
+				fields: [{
+                    name:'baseSet',type:'boolean'
+                },{
+                    name:'warehouse',type:'boolean'
+                },{
+                    name:'product',type:'boolean'
+                },{
+                    name:'customer',type:'boolean'
+                },{
+                    name:'vendor',type:'boolean'
+                },{
+                    name:'begin',type:'boolean'
+                }],
+				autoLoad: true,
+                pageSize: 10,
+                data: [{
+                    baseSet:false,
+                    warehouse:false,
+                    product:false,
+                    customer:false,
+                    vendor:false,
+                    begin:false,
+                }],
+                proxy: {
+                    timeout:8000,
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data',
+                        totalProperty: 'data',
+                    }
+                },
+			}),
 			tpl : new Ext.XTemplate(
+                '<tpl for=".">',
 				'<div class="x-guide-panel" align ="center">',
                     '<div class="x-guide-item" align ="center" >',
-                        '<img cls="afterLine" src="resources/images/guide/baseSet.png" style="margin:0 185px 0 0;" align ="center" width="135" height="90" data-qtip="基础设置" alt="基础设置" onClick="" >',
-                        '<img src="resources/images/guide/warehouse.png" style="margin:0 185px 0 0;" align ="center" width="135" height="90" data-qtip="仓库资料" alt="仓库资料" onClick="" >',
-                        '<img src="resources/images/guide/product.png" align ="center" width="135" height="90" data-qtip="物料资料" alt="物料资料" onClick="" >',
+                        '<img class="',
+                        '<tpl if="!baseSet">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/baseSet.png" style="margin:0 185px 0 0;" align ="center" width="135" height="90" alt="基础设置" onClick="showInformation(\'baseSet\')" >',
+                        '<img class="',
+                        '<tpl if="!warehouse">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/warehouse.png" style="margin:0 185px 0 0;" align ="center" width="135" height="90" alt="仓库资料" onClick="showInformation(\'warehouse\')" >',
+                        '<img class="',
+                        '<tpl if="!product">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/product.png" align ="center" width="135" height="90" alt="物料资料" onClick="showInformation(\'product\')" >',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<img src="resources/images/guide/1.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
-                        '<img src="resources/images/guide/2.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
-                        '<img src="resources/images/guide/3.png" style="margin: -20px 0px 0 0;" align ="center" width="32" height="32" >',
+                        '<img class="',
+                        '<tpl if="!baseSet">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/1.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" onClick="showInformation(\'baseSet\')" >',
+                        '<img class="',
+                        '<tpl if="!warehouse">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/2.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" onClick="showInformation(\'warehouse\')" >',
+                        '<img class="',
+                        '<tpl if="!product">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/3.png" style="margin: -20px 0px 0 0;" align ="center" width="32" height="32" onClick="showInformation(\'product\')" >',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<span  style="margin:0 270px 0px 0;" align ="center"  >基础设置</span>',
-                        '<span  style="margin:0 270px 0px 0;" align ="center" >仓库资料</span>',
-                        '<span  style="margin:0 0px 0px 0;" align ="center"  >物料资料</span>',
+                        '<span  style="margin:0 270px 0px 0;" align ="center" onClick="showInformation(\'baseSet\')" >基础设置</span>',
+                        '<span  style="margin:0 270px 0px 0;" align ="center" onClick="showInformation(\'warehouse\')" >仓库资料</span>',
+                        '<span  style="margin:0 0px 0px 0;" align ="center"  onClick="showInformation(\'product\')" >物料资料</span>',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
-                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
-                        '<img src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >',
+                        '<img class="',
+                        '<tpl if="!baseSet">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img class="',
+                        '<tpl if="!warehouse">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img class="',
+                        '<tpl if="!product">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >',
                         "<br>",
                         '<div class="x-guide-line"  height="1"  style="border:1px solid #E4F7FF;margin: -9px 0 0 0;width: 654px !important;" align ="center"></div>',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<img src="resources/images/guide/customer.png" style="margin:50px 185px 0 0;" align ="center" width="135" height="90" data-qtip="客户资料" alt="客户资料" onClick="" >',
-                        '<img src="resources/images/guide/vendor.png" style="margin:50px 185px 0 0;" align ="center" width="135" height="90" data-qtip="供应商资料" alt="供应商资料" onClick="" >',
-                        '<img src="resources/images/guide/begin.png" style="margin:50px 0 0 0;" align ="center" width="135" height="90" data-qtip="开始使用" alt="开始使用" onClick="" >',
+                        '<img class="',
+                        '<tpl if="!customer">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/customer.png" style="margin:50px 185px 0 0;" align ="center" width="135" height="90" alt="客户资料" onClick="showInformation(\'customer\')" >',
+                        '<img class="',
+                        '<tpl if="!vendor">x-guide-mask </tpl>',
+                        '"src="resources/images/guide/vendor.png" style="margin:50px 185px 0 0;" align ="center" width="135" height="90" alt="供应商资料" onClick="showInformation(\'vendor\')" >',
+                        '<img class="',
+                        '<tpl if="!begin">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/begin.png" style="margin:50px 0 0 0;" align ="center" width="135" height="90" alt="开始使用" onClick="showInformation(\'begin\',\'{begin}\')" >',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<img src="resources/images/guide/4.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
-                        '<img src="resources/images/guide/5.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
-                        '<img src="resources/images/guide/6.png" style="margin: -20px 0px 0 0;" align ="center" width="32" height="32" >',
+                        '<img class="',
+                        '<tpl if="!customer">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/4.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" onClick="showInformation(\'customer\')" >',
+                        '<img class="',
+                        '<tpl if="!vendor">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/5.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32"  onClick="showInformation(\'vendor\')">',
+                        '<img class="',
+                        '<tpl if="!begin">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/6.png" style="margin: -20px 0px 0 0;" align ="center" width="32" height="32" onClick="showInformation(\'begin\',\'{begin}\')" >',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<span  style="margin:0 265px 100px 0;" align ="center"  >客户资料</span>',
-                        '<span  style="margin:0 265px 100px 0;" align ="center" >供应商资料</span>',
-                        '<span  style="margin:0 0px 100px 0;" align ="center"  >开始使用</span>',
+                        '<span  style="margin:0 265px 100px 0;" align ="center"  onClick="showInformation(\'customer\')" >客户资料</span>',
+                        '<span  style="margin:0 265px 100px 0;" align ="center" onClick="showInformation(\'vendor\')" >供应商资料</span>',
+                        '<span  style="margin:0 0px 100px 0;" align ="center" onClick="showInformation(\'begin\',\'{begin}\')"  >开始使用</span>',
                     '</div>',
                     '<div class="x-guide-item" align ="center">',
-                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
-                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
-                        '<img src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >',
+                        '<img class="',
+                        '<tpl if="!customer">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img class="',
+                        '<tpl if="!vendor">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img class="',
+                        '<tpl if="!begin">x-guide-mask </tpl>',
+                        '" src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >',
                         "<br>",
                         '<div class="x-guide-line"  height="1"  style="border:1px solid #E4F7FF;margin: -9px 0 0 0;width: 654px !important;" align ="center"></div>',
                     '</div>',
-				'</div>'
+                '</div>',
+                '</tpl>'
 			),
 			trackOver: true,
 			overItemCls : 'x-module-over',
 			selectedClass : 'selected',
 			singleSelect : true,
 			itemSelector : '.x-module-item'
-		});
-		
-		Ext.apply(me,{
-			items:[view]
-		});
-		me.view = view;
+        });
+
+        Ext.apply(me,{
+            items:[view]
+        });
+        me.view = view;
+
         me.callParent(arguments);
     },
 
     refresh:function(){
-        this.ownerCt.setTitle('新手指引')
+        this.ownerCt.setTitle('新手指引');
+        //刷新store数据
+    },
+
+    getData:function(store){
+        var me = this;
+        //获取数据
+        me.BaseUtil.request({
+            url: me.dataUrl,
+            params: '',
+            method: 'GET',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                store;
+                debugger
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            showToast('读取初始化信息失败: ' + res.message);
+        });
+    },
+
+    showInformation:function(type,value){
+        var message = '';
+        var xtype = '';
+        var icon = 'x-gudie-information';
+        var title = '';
+        if(type=='baseSet'){
+            message = '<h4>您可以在参数设置中编辑公司的信息。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            xtype = 'sys-config-formpanel';
+        }
+        if(type=='warehouse'){
+            message = '<h4>因为新增物料时需要告知该物料所属仓库是哪里,所以需要首先进行仓库管理。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            xtype = 'other-warehouse';
+            title = '仓库资料'
+        }
+        if(type=='product'){
+            message = '<h4>录入物料及其期初数量;开账后也可通过录采购单对物料库存进行增加,</br>录销售单物料库存相应减少。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            xtype = 'document-product-basepanel';
+            title = '物料资料'
+        }
+        if(type=='customer'){
+            message = '<h4>对客户资料进行录入及管理。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            xtype = 'document-customer-basepanel';
+            title = '客户资料'
+        }
+        if(type=='vendor'){
+            message = '<h4>录采购单时需选择供应商,在单据页面选择供应商时</br>也提供供应商新增功能,您也可以跳过此步。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            xtype = 'document-vendor-basepanel';
+            title = '供应商资料'
+        }
+        if(type=='begin'){
+            message = '<h4>欢迎您使用优企云进销存!</br>'+
+            '温馨提示:开账后您还是可以通过左侧菜单栏对基础资料进行维护。</h4>';
+            xtype = "begin";
+            icon = 'x-gudie-end';
+            if(value=='false'){
+                icon = 'x-gudie-information';
+                message = '<h4>请激活所有模块后再使用系统!</h4>';
+            }
+        }
+        var me = this;
+        var form = this.view.ownerCt;
+        var panelEl = form.getEl()
+        var box = panelEl.getBox();
+        var height = box.height;
+        var width = box.width;
+
+        var win = form.add(Ext.create('Ext.window.MessageBox', {
+            buttonAlign : 'right',
+            height:0.5*height,
+            width:0.5*width,
+            buttons: [{
+                text: '我知道了',
+                cls:'x-formpanel-btn-orange',
+                handler: function(b) {
+                    var scope = b.ownerCt.ownerCt;
+                    if(xtype=='begin'&&value=='false'){
+                        scope.close();
+                        return true;
+                    }else if(xtype=='begin'&&value=='true'){
+                        me.ownerCt.close();
+                        return true;
+                    }
+                    openTab(xtype, title, xtype+'_add');
+                    scope.close();
+                }
+            },{
+                text: '取消',
+                cls:'x-formpanel-btn-blue',
+                handler: function(b) {
+                    var scope = b.ownerCt.ownerCt;
+                    scope.close();
+                }
+            }]
+        }));
+        win.show({
+            title : '模块介绍',
+            msg : message,
+            icon : icon
+        });
     }
 
 });

+ 145 - 0
frontend/saas-web/overrides/form/field/Number.js

@@ -0,0 +1,145 @@
+Ext.define("saas.override.form.field.Number", {
+    override: "Ext.form.field.Number",
+    
+    /**
+    * @cfg {Boolean} thousandSeparator
+    */
+    thousandSeparator: false,
+    
+    /**
+     * @inheritdoc
+     */
+    toRawNumber: function (value) {
+        return String(value).replace(this.decimalSeparator, '.').replace(new RegExp(Ext.util.Format.thousandSeparator, "g"), '');
+    },
+    
+    /**
+     * @inheritdoc
+     */
+    getErrors: function (value) {
+        if (!this.thousandSeparator)
+            return this.callParent(arguments);
+        var me = this,
+            errors = Ext.form.field.Text.prototype.getErrors.apply(me, arguments),
+            format = Ext.String.format,
+            num;
+
+        value = Ext.isDefined(value) ? value : this.processRawValue(this.getRawValue());
+
+        if (value.length < 1) { // if it's blank and textfield didn't flag it then it's valid
+            return errors;
+        }
+
+        value = me.toRawNumber(value);
+
+        if (isNaN(value.replace(Ext.util.Format.thousandSeparator, ''))) {
+            errors.push(format(me.nanText, value));
+        }
+
+        num = me.parseValue(value);
+
+        if (me.minValue === 0 && num < 0) {
+            errors.push(this.negativeText);
+        }
+        else if (num < me.minValue) {
+            errors.push(format(me.minText, me.minValue));
+        }
+
+        if (num > me.maxValue) {
+            errors.push(format(me.maxText, me.maxValue));
+        }
+
+        return errors;
+    },
+    
+    /**
+     * @inheritdoc
+     */
+     valueToRaw: function (value) {
+        if (!this.thousandSeparator)
+            return this.callParent(arguments);
+        var me = this;
+
+        var format = "000,000";
+        var l = (value+'').split('.')[1] ? (value+'').split('.')[1] : 0;
+        
+        for (var i = 0; i < l && i < me.decimalPrecision; i++) {
+            if (i == 0)
+                format += ".";
+            format += "0";
+        }
+        value = me.parseValue(Ext.util.Format.number(value, format));
+        value = me.fixPrecision(value);
+        value = Ext.isNumber(value) ? value : parseFloat(me.toRawNumber(value));
+        console.log('v1', format, value);
+
+        // var l = (value+'').split('.')[1] ? (value+'').split('.')[1] : 0;
+        // format = format.split('.')[0] + new Array(l).map(function() {return '0'}).join('');
+
+        value = isNaN(value) ? '' : String(Ext.util.Format.number(value, format)).replace('.', me.decimalSeparator);
+        console.log('v2', format, value);
+        return value;
+    },
+    
+    /**
+     * @inheritdoc
+     */
+    getSubmitValue: function () {
+        if (!this.thousandSeparator)
+            return this.callParent(arguments);
+        var me = this,
+            value = me.callParent();
+
+        if (!me.submitLocaleSeparator) {
+            value = me.toRawNumber(value);
+        }
+        return value;
+    },
+    
+    /**
+     * @inheritdoc
+     */
+    setMinValue: function (value) {
+        if (!this.thousandSeparator)
+            return this.callParent(arguments);
+        var me = this,
+            allowed;
+
+        me.minValue = Ext.Number.from(value, Number.NEGATIVE_INFINITY);
+        me.toggleSpinners();
+
+        // Build regexes for masking and stripping based on the configured options
+        if (me.disableKeyFilter !== true) {
+            allowed = me.baseChars + '';
+
+            if (me.allowExponential) {
+                allowed += me.decimalSeparator + 'e+-';
+            }
+            else {
+                allowed += Ext.util.Format.thousandSeparator;
+                if (me.allowDecimals) {
+                    allowed += me.decimalSeparator;
+                }
+                if (me.minValue < 0) {
+                    allowed += '-';
+                }
+            }
+
+            allowed = Ext.String.escapeRegex(allowed);
+            me.maskRe = new RegExp('[' + allowed + ']');
+            if (me.autoStripChars) {
+                me.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi');
+            }
+        }
+    },
+    
+    /**
+     * @private
+     */
+    parseValue: function (value) {
+        if (!this.thousandSeparator)
+            return this.callParent(arguments);
+        value = parseFloat(this.toRawNumber(value));
+        return isNaN(value) ? null : value;
+    }
+});

BIN
frontend/saas-web/resources/images/guide/end.png


BIN
frontend/saas-web/resources/images/guide/information.png