Browse Source

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

hy 7 years ago
parent
commit
60defde6e2
16 changed files with 150 additions and 102 deletions
  1. 0 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  2. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java
  3. 3 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  4. 14 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  5. 4 16
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  6. 13 7
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  7. 78 29
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  8. 1 1
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutListMapper.xml
  9. 2 2
      applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml
  10. 1 23
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  11. 6 0
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  12. 10 11
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  13. 4 4
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  14. 9 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelModel.js
  15. 2 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  16. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

+ 0 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -58,8 +58,6 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
     @Override
     public void updateLatestPurchasePrice(Long pu_id) {
         getMapper().updateLatestPurchasePrice(pu_id);
-        Product product = getMapper().selectByPrimaryKey(pu_id);
-        messageLogService.update(generateMsgObj(pu_id, product.getPr_code()));
     }
 
     @Override

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

@@ -34,4 +34,6 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
     void calcProdIn(@Param("pi_id") Long pi_id);
 
     void calcProdOut(@Param("pi_id") Long pi_id);
+
+    void getDefaultWarehouseByProduct(@Param("pi_id") Long pi_id);
 }

+ 3 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java

@@ -77,4 +77,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
 
     void calcProdInout(Long pi_id, String pi_class);
 
+    String pushMaxnubmer(ProdInOut prodInOut);
+
+    void getDefaultWarehouseByProduct(Long pi_id);
 }

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

@@ -395,6 +395,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_class(BillCodeSeq.PURCHASEOUT.getName());
         targetPi.setPi_date(new Date());
         targetPi.setPi_recorddate(new Date());
+        targetPi.setPi_vendid(sourcePi.getPi_vendid());
         targetPi.setPi_vendcode(sourcePi.getPi_vendcode());
         targetPi.setPi_vendname(sourcePi.getPi_vendname());
         targetPi.setPi_puid(sourcePi.getPi_puid());
@@ -403,7 +404,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setCompanyId(sourcePi.getCompanyId());
         targetPi.setCreateTime(new Date());
 
-
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入验退单从表
@@ -427,6 +427,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  targetPid.setPd_prodcode(sourcePid.getPd_prodcode());
                  targetPid.setPd_ioid(sourcePid.getId());
                  targetPid.setPd_taxrate(sourcePid.getPd_taxrate());
+                 //仓库信息
+                 targetPid.setPd_whid(sourcePid.getPd_whid());
+                 targetPid.setPd_whcode(sourcePid.getPd_whcode());
+                 targetPid.setPd_whname(sourcePid.getPd_whname());
+
                  //公司id
                  targetPid.setCompanyId(sourcePid.getCompanyId());
                  targetPid.setCreateTime(new Date());
@@ -439,7 +444,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
              }
          }
-
+        //更新默认仓库
+//        getDefaultWarehouseByProduct(pi_id);
         //采购验退单相关计算
         calcProdInout(pi_id,"采购验退单");
         DocBaseDTO baseDTO = new DocBaseDTO();
@@ -530,7 +536,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
 
-    private String pushMaxnubmer(ProdInOut prodInOut) {
+    public String pushMaxnubmer(ProdInOut prodInOut) {
         String pi_inoutno = prodInOut.getPi_inoutno();
         String pi_class = prodInOut.getPi_class();
         Long id = prodInOut.getId();
@@ -549,7 +555,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         return maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
     }
 
-
+    @Override
+    @Transactional
+    public void getDefaultWarehouseByProduct(Long pi_id) {
+        prodIODetailMapper.getDefaultWarehouseByProduct(pi_id);
+    }
 
 
     private ProdInOut checkAndReturnOrder (Long id){

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

@@ -180,12 +180,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         baseDTO = getBaseDTOById(pu_id);
 
-        //取供应商汇率
-        getVendorTaxrate(pu_id);
-        //取价
-        getPrice(pu_id);
-
-
         //计算金额,未税单价,未税金额等
         calcPurchase(pu_id);
         //日志
@@ -193,14 +187,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         return baseDTO;
     }
 
-    private void getVendorTaxrate(Long pu_id) {
-//        purchasedetailMapper.getVendorTaxrate(pu_id);
-    }
-
-    private void getPrice(Long pu_id) {
-//        purchasedetailMapper.getPrice(pu_id);
-    }
-
 
     @Override
     @Transactional
@@ -461,7 +447,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 //公司id
                 prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
                 prodIODetail.setCreateTime(new Date());
-
                 //本次转单数
                 prodIODetail.setPd_inqty(pdQty-pdYqty);
                 prodIODetailMapper.insertSelective(prodIODetail);
@@ -470,7 +455,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
         }
