ConditionForm.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Ext.define('trade.view.make.intellpurc.ConditionForm', {
  2. extend: 'Ext.form.Panel',
  3. xtype: 'purchase-intellpurc-conditionform',
  4. initComponent: function () {
  5. var me = this;
  6. Ext.apply(me, {
  7. bodyPadding: '8 12 8 12',
  8. layout: 'column',
  9. items: [{
  10. xtype: 'radiogroup',
  11. name: 'mergeSetting',
  12. fieldLabel: '合并采购设置',
  13. simpleValue: true,
  14. columnWidth: 0.5,
  15. items: [
  16. { boxLabel: '不合并', inputValue: '1', checked: true },
  17. { boxLabel: '全部合并', inputValue: '2' },
  18. { boxLabel: '按天数合并', inputValue: '3' }
  19. ],
  20. listeners: {
  21. change: function (r, newValue, oldValue) {
  22. if (newValue == '3') {
  23. this.ownerCt.down('[name="mergeNum"]').setHidden(false);
  24. } else {
  25. this.ownerCt.down('[name="mergeNum"]').setHidden(true);
  26. }
  27. }
  28. }
  29. }, {
  30. xtype: 'textfield',
  31. name: 'mergeNum',
  32. columnWidth: 0.2,
  33. fieldLabel: '合并天数',
  34. hidden: true
  35. }, {
  36. xtype: 'displayfield',
  37. columnWidth: 0.3
  38. }, {
  39. xtype: 'checkbox',
  40. boxLabel: '安全库存纳入需求',
  41. name: 'saleStore',
  42. inputValue: '1',
  43. checked: true,
  44. columnWidth: 0.25
  45. }, {
  46. xtype: 'checkbox',
  47. boxLabel: '最小包装采购',
  48. name: 'minPacking',
  49. inputValue: '1',
  50. checked: true,
  51. columnWidth: 0.25
  52. }]
  53. })
  54. me.callParent(arguments);
  55. },
  56. });