Przeglądaj źródła

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

zhoudw 7 lat temu
rodzic
commit
50bff62671
30 zmienionych plików z 378 dodań i 208 usunięć
  1. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  2. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  3. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  4. 16 12
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  5. 7 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  6. 1 1
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  7. 1 1
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  8. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  9. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  10. 16 1
      frontend/saas-web/app/Application.scss
  11. 18 9
      frontend/saas-web/app/view/core/form/FormPanel.js
  12. 35 1
      frontend/saas-web/app/view/core/form/FormPanelController.js
  13. 125 0
      frontend/saas-web/app/view/core/form/field/Month.js
  14. 6 6
      frontend/saas-web/app/view/document/customer/FormPanel.js
  15. 44 24
      frontend/saas-web/app/view/document/product/BasePanel.js
  16. 51 107
      frontend/saas-web/app/view/document/product/FormPanel.js
  17. 4 1
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  18. 6 6
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  19. 1 0
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  20. 1 0
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  21. 9 5
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  22. 6 5
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  23. 5 3
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  24. 4 3
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  25. 2 2
      frontend/saas-web/app/view/money/report/AccountBalance.js
  26. 2 2
      frontend/saas-web/app/view/money/report/PayDetail.js
  27. 2 2
      frontend/saas-web/app/view/money/report/RecDetail.js
  28. 2 2
      frontend/saas-web/app/view/money/report/VendorCheck.js
  29. 2 2
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  30. 1 4
      frontend/saas-web/app/view/stock/report/ProdinoutCount.js

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.service.PaybalanceService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -22,6 +23,7 @@ public class PaybalanceController {
     @Autowired
     private PaybalanceService paybalanceService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result saveFormData(@RequestBody Pay body) {
         DocBaseDTO docBaseDTO = paybalanceService.insert(body);
@@ -58,12 +60,14 @@ public class PaybalanceController {
         return Result.success(list);
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Pay body){
         paybalanceService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") int id){
         paybalanceService.unAudit(id);

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.money.po.Recbalance;
 import com.usoftchina.saas.money.service.RecbalanceService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Iterator;
@@ -24,6 +25,7 @@ public class RecbalanceContorller {
     @Autowired
     private RecbalanceService recbalanceService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result saveFormData(@RequestBody Rec body){
         DocBaseDTO docBaseDTO = recbalanceService.insert(body);
@@ -58,12 +60,14 @@ public class RecbalanceContorller {
         return Result.success(recbalanceService.selectList(page, condition));
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Rec body){
         recbalanceService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") Long id){
         recbalanceService.unAudit(id);

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java

@@ -22,7 +22,7 @@ public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
 //    Long insert(Banksubledger record);
 
     int insertSelective(Banksubledger record);
-    String selectCode(String code);
+    List<String> selectCode(String code);
 
     List<Banksubledger> selectByExample(BanksubledgerExample example);
 

+ 16 - 12
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -192,7 +192,8 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             //更新账户资料金额
             Bankinformation bankinformation = new Bankinformation();
             Bankinformation nowBankInformation = paybalanceMapper.selectBankInformationByPrimaryKey(det.getPd_bankid());
-            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()+det.getPd_amount());
+            bankinformation.setBk_thisamount((nowBankInformation.getBk_thisamount() == null ? new Double(0) : nowBankInformation.getBk_thisamount())
+                    + (det.getPd_amount() == null ? 0.0 : det.getPd_amount()));
             paybalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
         }
         //更新主表pb_pbdamount=从表二金额合计
@@ -240,18 +241,18 @@ public class PaybalanceServiceImpl implements PaybalanceService {
          * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
          */
         Paybalance pay = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
-        Double pay_preamount = pay.getPb_preamount();
-        Double pay_pbdamount = pay.getPb_pbdamount();
+        Double pay_preamount = pay.getPb_preamount() == null ? new Double(0): pay.getPb_preamount();
+        Double pay_pbdamount = pay.getPb_pbdamount() == null ? new Double(0): pay.getPb_pbdamount();
         Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(pay.getPb_vendid());
-        Double preamount = vendorData.getVe_preamount();
-        Double beginapamount = vendorData.getVe_beginapamount();
-        Double beginprepayamount= vendorData.getVe_beginprepayamount();
-        Double payamount = vendorData.getVe_payamount();
+        Double preamount = vendorData.getVe_preamount() == null ? new Double(0) : vendorData.getVe_preamount();
+        Double beginapamount = vendorData.getVe_beginapamount() == null ? new Double(0) : vendorData.getVe_beginapamount();
+        Double beginprepayamount= vendorData.getVe_beginprepayamount() == null ? new Double(0) : vendorData.getVe_beginprepayamount();
+        Double payamount = vendorData.getVe_payamount() == null ? new Double(0) : vendorData.getVe_payamount() ;
         Vendor vendor = new Vendor();
         vendor.setId(Long.valueOf(String.valueOf(pay.getPb_vendid())));
-        vendor.setVe_preamount(preamount-pay_preamount);
-        vendor.setVe_payamount(payamount+pay_pbdamount);
-        vendor.setVe_leftamount(beginapamount-beginprepayamount+payamount+pay_pbdamount-preamount+pay_preamount);
+        vendor.setVe_preamount(preamount - pay_preamount);
+        vendor.setVe_payamount(payamount + pay_pbdamount);
+        vendor.setVe_leftamount(beginapamount - beginprepayamount + payamount + pay_pbdamount - preamount + pay_preamount);
         paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
 
         //更新账户资料金额
@@ -259,7 +260,8 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         for (Paybalancedet det:paybalancedet) {
             Bankinformation bankinformation = new Bankinformation();
             Bankinformation nowBankInformation = paybalanceMapper.selectBankInformationByPrimaryKey(det.getPd_bankid());
-            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()-det.getPd_amount());
+            bankinformation.setBk_thisamount((nowBankInformation.getBk_thisamount() == null ? new Double(0) : nowBankInformation.getBk_thisamount())
+                    - (det.getPd_amount() == null ? new Double(0) : det.getPd_amount()));
             paybalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
         }
 
@@ -460,7 +462,9 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             banksubledger.setBl_manname(paybalance.getPb_manname());
             banksubledger.setBl_remark(paybalancedet.getPd_remark());
             banksubledger.setBl_orderamount(paybalancedet.getPd_amount() * -1);
-            if (banksubledgerMapper.selectCode(banksubledger.getBl_code()) == null){
+
+            List<String> bankList = banksubledgerMapper.selectCode(banksubledger.getBl_code());
+            if (bankList.size() == 0){
                 banksubledgerMapper.insertSelective(banksubledger);
             }else {
                 banksubledgerMapper.updateByPrimaryKeySelective(banksubledger);

+ 7 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -244,9 +244,9 @@ public class RecbalanceServiceImpl implements RecbalanceService {
 
         Customer customer = new Customer();
         customer.setId(Long.valueOf(String.valueOf(recbalance.getRb_custid())));
-        customer.setCu_preamount(preamount+amountTotal);
-        customer.setCu_recamount(recamount-amountTotal2);
-        customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-amountTotal2-preamount-amountTotal);
+        customer.setCu_preamount(preamount + amountTotal);
+        customer.setCu_recamount(recamount - amountTotal2);
+        customer.setCu_leftamount(beginapamount - beginprepayamount + recamount - amountTotal2 - preamount - amountTotal);
         recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
 
         //更新本次核销金额
@@ -276,8 +276,8 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         Double recamount = customerData.getCu_recamount()==null?new Double(0):customerData.getCu_recamount();
         Customer customer = new Customer();
         customer.setId(Long.valueOf(String.valueOf(rec.getRb_custid())));
-        customer.setCu_preamount(preamount-pay_preamount);
-        customer.setCu_recamount(recamount+pay_pbdamount);
+        customer.setCu_preamount(preamount - pay_preamount);
+        customer.setCu_recamount(recamount + pay_pbdamount);
         customer.setCu_leftamount(beginapamount-beginprepayamount+recamount+pay_pbdamount-preamount+pay_preamount);
         recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
 
@@ -286,7 +286,8 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         for (Recbalancedet det:recbalancedet) {
             Bankinformation bankinformation = new Bankinformation();
             Bankinformation nowBankInformation = recbalanceMapper.selectBankInformationByPrimaryKey(det.getRd_bankid());
-            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()-det.getRd_amount());
+            bankinformation.setBk_thisamount((nowBankInformation.getBk_thisamount() == null ? new Double(0) : nowBankInformation.getBk_thisamount()) -
+                    (det.getRd_amount() == null ? new Double(0) : det.getRd_amount()));
             recbalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
         }
 

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml

@@ -32,7 +32,7 @@
     select 
     <include refid="Base_Column_List" />
     from paybalancedet
-    where pd_pbid = #{id,jdbcType=INTEGER}
+    where pd_pbid = #{id,jdbcType=INTEGER} order by pd_id desc
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedet

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml

@@ -32,7 +32,7 @@
     select
     <include refid="Base_Column_List" />
     from paybalancedetail
-    where pbd_pbid = #{id,jdbcType=INTEGER}
+    where pbd_pbid = #{id,jdbcType=INTEGER} order by pbd_sldate desc
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedetail

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml

@@ -90,7 +90,7 @@
     select 
     <include refid="Base_Column_List" />
     from recbalancedet
-    where rd_rbid = #{id,jdbcType=INTEGER}
+    where rd_rbid = #{id,jdbcType=INTEGER} order by rd_id desc
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer">
     delete from recbalancedet

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml

@@ -36,7 +36,7 @@
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from recbalancedetail
-    where rbd_id = #{id,jdbcType=INTEGER}
+    where rbd_id = #{id,jdbcType=INTEGER} order by rbd_sldate desc
   </delete>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >

+ 16 - 1
frontend/saas-web/app/Application.scss

@@ -175,7 +175,22 @@ body.launching {
       color:#fff !important;
   }
 }
-
+.x-formpanel-btn-white {
+    border: 1px solid #c1c1c1 !important;
+    //border-radius: 2px;
+    box-shadow: 0 1px 1px rgba(0,0,0,.15);
+    /*background: #fff;
+    background: -moz-linear-gradient(top,#fff,#f4f4f4);
+    background: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f4f4f4));
+    background: -o-linear-gradient(top,#fff,#f4f4f4);
+    background: -ms-linear-gradient(top,#fff 0,#f4f4f4 100%);
+    background: linear-gradient(top,#fff,#f4f4f4); */
+    border-color: #fff;
+    background: linear-gradient(to bottom,#fff,#f4f4f4 100%) !important;
+    .x-btn-inner-default-toolbar-small{
+      color: #555;
+  }
+}
 .x-grid-body {
   border-width: 1px;
   border-color: #ABDAFF;

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

@@ -46,35 +46,37 @@ Ext.define('saas.view.core.form.FormPanel', {
         unAuditText: '未审核',
         auditBtnText: '审核',
         unAuditBtnText: '反审核',
+        messageLogText:'操作日志'
     },
-    buttons:[{
+    /* buttons:[{
         text:'操作日志',
+        bind: {
+            hidden: 'isNewPanle'
+        },
         handler:function(btn){
             var form = btn.up('form'),
             mlKeyvalue = form.viewModel.get(form._idField)||0,
             win = Ext.getCmp(form.xtype+mlKeyvalue);
-            if (!win) {
-                win = Ext.create('Ext.window.Window', {
+            if (!win&&mlKeyvalue!=0) {
+                var win = form.add(Ext.create('Ext.window.Window', {
                     modal: true,
                     id:form.xtype+mlKeyvalue,
-                    height: '80%',
+                    height: '60%',
                     width: '80%',
                     title: '操作日志('+form.viewModel.get(form._codeField)+')',
                     scrollable: true,
-                    //bodyPadding: 10,
                     constrain: true,
                     closable: true,
                     layout: 'fit',
-                    renderTo: Ext.getCmp('main-tab-panel').getActiveTab().down('form').getEl(),
                     items: [{
                         xtype: 'core-form-mseeageLog',
                         mlKeyvalue:mlKeyvalue
                     }]
-                });
+                }));
             };
             win.show();
         }
-    }],
+    }], */
     initComponent: function () {
         var me = this,
         auditTexts = me.auditTexts;
@@ -121,7 +123,14 @@ Ext.define('saas.view.core.form.FormPanel', {
                 hidden:'{!showAuditBtn}'
             },
             handler: "auditBtnClick",
-        }];
+        }, {
+            cls:'x-formpanel-btn-white',
+            text:'操作日志',
+            bind: {
+                hidden: '{!id}'
+            },
+            handler:"showMessageLog"
+        } ];
 
         Ext.apply(me, {
             dockedItems: [{

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

@@ -32,6 +32,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
     },
 
     initCopyData: function(formData) {
+        var me = this;
         var form = this.getView();
         var detailCount = form.detailCount;
         var main = formData.main;
@@ -67,6 +68,10 @@ Ext.define('saas.view.core.form.FormPanelController', {
             }
         }
 
+        return me.myInitCopyData(formData);;
+    },
+
+    myInitCopyData: function(formData) {
         return formData;
     },
     
@@ -291,7 +296,36 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var me = this,
         viewModel = me.getViewModel(),
         codeEditable = viewModel.get('base.codeEditable');
-
         viewModel.set('base.codeEditable', !codeEditable);
+    },
+    showMessageLog:function(btn){
+        var me = this,
+        form = me.getView(),
+        viewModel = me.getViewModel(),
+        mlKeyvalue = viewModel.get(form._idField),
+        win = Ext.getCmp(form.xtype+mlKeyvalue);
+        if (!win&&mlKeyvalue!=0) {
+            var win = form.add(Ext.create('Ext.window.Window', {
+                modal: true,
+                id:me.xtype+mlKeyvalue,
+                height: '60%',
+                width: '80%',
+                title: '操作日志('+viewModel.get(form._codeField)+')',
+                scrollable: true,
+                constrain: true,
+                closable: true,
+                layout: 'fit',
+                items: [{
+                    xtype: 'core-form-mseeageLog',
+                    mlKeyvalue:mlKeyvalue
+                }],
+                listeners:{
+                    'close':function(){
+                        btn.removeCls('x-btn-focus');
+                    }
+                }
+            }));
+        };
+        win.show();
     }
 });

+ 125 - 0
frontend/saas-web/app/view/core/form/field/Month.js

@@ -0,0 +1,125 @@
+/**
+ * Created by zhouy on 2018/11/12.
+ */
+Ext.define('saas.view.core.form.field.Month', {
+    extend:'Ext.form.field.Picker',
+    alias: 'widget.monthdatefield',
+    requires: ['Ext.picker.Month'],
+    format : "Ym",
+    disabledDaysText : "Disabled",
+    disabledDatesText : "Disabled",
+    triggerCls : Ext.baseCSSPrefix + 'form-date-trigger',
+    matchFieldWidth: false,
+    componentCls: Ext.baseCSSPrefix + 'form-field-date',
+    ariaRole: 'combobox',
+    validateOnFocusLeave: true,
+    hideOnSelect:true,
+    editable:false,
+    autoValue:true,
+    initComponent: function() {
+        var me = this,
+            isString = Ext.isString,
+            min, max;
+
+        min = me.minValue;
+        max = me.maxValue;
+        if(isString(min)){
+            me.minValue = me.parseDate(min);
+        }
+        if(isString(max)){
+            me.maxValue = me.parseDate(max);
+        }
+        me.disabledDatesRE = null;
+        if(Ext.isEmpty(me.value)){
+            me.value=me.getCurrentVal();
+        }
+        me.callParent();
+    },
+    createPicker: function() {
+        var me = this,
+            picker = me.monthPicker,
+            format = Ext.String.format;
+       return me.monthPicker=picker=new Ext.picker.Month({
+            id: me.id + '-picker',
+            pickerField: me,
+            floating: true,
+            preventRefocus: true,
+            value:me.getPickerValues(),
+            format: me.format,
+            ownerCmp: me,
+            listeners: {
+                scope:me,
+                cancelclick: me.onCancelClick,
+                okclick: me.onOkClick,
+                yeardblclick: me.onOkClick,
+                monthdblclick: me.onOkClick
+            },
+            keyNavConfig: {
+                esc: function() {
+                    me.inputEl.focus();
+                    me.collapse();
+                }
+            }
+        });
+    },
+    getActive: function(){
+        return this.activeDate || this.value;
+    },
+    onOkClick: function(picker, value) {
+        var me = this,
+            month = value[0],
+            year = value[1];
+        if (value.length == 2) {
+            month = month == null ? new Date().getMonth() : month;
+            month = Number(month) + 1;
+            month = month < 10 ? '0' + month : month;
+            year = year == null ? new Date().getFullYear() : year;
+            if (this.minValue) {
+                if (Number(year + '' + month) < this.minYearMonth) {
+                    return;
+                }
+            }
+            if (this.maxValue) {
+                if (Number(year + '' + month) > this.maxYearMonth) {
+                    return;
+                }
+            }
+            this.setValue(year + '' + month);
+        }
+        me.onSelect();
+    },
+    getCurrentVal:function(){
+        return Ext.Date.format(new Date(), this.format);
+    },
+    onCancelClick: function() {
+        this.onSelect();
+    },
+    getPickerValues:function() {
+        var val = this.value, year, month;
+        if (val && val.length == 6) {
+            year = Ext.Number.from(val.substring(0, 4), 0);
+            month = Ext.Number.from(val.substring(4, 6), 0);
+            month = month-1;
+        } else {
+            year = new Date().getFullYear();
+            month = new Date().getMonth();
+        }
+        return [month, year];
+    },
+    setValue: function (value) {
+        if (Ext.isEmpty(value)) {
+            value =this.getCurrentVal();
+        }
+        var f = value.match(/^(\d{4})(\d{2})$/);
+        if(f) {
+            var d = f[1] + '-' + f[2];
+            value = Ext.Date.format(new Date(d), this.format);
+        }
+        this.callParent([value]);
+        this.publishState('value', value);
+    },
+    onSelect: function() {
+        this.monthPicker.hide();
+    }
+
+});

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

@@ -28,18 +28,18 @@ Ext.define('saas.view.document.customer.FormPanel', {
         fieldLabel: 'id',
         allowBlank: true,
         columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'cu_name',
-        fieldLabel: '客户名称',
-        allowBlank: false,
-        columnWidth: 0.5
     },{
         xtype: 'textfield',
         name: 'cu_code',
         fieldLabel: '客户编号',
         allowBlank: false,
         columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'cu_name',
+        fieldLabel: '客户名称',
+        allowBlank: false,
+        columnWidth: 0.5
     },{
         editable:false,
         xtype : "remotecombo", 

+ 44 - 24
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -44,7 +44,6 @@ Ext.define('saas.view.document.product.BasePanel', {
     _formXtype:'document-product-formpanel',
     _title:'物料资料',
     _deleteUrl:'/api/document/product/delete/',
-    // _dataUrl:'http://192.168.253.31:9480/product/list',
     _batchOpenUrl:'/api/document/product/batchOpen',
     _batchCloseUrl:'/api/document/product/batchClose',
     _batchDeleteUrl:'/api/document/product/batchDelete',
@@ -62,32 +61,53 @@ Ext.define('saas.view.document.product.BasePanel', {
         },{
             text : "物料编号", 
             width : 200.0, 
-            dataIndex : "pr_code", 
-            xtype : "", 
-        }, 
-        {
+            dataIndex : "pr_code"
+        }, {
             text : "物料名称", 
             dataIndex : "pr_detail", 
-            width : 120.0, 
-            xtype : "", 
-        },
-        {
+            width : 120.0
+        }, {
+            text : "规格", 
+            dataIndex : "pr_spec"
+        }, {
+            text : "类型", 
+            dataIndex : "pr_kind"
+        }, {
+            text : "单位", 
+            dataIndex : "pr_unit"
+        }, {
+            text : "总库存数", 
+            dataIndex : "po_onhand",
+            xtype: 'numbercolumn'
+        }, {
+            text : "单位成本", 
+            dataIndex : "pr_standardprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "最新采购单价", 
+            dataIndex : "pr_purcprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "最新出库单价", 
+            dataIndex : "pr_saleprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "型号", 
+            dataIndex : "pr_orispeccode"
+        }, {
+            text : "品牌", 
+            dataIndex : "pr_brand"
+        }, {
+            text : "最小包装", 
+            dataIndex : "pr_zxbzs",
+            xtype: 'numbercolumn'
+        }, {
+            text : "L/T", 
+            dataIndex : "pr_leadtime",
+            xtype: 'numbercolumn'
+        }, {
             text : "状态", 
-            dataIndex : "pr_status", 
-            width : 120.0, 
-            xtype : ""
-        }, 
-        {
-            text : "状态码", 
-            dataIndex : "pr_statuscode", 
-            width : 0, 
-            xtype : ""
-        }, 
-        {
-            text : "物料种类", 
-            dataIndex : "pr_kind", 
-            width : 120.0, 
-            xtype : "",
+            dataIndex : "pr_status"
         }]
     },
 

+ 51 - 107
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -23,62 +23,51 @@ Ext.define('saas.view.document.product.FormPanel', {
 
     codeInHeader: false,
 
-
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
         fieldLabel: 'id',
-        allowBlank: true,
-        columnWidth: 0.25
+        allowBlank: true
     },{
         xtype: 'textfield',
         name: 'pr_code',
         fieldLabel: '物料编号',
-        allowBlank: false,
-        columnWidth: 0.25
+        allowBlank: false
     },{
         xtype: 'textfield',
         name: 'pr_detail',
         fieldLabel: '物料名称',
-        allowBlank: false,
-        columnWidth: 0.25
+        allowBlank: false
     },{
         xtype: 'hidden',
         name: 'pr_status',
-        fieldLabel: '状态',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '状态'
     },{
         xtype: 'hidden',
         name: 'pr_statuscode',
-        fieldLabel: '状态码',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '状态码'
     },{
         xtype: 'textfield',
         name: 'pr_spec',
         fieldLabel: '规格',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{  
+        allowBlank: false
+    },{
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/productunit/getCombo',
-        name : "pr_unit", 
-        fieldLabel : "单位", 
+        storeUrl:'/api/document/producttype/getCombo',
+        name : "pr_kind", 
+        fieldLabel : "类型", 
         allowBlank : false, 
-        columnWidth : 0.25,
-        editable:false,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料单位'
+                    title: '新增物料类型'
                 },
-                dataKind:'productunit',
-                belong:document.etc['productunit'],
+                dataKind:'productkind',
+                belong:document.etc['productkind'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -87,37 +76,25 @@ Ext.define('saas.view.document.product.FormPanel', {
             this.dialog.show();
         }
     },{
-        xtype : "dbfindtrigger",   
-        name : "pr_vendcode", 
-        bind : "{pr_vendcode}", 
-        fieldLabel : "供应商编号", 
-        allowBlank : true, 
-        columnWidth : 0.25, 
-    }, {
-        xtype : "textfield", 
-        name : "pr_vendname", 
-        bind : "{pr_vendname}", 
-        fieldLabel : "供应商名称", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        xtype: 'textfield',
+        name: 'pr_orispeccode',
+        fieldLabel: '型号'
     },{
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/producttype/getCombo',
-        name : "pr_kind", 
-        fieldLabel : "类型", 
-        allowBlank : false, 
-        columnWidth : 0.25,
+        storeUrl:'/api/document/productbrand/getCombo',
+        name : "pr_brand", 
+        fieldLabel : "品牌", 
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料类型'
+                    title: '新增物料品牌'
                 },
-                dataKind:'productkind',
-                belong:document.etc['productkind'],
+                dataKind:'productbrand',
+                belong:document.etc['productbrand'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -125,30 +102,24 @@ Ext.define('saas.view.document.product.FormPanel', {
             });
             this.dialog.show();
         }
-    },{
-        xtype: 'textfield',
-        name: 'pr_orispeccode',
-        fieldLabel: '型号',
-        allowBlank: true,
-        columnWidth: 0.25
-    },{
+    },{  
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/productbrand/getCombo',
-        name : "pr_brand", 
-        fieldLabel : "物料品牌", 
-        allowBlank : true, 
-        columnWidth : 0.25,
+        storeUrl:'/api/document/productunit/getCombo',
+        name : "pr_unit", 
+        fieldLabel : "单位", 
+        allowBlank : false, 
+        editable:false,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料品牌'
+                    title: '新增物料单位'
                 },
-                dataKind:'productbrand',
-                belong:document.etc['productbrand'],
+                dataKind:'productunit',
+                belong:document.etc['productunit'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -156,103 +127,76 @@ Ext.define('saas.view.document.product.FormPanel', {
             });
             this.dialog.show();
         }
-    },{
-        xtype : "hidden", 
-        name : "pr_vendid", 
-        bind : "{pr_vendid}", 
-        fieldLabel : "供应商ID", 
-        allowBlank : true, 
-        columnWidth : 0
     },{
         xtype : "hidden", 
         name : "pr_whid", 
-        bind : "{pr_whid}", 
-        fieldLabel : "仓库ID", 
-        allowBlank : true, 
-        columnWidth : 0
+        fieldLabel : "仓库ID"
     },{  
         xtype : "dbfindtrigger",     
         name : "pr_whcode", 
-        bind : "{pr_whcode}", 
         fieldLabel : "仓库编号", 
-        allowBlank : true, 
-        columnWidth : 0.25, 
     }, {
         xtype : "textfield", 
         name : "pr_whname", 
         fieldLabel : "仓库名称", 
         allowBlank : true, 
         columnWidth : 0.25
+    },{
+        xtype : "hidden", 
+        name : "pr_vendid", 
+        fieldLabel : "供应商ID", 
+        columnWidth : 0
+    },{
+        xtype : "dbfindtrigger",   
+        name : "pr_vendcode", 
+        fieldLabel : "供应商编号"
+    }, {
+        xtype : "textfield", 
+        name : "pr_vendname", 
+        fieldLabel : "供应商名称"
     },{
         xtype : "numberfield", 
-        bind : "{pr_standardprice}",
         name : "pr_standardprice", 
         fieldLabel : "标准单价", 
         allowBlank : true, 
         columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
-        bind : "{pr_purcprice}",
         name : "pr_purcprice", 
         fieldLabel : "最新采购单价", 
         allowBlank : true, 
         columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
         name : "pr_saleprice", 
         fieldLabel : "最新出货单价", 
-        allowBlank : true, 
-        columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         xtype : "numberfield", 
         name : "pr_zxbzs", 
         fieldLabel : "最小包装数", 
         minValue:0,
         decimalPrecision: 0,
-        allowBlank : true, 
-        columnWidth : 0.25
+        allowBlank : true
     },{  
         hidden:true,
         xtype : "datefield", 
         name : "createTime", 
-        fieldLabel : "创建时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        fieldLabel : "创建时间"
     },{  
         hidden:true,
         xtype : "datefield", 
         name : "updateTime", 
-        fieldLabel : "更新时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        fieldLabel : "更新时间"
     }],
 
     defaultButtons:[{

+ 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", 

+ 6 - 6
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -28,18 +28,18 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         fieldLabel: 'id',
         allowBlank: true,
         columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 've_name',
-        fieldLabel: '供应商名称',
-        allowBlank: false,
-        columnWidth: 0.5
     },{
         xtype: 'textfield',
         name: 've_code',
         fieldLabel: '供应商编号',
         allowBlank: false,
         columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 've_name',
+        fieldLabel: '供应商名称',
+        allowBlank: false,
+        columnWidth: 0.5
     },{
         xtype: 'hidden',
         name: 've_status',

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

@@ -56,6 +56,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
         xtype:'datefield',
         name : 'or_date',
         fieldLabel : '单据日期',
+        defaultValue: new Date(),
         allowBlank : false
     },{
         name : "detailGridField", 

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

@@ -56,6 +56,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
         xtype:'datefield',
         name : 'os_date',
         fieldLabel : '单据日期',
+        defaultValue: new Date(),
         allowBlank : false
     },{
         name : "detailGridField", 

+ 9 - 5
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -21,9 +21,9 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     _unAuditUrl: '/api/money/paybalance/unAudit/',
     _deleteUrl: '/api/money/paybalance/delete/',
 
-    _readUrl: 'http://192.168.253.35:8880/paybalance/read/',
+    // _readUrl: 'http://192.168.253.35:8880/paybalance/read/',
     // _saveUrl: 'http://192.168.253.129:8940/money/paybalance/save/',
-    _auditUrl: 'http://192.168.253.35:8880/paybalance/audit/',
+    // _auditUrl: 'http://192.168.253.35:8880/paybalance/audit/',
     // _unAuditUrl: 'http://192.168.253.35Pb_pdamount:8880/paybalance/unAudit/',
     // _deleteUrl: 'http://192.168.253.129:8940/money/paybalance/delete/',
     
@@ -64,6 +64,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "datefield",
         name: "pb_date",
         fieldLabel: "日期",
+        defaultValue: new Date(),
         allowBlank : false
     },{
         xtype: 'textfield',
@@ -85,7 +86,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     }, {
         xtype: 'numberfield',
         name: 'pb_discounts',
-        fieldLabel: '整单折扣'
+        fieldLabel: '整单折扣',
+        hidden: true
     }, {
         xtype: 'hidden',
         name: 'pb_havebalance',
@@ -244,7 +246,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "已核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_havebalance",
+            dataIndex: "sl_yamount",
+            ignore:true,
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2
@@ -265,7 +268,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_pbdamount",
+            dataIndex: "sl_namount",
+            ignore:true,
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2

+ 6 - 5
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -106,10 +106,10 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             to: 'pbd_amount'
                         },{
                             from: 'sl_yamount',
-                            to: 'pb_havebalance'
+                            to: 'sl_yamount'
                         },{
                             from: 'sl_namount',
-                            to: 'pb_pbdamount'
+                            to: 'sl_namount'
                         },{
                             from:'sl_date',
                             to:'pbd_sldate'
@@ -160,9 +160,9 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             align:'end'
                         }, {
                             "text": "已核销金额",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "sl_yamount",
-                            "width": 200,
+                            "width": 150,
                             xtype: 'numbercolumn',
                             align:'end',
                             "items": null
@@ -177,7 +177,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 150,
+                            "width": 120,
+                            xtype: 'datecolumn',
                             align:'end'
                         }]
                     });

+ 5 - 3
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -65,6 +65,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: "datefield",
         name: "rb_date",
         fieldLabel: "日期",
+        defaultValue: new Date(),
         allowBlank : false
     }, {
         xtype: "textfield",
@@ -78,7 +79,8 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
     }, {
         xtype: "numberfield",
         name: "rb_discounts",
-        fieldLabel: "整单折扣"
+        fieldLabel: "整单折扣",
+        hidden: true
     }, {
         xtype: 'numberfield',
         name: 'rb_preamount',
@@ -249,7 +251,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "已核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "rbd_havebalance",
+            dataIndex: "sl_yamount",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -266,7 +268,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "rbd_pbdamount",
+            dataIndex: "sl_namount",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');

+ 4 - 3
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -184,10 +184,10 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             to: 'rbd_amount'
                         },{
                             from: 'sl_yamount',
-                            to: 'rbd_havebalance'
+                            to: 'sl_yamount'
                         },{
                             from: 'sl_namount',
-                            to: 'rbd_pbdamount'
+                            to: 'sl_namount'
                         },{
                             from:'sl_date',
                             to:'rbd_sldate'
@@ -255,7 +255,8 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 150,
+                            "width": 120,
+                            xtype: 'datecolumn',
                             align:'end'
                         }]
                     });

+ 2 - 2
frontend/saas-web/app/view/money/report/AccountBalance.js

@@ -11,13 +11,13 @@ Ext.define('saas.view.money.report.AccountBalance', {
     listUrl: '/api/money/report/accountBalance',
     defaultCondition: null,
     reportTitle: '资金账户收支明细',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:账户、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'bankcode',
         fieldLabel: '账户名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'date',

+ 2 - 2
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -10,13 +10,13 @@ Ext.define('saas.view.money.report.PayDetail', {
     listUrl: '/api/money/report/payDetail',
     defaultCondition: null,
     reportTitle: '应付账款明细表',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'pb_date',

+ 2 - 2
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -11,13 +11,13 @@ Ext.define('saas.view.money.report.RecDetail', {
     listUrl: '/api/money/report/recDetail',
     defaultCondition: null,
     reportTitle: '应收账款明细',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:客户、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'pi_custname',
         fieldLabel: '客户名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'pb_date',

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

@@ -11,13 +11,13 @@ Ext.define('saas.view.money.report.VendorCheck', {
     listUrl: '/api/money/report/vendorCheck',
     defaultCondition: null,
     reportTitle: '供应商对账单',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'pi_date',

+ 2 - 2
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
         }, {
@@ -164,7 +164,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 120
         }, {
             text: '单据日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pu_date',
             xtype: 'datecolumn',
             width: 200
         }, {

+ 1 - 4
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -24,12 +24,9 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
         fieldLabel: '物料编号',
         columnWidth: 0.2
     }, {
-        //xtype: 'datefield',
-        xtype: 'textfield',
+        xtype: 'monthdatefield',
         name: 'pwm_yearmonth',
         fieldLabel: '单据日期',
-        format: 'YYYYMM',
-       // defaultValue: new Date(),
         columnWidth: 0.2
     }],
     reportColumns: [{