-        //采购单相关计算
+        //更新默认仓库
+        prodInOutService.getDefaultWarehouseByProduct(pi_id);
+
+        //采购验收单相关计算
         prodInOutService.calcProdInout(pi_id,"采购验收单");
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);

+ 13 - 7
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -740,19 +740,25 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
-
+  <update id="getDefaultWarehouseByProduct">
+    update prodiodetail
+    set pd_whid=(select pr_whid from product where pd_prodid = pr_id),
+    pd_whcode=(select pr_whcode from product where pd_prodid = pr_id),
+    pd_whname=(select pr_whname from product where pd_prodid = pr_id)
+    where pd_piid = #{pi_id,jdbcType=INTEGER};
+  </update>
 
 
 </mapper>

+ 78 - 29
applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml

@@ -361,32 +361,81 @@
   <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update purchasedetail <set>
-      PD_PUID = #{item.pd_puid},
-      PD_CODE = #{item.pd_code},
-      PD_DETNO = #{item.pd_detno},
-      PD_PRODID = #{item.pd_prodid},
-      PD_PRODCODE = #{item.pd_prodcode},
-      PD_UNIT = #{item.pd_unit},
-      PD_QTY = #{item.pd_qty},
-      PD_PRICE = #{item.pd_price},
-      PD_TAXPRICE = #{item.pd_taxprice},
-      PD_TOTAL = #{item.pd_total},
-      PD_TAXRATE = #{item.pd_taxrate},
-      PD_TAXTOTAL = #{item.pd_taxtotal},
-      PD_ACCEPTQTY = #{item.pd_acceptqty},
-      PD_DELIVERY = #{item.pd_delivery},
-      PD_SALECODE = #{item.pd_salecode},
-      PD_SALEDETNO = #{item.pd_saledetno},
-      PD_SDID = #{item.pd_sdid},
-      companyId = #{item.companyId},
-      updaterId = #{item.updaterId},
-      updateTime = #{item.updateTime},
-      pd_text1 = #{item.pd_text1},
-      pd_text2 = #{item.pd_text2},
-      pd_text3 = #{item.pd_text3},
-      pd_text4 = #{item.pd_text4},
-      pd_text5 = #{item.pd_text5},
-      pd_yqty = #{item.pd_yqty}
+      <if test="item.pd_puid != null" >
+        PD_PUID = #{item.pd_puid,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_code != null" >
+        PD_CODE = #{item.pd_code,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_detno != null" >
+        PD_DETNO = #{item.pd_detno,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_prodid != null" >
+        PD_PRODID = #{item.pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_prodcode != null" >
+        PD_PRODCODE = #{item.pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_unit != null" >
+        PD_UNIT = #{item.pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_qty != null" >
+        PD_QTY = #{item.pd_qty,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_price != null" >
+        PD_PRICE = #{item.pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_total != null" >
+        PD_TOTAL = #{item.pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_taxrate != null" >
+        PD_TAXRATE = #{item.pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_taxtotal != null" >
+        PD_TAXTOTAL = #{item.pd_taxtotal,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_acceptqty != null" >
+        PD_ACCEPTQTY = #{item.pd_acceptqty,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_delivery != null" >
+        PD_DELIVERY = #{item.pd_delivery,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_salecode != null" >
+        PD_SALECODE = #{item.pd_salecode,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_saledetno != null" >
+        PD_SALEDETNO = #{item.pd_saledetno,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_sdid != null" >
+        PD_SDID = #{item.pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="item.companyId != null" >
+        companyId = #{item.companyId,jdbcType=INTEGER},
+      </if>
+      <if test="item.updaterId != null" >
+        updaterId = #{item.updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="item.updateTime != null" >
+        updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="item.pd_text1 != null" >
+        pd_text1 = #{item.pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text2 != null" >
+        pd_text2 = #{item.pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text3 != null" >
+        pd_text3 = #{item.pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text4 != null" >
+        pd_text4 = #{item.pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text5 != null" >
+        pd_text5 = #{item.pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_yqty != null" >
+        pd_yqty = #{item.pd_yqty,jdbcType=DOUBLE},
+      </if>
       </set>
       where PD_ID = #{item.id,jdbcType=INTEGER}
     </foreach>
@@ -410,9 +459,9 @@
 
   <update id="calcPurchase" parameterType="long" >
     update purchasedetail set pd_taxprice = ifnull(PD_PRICE,0)/(1+ifnull(pd_taxrate,0)/100) where pd_puid = #{pu_id,jdbcType=INTEGER};
