JinHanShengHang
hanxuntao 9 months ago
parent 8074cd24ad
commit 9d0e522dd2

@ -1480,9 +1480,9 @@ namespace DSWeb.Areas.Account.Controllers
if (j != 0) { if (j != 0) {
msg=msg+ "<font color='red'>未锁定" + j.ToString() + "票</font> "; msg=msg+ "<font color='red'>未锁定" + j.ToString() + "票</font> ";
} }
if (i == 0) { if (i == 1) {
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from v_op_gain_sum where (TTLDR<>TTLCR) and BSNO='" + selectbsno + "'"); var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select COUNT(*) BLCOUNT from v_op_gain_sum where (TTLDR<TTLCR) and BSNO='" + selectbsno + "'");
if (BLCOUNT != "0") { if (BLCOUNT != "0") {
msg = msg + "<font color='red' size='4'>注意此票未负利润!</font> "; msg = msg + "<font color='red' size='4'>注意此票未负利润!</font> ";
} }

@ -1509,6 +1509,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
dataIndex: 'CUSTOMNO', dataIndex: 'CUSTOMNO',
header: Zi.LAN.CUSTOMNO, header: Zi.LAN.CUSTOMNO,
width: 80 width: 80
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO,
width: 80
} }
]; ];
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.initgirdcolums, 1); //使用者id表名中间column数组跳过一开始的几列 this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.initgirdcolums, 1); //使用者id表名中间column数组跳过一开始的几列

@ -859,6 +859,16 @@ Ext.extend(Shipping.MsChRecvInvSettlementEdit, Ext.Panel, {
dataIndex: 'OP', dataIndex: 'OP',
header: Zi.LAN.Handle, header: Zi.LAN.Handle,
width: 80 width: 80
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
header: Zi.LAN.DeclarationNumber,
width: 108
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO,
width: 108
} }
] ]
}); });

