FormPanel.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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 : "hidden"
  65. }, {
  66. text : "物料id",
  67. dataIndex : "pd_prodid",
  68. width : 0
  69. }, {
  70. text : "物料编号",
  71. width : 200.0,
  72. dataIndex : "pd_prodcode",
  73. xtype : "",
  74. items : null,
  75. editor : {
  76. displayField : "display",
  77. editable : true,
  78. format : "",
  79. hideTrigger : false,
  80. maxLength : 100.0,
  81. minValue : null,
  82. positiveNum : false,
  83. queryMode : "local",
  84. store : null,
  85. valueField : "value",
  86. xtype : "dbfindtrigger"
  87. }
  88. }, {
  89. text : "名称",
  90. dataIndex : "pr_detail",
  91. ignore:true,
  92. width : 150.0,
  93. renderer: function (v, m, r) {
  94. debugger;
  95. return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
  96. }
  97. },
  98. {
  99. text : "规格",
  100. dataIndex : "pr_spec",
  101. ignore:true,
  102. width : 150.0,
  103. renderer: function (v, m, r) {
  104. debugger;
  105. return r.data["product"]?r.data["product"][m.column.dataIndex]:v;
  106. }
  107. },
  108. {
  109. text : "出货数量",
  110. dataIndex : "pd_outqty",
  111. editor : {
  112. xtype : "numberfield"
  113. },
  114. width : 120.0,
  115. xtype : "numbercolumn",
  116. format:'0,000.00',
  117. items : null,
  118. summaryType: 'sum'
  119. }, {
  120. text : "仓库ID",
  121. dataIndex : "pd_whid",
  122. width : 0
  123. }, {
  124. text : "仓库",
  125. dataIndex : "pd_whcode",
  126. width :0
  127. }, {
  128. text : "仓库",
  129. dataIndex : "pd_whname",
  130. width : 120.0,
  131. items : null,
  132. editor : {
  133. displayField : "display",
  134. editable : true,
  135. format : "",
  136. hideTrigger : false,
  137. maxLength : 100.0,
  138. minValue : null,
  139. positiveNum : false,
  140. queryMode : "local",
  141. store : null,
  142. valueField : "value",
  143. xtype : "dbfindtrigger"
  144. }
  145. },
  146. {
  147. text : "单价",
  148. dataIndex : "pd_sendprice",
  149. editor : {
  150. xtype : "numberfield"
  151. },
  152. width : 120.0,
  153. xtype : "numbercolumn",
  154. items : null
  155. },
  156. {
  157. text : "金额",
  158. dataIndex : "pd_total",
  159. width : 120.0,
  160. xtype : "numbercolumn"
  161. }, {
  162. text : "税率",
  163. dataIndex : "pd_taxrate",
  164. width : 120.0,
  165. xtype : "numbercolumn",
  166. items : null
  167. },
  168. {
  169. text : "未税金额",
  170. dataIndex : "pd_nettotal",
  171. xtype : "numbercolumn"
  172. },
  173. {
  174. text : "销售单号",
  175. dataIndex : "pd_ordercode",
  176. width : 120.0
  177. },{
  178. text : "销售序号",
  179. dataIndex : "pd_orderdetno",
  180. xtype : "numbercolumn",
  181. flex:1
  182. }
  183. ]
  184. }, {
  185. xtype : "textfield",
  186. name : "pi_total",
  187. fieldLabel : "总额",
  188. readOnly: true
  189. }, {
  190. xtype : "textfield",
  191. name : "pi_recordman",
  192. fieldLabel : "录入人",
  193. readOnly:true
  194. }, {
  195. format : "Y-m-d",
  196. xtype : "datefield",
  197. name : "pi_recorddate",
  198. fieldLabel : "录入日期",
  199. readOnly:true
  200. }, {
  201. xtype : "textfield",
  202. name : "pi_auditman",
  203. fieldLabel : "审核人",
  204. readOnly:true
  205. }, {
  206. format : "Y-m-d",
  207. xtype : "datefield",
  208. name : "pi_auditdate",
  209. fieldLabel : "审核日期",
  210. readOnly:true
  211. }]
  212. });