-    update purchasedetail set pd_total = ifnull(PD_PRICE,0)*ifnull(pd_qty,0),pd_taxtotal = pd_taxprice*ifnull(pd_qty,0) where pd_puid = #{pu_id,jdbcType=INTEGER};
-    update purchase set pu_total = (select sum(pd_total) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
-    update purchase set PU_TAXTOTAL = (select sum(pd_taxtotal) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
+    update purchasedetail set pd_total = round(ifnull(PD_PRICE,0)*ifnull(pd_qty,0),2),pd_taxtotal = round(pd_taxprice*ifnull(pd_qty,0),2) where pd_puid = #{pu_id,jdbcType=INTEGER};
+    update purchase set pu_total = round((select sum(pd_total) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ),2)  where pu_id = #{pu_id,jdbcType=INTEGER};
+    update purchase set PU_TAXTOTAL = round((select sum(pd_taxtotal) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ),2)  where pu_id = #{pu_id,jdbcType=INTEGER};
   </update>
 
 

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

@@ -96,7 +96,7 @@
           and  companyId = #{companyId}
         </if>
       </where>
-      order by pi_id
+      order by pi_id desc
   </select>
 
 </mapper>

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

@@ -60,7 +60,7 @@
             <if test="companyId != null">
                 and   sale.companyId = #{companyId}
             </if>
-        </where>  order by sd_detno
+        </where>  order by sd_detno desc
     </select>
 
     <select id="selectPurchaseBycondition" resultMap="BaseResultMap">
@@ -73,7 +73,7 @@
                 and  companyId = #{companyId}
             </if>
         </where>
-        order by sa_id
+        order by sa_id desc
     </select>
 
 </mapper>

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

@@ -63,22 +63,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         xtype : "hidden", 
         name : "pu_delivery", 
         fieldLabel : "交货日期"
-    }, {
-        xtype : "hidden", 
-        name : "pu_buyerid", 
-        bind : "{pu_buyerid}", 
-        fieldLabel : "采购员ID"
-    }, {
-        xtype : "textfield", 
-        name : "pu_buyercode", 
-        fieldLabel : "采购员编号", 
-        hidden:true,
-        columnWidth : 0
-    }, {
-        xtype : "textfield", 
-        name : "pu_buyername", 
-        fieldLabel : "采购员名称"
-    }, {
+    },{
         xtype : "textfield", 
         name : "pu_shipaddresscode", 
         fieldLabel : "交货地址"
@@ -202,13 +187,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     var xr = (new Array(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)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
                 }
             }, 
             {

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

@@ -118,6 +118,8 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         },{
                             from:'pr_spec',to:'pr_spec'
+                        },{
+                            from:'pr_purcprice',to:'pd_price'
                         }],
                         //联想设置
                         dbtpls:[{
@@ -158,6 +160,10 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "text": "单位",
                             "dataIndex": "pr_spec",
                             "width": 100,
+                        }, {
+                            "text": "最新采购单价",
+                            "dataIndex": "pr_purcprice",
+                            "width": 0,
                         },{
                             "text": "仓库id",
                             "dataIndex": "pr_whid",

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

@@ -104,9 +104,17 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             xtype: 'numbercolumn',
             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',
@@ -121,16 +129,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             xtype: 'datecolumn',
             width: 200
         }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '金额',
+            text: '总额',
             dataIndex: 'pu_total',
             xtype: 'numbercolumn',
             width: 120,

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

@@ -39,11 +39,10 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype: 'button',
         text: '转采购验退单',
         bind: {
-            hidden: '{!id}'
-        },
+           hidden: '{turnHidden}'
+       },
         handler: 'turnOut'
     }],
-
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
@@ -75,7 +74,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
+        fieldLabel: '供应商名称',
+        allowBlank : false,
     },{
         xtype : "datefield", 
         name : "pi_date", 

+ 9 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelModel.js

@@ -4,5 +4,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelModel', {
     
     data: {
         pi_class: '采购验收单'
-     }
+     },
+     formulas:{
+        turnHidden:{
+            bind:'{pi_statuscode}',
+            get:function(value){
+                return value!='AUDITED';
+            }
+        }
+    }
 });

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

@@ -66,7 +66,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
+        fieldLabel: '供应商名称',
+        allowBlank : false,
     },{
         xtype : "datefield", 
         name : "pi_date", 

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

@@ -21,7 +21,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'ve_id',to:'pi_vendid',ignore:true
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{