AppropriationInOut.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Ext.define('saas.model.stock.AppropriationInOut', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'id', type: 'int' }, // id
  5. { name: 'pd_prodid', type: 'int' }, // 物料id
  6. { name: 'pd_prodcode', type: 'string' }, // 物料编号
  7. { name: 'pr_brand', type: 'string' }, // 品牌
  8. { name: 'pr_detail', type: 'string' }, // 名称
  9. { name: 'pr_orispeccode', type: 'string' }, // 型号
  10. { name: 'pr_spec', type: 'string' }, // 规格
  11. { name: 'pd_outqty', type: 'float' }, // 数量
  12. { name: 'pr_unit', type: 'string' }, // 单位
  13. { name: 'pd_netprice', type: 'float' }, // 单价
  14. { name: 'pd_orderprice', type: 'float', // 含税单价
  15. // convert: function(v, rec) {
  16. // var t = rec.get('pd_netprice') * (1 + rec.get('pd_taxrate') / 100);
  17. // return Number(saas.util.BaseUtil.numberFormat(t, 4, false));
  18. // },
  19. // depends: ['pd_netprice', 'pd_taxrate']
  20. },
  21. { name: 'pd_nettotal', type: 'float', // 金额
  22. // convert: function(v, rec) {
  23. // var t = rec.get('pd_netprice') * rec.get('pd_outqty');
  24. // return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  25. // },
  26. // depends: ['pd_netprice', 'pd_outqty']
  27. },
  28. { name: 'pd_taxrate', type: 'float' }, // 税率
  29. { name: 'pd_taxamount', type: 'float', // 税额
  30. // convert: function(v, rec) {
  31. // var t = rec.get('pd_ordertotal') - rec.get('pd_nettotal');
  32. // return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  33. // },
  34. // depends: ['pd_ordertotal', 'pd_nettotal']
  35. },
  36. { name: 'pd_ordertotal', type: 'float', // 价税合计
  37. // convert: function(v, rec) {
  38. // var t = rec.get('pd_orderprice') * rec.get('pd_outqty');
  39. // return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  40. // },
  41. // depends: ['pd_orderprice', 'pd_outqty']
  42. },
  43. { name: 'pd_whid', type: 'int' }, // 拨出仓库id
  44. { name: 'pd_whcode', type: 'string' }, // 拨出仓库编号
  45. { name: 'pd_whname', type: 'string' }, // 拨出仓库
  46. { name: 'pd_inwhid', type: 'int' }, // 拨入仓库id
  47. { name: 'pd_inwhcode', type: 'string' }, // 拨入仓库编号
  48. { name: 'pd_inwhname', type: 'string' }, // 拨入仓库
  49. { name: 'pd_ioid', type: 'int' }, // 验收明细id
  50. { name: 'iocode', type: 'string' }, // 验收单号
  51. { name: 'iodetno', type: 'int' }, // 验收序号
  52. { name: 'pd_remark', type: 'string' }, // 备注
  53. { name: 'pd_text1', type: 'string' },
  54. { name: 'pd_text2', type: 'string' },
  55. { name: 'pd_text3', type: 'string' },
  56. { name: 'pd_text4', type: 'string' },
  57. { name: 'pd_text5', type: 'string' }
  58. ],
  59. //一对一映射
  60. associations: [{ type: 'hasOne', model: 'saas.model.document.ProductDTO', associationKey: 'ProductDTO'}]
  61. });