FormPanel.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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 : "dbfindtrigger"
  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_yqty",
  112. width : 120.0,
  113. xtype : "numbercolumn",
  114. format:'0',
  115. summaryType: 'sum'
  116. },
  117. {
  118. text : "仓库",
  119. dataIndex : "pd_whname",
  120. width : 120.0,
  121. editor : {
  122. displayField : "display",
  123. editable : true,
  124. format : "",
  125. hideTrigger : false,
  126. maxLength : 100.0,
  127. minValue : null,
  128. positiveNum : false,
  129. queryMode : "local",
  130. store : null,
  131. valueField : "value",
  132. xtype : "dbfindtrigger"
  133. }
  134. },
  135. {
  136. text : "单价",
  137. dataIndex : "pd_sendprice",
  138. width : 120.0,
  139. editor : {
  140. xtype : "numberfield"
  141. },
  142. xtype : "numbercolumn",
  143. },
  144. {
  145. text : "含税金额",
  146. dataIndex : "pd_total",
  147. width : 120.0,
  148. xtype : "numbercolumn"
  149. }, {
  150. text : "税率",
  151. dataIndex : "pd_taxrate",
  152. width : 120.0,
  153. editor : {
  154. xtype : "numberfield"
  155. },
  156. xtype : "numbercolumn",
  157. items : null
  158. },
  159. {
  160. text : "未税金额",
  161. dataIndex : "pd_nettotal",
  162. xtype : "numbercolumn"
  163. },
  164. {
  165. text : "销售订单明细id",
  166. dataIndex : "pd_sdid",
  167. width : 120.0,
  168. hidden:true
  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 : "createTime",
  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. });