Przeglądaj źródła

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

chenw 6 lat temu
rodzic
commit
b71057b713

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

@@ -70,6 +70,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_currency;
 
+    private Double pi_rate;
+
     private Integer pi_buyerid;
 
     private String pi_buyercode;

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

@@ -31,6 +31,7 @@
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pi_currency" jdbcType="VARCHAR" property="pi_currency" />
+    <result column="pi_rate" jdbcType="DOUBLE" property="pi_rate" />
     <result column="pi_buyerid" jdbcType="INTEGER" property="pi_buyerid" />
     <result column="pi_buyercode" jdbcType="VARCHAR" property="pi_buyercode" />
     <result column="pi_buyername" jdbcType="VARCHAR" property="pi_buyername" />
@@ -203,7 +204,7 @@
 
   <sql id="Prodinout_Column_List" >
     prodinout.pi_id pi_id,prodinout.pi_inoutno pi_inoutno,prodinout.pi_class pi_class,prodinout.pi_date pi_date,prodinout.pi_vendid pi_vendid,prodinout.pi_vendcode pi_vendcode,prodinout.pi_vendname pi_vendname,prodinout.pi_custid pi_custid,prodinout.pi_custcode pi_custcode,prodinout.pi_custname pi_custname,prodinout.pi_puid pi_puid,prodinout.pi_pucode pi_pucode,prodinout.pi_said pi_said,prodinout.pi_sacode pi_sacode,prodinout.pi_total pi_total,prodinout.pi_address pi_address,prodinout.pi_ioid pi_ioid,prodinout.pi_status pi_status,prodinout.pi_statuscode pi_statuscode,prodinout.pi_printstatus pi_printstatus,prodinout.pi_printstatuscode pi_printstatuscode,prodinout.companyid companyid,prodinout.updaterId updaterId,prodinout.updatetime updatetime,prodinout.pi_text1 pi_text1,prodinout.pi_text2 pi_text2,prodinout.pi_text3 pi_text3,prodinout.pi_text4 pi_text4,prodinout.pi_text5 pi_text5,prodinout.pi_nettotal pi_nettotal,prodinout.pi_auditdate pi_auditdate,prodinout.pi_auditman pi_auditman,prodinout.pi_remark pi_remark,
-prodinout.creatorName creatorName,prodinout.creatorId creatorId,prodinout.createTime createTime,prodinout.updaterName updaterName,prodinout.pi_macode pi_macode,prodinout.pi_maid pi_maid,prodinout.pi_prstatuscode pi_prstatuscode,prodinout.pi_prstatus pi_prstatus,prodinout.pi_iocode pi_iocode,prodinout.pi_currency pi_currency,
+prodinout.creatorName creatorName,prodinout.creatorId creatorId,prodinout.createTime createTime,prodinout.updaterName updaterName,prodinout.pi_macode pi_macode,prodinout.pi_maid pi_maid,prodinout.pi_prstatuscode pi_prstatuscode,prodinout.pi_prstatus pi_prstatus,prodinout.pi_iocode pi_iocode,prodinout.pi_currency pi_currency,pi_rate,
   </sql>
   <sql id="Prodiodetail_Column_List" >
     prodiodetail.pd_id pd_id,prodiodetail.pd_piid pd_piid,prodiodetail.pd_inoutno pd_inoutno,prodiodetail.pd_piclass pd_piclass,prodiodetail.pd_pdno pd_pdno,prodiodetail.pd_ordercode pd_ordercode,prodiodetail.pd_orderdetno pd_orderdetno,prodiodetail.pd_prodid pd_prodid,prodiodetail.pd_prodcode pd_prodcode,prodiodetail.pd_unit pd_unit,prodiodetail.pd_inqty pd_inqty,prodiodetail.pd_outqty pd_outqty,prodiodetail.pd_orderprice pd_orderprice,prodiodetail.pd_sendprice pd_sendprice,prodiodetail.pd_price pd_price,prodiodetail.pd_total pd_total,prodiodetail.pd_taxrate pd_taxrate,prodiodetail.pd_netprice pd_netprice,prodiodetail.pd_nettotal pd_nettotal,prodiodetail.pd_whid pd_whid,prodiodetail.pd_whcode pd_whcode,prodiodetail.pd_whname pd_whname,prodiodetail.pd_inwhid pd_inwhid,prodiodetail.pd_inwhcode pd_inwhcode,prodiodetail.pd_inwhname pd_inwhname,prodiodetail.pd_orderid pd_orderid,prodiodetail.pd_sdid pd_sdid,prodiodetail.pd_status pd_status,prodiodetail.pd_remark pd_remark,prodiodetail.pd_text1 pd_text1,prodiodetail.pd_text2 pd_text2,prodiodetail.pd_text3 pd_text3,

