Browse Source

采购单明细行的需求日期为空时,直接等于主表的交货日期

zhoudw 7 years ago
parent
commit
a65c023b21

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

@@ -138,6 +138,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.setCompanyId(companyId);
                 detail.setCreatorId(userId);
                 detail.setCreateTime(new Date());

+ 11 - 8
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -52,9 +52,11 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         fieldLabel : "供应商名称",
         allowBlank : false,
     },{
-        xtype : "hidden", 
+        xtype : "datefield", 
         name : "pu_delivery", 
-        fieldLabel : "交货日期"
+        fieldLabel : "交货日期",
+        allowBlank:false,
+        columnWidth : 0.25,
     },{
         editable:false,
         xtype : "remotecombo", 
@@ -81,11 +83,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             });
             this.dialog.show();
         }
-    }, {
-        xtype : "textfield", 
-        name : "pu_total", 
-        fieldLabel : "单据金额",
-        readOnly:true
     },{
         name : "detailGridField", 
         xtype : "detailGridField", 
@@ -308,12 +305,18 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 width : 120.0
             }
         ]
+    }, {
+        xtype : "textfield", 
+        name : "pu_total", 
+        fieldLabel : "单据金额",
+        readOnly:true,
+        columnWidth : 0.25,
     },
     {
         xtype : "textfield", 
         name : "pu_remark", 
         fieldLabel : "备注", 
-        columnWidth : 1
+        columnWidth : 0.75
     },
     {
         xtype : "textfield",