FormPanel.js 6.3 KB

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