FormPanel.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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. allowBlank:false
  34. },{
  35. xtype : "hidden",
  36. name : "pi_custid",
  37. fieldLabel : "客户ID"
  38. },{
  39. xtype : "hidden",
  40. name : "pi_custcode",
  41. fieldLabel : "客户编号"
  42. }, {
  43. xtype : "dbfindtrigger",
  44. name : "pi_custname",
  45. fieldLabel : "客户名称",
  46. allowBlank:false,
  47. }, {
  48. xtype : "textfield",
  49. name : "pi_address",
  50. fieldLabel : "交货地址",
  51. columnWidth : 0.5
  52. }, {
  53. name : "detailGridField",
  54. xtype : "detailGridField",
  55. detnoColumn: 'pd_pdno',
  56. storeModel:'saas.model.sale.ProdIODetail',
  57. deleteDetailUrl:'/api/sale/prodinout/deleteDetail/',
  58. columns : [
  59. {
  60. text : "id",
  61. dataIndex : "id",
  62. xtype : "numbercolumn",
  63. width:0
  64. }, {
  65. text : "物料id",
  66. dataIndex : "pd_prodid",
  67. width :0
  68. }, {
  69. text : "物料编号",
  70. width : 200.0,
  71. dataIndex : "pd_prodcode",
  72. allowBlank:false,
  73. editor : {
  74. displayField : "display",
  75. editable : true,
  76. format : "",
  77. hideTrigger : false,
  78. maxLength : 100.0,
  79. minValue : null,
  80. positiveNum : false,
  81. queryMode : "local",
  82. store : null,
  83. valueField : "value",
  84. xtype : "multidbfindtrigger"
  85. }
  86. }, {
  87. text : "名称",
  88. dataIndex : "pr_detail",
  89. ignore:true,
  90. width : 150.0,
  91. renderer: function (v, m, r) {
  92. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  93. }
  94. }, {
  95. text : "规格",
  96. dataIndex : "pr_spec",
  97. ignore:true,
  98. width : 150.0,
  99. renderer: function (v, m, r) {
  100. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  101. }
  102. }, {
  103. text : "数量",
  104. dataIndex : "pd_inqty",
  105. allowBlank:false,
  106. editor : {
  107. xtype : "numberfield"
  108. },
  109. width : 120.0,
  110. xtype : "numbercolumn",
  111. format:'0',
  112. summaryType: 'sum'
  113. }, {
  114. text : "仓库ID",
  115. dataIndex : "pd_whid",
  116. width : 0
  117. }, {
  118. text : "仓库",
  119. dataIndex : "pd_whcode",
  120. width :0
  121. }, {
  122. text : "仓库",
  123. dataIndex : "pd_whname",
  124. allowBlank:false,
  125. width : 120.0,
  126. editor : {
  127. displayField : "display",
  128. editable : true,
  129. format : "",
  130. hideTrigger : false,
  131. maxLength : 100.0,
  132. minValue : null,
  133. positiveNum : false,
  134. queryMode : "local",
  135. store : null,
  136. valueField : "value",
  137. xtype : "dbfindtrigger"
  138. }
  139. },
  140. {
  141. text : "单价",
  142. dataIndex : "pd_sendprice",
  143. width : 120.0,
  144. editor : {
  145. xtype : "numberfield"
  146. },
  147. xtype : "numbercolumn",
  148. },
  149. {
  150. text : "含税金额",
  151. dataIndex : "pd_total",
  152. width : 120.0,
  153. xtype : "numbercolumn",
  154. summaryType: 'sum'
  155. }, {
  156. text : "税率",
  157. dataIndex : "pd_taxrate",
  158. width : 120.0,
  159. editor : {
  160. xtype : "numberfield"
  161. },
  162. xtype : "numbercolumn",
  163. items : null
  164. },
  165. {
  166. text : "未税金额",
  167. dataIndex : "pd_nettotal",
  168. xtype : "numbercolumn"
  169. },
  170. {
  171. text : "销售订单明细id",
  172. dataIndex : "pd_sdid",
  173. width : 120.0,
  174. hidden:true
  175. },
  176. {
  177. text : "销售单号",
  178. dataIndex : "pd_ordercode",
  179. width : 120.0
  180. },{
  181. text : "销售序号",
  182. dataIndex : "pd_orderdetno",
  183. xtype : "numbercolumn",
  184. flex:1
  185. }
  186. ]
  187. }, {
  188. xtype : "textfield",
  189. name : "pi_total",
  190. fieldLabel : "总额",
  191. readOnly: true
  192. }, {
  193. xtype : "textfield",
  194. name : "pi_recordman",
  195. fieldLabel : "录入人",
  196. readOnly:true
  197. }, {
  198. format : "Y-m-d",
  199. xtype : "datefield",
  200. name : "pi_recorddate",
  201. fieldLabel : "录入日期",
  202. readOnly:true
  203. }, {
  204. xtype : "textfield",
  205. name : "pi_auditman",
  206. fieldLabel : "审核人",
  207. readOnly:true
  208. }, {
  209. format : "Y-m-d",
  210. xtype : "datefield",
  211. name : "pi_auditdate",
  212. fieldLabel : "审核日期",
  213. readOnly:true
  214. }]
  215. });