Эх сурвалжийг харах

客户采购单 价税合计自动计算

zhuth 6 жил өмнө
parent
commit
e4ec5a69f3

+ 15 - 0
frontend/saas-web/app/model/sale/b2b/PurchaseDetail.js

@@ -9,5 +9,20 @@ Ext.define('saas.model.sale.b2b.PurchaseDetail', {
         { name: 'sd_prodbrand', type: 'string' }, // 品牌
         { name: 'sd_orispeccode', type: 'string' }, // 型号
         { name: 'sd_prodspec', type: 'string' }, // 规格
+        { name: 'sd_custprodcode', type: 'string' }, // 客户料号
+        { name: 'sd_custorispeccode', type: 'string' }, // 客户型号
+        { name: 'sd_custprodspec', type: 'string' }, // 客户规格
+        { name: 'sd_qty', type: 'float' }, // 数量
+        { name: 'sd_produnit', type: 'string' }, // 单位
+        { name: 'sd_price', type: 'float' }, // 含税单价
+        { name: 'sd_taxrate', type: 'float' }, // 税率
+        { name: 'sd_total', type: 'float', // 价税合计
+            convert: function(v, rec) {
+                var t = rec.get('sd_price') * rec.get('sd_qty');
+                return Number(saas.util.BaseUtil.numberFormat(t, 4, false));
+            },
+            depends: ['sd_price', 'sd_qty'] },
+        { name: 'sd_delivery', type: 'string' }, // 交货日期
+        { name: 'sd_remark', type: 'string' }, // 备注
     ],
 });