FormPanel.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. Ext.define('saas.view.sale.saleIn.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'sale-salein-formpanel',
  4. controller: 'sale-salein-formpanel',
  5. viewModel: 'sale-salein-formpanel',
  6. viewName: 'sale-salein-formpanel',
  7. caller:'SaleIn',
  8. //字段属性
  9. _title:'销售退货单',
  10. _idField: 'id',
  11. _codeField: 'pi_inoutno',
  12. _statusField: 'pi_status',
  13. _statusCodeField: 'pi_statuscode',
  14. _relationColumn: 'pd_piid',
  15. _readUrl:'/api/sale/prodinout/read/',
  16. _saveUrl:'/api/sale/prodinout/save/',
  17. _auditUrl:'/api/sale/prodinout/audit/',
  18. _unAuditUrl:'/api/sale/prodinout/unAudit/',
  19. _deleteUrl:'/api/sale/prodinout/delete/',
  20. _turnInUrl:'/api/sale/prodinout/turnProdIn/',
  21. initId:0,
  22. defaultItems: [{
  23. xtype: 'hidden',
  24. name: 'id',
  25. fieldLabel: 'id'
  26. }, {
  27. xtype : "textfield",
  28. name : "pi_class",
  29. fieldLabel : "单据类型",
  30. readOnly:true,
  31. allowBlank : false,
  32. defaultValue:'销售退货单'
  33. },{
  34. xtype : "hidden",
  35. name : "pi_custid",
  36. fieldLabel : "客户ID"
  37. },{
  38. xtype : "hidden",
  39. name : "pi_custcode",
  40. fieldLabel : "客户编号"
  41. }, {
  42. xtype : "dbfindtrigger",
  43. name : "pi_custname",
  44. fieldLabel : "客户名称"
  45. }, {
  46. xtype : "textfield",
  47. name : "pi_address",
  48. fieldLabel : "交货地址",
  49. columnWidth : 0.5
  50. }, {
  51. name : "detailGridField",
  52. xtype : "detailGridField",
  53. detnoColumn: 'pd_pdno',
  54. storeModel:'saas.model.sale.ProdIODetail',
  55. deleteDetailUrl:'/api/sale/prodinout/deleteDetail/',
  56. columns : [
  57. {
  58. text : "id",
  59. dataIndex : "id",
  60. xtype : "numbercolumn",
  61. width:0
  62. }, {
  63. text : "物料id",
  64. dataIndex : "pd_prodid",
  65. width :0
  66. }, {
  67. text : "物料编号",
  68. width : 200.0,
  69. dataIndex : "pd_prodcode",
  70. editor : {
  71. displayField : "display",
  72. editable : true,
  73. format : "",
  74. hideTrigger : false,
  75. maxLength : 100.0,
  76. minValue : null,
  77. positiveNum : false,
  78. queryMode : "local",
  79. store : null,
  80. valueField : "value",
  81. xtype : "multidbfindtrigger"
  82. }
  83. }, {
  84. text : "名称",
  85. dataIndex : "pr_detail",
  86. ignore:true,
  87. width : 150.0,
  88. renderer: function (v, m, r) {
  89. return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
  90. }
  91. }, {
  92. text : "规格",
  93. dataIndex : "pr_spec",
  94. ignore:true,
  95. width : 150.0,
  96. renderer: function (v, m, r) {
  97. return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
  98. }
  99. }, {
  100. text : "数量",
  101. dataIndex : "pd_inqty",
  102. editor : {
  103. xtype : "numberfield"
  104. },
  105. width : 120.0,
  106. xtype : "numbercolumn",
  107. format:'0',
  108. summaryType: 'sum'
  109. }, {
  110. text : "仓库",
  111. dataIndex : "pd_whname",
  112. width : 120.0,
  113. editor : {
  114. displayField : "display",
  115. editable : true,
  116. format : "",
  117. hideTrigger : false,
  118. maxLength : 100.0,
  119. minValue : null,
  120. positiveNum : false,
  121. queryMode : "local",
  122. store : null,
  123. valueField : "value",
  124. xtype : "dbfindtrigger"
  125. }
  126. },
  127. {
  128. text : "单价",
  129. dataIndex : "pd_sendprice",
  130. width : 120.0,
  131. editor : {
  132. xtype : "numberfield"
  133. },
  134. xtype : "numbercolumn",
  135. },
  136. {
  137. text : "含税金额",
  138. dataIndex : "pd_total",
  139. width : 120.0,
  140. xtype : "numbercolumn"
  141. }, {
  142. text : "税率",
  143. dataIndex : "pd_taxrate",
  144. width : 120.0,
  145. editor : {
  146. xtype : "numberfield"
  147. },
  148. xtype : "numbercolumn",
  149. items : null
  150. },
  151. {
  152. text : "未税金额",
  153. dataIndex : "pd_nettotal",
  154. xtype : "numbercolumn"
  155. },
  156. {
  157. text : "销售订单明细id",
  158. dataIndex : "pd_sdid",
  159. width : 120.0,
  160. hidden:true
  161. },
  162. {
  163. text : "销售单号",
  164. dataIndex : "pd_ordercode",
  165. width : 120.0
  166. },{
  167. text : "销售序号",
  168. dataIndex : "pd_orderdetno",
  169. xtype : "numbercolumn",
  170. flex:1
  171. }
  172. ]
  173. }, {
  174. xtype : "textfield",
  175. name : "pi_total",
  176. fieldLabel : "总额",
  177. readOnly: true
  178. }, {
  179. xtype : "textfield",
  180. name : "pi_recordman",
  181. fieldLabel : "录入人",
  182. readOnly:true
  183. }, {
  184. format : "Y-m-d",
  185. xtype : "datefield",
  186. name : "pi_recorddate",
  187. fieldLabel : "录入日期",
  188. readOnly:true
  189. }, {
  190. xtype : "textfield",
  191. name : "pi_auditman",
  192. fieldLabel : "审核人",
  193. readOnly:true
  194. }, {
  195. format : "Y-m-d",
  196. xtype : "datefield",
  197. name : "pi_auditdate",
  198. fieldLabel : "审核日期",
  199. readOnly:true
  200. }]
  201. });