FormPanel.js 6.6 KB

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