1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //包装单的分包数 预警
- define(function (require) {
- return function (context) {
- var $dlg, $form;
- return {
- xtype: 'dialog',
- dialogId: 'dialogSjShow105',
- title: '包装单数量',
- width: 360,
- height: 160,
- onOpen: function () {
- loadingMask: false,
- $dlg = $(this);
- },
- center: {
- items: {
- xtype: 'formgroup',
- onRender: function () {
- $form = $(this);
- },
- items: [[
- {
- label: '打包数量', name: 'num', labelWidth: 'auto', width: 280,
- },
- ]]
- }
- },
- buttons: [
- {
- text: "打印", iconCls: "fa fa-save", onClick: function () {
- if($form.formGet().num==null ||$form.formGet().num==undefined ||$form.formGet().num==''){
- return $.yvan.msg('请先选择打包数量');
- }
- $.yvan.ajax({
- method: 'post',
- url: api('/pdf/printWarnOrder105'),
- data: {
- batchId: context.batchId,
- num:$form.formGet().num,
- },
- success: function (data) {
- // alert(data.data);
- if (data.data != null && data.data != undefined && data.data != '') {
- console.log(data.data);
- callCsPrintHGZ(data.data);
- } else {
- $.yvan.msg("数据为空")
- }
- }
- });
- $dlg.dialog('close');
- }
- }, {
- text: "关闭", iconCls: "fa fa-times", onClick: function () {
- $dlg.dialog('close');
- }
- }
- ]
- };
- };
- });
|