dialogWarnShow80.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //包装单的分包数 预警
  2. define(function (require) {
  3. return function (context) {
  4. var $dlg, $form;
  5. return {
  6. xtype: 'dialog',
  7. dialogId: 'dialogSjShow80',
  8. title: '包装单数量',
  9. width: 360,
  10. height: 160,
  11. onOpen: function () {
  12. loadingMask: false,
  13. $dlg = $(this);
  14. },
  15. center: {
  16. items: {
  17. xtype: 'formgroup',
  18. onRender: function () {
  19. $form = $(this);
  20. },
  21. items: [[
  22. {
  23. label: '打包数量', name: 'num', labelWidth: 'auto', width: 280,
  24. },
  25. ]]
  26. }
  27. },
  28. buttons: [
  29. {
  30. text: "打印", iconCls: "fa fa-save", onClick: function () {
  31. if($form.formGet().num==null ||$form.formGet().num==undefined ||$form.formGet().num==''){
  32. return $.yvan.msg('请先选择打包数量');
  33. }
  34. $.yvan.ajax({
  35. method: 'post',
  36. url: api('/pdf/printWarnOrder80'),
  37. data: {
  38. batchId: context.batchId,
  39. num:$form.formGet().num,
  40. },
  41. success: function (data) {
  42. // alert(data.data);
  43. if (data.data != null && data.data != undefined && data.data != '') {
  44. console.log(data.data);
  45. callCsPrintHGZ(data.data);
  46. } else {
  47. $.yvan.msg("数据为空")
  48. }
  49. }
  50. });
  51. $dlg.dialog('close');
  52. }
  53. }, {
  54. text: "关闭", iconCls: "fa fa-times", onClick: function () {
  55. $dlg.dialog('close');
  56. }
  57. }
  58. ]
  59. };
  60. };
  61. });