From 22c53d569efdd809fa33d62675b4d5481e834c85 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Fri, 13 Jan 2023 11:10:34 +0800 Subject: [PATCH 1/2] 12 --- .../Controllers/MsChFeeController.cs | 118 +++++----- .../Viewsjs/MsChFee/FeeDrCrGrid.js | 204 +++++++++++++----- 2 files changed, 204 insertions(+), 118 deletions(-) diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs index 1b662bd6..6d56deb0 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsChFeeController.cs @@ -389,66 +389,66 @@ namespace DSWeb.MvcShipping.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; } - var FEESAVENOTSAMEAMOUNT = MsSysParamSetDAL.GetData("PARAMNAME='FEESAVENOTSAMEAMOUNT'"); - if (FEESAVENOTSAMEAMOUNT.PARAMVALUE == "1"&& feetype==2) - { - var oldfeelist = MsChFeeDAL.GetAllDataList("BSNO='" + bsno + "' AND FEETYPE=2"); - var findlist = new List(); - foreach (var fee in oldfeelist) - { - var newfee = bodyList.Find(X => X.GId == fee.GId); - if (newfee == null&&fee.FeeType == 2) - { - var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName && X.Amount == fee.Amount); - if (newinvlink == null) - { - var InvLink = new MsChFee(); - InvLink.Currency = fee.Currency; - InvLink.CustomerName = fee.CustomerName; - InvLink.Amount = fee.Amount; - findlist.Add(InvLink); - } - else - { - var jsonRespose3 = new JsonResponse - { - Success = false, - Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!", - }; - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; - - } - } - } + // var FEESAVENOTSAMEAMOUNT = MsSysParamSetDAL.GetData("PARAMNAME='FEESAVENOTSAMEAMOUNT'"); + // if (FEESAVENOTSAMEAMOUNT.PARAMVALUE == "1"&& feetype==2) + // { + // var oldfeelist = MsChFeeDAL.GetAllDataList("BSNO='" + bsno + "' AND FEETYPE=2"); + // var findlist = new List(); + // foreach (var fee in oldfeelist) + // { + // var newfee = bodyList.Find(X => X.GId == fee.GId); + // if (newfee == null&&fee.FeeType == 2) + // { + // var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName && X.Amount == fee.Amount); + // if (newinvlink == null) + // { + // var InvLink = new MsChFee(); + // InvLink.Currency = fee.Currency; + // InvLink.CustomerName = fee.CustomerName; + // InvLink.Amount = fee.Amount; + // findlist.Add(InvLink); + // } + // else + // { + // var jsonRespose3 = new JsonResponse + // { + // Success = false, + // Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!", + // }; + // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; + + // } + // } + // } - foreach (var fee in bodyList) - { - if (fee.FeeType == 2) - { - var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName && X.Amount == fee.Amount); - if (newinvlink == null) - { - var InvLink = new MsChFee(); - InvLink.Currency = fee.Currency; - InvLink.CustomerName = fee.CustomerName; - InvLink.Amount = fee.Amount; - findlist.Add(InvLink); - } - else - { - var jsonRespose3 = new JsonResponse - { - Success = false, - Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!", - }; - return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; - - } - } - } - - - } + // foreach (var fee in bodyList) + // { + // if (fee.FeeType == 2) + // { + // var newinvlink = findlist.Find(X => X.Currency == fee.Currency && X.CustomerName == fee.CustomerName && X.Amount == fee.Amount); + // if (newinvlink == null) + // { + // var InvLink = new MsChFee(); + // InvLink.Currency = fee.Currency; + // InvLink.CustomerName = fee.CustomerName; + // InvLink.Amount = fee.Amount; + // findlist.Add(InvLink); + // } + // else + // { + // var jsonRespose3 = new JsonResponse + // { + // Success = false, + // Message = "客户名称,金额,币别 ,相同,不允许保存,请调整!", + // }; + // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; + + // } + // } + // } + + + //} if (isyj == "1") diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js index 5a4f561a..c337665d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js @@ -48,7 +48,8 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { this.AMENDSELFWORKFLOW = 0; this.FEENOTPR=false; this.ISWACC=0; - this.FEEMANGERMUSTBE=0; + this.FEEMANGERMUSTBE = 0; + this.FEESAVENOTSAMEAMOUNT = 0; this.MODIFYCUSTBFFEELOCK=0; this.DrRangDaStr=" 1=1 "; this.CrRangDaStr=" 1=1 "; @@ -5673,6 +5674,33 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { }, scope: this }); + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsSysParamSet/GetData', + params: { + condition: "PARAMNAME='FEESAVENOTSAMEAMOUNT'" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + + } else { + var data = result.data; + if (data.PARAMVALUE == '1') { + this.FEESAVENOTSAMEAMOUNT = 1; + } else { + + } + + } + } else { + + } + }, + scope: this + }); + Ext.Ajax.request({ waitMsg: '', url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', @@ -7274,7 +7302,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { var bodyDrChFeeDatas = []; var i; - + this.isrepeatfee = 0; if (type == '1') { for (i = 0; i < this.storeDrChFee.getCount(); i += 1) { var memberyf = this.storeDrChFee.getAt(i); @@ -7291,7 +7319,10 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { }; var jsonChFeeBody = ConvertFeeRecordsToJson(bodyDrChFeeDatas); } else if (type == '2') { - + this.TMPstoreDrChFee = Ext.create('Ext.data.Store', { + model: 'MsChFee', + remoteSort: false + }); for (i = 0; i < this.storeCrChFee.getCount(); i += 1) { var memberyf = this.storeCrChFee.getAt(i); if (memberyf.data.Currency ==LOCALCURR&&memberyf.data.ExChangerate!=1) { @@ -7304,11 +7335,27 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { bodyDrChFeeDatas.push(memberyf); var amount = memberyf.data.Amount; var ExChangerate = memberyf.data.ExChangerate; + if (this.FEESAVENOTSAMEAMOUNT == 1) { + for (var j = 0; j < this.TMPstoreDrChFee.getCount(); j += 1) { + var memberbody = this.TMPstoreDrChFee.getAt(j); + if (memberbody.data.CustomerName == memberyf.data.CustomerName && memberbody.data.FeeName == memberyf.data.FeeName + && memberbody.data.Amount == memberyf.data.Amount && memberbody.data.Currency == memberyf.data.Currency) + { + this.isrepeatfee = 1 + } + } + if (this.isrepeatfee == 0) { + this.TMPstoreDrChFee.add(memberyf); + } + } }; var jsonChFeeBody = ConvertFeeRecordsToJson(bodyDrChFeeDatas); }else if (type == '3') { - + this.TMPstoreDrChFee = Ext.create('Ext.data.Store', { + model: 'MsChFee', + remoteSort: false + }); for (i = 0; i < this.storeDrChFee.getCount(); i += 1) { var memberyf = this.storeDrChFee.getAt(i); if (memberyf.data.Currency ==LOCALCURR&&memberyf.data.ExChangerate!=1) { @@ -7333,6 +7380,18 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { bodyDrChFeeDatas.push(memberyf); var amount = memberyf.data.Amount; var ExChangerate = memberyf.data.ExChangerate; + if (this.FEESAVENOTSAMEAMOUNT == 1) { + for (var j = 0; j < this.TMPstoreDrChFee.getCount(); j += 1) { + var memberbody = this.TMPstoreDrChFee.getAt(j); + if (memberbody.data.CustomerName == memberyf.data.CustomerName && memberbody.data.FeeName == memberyf.data.FeeName + && memberbody.data.Amount == memberyf.data.Amount && memberbody.data.Currency == memberyf.data.Currency) { + this.isrepeatfee = 1 + } + } + if (this.isrepeatfee == 0) { + this.TMPstoreDrChFee.add(memberyf); + } + } }; var jsonChFeeBody = ConvertFeeRecordsToJson(bodyDrChFeeDatas); @@ -7343,69 +7402,96 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { Ext.Msg.show({ title: Zi.LAN.FEE.ChuoWu, msg: '请先保存业务信息!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); return; } - Ext.Msg.wait(Zi.LAN.FEE.ZhengZaiCaoZuoShuJu); - Ext.Ajax.request({ - waitMsg: Zi.LAN.FEE.ZhengZaiCaoZuoShuJu, //'正在保存数据...', - url: '/MvcShipping/MsChFee/Save', - scope: this, - params: { - bsno: _thisfee.strBSNO, - type: type, - chfeebody: jsonChFeeBody - }, - callback: function (options, success, response) { - if (success) { - Ext.MessageBox.hide(); - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - // if (type == '1') { - // for (var i = 0; i < this.storeDrChFee.getCount(); i += 1) { - // var member = this.storeDrChFee.getAt(i); - // member.set("BsNo", _thisfee.strBSNO); - // member.commit(); - // } - //// this.gridDrChFee.unSelectAll(); - // } else if (type == '2') { - // for (var i = 0; i < this.storeCrChFee.getCount(); i += 1) { - // var member = this.storeCrChFee.getAt(i); - // member.set("BsNo", _thisfee.strBSNO); - // member.commit(); - // } - //// this.gridCrChFee.unSelectAll(); - - // } + if (this.FEESAVENOTSAMEAMOUNT == 1 && this.isrepeatfee == 1) { + Ext.MessageBox.confirm('提示', '结算对象,金额,币别,费用名称,相同,确定保存?', function (btn) { + if (btn == 'yes') { + Ext.Msg.wait(Zi.LAN.FEE.ZhengZaiCaoZuoShuJu); + Ext.Ajax.request({ + waitMsg: Zi.LAN.FEE.ZhengZaiCaoZuoShuJu, //'正在保存数据...', + url: '/MvcShipping/MsChFee/Save', + scope: this, + params: { + bsno: _thisfee.strBSNO, + type: type, + chfeebody: jsonChFeeBody + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { - if (type == 1) { - _thisfee.LoadDrChFee(); - } else if (type == 2) { - _thisfee.LoadCrChFee(); - } else { - _thisfee.LoadDrChFee(); - _thisfee.LoadCrChFee(); + if (type == 1) { + _thisfee.LoadDrChFee(); + } else if (type == 2) { + _thisfee.LoadCrChFee(); + } else { + _thisfee.LoadDrChFee(); + _thisfee.LoadCrChFee(); + } + } else { + Ext.Msg.show({ title: Zi.LAN.FEE.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } else { + Ext.Msg.show({ + title: Zi.LAN.FEE.TiShi, + msg: Zi.LAN.FEE.FuWuQiXiangYingChuCuo, + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); + } + } + }); + } else { + return false; + } + }) + } else { + Ext.Msg.wait(Zi.LAN.FEE.ZhengZaiCaoZuoShuJu); + Ext.Ajax.request({ + waitMsg: Zi.LAN.FEE.ZhengZaiCaoZuoShuJu, //'正在保存数据...', + url: '/MvcShipping/MsChFee/Save', + scope: this, + params: { + bsno: _thisfee.strBSNO, + type: type, + chfeebody: jsonChFeeBody + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + + if (type == 1) { + _thisfee.LoadDrChFee(); + } else if (type == 2) { + _thisfee.LoadCrChFee(); + } else { + _thisfee.LoadDrChFee(); + _thisfee.LoadCrChFee(); + + } + } else { + Ext.Msg.show({ title: Zi.LAN.FEE.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } - //this.storeChFeeGain.load({ params: { bsno: _thisfee.strBSNO, optype: _thisfee.stroplb } }); - //this.storeChFeeMasterGain.load({ params: { bsno: _thisfee.strBSNO, optype: _thisfee.stroplb } }); - //this.storeBodySum.load({ params: { bsno: _thisfee.strBSNO, optype: _thisfee.stroplb }, - // callback: function (r, options, success) { - // if (success) { - // _thisfee.setTotalHead(); - // } - // } - //}); } else { - Ext.Msg.show({ title: Zi.LAN.FEE.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + Ext.Msg.show({ + title: Zi.LAN.FEE.TiShi, + msg: Zi.LAN.FEE.FuWuQiXiangYingChuCuo, + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); } - } else { - Ext.Msg.show({ title: Zi.LAN.FEE.TiShi, - msg: Zi.LAN.FEE.FuWuQiXiangYingChuCuo, - icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK - }); } - } - }); + }); + } + + + }, //end save + + onShenModifyClick: function (button, event, type) { var allow = this.getAllowOperationDetail(); From e0f1dd75bfe76a7dda2045b79e1721cae6e5f4ae Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Wed, 18 Jan 2023 08:06:20 +0800 Subject: [PATCH 2/2] 1 --- .../Controllers/Chfee_lockController.cs | 1 + .../Account/Viewsjs/Chfee_lock/Chfee_lock.js | 6 + .../Controllers/MsOpSeaeModuleController.cs | 11 +- .../MvcShipping/DAL/MsChFee/MsChFeeDAL.cs | 18 ++- .../DAL/MsOpSeaeModule/MsOpSeaeModuleDAL.cs | 21 +-- .../Models/MsOpSeaeModule/MsOpSeaeModule.cs | 23 +-- .../MvcShipping/Views/MsOpAire/EditView.aspx | 21 +++ .../Viewsjs/MsChFee/FeeDrCrGrid.js | 14 +- .../Viewsjs/MsOpAire/MsOpAireEditView.js | 2 +- .../MsOpSeaeModule/MsOpSeaeModuleIndex.js | 149 ++++++++---------- .../MsOpSeaeModule/MsOpSeaeModuleModel.js | 5 +- JobAutoCreateFee/JobGetMhData.cs | 4 +- 12 files changed, 146 insertions(+), 129 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_lockController.cs b/DSWeb/Areas/Account/Controllers/Chfee_lockController.cs index 880a759b..5d4b19b6 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_lockController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_lockController.cs @@ -143,6 +143,7 @@ namespace DSWeb.Areas.Account.Controllers strSql.Append(",case ISNULL(C.ETDCLOSE,0) when 1 then '已锁定' else '未锁定' end as ETDCLOSEREF"); strSql.Append(",case ISNULL(C.DRCLOSE,0) when 1 then '已锁定' else '未锁定' end as DRCLOSEREF"); strSql.Append(",case ISNULL(C.CRCLOSE,0) when 1 then '已锁定' else '未锁定' end as CRCLOSEREF"); + strSql.Append(",(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP"); strSql.Append(" FROM V_OP_BILL B "); strSql.Append(" LEFT JOIN (SELECT BSNO,isnull(SUM(CASE FEETYPE WHEN 1 THEN(CASE CURRENCY WHEN 'RMB' THEN ISNULL(AMOUNT, 0) ELSE 0 END) ELSE 0 END), 0) AS RMBDR,"); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js index cadeeec8..599821db 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js @@ -110,6 +110,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { { name: 'BSCLOSEOP', type: 'string' }, { name: 'FEECLOSETIME', type: 'string' }, { name: 'FEECLOSEOP', type: 'string' }, + { name: 'SALECORP', type: 'string' }, { name: 'NETWEIGHT', type: 'number' }, { name: 'KGS', type: 'number' }, { name: 'TEU', type: 'number' }, @@ -617,6 +618,11 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { dataIndex: 'CNTRTOTAL', header: '箱型箱量', width: 80 + }, { + sortable: true, + dataIndex: 'SALECORP', + header: '所属分部', + width: 80 }, { sortable: true, dataIndex: 'REMARK', diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeModuleController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeModuleController.cs index d31b56b7..82a8b79a 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeModuleController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeModuleController.cs @@ -88,10 +88,10 @@ namespace DSWeb.MvcShipping.Controllers ////分公司代码 - //if (headData.CORPID == "" || headData.CORPID == null) - //{ - // headData.CORPID = Convert.ToString(Session["COMPANYID"]); - //} + if (headData.CORPID == "" || headData.CORPID == null) + { + headData.CORPID = Convert.ToString(Session["COMPANYID"]); + } //分公司代码 if (headData.GID == "" || headData.GID == null) @@ -103,7 +103,8 @@ namespace DSWeb.MvcShipping.Controllers if (opstatus == "add") { headData.DbOperationType = DbOperationType.DbotIns; - // + headData.INPUTBY =Convert.ToString(Session["SHOWNAME"]).ToString().Trim(); + headData.INPUTDATE = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } else if (opstatus == "edit") { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs index cca20a32..edf21713 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs @@ -91,7 +91,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL private const string PARM_FEE_ISACC = "@ISACC"; private const string PARM_SALECORP = "@SALECORP"; private const string PARM_FEE_ISCRMORDERFEE = "@ISCRMORDERFEE"; - + private const string PARM_FEE_STATEMENTNO = "@STATEMENTNO"; #endregion static private SqlParameter[] GetInsertParms() @@ -135,7 +135,8 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL new SqlParameter(PARM_MANAGER,SqlDbType.VarChar,50), new SqlParameter(PARM_FEE_ISACC,SqlDbType.VarChar,1), new SqlParameter(PARM_SALECORP,SqlDbType.VarChar,60), - new SqlParameter(PARM_FEE_ISCRMORDERFEE,SqlDbType.VarChar,1) + new SqlParameter(PARM_FEE_ISCRMORDERFEE,SqlDbType.VarChar,1), + new SqlParameter(PARM_FEE_STATEMENTNO,SqlDbType.VarChar,60) }; @@ -146,16 +147,16 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL private const string SQL_INSERT_FEE = " INSERT INTO ch_fee(GID, BSNO, FEETYPE, FEENAME, FEEDESCRIPTION, CUSTOMERTYPE, CUSTOMERNAME, UNIT, UNITPRICE, QUANTITY, AMOUNT, CURRENCY, " + " EXCHANGERATE, REASON, REMARK, COMMISSIONRATE,ENTEROPERATOR, ENTERDATE,ISOPEN, ISADVANCEDPAY, SORT, FEESTATUS, FEEFRT, " - + " TAXRATE,NOTAXAMOUNT,ACCTAXRATE,LINENUM,TAXUNITPRICE,MODIFIEDUSER,MODIFIEDTIME,WMSOUTBSNO,PREAMOUNT,ISINVOICE,INPUTMODE,LOCALCURR,MANAGER,ISACC,SALECORP,ISCRMORDERFEE) " + + " TAXRATE,NOTAXAMOUNT,ACCTAXRATE,LINENUM,TAXUNITPRICE,MODIFIEDUSER,MODIFIEDTIME,WMSOUTBSNO,PREAMOUNT,ISINVOICE,INPUTMODE,LOCALCURR,MANAGER,ISACC,SALECORP,ISCRMORDERFEE,STATEMENTNO) " + " VALUES " + " (@gid,@bsno,@fee_type,@fee_name,@fee_description,@customer_type,@customer_name,@unit,@unit_price,@quantity,@amount,@currency, " + " @exchange_rate,@reason,@remark,@comm_rate,@enter_operator,@enter_date,@is_open,@is_advance_pay,@sort,@fee_status,@fee_frt, " - + " @taxrate,@notaxamount,@acctaxrate,@LINENUM,@taxunit_price,@MODIFIEDUSER,@MODIFIEDTIME,@WMSOUTBSNO,@PREAMOUNT,@ISINVOICE,@INPUTMODE,@LOCALCURR,@MANAGER,@ISACC,@SALECORP,@ISCRMORDERFEE)";//DateTime.Now.ToString() + + " @taxrate,@notaxamount,@acctaxrate,@LINENUM,@taxunit_price,@MODIFIEDUSER,@MODIFIEDTIME,@WMSOUTBSNO,@PREAMOUNT,@ISINVOICE,@INPUTMODE,@LOCALCURR,@MANAGER,@ISACC,@SALECORP,@ISCRMORDERFEE,@STATEMENTNO)";//DateTime.Now.ToString() private const string SQL_UPDATE_CH_FE = " UPDATE ch_fee SET FEENAME = @fee_name,FEEDESCRIPTION=@fee_description,CUSTOMERTYPE=@customer_type,CUSTOMERNAME = @customer_name,UNIT = @unit,UNITPRICE = @unit_price,QUANTITY = @quantity,COMMISSIONRATE = @comm_rate," + " AMOUNT = @amount,CURRENCY = @currency,EXCHANGERATE = @exchange_rate,FEEFRT = @fee_frt,REMARK = @remark,ISADVANCEDPAY = @is_advance_pay," + " WMSOUTBSNO=@WMSOUTBSNO,LINENUM=@LINENUM,TaxRate=@TAXRATE,NoTaxAmount=@NOTAXAMOUNT,AccTaxRate=@ACCTAXRATE,TAXUNITPRICE=@TAXUNITPRICE,PREAMOUNT=@PREAMOUNT," - + "MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME,ISOPEN = @ISOPEN,IsInvoice=@IsInvoice,INPUTMODE=@INPUTMODE,LOCALCURR=@LOCALCURR,MANAGER=@MANAGER,ISACC=@ISACC,SALECORP=@SALECORP,ISCRMORDERFEE=@ISCRMORDERFEE WHERE GID = @gid "; + + "MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME,ISOPEN = @ISOPEN,IsInvoice=@IsInvoice,INPUTMODE=@INPUTMODE,LOCALCURR=@LOCALCURR,MANAGER=@MANAGER,ISACC=@ISACC,SALECORP=@SALECORP,ISCRMORDERFEE=@ISCRMORDERFEE,STATEMENTNO=@STATEMENTNO WHERE GID = @gid "; private const string SQL_INSERT_ORDERFEE = " INSERT INTO ch_fee_order(GID, BSNO, FEETYPE, FEENAME, FEEDESCRIPTION, CUSTOMERTYPE, CUSTOMERNAME, UNIT, UNITPRICE, QUANTITY, AMOUNT, CURRENCY, " @@ -328,7 +329,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL }; } else parms[38].Value = "0"; - + parms[39].Value = feeEntity.STATEMENTNO; SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_INSERT_FEE, parms); } @@ -366,7 +367,8 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL new SqlParameter("@MANAGER",SqlDbType.VarChar,60), new SqlParameter("@ISACC",SqlDbType.VarChar,1), new SqlParameter("@SALECORP",SqlDbType.VarChar,60), - new SqlParameter("@ISCRMORDERFEE",SqlDbType.VarChar,1) + new SqlParameter("@ISCRMORDERFEE",SqlDbType.VarChar,1), + new SqlParameter("@STATEMENTNO",SqlDbType.VarChar,60) }; @@ -497,7 +499,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL } } else updateParms[31].Value = "0"; - + updateParms[32].Value = feeEntity.STATEMENTNO; SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_UPDATE_CH_FE, updateParms); } } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeaeModule/MsOpSeaeModuleDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeaeModule/MsOpSeaeModuleDAL.cs index c275a844..79bbbe4b 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeaeModule/MsOpSeaeModuleDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeaeModule/MsOpSeaeModuleDAL.cs @@ -58,8 +58,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL strSql.Append("PlACERECEIPT,PORTLOADID,PORTLOAD,PORTDISCHARGEID,PORTDISCHARGE,PLACEDELIVERYID,PLACEDELIVERY,DESTINATIONID,DESTINATION,"); strSql.Append("NOBILL,ISSUETYPE,ISSUEPLACE,BLFRT,PREPARDAT,PAYABLEAT,[SERVICE],MARKS,NOPKGS,[DESCRIPTION],GOODSNAME,"); strSql.Append("GROSSWEIGHT,MEASUREMENT,PKGS,KINDPKGS,KGS,CBM,TOTALNO,INPUTDATE,"); - strSql.Append("INPUTBY,PLACERECEIPTID,REMARKS,HSCODE,CARGOID,COPYNOBILL,[DCLASS],[DUNNO],[REEFERF],[HUMIDITY],[TEMPID],[TEMPSET],[TEMPMAX],"); - strSql.Append("[TEMPMIN],[DPAGE],[DLABEL],[LINKMAN]"); + strSql.Append("INPUTBY,PLACERECEIPTID,REMARK,HSCODE,CARGOID,COPYNOBILL,[DCLASS],[DUNNO],[REEFERF],[HUMIDITY],[TEMPID],[TEMPSET],[TEMPMAX],"); + strSql.Append("[TEMPMIN],[DPAGE],[DLABEL],[LINKMAN],CUSTOMERNAME"); strSql.Append(" from op_seae_module "); if (!string.IsNullOrEmpty(strCondition)) @@ -100,8 +100,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL strSql.Append("PlACERECEIPT,PORTLOADID,PORTLOAD,PORTDISCHARGEID,PORTDISCHARGE,PLACEDELIVERYID,PLACEDELIVERY,DESTINATIONID,DESTINATION,"); strSql.Append("NOBILL,ISSUETYPE,ISSUEPLACE,BLFRT,PREPARDAT,PAYABLEAT,[SERVICE],MARKS,NOPKGS,[DESCRIPTION],GOODSNAME,"); strSql.Append("GROSSWEIGHT,MEASUREMENT,PKGS,KINDPKGS,KGS,CBM,TOTALNO,INPUTDATE,"); - strSql.Append("INPUTBY,PLACERECEIPTID,REMARKS,HSCODE,CARGOID,COPYNOBILL,[DCLASS],[DUNNO],[REEFERF],[HUMIDITY],[TEMPID],[TEMPSET],[TEMPMAX],"); - strSql.Append("[TEMPMIN],[DPAGE],[DLABEL],[LINKMAN]"); + strSql.Append("INPUTBY,PLACERECEIPTID,REMARK,HSCODE,CARGOID,COPYNOBILL,[DCLASS],[DUNNO],[REEFERF],[HUMIDITY],[TEMPID],[TEMPSET],[TEMPMAX],"); + strSql.Append("[TEMPMIN],[DPAGE],[DLABEL],[LINKMAN],CUSTOMERNAME"); strSql.Append(" from op_seae_module "); if (!string.IsNullOrEmpty(strCondition)) @@ -129,8 +129,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL strSql.Append("PlACERECEIPT,PORTLOADID,PORTLOAD,PORTDISCHARGEID,PORTDISCHARGE,PLACEDELIVERYID,PLACEDELIVERY,DESTINATIONID,DESTINATION,"); strSql.Append("NOBILL,ISSUETYPE,ISSUEPLACE,BLFRT,PREPARDAT,PAYABLEAT,[SERVICE],MARKS,NOPKGS,[DESCRIPTION],GOODSNAME,"); strSql.Append("GROSSWEIGHT,MEASUREMENT,PKGS,KINDPKGS,KGS,CBM,TOTALNO,INPUTDATE,"); - strSql.Append("INPUTBY,PLACERECEIPTID,REMARKS,HSCODE,CARGOID,COPYNOBILL,[DCLASS],[DUNNO],[REEFERF],[HUMIDITY],[TEMPID],[TEMPSET],[TEMPMAX],"); - strSql.Append("[TEMPMIN],[DPAGE],[DLABEL],[LINKMAN]"); + strSql.Append("INPUTBY,PLACERECEIPTID,REMARK,HSCODE,CARGOID,COPYNOBILL,[DCLASS],[DUNNO],[REEFERF],[HUMIDITY],[TEMPID],[TEMPSET],[TEMPMAX],"); + strSql.Append("[TEMPMIN],[DPAGE],[DLABEL],[LINKMAN],CUSTOMERNAME"); strSql.Append(" from op_seae_module "); if (!string.IsNullOrEmpty(condition)) @@ -206,7 +206,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL data.PAYABLEAT = Convert.ToString(reader["PAYABLEAT"]);//到付地点 data.SERVICE = Convert.ToString(reader["SERVICE"]);//运输条款 data.MARKS = Convert.ToString(reader["MARKS"]);//唛头 - data.REMARKS = Convert.ToString(reader["REMARKS"]);//唛头 + data.REMARK = Convert.ToString(reader["REMARK"]);//唛头 data.DCLASS = Convert.ToString(reader["DCLASS"]);//唛头 data.DUNNO = Convert.ToString(reader["DUNNO"]);//发货人 data.REEFERF = Convert.ToString(reader["REEFERF"]);//发货人 @@ -223,6 +223,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL data.COPYNOBILL = Convert.ToString(reader["COPYNOBILL"]);// if (reader["INPUTDATE"] != DBNull.Value) data.INPUTDATE = Convert.ToDateTime(reader["INPUTDATE"]).ToString("yyyy-MM-dd HH:mm:ss");//签单日期 + data.CUSTOMERNAME = Convert.ToString(reader["CUSTOMERNAME"]);// #endregion headList.Add(data); } @@ -292,7 +293,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL data.PAYABLEAT = Convert.ToString(reader["PAYABLEAT"]);//到付地点 data.SERVICE = Convert.ToString(reader["SERVICE"]);//运输条款 data.MARKS = Convert.ToString(reader["MARKS"]);//唛头 - data.REMARKS = Convert.ToString(reader["REMARKS"]);//唛头 + data.REMARK = Convert.ToString(reader["REMARK"]);//唛头 data.DCLASS = Convert.ToString(reader["DCLASS"]);//唛头 data.DUNNO = Convert.ToString(reader["DUNNO"]);//发货人 data.REEFERF = Convert.ToString(reader["REEFERF"]);//发货人 @@ -387,13 +388,13 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeModuleDAL } else { - str = " UPPER(Corpid)='" + companyid + "'"; + str = " 1=1"; } } else if (visiblerange == "1") { - str = " UPPER(Corpid)='" + companyid + "'"; + str = " 1=1"; } return str; } diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpSeaeModule/MsOpSeaeModule.cs b/DSWeb/Areas/MvcShipping/Models/MsOpSeaeModule/MsOpSeaeModule.cs index 269b9344..25b9729f 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpSeaeModule/MsOpSeaeModule.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpSeaeModule/MsOpSeaeModule.cs @@ -60,10 +60,10 @@ namespace DSWeb.MvcShipping.Models.MsOpSeaeModule private string _inputby = ""; - /// - /// 录入人 + /// + /// 录入人 /// - [ModelDB] + [ModelDB(MDBType = ModelDBOprationType.Insert)] public string INPUTBY { get{ return _inputby; } @@ -480,16 +480,6 @@ namespace DSWeb.MvcShipping.Models.MsOpSeaeModule } - private string _cntrno = ""; - /// - /// 集装箱大写 - /// - [ModelDB] - public string CNTRNO - { - get { return _cntrno; } - set { _cntrno = value; } - } @@ -539,7 +529,7 @@ namespace DSWeb.MvcShipping.Models.MsOpSeaeModule /// 备注 /// [ModelDB] - public string REMARKS + public string REMARK { get { return _remarks; } set { _remarks = value; } @@ -704,7 +694,10 @@ namespace DSWeb.MvcShipping.Models.MsOpSeaeModule get { return _INPUTDATE; } set { _INPUTDATE = value; } } - + [ModelDB] + public string CUSTOMERNAME { get; set; } + [ModelDB(MDBType = ModelDBOprationType.Insert)] + public string CORPID { get; set; } #endregion diff --git a/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx b/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx index b2d7e94d..9e95a7a8 100644 --- a/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx +++ b/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx @@ -33,6 +33,17 @@ DEPTNAME = '<%= Session["DEPTNAME"] %>'; } getSessgion5(); + var strLANGUAGES; + function getSessgion6() { + strLANGUAGES = '<%= Session["LANGUAGES"] %>'; //zh-cn-中文,en-us-英文 + if (strLANGUAGES == "en-us") { + document.write(' @@ -44,6 +55,16 @@ + + + + +<%----%> + + + + +