+ 1 - 1
frontend/saas-web/app/model/report/PayDetail.js

@@ -4,7 +4,7 @@ Ext.define('saas.model.report.PayDetail', {
     fields: [
         { name: 'pd_date', type: 'string' },
         { name: 'pd_code', type: 'string' },
-        { name: 'pd_kind', type: 'date' },
+        { name: 'pd_kind', type: 'string' },
         { name: 'pd_buyername', type: 'string' },
         { name: 'pd_currency', type: 'string' },
         { name: 'pd_addpay', type: 'float' },

+ 2 - 0
frontend/saas-web/app/util/FormUtil.js

@@ -11,6 +11,8 @@ Ext.define('saas.util.FormUtil', {
             let me = this,
             defaultItems = form.defaultItems;
 
+            // form.add(defaultItems);
+
             saas.util.ViewUtil.getViewConfig(form.viewName)
             .then(function(cfg) {
                 if(cfg) {

+ 1 - 1
frontend/saas-web/app/util/ViewUtil.js

@@ -15,7 +15,7 @@ Ext.define('saas.util.ViewUtil', {
                 url = me.getCfgUrl.replace(me.urlRe, '$1' + viewName);
             return saas.util.BaseUtil.request({
                     url,
-                    async: false
+                    async: true
                 })
                 .then(function (res) {
                     let cfg = me.decodeViewConfig(res.data);

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

@@ -50,7 +50,6 @@ Ext.define('saas.view.core.form.FormPanel', {
         auditTexts = me.auditTexts;
         me._deleteMsg = '删除的'+me._title+'将不能恢复,请确认是否删除?';
         me.initViewModel();
-        me.initFormItems();
 
         me.defaultBtns = me.defaultBtns || [{
             cls: 'x-formpanel-btn-blue',
@@ -144,6 +143,8 @@ Ext.define('saas.view.core.form.FormPanel', {
             },
         });
         me.callParent(arguments);
+
+        me.initFormItems();
     },
 
     initFormItems: function() {

+ 9 - 9
frontend/saas-web/app/view/document/customer/FormController.js

@@ -18,15 +18,15 @@ Ext.define('saas.view.document.customer.FormController', {
                     }) ;   
                 }
             },
-            // 'currencyDbfindTrigger[name=cu_currency]':{
-            //     beforerender:function(f){
-            //         Ext.apply(f,{
-            //             dbfinds:[{
-            //                 from:'cr_name',to:'cu_currency'
-            //             }],
-            //         }) ;   
-            //     }
-            // }
+             'currencyDbfindTrigger[name=cu_currency]':{
+                beforerender:function(f){
+                     Ext.apply(f,{
+                         dbfinds:[{
+                            from:'cr_name',to:'cu_currency'
+                         }],
+                    }) ;   
+                 }
+             }
         });
     },
 

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

@@ -132,33 +132,12 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 columnWidth: 0.25,
                 group: '交易信息',
             }, {
-                xtype: 'condbfindtrigger',
-                fieldLabel: '币别汇率',
+                xtype: 'currencyDbfindTrigger',
+                name: "cu_currency",
+                fieldLabel: '币别',
                 allowBlank: false,
-                dbType: 'currencyDbfindTrigger',
-                dbfinds: [{
-                    from: 'cr_name', to: 'cu_currency'
-                }, {
-                    from: 'cr_rate', to: 'cr_rate'
-                }],
-                defaultValue: {
-                    cu_currency: this.getViewModel().get('defaultCurrency'),
-                    cu_taxrate: 1
-                },
-                supFieldConfig: {
-                    xtype: 'numberfield',
-                    readOnly: false,
-                    ignore:true,
-                    defaultReadOnly: false,
-                    decimalPrecision: 6,
-                    vtype: 'positiveNumber',
-                    listeners: {
-                        change: function(f, v) {
-                            var defaultCurrency = Ext.getCmp('mainView').getViewModel().get('defaultCurrency');
-                            f.setReadOnly(f.ownerCt.items.items[0].value == defaultCurrency);
-                        }
-                    }
-                },
+                columnWidth: 0.25,
+                defaultValue:  this.getViewModel().get('defaultCurrency') ,
                 group: '交易信息',
             }, {
                 xtype: "numberfield",

+ 9 - 9
frontend/saas-web/app/view/document/vendor/FormController.js

@@ -19,15 +19,15 @@ Ext.define('saas.view.document.vendor.FormController', {
 
                 }
             },
-            // 'currencyDbfindTrigger[name=ve_currency]':{
-            //     beforerender:function(f){
-            //         Ext.apply(f,{
-            //             dbfinds:[{
-            //                 from:'cr_name',to:'ve_currency'
-            //             }],
-            //         }) ;   
-            //     }
-            // }
+            'currencyDbfindTrigger[name=ve_currency]':{
+                 beforerender:function(f){
+                     Ext.apply(f,{
+                        dbfinds: [{
+                            from: 'cr_name', to: 've_currency'
+                        }]
+                     }) ;   
+                 }
+            }
         });
 
     },

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

@@ -138,33 +138,12 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 columnWidth: 0.25,
                 group: '交易信息',
             }, {
-                xtype: 'condbfindtrigger',
-                fieldLabel: '币别汇率',
+                xtype: 'currencyDbfindTrigger',
+                name: "ve_currency",
+                fieldLabel: '币别',
                 allowBlank: false,
-                dbType: 'currencyDbfindTrigger',
-                dbfinds: [{
-                    from: 'cr_name', to: 've_currency'
-                }, {
-                    from: 'cr_rate', to: 'cr_rate'
-                }],
-                defaultValue: {
-                    ve_currency: this.getViewModel().get('defaultCurrency'),
-                    ve_taxrate: 1
-                },
-                supFieldConfig: {
-                    xtype: 'numberfield',
-                    readOnly: false,
-                    ignore:true,
-                    defaultReadOnly: false,
-                    decimalPrecision: 6,
-                    vtype: 'positiveNumber',
-                    listeners: {
-                        change: function(f, v) {
-                            var defaultCurrency = Ext.getCmp('mainView').getViewModel().get('defaultCurrency');
-                            f.setReadOnly(f.ownerCt.items.items[0].value == defaultCurrency);
-                        }
-                    }
-                },
+                columnWidth: 0.25,
+                defaultValue:  this.getViewModel().get('defaultCurrency') ,
                 group: '交易信息',
             }, {
                 xtype: "numberfield",

+ 9 - 8
frontend/saas-web/app/view/main/Navigation.js

@@ -28,15 +28,16 @@ Ext.define('saas.view.main.Navigation', {
             }),
             tpl: new Ext.XTemplate('<ul class="x-navlist">',
                 '<tpl for=".">',
-                '<li class="x-navitem">',
-                '<div class="x-navitem-body">',
-                '<div class="nav-inner-wrap" style="margin-left: 0px;">',
-                '<div class="nav-inner-icon {iconCls}"></div>',
-                '<div class="nav-inner-text">{text}</div>',
-                '</div>',
-                '</li>',
+                    '<li class="x-navitem">',
+                        '<div class="x-navitem-body">',
+                            '<div class="nav-inner-wrap" style="margin-left: 0px;">',
+                                '<div class="nav-inner-icon {iconCls}"></div>',
+                                '<div class="nav-inner-text">{text}</div>',
+                            '</div>',
+                        '</div>',
+                    '</li>',
                 '</tpl>',
-                '</ul>'),
+            '</ul>'),
             trackOver: true,
             overItemCls: 'x-navitem-over',
             selectedItemCls: 'x-navitem-selected',

+ 6 - 23
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -99,13 +99,14 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
                 }, {
                     text: "转出币别",
                     dataIndex: "ftd_currency",
-                    align:'center'
+                    align:'center',
+                    width: 80
                 }, {
                     text: "转出金额(元)",
                     xtype: 'numbercolumn',
                     dataIndex: "ftd_nowbalance",
                     allowBlank: false,
-                    width: 150.0,
+                    width: 110.0,
                     editor: {
                         xtype: "numberfield",
                         decimalPrecision: 2
@@ -124,13 +125,14 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
                 }, {
                     text: "转入币别",
                     dataIndex: "ftd_incurrency",
-                    align:'center'
+                    align:'center',
+                    width: 80
                 }, {
                     text: "转入金额(元)",
                     xtype: 'numbercolumn',
                     dataIndex: "ftd_innowbalance",
                     allowBlank: false,
-                    width: 150.0,
+                    width: 110.0,
                     editor: {
                         xtype: "numberfield",
                         decimalPrecision: 2
@@ -142,25 +144,6 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
                     summaryRenderer: function(v, d, f, m) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
-                },{
-                    text: '转存汇率',
-                    xtype: 'numbercolumn',
-                    dataIndex: 'ftd_rate',
-                    width: 110,
-                    renderer: function(v, m, r) {
-                        return saas.util.BaseUtil.numberFormat(v, 6, true);
-                    },
-                }, {
-                    text: "结算号",
-                    dataIndex: "ftd_paycode",
-                    width: 150,
-                    editor: {
-                        xtype: ''
-                    }
-                },{
-                    text: '结算方式',
-                    dataIndex: 'ftd_paymethod',
-                    width: 150
                 },  {
                     text: '审核状态',
                     dataIndex: 'ft_status',

+ 52 - 20
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -39,28 +39,60 @@ Ext.define('saas.view.money.verification.FormPanel', {
         me.defaultItems = Ext.Array.clone(defaultItems);
         me.detailCount = 0;
 
+        me.setLoading(true);
         saas.util.ViewUtil.getViewConfig(me.viewName)
-            .then(function (cfg) {
-                let items = defaultItems || [];
-
-                me.cusCfg = cfg;
-
-                items = FormUtil.initItems(items);
-                items = FormUtil.applyCusMainItemConfig(items, cfg);
-                items = FormUtil.applyCusDetailItemConfig(items, cfg);
-
-                me.configItems = items;
-
-                items = FormUtil.applyDefaultItems(me, items);
-                me.removeAll();
-                return me.addItems(items);
-            })
-            .then(function (items) {
-                me.fireEvent('afterSetItems', me, items);
-            })
-            .then(function () {
+        .then(function (cfg) {
+            me.setLoading(false);
+            let items = defaultItems || [];
+
+            me.cusCfg = cfg;
+
+            items = FormUtil.initItems(items);
+            items = FormUtil.applyCusMainItemConfig(items, cfg);
+            items = FormUtil.applyCusDetailItemConfig(items, cfg);
+
+            me.configItems = items;
+
+            items = FormUtil.applyDefaultItems(me, items);
+            me.removeAll();
+            return me.addItems(items);
+        })
+        .then(function (items) {
+            me.fireEvent('afterSetItems', me, items);
+        })
+        .then(function () {
+            if(!me._loaded) {
+                me._loaded = true;
                 FormUtil.loadData(me);
-            })
+            }else {
+                let viewModel = me.getViewModel();
+                let code = viewModel.get(me._codeField);
+                let detailGrids = me.query('detailGridField');
+
+                let o = {};
+                o[me._codeField] = code;
+
+                let formData = {main: {}};
+                Ext.apply(formData.main, o);
+                Ext.Array.each(detailGrids, function(grid, index) {
+                    let detno = 0;
+                    let detnoColumn = grid.detnoColumn;
+                    let datas = [];
+                    let emptyRows = grid.emptyRows;
+                    
+                    Ext.Array.each(new Array(emptyRows), function() {
+                        detno += 1;
+                        let data = {};
+                        data[detnoColumn] = detno;
+                        datas.push(data);
+                    })
+                    formData['detail' + index] = datas;
+                });
+
+                me.initFormData(formData);
+                me.fireEvent('load', me, formData);
+            }
+        })
     },
 
     getAcitveItems: function () {

+ 12 - 0
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -300,6 +300,18 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
+        vc_kind = viewModel.get('vc_kind');
+        //应收转应收 receivable_to_receivable 客户一致时提示 “保存失败: 转出客户与转入客户相同”
+        if(vc_kind === 'receivable_to_receivable' && (viewModel.get('vc_custid') === viewModel.get('vc_turncustid') )){
+            saas.util.BaseUtil.showErrorToast("保存失败: 转出客户与转入客户相同");
+            return false;
+        }
+        //应付转应付 payable_to_payable 供应商一致时提示 “保存失败: 转出供应商与转入供应商相同”
+        if(vc_kind === 'payable_to_payable' && (viewModel.get('vc_vendid') === viewModel.get('vc_turnvendid') )){
+            saas.util.BaseUtil.showErrorToast("保存失败: 转出客户与转入客户相同");
+            return false;
+        }
+
         var sum_detail1 = store1.sum('vd_nowbalance'); // 从表1核销合计
         var sum_detail2 = store2.sum('vcd_nowbalance'); // 从表2核销合计
 

+ 35 - 57
frontend/saas-web/app/view/sale/b2b/Business.js

@@ -123,67 +123,47 @@ Ext.define('saas.view.sale.b2b.Business', {
                     text: '发布时间',
                     xtype: 'datecolumn',
                     dataIndex: 'startDate',
-                    format: 'Y-m-d H:i:s'
+                    format: 'Y-m-d H:i:s',
+                    width: 150
                 }, {
                     text: '截止时间',
                     xtype: 'datecolumn',
-                    dataIndex: 'endDate'
+                    dataIndex: 'endDate',
+                    format: 'Y-m-d H:i:s',
+                    width: 150
                 }, {
-                    text: '操作',
+                    text: '报价状态',
                     dataIndex: 'quoted',
+                    textAlign: 'center',
                     renderer:function(val, meta, record,x,y,store, view){
-                        if(val == 0){
-                            return '<a style="color: #35BAF6; cursor: pointer;">点击报价</a>';
-                        }
-                        var id = record.id;
-                        var grid = view.up('grid');
-                        
-                        if(!view.tip) {
-                            view.tip = Ext.create('Ext.tip.ToolTip', {
-                                hidden: true,
-                                target: view.el,
-                                delegate: '.x-grid-cell-'+meta.column.id,
-                                trackMouse: true,
-                                renderTo: Ext.getBody(),	
-                                maxWidth :830,
-                                layout:'anchor',
-                                listeners: {								          
-                                    beforeshow: function updateTipBody(tip) {
-                                        var dg = Ext.getCmp('grid-'+id);
-                                        var record = grid.focusRecord;
-                                        if(record.data.qutations.agreed) {
-                                            this.setHtml(null);
-                                            var replies = record.data.qutations.replies;
-                                            dg.store.loadData(replies);
-                                            dg.show();
-                                        }else {
-                                            dg.hide();
-                                            this.setHtml(record.data.qutations.refusereason || '无');
-                                        }
-                                    }
-                                },
-                                items : [Ext.create('Ext.grid.Panel', {
-                                    id: 'grid-'+id,
-                                    frame:true,
-                                    anchor: '100% 100%',
-                                    width:205,
-                                    store:[],
-                                    columns: [{
-                                        text: '分段数量',
-                                        dataIndex: 'lapQty',
-                                        width: 110
-                                    }, {
-                                        text: '分段价格',
-                                        dataIndex: 'price',
-                                        width: 90
-                                    }]
-                                })]
-                            });
+                        if(val == 0) {
+                            return '<div style="text-align: center;color: #35BAF6;">未报价</div>';
+                        }else {
+                            var qutations = record.data.qutations;
+                            if(qutations.agreed == null) {
+                                return '<div style="text-align: center;color: #FBBC05;">已报价</div>';
+                            }else if(qutations.agreed == 1){
+                                return '<div style="text-align: center;color: green;">被采纳</div>';
+                            }else if(qutations.agreed == 0) {
+                                return '<div style="text-align: center;color:#ff6c00;">被拒绝</div>';
+                            }
                         }
-                        if(record.data.qutations.agreed) {
-                            return '<div style="text-align: center;color: green;">查看报价信息</div>';
+                    }
+                }, {
+                    text: '操作',
+                    dataIndex: 'quoted',
+                    renderer:function(val, meta, record,x,y,store, view){
+                        if(val == 0) {
+                            return '<div style="text-align: center;color: #35BAF6;cursor: pointer;">点击报价</div>';
                         }else {
-                            return '<div style="text-align: center;color:#ff6c00;">查看拒绝理由</div>';
+                            var qutations = record.data.qutations;
+                            if(qutations.agreed == null) {
+                                return '<div style="text-align: center;color: #FBBC05;cursor: pointer;">查看报价信息</div>';
+                            }else if(qutations.agreed == 1){
+                                return '<div style="text-align: center;color: green;cursor: pointer;">查看报价信息</div>';
+                            }else if(qutations.agreed == 0) {
+                                return '<div style="text-align: center;color:#ff6c00;">查看报价信息</div>';
+                            }
                         }
                     },
                     listeners: {
@@ -191,10 +171,8 @@ Ext.define('saas.view.sale.b2b.Business', {
                             var dataIndex = this.dataIndex;
                             var record = tableView.store.getAt(rowIdx);
                             var value = record.get(dataIndex);
-                            
-                            if(value == '0') {
-                                me.getController().showQuoteWin(record);
-                            }
+
+                            me.getController().showQuoteWin(record, !!value);
                         },
                     }
                 }],

+ 5 - 2
frontend/saas-web/app/view/sale/b2b/BusinessController.js

@@ -2,15 +2,18 @@ Ext.define('saas.view.sale.b2b.BusinessController', {
     extend: 'saas.view.core.base.BasePanelController',
     alias: 'controller.sale-b2b-business',
 
-    showQuoteWin: function(record) {
+    showQuoteWin: function(record, quoted) {
         var me = this,
         view = me.getView();
 
         var win = Ext.getCmp();
         if(!win) {
             win = Ext.create('saas.view.sale.b2b.QuoteWin', {
+                width: view.getBox().width * 0.8,
+                height: view.getBox().height * 0.8,
                 record: record,
-                listView: view
+                listView: view,
+                quoted: quoted
             });
             view.add(win);
         }

+ 44 - 6
frontend/saas-web/app/view/sale/b2b/QuoteWin.js

@@ -3,7 +3,9 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
     xtype: 'quotewin',
 
     title: '报价信息',
-    width: 600,
+    width: '800',
+    height: '400',
+    scrollable: true,
     cls: 'x-window-dbfind',
     closlayout: 'fit',
     modal: true,
@@ -12,6 +14,7 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
     initComponent: function () {
         var me = this;
         var record = me.record;
+        var quoted = me.quoted;
         Ext.apply(me, {
             items: [{
                 xtype: 'form',
@@ -20,7 +23,7 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                     margin: '0 0 10 0',
                     labelAlign: 'right',
                     labelWidth: 90,
-                    columnWidth: 0.5,
+                    columnWidth: 0.25,
                 },
                 isValid: function (values) {
                     var leadtimeField = this.getForm().findField('leadtime');
@@ -91,7 +94,7 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                             name: 'no',
                             type: 'int'
                         }, {
-                            name: 'step',
+                            name: 'lapQty',
                             type: 'int'
                         }, {
                             name: 'price',
@@ -101,7 +104,7 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                     }),
                     columns: [{
                         text: '梯度',
-                        dataIndex: 'step',
+                        dataIndex: 'lapQty',
                         xtype: 'numbercolumn',
                         editor: {
                             xtype: "numberfield",
@@ -124,12 +127,22 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
                             return saas.util.BaseUtil.numberFormat(v, 4, true);
                         },
                     }]
+                }, {
+                    xtype: 'textfield',
+                    name: 'message',
+                    columnWidth: 1,
+                    fieldLabel: '回复信息',
+                    hidden: true
                 }]
             }],
             buttonAlign: 'center',
             buttons: [{
-                text: '确定',
+                text: quoted && record.get('qutations') && record.get('qutations').agreed == 0 ? '重新发起报价' : '确定',
                 handler: function () {
+                    if(quoted && record.get('qutations') && record.get('qutations').agreed != 0) {
+                        me.close();
+                        return;
+                    }
                     var win = this.up('window'),
                         form = win.down('form'),
                         grid = form.down('grid');
@@ -155,6 +168,31 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
         me.callParent(arguments);
     },
 
+    listeners: {
+        afterrender: function() {
+            var me = this,
+            form = me.down('form'),
+            leadtimeField = form.getForm().findField('leadtime'),
+            taxrateField = form.getForm().findField('taxrate'),
+            messageField = form.getForm().findField('message'),
+            grid = form.down('grid'),
+            store = grid.store,
+            record = me.record,
+            qutations = record.get('qutations'),
+            quoted = me.quoted;
+
+            if(quoted) {
+                leadtimeField.setValue(qutations.leadTime);
+                taxrateField.setValue(qutations.taxRate);
+                store.loadData(qutations.replies || []);
+                if(qutations.agreed == 0) {
+                    messageField.setValue(qutations.refusereason);
+                    messageField.setVisible(true);
+                }
+            }
+        }
+    },
+
     onQuote: function (values) {
         var view = this;
         var params = {
@@ -173,7 +211,7 @@ Ext.define('saas.view.sale.b2b.QuoteWin', {
             leadtime: values.leadtime, // 交期
             replies: values.detail.map(function(d) {
                 return {
-                    lapQty: d.step,
+                    lapQty: d.lapQty,
                     price: d.price
                 }
             }), // 梯度价格,

+ 4 - 0
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -21,6 +21,10 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         }, {
                             from: 'ca_address',
                             to: 'pi_address'
+                        },{
+                            from:'cu_currency',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
                         }],
                     });
                 }

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

@@ -18,6 +18,10 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             from:'cu_name',to:'pi_custname'
                         },{
                             from:'ca_address',to:'pi_address'
+                        },{
+                            from:'cu_currency',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
                         }],
                     }) ;   
                 }

+ 4 - 7
frontend/saas-web/app/view/stock/report/DataList.js

@@ -11,25 +11,22 @@ Ext.define('saas.view.stock.report.DataList', {
     listUrl: '/api/document/product/ReserveCost',
     defaultCondition: null,
     reportTitle: '物料库存数量金额表',
-    QueryWidth: 0.4,
+    QueryWidth: 0.65,
     printAble: false,
     exportAble: true,
     queryMode: 'MAIN',
 
     searchItems: [{
         xtype: 'productDbfindTrigger',
-        name: 'pr_code',
-        emptyText: '请输入物料编号、名称或规格',
+        name: 'pr_detail',
+        emptyText: '请输入物料编号或名称',
         columnWidth: 0.25
     }, {
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
         emptyText: '请输入仓库编号或名称',
         hidden:true,
-        columnWidth: 0.25,
-        getCondition: function (v) {
-            return "(upper(wh_code) like '%" + v.toUpperCase() + "%' or upper(wh_description) like '%" + v.toUpperCase() + "%')";
-        }
+        columnWidth: 0.25
     }, {
         xtype: 'checkboxfield',
         name: 'toggle',

+ 16 - 20
frontend/saas-web/app/view/stock/report/Prodiodetail.js

@@ -53,23 +53,13 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
         text: 'id',
         dataIndex: 'id',
         hidden: true
-    }, {
-        text: '单号',
-        dataIndex: 'pi_inoutno',
-        width: 150,
-        locked: true
-    },  {
-        text: '业务类型',
-        dataIndex: 'pi_class',
-        width: 100,
-        locked: true
-    }, {
+    },{
         text: '单据日期',
         dataIndex: 'pi_date',
         xtype: 'datecolumn',
         width: 110,
         locked: true
-    }, {
+    },  {
         text: '序号',
         dataIndex: 'pd_pdno',
         exportFormat: 'Integer',
@@ -80,6 +70,20 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
         renderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 0, false);
         }
+    }, {
+        text: '单号',
+        dataIndex: 'pi_inoutno',
+        width: 150,
+        locked: true
+    },  {
+        text: '业务类型',
+        dataIndex: 'pi_class',
+        width: 100,
+        locked: true
+    }, {
+        text: '往来单位',
+        dataIndex: 'bizname',
+        width: 200
     }, {
         text: '物料编号',
         dataIndex: 'pd_prodcode',
@@ -137,18 +141,10 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
         text: '仓库',
         dataIndex: 'pd_whname',
         width: 120
-    }, {
-        text: '往来单位',
-        dataIndex: 'bizname',
-        width: 200
     }, {
         text: '关联单号',
         dataIndex: 'pd_ordercode',
         width: 150
-    }, {
-        text: '物料类型',
-        dataIndex: 'pr_kind',
-        width: 100
     }, {
         text: '备注',
         dataIndex: 'pd_remark',