|
|
|
@ -669,14 +669,17 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, {
|
|
|
|
|
text: Zi.LAN.UpdateCustomersWith, //"客户名称更改",
|
|
|
|
|
iconCls: "btndelete",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.UpdateCustomersWith(button, event);
|
|
|
|
|
// this.UpdateCustomersWith(button, event);
|
|
|
|
|
this.winModifyUpdateShow.show();
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, {
|
|
|
|
|
text: Zi.LAN.RepeatCustomersWith, //"重复客户合并",
|
|
|
|
|
iconCls: "btndelete",
|
|
|
|
|
handler: function (button, event) {
|
|
|
|
|
this.RepeatCustomersWith(button, event);
|
|
|
|
|
// this.RepeatCustomersWith(button, event);
|
|
|
|
|
this.winModifyRepeatShow.show();
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
}, '-',
|
|
|
|
@ -788,6 +791,282 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, {
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#region 批量修改窗体
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeOldCustModify = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.comboxOldCustModify = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.OLDCUSTNAME,
|
|
|
|
|
store: this.storeOldCustModify,
|
|
|
|
|
queryMode: 'remote',
|
|
|
|
|
minChars: 0,
|
|
|
|
|
queryParam: 'CODENAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'OLDNAME',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeNewCustModify = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.comboxNewCustModify = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.NEWCUSTNAME,
|
|
|
|
|
store: this.storeNewCustModify,
|
|
|
|
|
queryMode: 'remote',
|
|
|
|
|
minChars: 0,
|
|
|
|
|
queryParam: 'CODENAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'NEWNAME',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formModifyRepeat = Ext.widget('form', {
|
|
|
|
|
region: 'north',
|
|
|
|
|
frame: true,
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 70,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
{//fieldset 1
|
|
|
|
|
xtype: 'fieldset',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
layout: 'anchor',
|
|
|
|
|
defaults: {
|
|
|
|
|
anchor: '100%'
|
|
|
|
|
},
|
|
|
|
|
items: [{
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxOldCustModify
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxNewCustModify
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}//end fieldset 1
|
|
|
|
|
]//end root items
|
|
|
|
|
}); //end this.formEdit
|
|
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.winModifyRepeatShow = Ext.create('Ext.window.Window', {
|
|
|
|
|
title: Zi.LAN.RepeatCustomersWith,
|
|
|
|
|
width: 320,
|
|
|
|
|
//height : 120,
|
|
|
|
|
//plain : true,
|
|
|
|
|
iconCls: "addicon",
|
|
|
|
|
resizable: false,
|
|
|
|
|
// 是否可以拖动
|
|
|
|
|
// draggable:false,
|
|
|
|
|
collapsible: true, // 允许缩放条
|
|
|
|
|
closeAction: 'close',
|
|
|
|
|
closable: true,
|
|
|
|
|
modal: 'true',
|
|
|
|
|
buttonAlign: "center",
|
|
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
|
|
items: [this.formModifyRepeat],
|
|
|
|
|
buttons: [{
|
|
|
|
|
text: Zi.LAN.QueRenXiuGai,
|
|
|
|
|
minWidth: 70,
|
|
|
|
|
handler: function () {
|
|
|
|
|
|
|
|
|
|
_this.onModifyRepeatClick()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: Zi.LAN.btnClose,
|
|
|
|
|
minWidth: 70,
|
|
|
|
|
handler: function () {
|
|
|
|
|
_this.winModifyRepeatShow.close();
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeOldCust = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.comboxOldCust = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.OLDCUSTNAME,
|
|
|
|
|
store: this.storeOldCust,
|
|
|
|
|
queryMode: 'remote',
|
|
|
|
|
minChars: 0,
|
|
|
|
|
queryParam: 'CODENAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'OLDNAME',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName',
|
|
|
|
|
listeners: {
|
|
|
|
|
scope: this,
|
|
|
|
|
blur: function (field, The, eOpts) {
|
|
|
|
|
field.setRawValue(field.value);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
|
|
if (records.length > 0) {
|
|
|
|
|
this.formModifyUpdate.getForm().findField('OLDCODENAME').setValue(records[0].data.CustCode);
|
|
|
|
|
this.formModifyUpdate.getForm().findField('OLDDESCRIPTION').setValue(records[0].data.DESCRIPTION);
|
|
|
|
|
this.formModifyUpdate.getForm().findField('NEWCODENAME').setValue(records[0].data.CustCode);
|
|
|
|
|
this.formModifyUpdate.getForm().findField('NEWCUSTNAME').setValue(records[0].data.CustName);
|
|
|
|
|
this.formModifyUpdate.getForm().findField('NEWDESCRIPTION').setValue(records[0].data.DESCRIPTION);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formModifyUpdate = Ext.widget('form', {
|
|
|
|
|
region: 'north',
|
|
|
|
|
frame: true,
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 70,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
{//fieldset 1
|
|
|
|
|
xtype: 'fieldset',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
layout: 'anchor',
|
|
|
|
|
defaults: {
|
|
|
|
|
anchor: '100%'
|
|
|
|
|
},
|
|
|
|
|
items: [{
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxOldCust
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: Zi.LAN.OLDCODE, //'客户编码',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
flex: 1,
|
|
|
|
|
name: 'OLDCODENAME'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: Zi.LAN.OLDDESCRIPTION, //'客户编码',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
flex: 1,
|
|
|
|
|
name: 'OLDDESCRIPTION'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: Zi.LAN.NEWCODE, //'客户编码',
|
|
|
|
|
flex: 1,
|
|
|
|
|
name: 'NEWCODENAME'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: Zi.LAN.NEWCUSTNAME2, //'客户编码',
|
|
|
|
|
flex: 1,
|
|
|
|
|
name: 'NEWCUSTNAME'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [{
|
|
|
|
|
fieldLabel: Zi.LAN.NEWDESCRIPTION , //'客户编码',
|
|
|
|
|
flex: 1,
|
|
|
|
|
name: 'NEWDESCRIPTION'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}//end fieldset 1
|
|
|
|
|
]//end root items
|
|
|
|
|
}); //end this.formEdit
|
|
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.winModifyUpdateShow = Ext.create('Ext.window.Window', {
|
|
|
|
|
title: Zi.LAN.UpdateCustomersWith,
|
|
|
|
|
width: 320,
|
|
|
|
|
//height : 120,
|
|
|
|
|
//plain : true,
|
|
|
|
|
iconCls: "addicon",
|
|
|
|
|
resizable: false,
|
|
|
|
|
// 是否可以拖动
|
|
|
|
|
// draggable:false,
|
|
|
|
|
collapsible: true, // 允许缩放条
|
|
|
|
|
closeAction: 'close',
|
|
|
|
|
closable: true,
|
|
|
|
|
modal: 'true',
|
|
|
|
|
buttonAlign: "center",
|
|
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
|
|
items: [this.formModifyUpdate],
|
|
|
|
|
buttons: [{
|
|
|
|
|
text: Zi.LAN.QueRenXiuGai,
|
|
|
|
|
minWidth: 70,
|
|
|
|
|
handler: function () {
|
|
|
|
|
|
|
|
|
|
_this.onModifyUpdateClick()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text: Zi.LAN.btnClose,
|
|
|
|
|
minWidth: 70,
|
|
|
|
|
handler: function () {
|
|
|
|
|
_this.winModifyUpdateShow.close();
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
@ -877,6 +1156,120 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, {
|
|
|
|
|
},
|
|
|
|
|
//end initUIComponents
|
|
|
|
|
|
|
|
|
|
onModifyRepeatClick: function (menu, event) {
|
|
|
|
|
|
|
|
|
|
var GidStr = '';
|
|
|
|
|
|
|
|
|
|
var OLDNAME = this.formModifyRepeat.getForm().findField('OLDNAME').getValue();
|
|
|
|
|
var NEWNAME = this.formModifyRepeat.getForm().findField('NEWNAME').getValue();
|
|
|
|
|
if (OLDNAME == '') {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.YuanMingChenBuNengWeiKong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'请先选择要删除的客户!'
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (NEWNAME == '') {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.NewMingChenBuNengWeiKong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'请先选择要删除的客户!'
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
|
|
url: '/MvcShipping/MsInfoClient/RepeatCustName',
|
|
|
|
|
params: {
|
|
|
|
|
oldename: OLDNAME,
|
|
|
|
|
newename: NEWNAME
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (!result.Success) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: '提示',
|
|
|
|
|
msg: result.Message,
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
_this.winModifyRepeatShow.close();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onModifyUpdateClick: function (menu, event) {
|
|
|
|
|
|
|
|
|
|
var GidStr = '';
|
|
|
|
|
|
|
|
|
|
var OLDNAME = this.formModifyUpdate.getForm().findField('OLDNAME').getValue();
|
|
|
|
|
var NEWCODENAME = this.formModifyUpdate.getForm().findField('NEWCODENAME').getValue();
|
|
|
|
|
var NEWCUSTNAME = this.formModifyUpdate.getForm().findField('NEWCUSTNAME').getValue();
|
|
|
|
|
var NEWDESCRIPTION = this.formModifyUpdate.getForm().findField('NEWDESCRIPTION').getValue();
|
|
|
|
|
if (OLDNAME == '') {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.YuanMingChenBuNengWeiKong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'请先选择要删除的客户!'
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (NEWCODENAME == '' || NEWCUSTNAME == '' || NEWDESCRIPTION == '') {
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.NewMingChenBuNengWeiKong2, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'请先选择要删除的客户!'
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
|
|
url: '/MvcShipping/MsInfoClient/UpdateCustName',
|
|
|
|
|
params: {
|
|
|
|
|
oldename: OLDNAME,
|
|
|
|
|
newcode: NEWCODENAME,
|
|
|
|
|
newename: NEWCUSTNAME,
|
|
|
|
|
newdescription: NEWDESCRIPTION
|
|
|
|
|
},
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
if (success) {
|
|
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
|
|
if (!result.Success) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: '提示',
|
|
|
|
|
msg: result.Message,
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
_this.storeList.reload();
|
|
|
|
|
_this.winModifyUpdateShow.close();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onClearSql: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
form.reset();
|
|
|
|
|