|
@@ -136,8 +136,10 @@ Ext.define('erp.controller.pm.make.MakePlan!Add', {
|
|
|
},
|
|
},
|
|
|
click: function(btn){
|
|
click: function(btn){
|
|
|
var linecode = '';
|
|
var linecode = '';
|
|
|
|
|
+ var mp_period ='';
|
|
|
if(Ext.getCmp('mp_linecode')){
|
|
if(Ext.getCmp('mp_linecode')){
|
|
|
linecode = Ext.getCmp('mp_linecode').value;
|
|
linecode = Ext.getCmp('mp_linecode').value;
|
|
|
|
|
+ mp_period = Ext.getCmp('mp_period').value;
|
|
|
}
|
|
}
|
|
|
var grid = Ext.getCmp('grid');
|
|
var grid = Ext.getCmp('grid');
|
|
|
var me = this;
|
|
var me = this;
|
|
@@ -216,9 +218,9 @@ Ext.define('erp.controller.pm.make.MakePlan!Add', {
|
|
|
'起始时间介于0-23');
|
|
'起始时间介于0-23');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if( b==null ||b>23 || b<0){
|
|
|
|
|
|
|
+ if( b==null ||b>24 || b<0){
|
|
|
Ext.Msg.alert('温馨提示',
|
|
Ext.Msg.alert('温馨提示',
|
|
|
- '结束时间介于0-23');
|
|
|
|
|
|
|
+ '结束时间介于0-24');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if(b-a>0){
|
|
if(b-a>0){
|
|
@@ -238,6 +240,7 @@ Ext.define('erp.controller.pm.make.MakePlan!Add', {
|
|
|
detailgrid.store.data.items[j].set('mpd_datenum','H'+a);
|
|
detailgrid.store.data.items[j].set('mpd_datenum','H'+a);
|
|
|
detailgrid.store.data.items[j].set('mpd_planqty',c);
|
|
detailgrid.store.data.items[j].set('mpd_planqty',c);
|
|
|
detailgrid.store.data.items[j].set('mpd_linecode',linecode);
|
|
detailgrid.store.data.items[j].set('mpd_linecode',linecode);
|
|
|
|
|
+ detailgrid.store.data.items[j].set('mpd_workdate',mp_period);
|
|
|
a++;
|
|
a++;
|
|
|
if(a>24){
|
|
if(a>24){
|
|
|
a=a-24;
|
|
a=a-24;
|
|
@@ -251,6 +254,7 @@ Ext.define('erp.controller.pm.make.MakePlan!Add', {
|
|
|
detailgrid.store.data.items[j].set('mpd_datenum','H'+a);
|
|
detailgrid.store.data.items[j].set('mpd_datenum','H'+a);
|
|
|
detailgrid.store.data.items[j].set('mpd_planqty',c);
|
|
detailgrid.store.data.items[j].set('mpd_planqty',c);
|
|
|
detailgrid.store.data.items[j].set('mpd_linecode',linecode);
|
|
detailgrid.store.data.items[j].set('mpd_linecode',linecode);
|
|
|
|
|
+ detailgrid.store.data.items[j].set('mpd_workdate',mp_period);
|
|
|
a++;
|
|
a++;
|
|
|
if(a>24){
|
|
if(a>24){
|
|
|
a=a-24;
|
|
a=a-24;
|
|
@@ -261,7 +265,8 @@ Ext.define('erp.controller.pm.make.MakePlan!Add', {
|
|
|
detailgrid.store.data.items[j].set('mpd_datenum','H'+a);
|
|
detailgrid.store.data.items[j].set('mpd_datenum','H'+a);
|
|
|
detailgrid.store.data.items[j].set('mpd_planqty',c);
|
|
detailgrid.store.data.items[j].set('mpd_planqty',c);
|
|
|
detailgrid.store.data.items[j].set('mpd_linecode',linecode);
|
|
detailgrid.store.data.items[j].set('mpd_linecode',linecode);
|
|
|
- length++;
|
|
|
|
|
|
|
+ detailgrid.store.data.items[j].set('mpd_workdate',mp_period);
|
|
|
|
|
+ length++;
|
|
|
a++;
|
|
a++;
|
|
|
if(a>24){
|
|
if(a>24){
|
|
|
a=a-24;
|
|
a=a-24;
|