@ -2603,6 +2603,93 @@ namespace DSWeb.MvcShipping.Controllers
#endregion #endregion
public ContentResult UpdateCustName(string oldename, string newcode, string newename, string newdescription)
{
string LANGUAGES = Convert.ToString(Session["LANGUAGES"]);
if (string.IsNullOrEmpty(oldename))
{
var jsonRespose1 = new JsonResponse { Success = false, Message = "原客户不能为空!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose1) };
}
var isPost = true;
var errorstr = "";
var ct = MsInfoClientDAL.GetRdCount("SHORTNAME='" + newename + "'");
if (ct != 0)
{
isPost = false;
if (LANGUAGES == "en-us")
{
errorstr = "ShortName is repeat";
}
else
errorstr = "客户简称重复";
}
ct = MsInfoClientDAL.GetRdCount("DESCRIPTION='" + newdescription + "'");
if (ct != 0)
{
isPost = false;
if (LANGUAGES == "en-us")
{
errorstr = "FullName is repeat";
}
else
errorstr = "客户全称重复";
}
if (!isPost) {
var jsonRespose2 = new JsonResponse { Success = false, Message = errorstr + "不允许更新!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
var client = MsInfoClientDAL.GetData("SHORTNAME='" + oldename + "'");
MsInfoClientDAL.UpdateCustName(client.GID, client.CODENAME, client.SHORTNAME, client.DESCRIPTION, newcode, newename, newdescription,Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]));
var jsonRespose = new JsonResponse { Success = true, Message = "更新完成!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult RepeatCustName(string oldename, string newename)
{
string LANGUAGES = Convert.ToString(Session["LANGUAGES"]);
if (string.IsNullOrEmpty(oldename))
{
var jsonRespose1 = new JsonResponse { Success = false, Message = "原客户不能为空!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose1) };
}
if (string.IsNullOrEmpty(newename))
{
var jsonRespose1 = new JsonResponse { Success = false, Message = "替换客户不能为空!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose1) };
}
var isPost = true;
var errorstr = "";
var client = MsInfoClientDAL.GetData("SHORTNAME='" + oldename + "'");
var newclient = MsInfoClientDAL.GetData("SHORTNAME='" + newename + "'");
MsInfoClientDAL.RepeatCustName(client.GID, client.CODENAME, client.SHORTNAME, client.DESCRIPTION,newclient.GID, newclient.CODENAME, newclient.SHORTNAME, newclient.DESCRIPTION, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]));
var jsonRespose = new JsonResponse { Success = true, Message = "更新完成!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
} }
} }

@ -3597,6 +3597,41 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
#endregion #endregion
public static int UpdateCustName(string GID, string oldecode, string oldename, string oldedescription, string newcode, string newename, string newdescription, string userid, string username)
{
Database db = DatabaseFactory.CreateDatabase();
var cmd = db.GetStoredProcCommand("proc_isClientUpdate");
db.AddInParameter(cmd, "@GID", DbType.String, GID);
db.AddInParameter(cmd, "@oldCODENAME", DbType.String, oldecode);
db.AddInParameter(cmd, "@oldSHORTNAME", DbType.String, oldename);
db.AddInParameter(cmd, "@oldDESCRIPTION", DbType.String, oldedescription);
db.AddInParameter(cmd, "@newCODENAME", DbType.String, newcode);
db.AddInParameter(cmd, "@newSHORTNAME", DbType.String, newename);
db.AddInParameter(cmd, "@newDESCRIPTION", DbType.String, newdescription);
db.AddInParameter(cmd, "@strUserID", DbType.String, userid);
db.AddInParameter(cmd, "@strUserName", DbType.String, username);
db.ExecuteNonQuery(cmd);
return 0;
}
public static int RepeatCustName(string GID, string oldecode, string oldename, string oldedescription,string newGID,string newcode, string newename, string newdescription, string userid, string username)
{
Database db = DatabaseFactory.CreateDatabase();
var cmd = db.GetStoredProcCommand("proc_isClientRepeat");
db.AddInParameter(cmd, "@oldGID", DbType.String, GID);
db.AddInParameter(cmd, "@oldCODENAME", DbType.String, oldecode);
db.AddInParameter(cmd, "@oldSHORTNAME", DbType.String, oldename);
db.AddInParameter(cmd, "@oldDESCRIPTION", DbType.String, oldedescription);
db.AddInParameter(cmd, "@newGID ", DbType.String, newGID);
db.AddInParameter(cmd, "@newCODENAME", DbType.String, newcode);
db.AddInParameter(cmd, "@newSHORTNAME", DbType.String, newename);
db.AddInParameter(cmd, "@newDESCRIPTION", DbType.String, newdescription);
db.AddInParameter(cmd, "@strUserID", DbType.String, userid);
db.AddInParameter(cmd, "@strUserName", DbType.String, username);
db.ExecuteNonQuery(cmd);
return 0;
}
#region 参照部分 #region 参照部分

@ -669,14 +669,17 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, {
text: Zi.LAN.UpdateCustomersWith, //"客户名称更改", text: Zi.LAN.UpdateCustomersWith, //"客户名称更改",
iconCls: "btndelete", iconCls: "btndelete",
handler: function (button, event) { handler: function (button, event) {
this.UpdateCustomersWith(button, event); // this.UpdateCustomersWith(button, event);
this.winModifyUpdateShow.show();
}, },
scope: this scope: this
}, { }, {
text: Zi.LAN.RepeatCustomersWith, //"重复客户合并", text: Zi.LAN.RepeatCustomersWith, //"重复客户合并",
iconCls: "btndelete", iconCls: "btndelete",
handler: function (button, event) { handler: function (button, event) {
this.RepeatCustomersWith(button, event); // this.RepeatCustomersWith(button, event);
this.winModifyRepeatShow.show();
}, },
scope: this scope: this
}, '-', }, '-',
@ -788,6 +791,282 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, {
scope: this 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 }, //end initUIComponents
onRefreshClick: function (button, event) { onRefreshClick: function (button, event) {
@ -877,6 +1156,120 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, {
}, },
//end initUIComponents //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 () { onClearSql: function () {
var form = this.formSearch.getForm(); var form = this.formSearch.getForm();
form.reset(); form.reset();

@ -319,4 +319,15 @@ Zi.LAN.YUEJIE = "月结";
Zi.LAN.BANYUEJIE = "半月结"; Zi.LAN.BANYUEJIE = "半月结";
Zi.LAN.YUEDINGTIANSHU = "约定天数"; Zi.LAN.YUEDINGTIANSHU = "约定天数";
Zi.LAN.ZHOUJIE = "周结"; Zi.LAN.ZHOUJIE = "周结";
Zi.LAN.XIANJIEMAIDAN = "现结买单"; Zi.LAN.XIANJIEMAIDAN = "现结买单";
Zi.LAN.OLDCUSTNAME = "原客户名称";
Zi.LAN.NEWCUSTNAME = "替换为客户";
Zi.LAN.YuanMingChenBuNengWeiKong = "原客户名称不能为空!";
Zi.LAN.NewMingChenBuNengWeiKong = "替换为客户名称不能为空!";
Zi.LAN.NewMingChenBuNengWeiKong2 = "新客户名称、客户代码、客户全称不能为空!";
Zi.LAN.OLDCODE = "原客户代码";
Zi.LAN.OLDDESCRIPTION = "原客户全称";
Zi.LAN.NEWCUSTNAME2 = "新客户简称";
Zi.LAN.NEWCODE = "新客户代码";
Zi.LAN.NEWDESCRIPTION = "新客户全称";
Zi.LAN.QueRenXiuGai = "确认修改";

@ -321,5 +321,15 @@ Zi.LAN.BANYUEJIE = "半月结";
Zi.LAN.YUEDINGTIANSHU = "约定天数"; Zi.LAN.YUEDINGTIANSHU = "约定天数";
Zi.LAN.ZHOUJIE = "周结"; Zi.LAN.ZHOUJIE = "周结";
Zi.LAN.XIANJIEMAIDAN = "现结买单"; Zi.LAN.XIANJIEMAIDAN = "现结买单";
Zi.LAN.OLDCUSTNAME = "原客户名称";
Zi.LAN.NEWCUSTNAME = "替换为客户";
Zi.LAN.YuanMingChenBuNengWeiKong = "原客户名称不能为空!";
Zi.LAN.NewMingChenBuNengWeiKong = "替换为客户名称不能为空!";
Zi.LAN.NewMingChenBuNengWeiKong2 = "新客户名称、客户代码、客户全称不能为空!";
Zi.LAN.OLDCODE = "原客户代码";
Zi.LAN.OLDDESCRIPTION = "原客户全称";
Zi.LAN.NEWCUSTNAME2 = "新客户简称";
Zi.LAN.NEWCODE = "新客户代码";
Zi.LAN.NEWDESCRIPTION = "新客户全称";
Zi.LAN.QueRenXiuGai = "确认修改";

Loading…
Cancel
Save