DS7_HYRD
hanxuntao 8 months ago
parent 08942b620e
commit a2df70b833

@ -636,7 +636,7 @@ Ext.extend(Shipping.MsChPayapplicationIndex, Ext.Panel, {
fieldLabel: Zi.LAN.sqdstat, //申请单状态
forceSelection: true,
store: this.storeBILLSTATUS,
valueField: 'EnumValueName',
valueField: 'EnumValueId',
displayField: BLTYPEDFIELDNAME,
name: 'BILLSTATUS'
});

@ -484,7 +484,7 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = json };
}
public ContentResult GetCopyData(string handle, string condition, string copybill,string copyfee="false")
public ContentResult GetCopyData(string handle, string condition, string copybill,string copyfee="false", string copyctn = "false")
{
MsOpSeae head = null;
@ -549,7 +549,20 @@ namespace DSWeb.MvcShipping.Controllers
MsChFeeDAL.SaveFee(feelist, head.BSNO, CookieConfig.GetCookie_UserId(Request));
}
}
if (copyctn == "true")
{
//var feelist = MsChFeeDAL.GetAllDataList(condition);
var ctnlist = MsOpSeaeDAL.GetBodyList(condition);
if (ctnlist != null)
{
for (int _i = 0; _i < ctnlist.Count; _i++)
{
ctnlist[_i].BSNO = "*";
}
MsOpSeaeDAL.SaveDetail(head.BSNO, ctnlist, CookieConfig.GetCookie_UserId(Request), false);
}
}
}
else
@ -760,7 +773,20 @@ namespace DSWeb.MvcShipping.Controllers
MsChFeeDAL.SaveFee(feelist, head.BSNO, CookieConfig.GetCookie_UserId(Request));
}
}
if (copyctn == "true")
{
//var feelist = MsChFeeDAL.GetAllDataList(condition);
var ctnlist = MsOpSeaeDAL.GetBodyList(condition);
if (ctnlist != null)
{
for (int _i = 0; _i < ctnlist.Count; _i++)
{
ctnlist[_i].BSNO = "*";
}
MsOpSeaeDAL.SaveDetail(head.BSNO, ctnlist, CookieConfig.GetCookie_UserId(Request), false);
}
}
}
}
var json = JsonConvert.Serialize(

@ -228,7 +228,7 @@ namespace DSWeb.MvcShipping.Controllers
if (amendstr == "true")
{
strSql.Append("SELECT B.BSNO, B.OPLB,B.OPLBNAME,'普通货' OPTYPE, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,B.ORDERNO,");
strSql.Append("SELECT B.PARENTID BSNO, B.OPLB,B.OPLBNAME,'普通货' OPTYPE, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,B.ORDERNO,");
strSql.Append("C.[DESCRIPTION] AS CUSTFULLNAME,B.CARGOID,B.TRADETERM,");
strSql.Append("B.ETD,B.PKGS,B.CBM,B.CNTRSEALNO,B.TRUCKER,B.CUSTOMSER,B.CLOSINGDATE,B.KINDPKGS,B.BSSOURCEDETAIL");
strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID,B.ETA,B.SALEDEPT,B.ISSUETYPE,B.ISCANCEL,B.ATD,B.SERVICECONTRACTNO");
@ -298,7 +298,7 @@ namespace DSWeb.MvcShipping.Controllers
{
strSql.Append(" and " + condition);
}
strSql.Append(" GROUP BY B.BSNO, B.OPLB,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,B.ORDERNO,");
strSql.Append(" GROUP BY B.PARENTID, B.OPLB,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,B.ORDERNO,");
strSql.Append("C.[DESCRIPTION] , B.CARGOID,B.TRADETERM,");
strSql.Append("B.ETD,B.PKGS,B.CBM,B.CNTRSEALNO,B.TRUCKER");
strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID,B.ETA,B.SERVICECONTRACTNO,B.SALEDEPT,B.ISSUETYPE,B.ISCANCEL,B.ATD,B.CUSTOMSER,B.CLOSINGDATE,B.KINDPKGS,B.BSSOURCEDETAIL");

@ -1071,7 +1071,14 @@ namespace DSWeb.MvcShipping.Controllers
if (istrue)
{
var accdate = DateTime.Now.ToString("yyyy-MM");
MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
if (headData.TRANSTYPE == "OPSEAI")
{
MsSeaeOrderDAL.OrderToOpSeai(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
else
{
MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
}
}
@ -1198,7 +1205,15 @@ namespace DSWeb.MvcShipping.Controllers
if (isautoop||(isauditautoop&& istrue))
{
var accdate = DateTime.Now.ToString("yyyy-MM");
result=MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
if (headData.TRANSTYPE == "OPSEAI")
{
result = MsSeaeOrderDAL.OrderToOpSeai(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
else
{
result = MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
}
else
{
@ -1469,7 +1484,14 @@ namespace DSWeb.MvcShipping.Controllers
if (istrue)
{
var accdate = DateTime.Now.ToString("yyyy-MM");
MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
if (headData.TRANSTYPE == "OPSEAI")
{
MsSeaeOrderDAL.OrderToOpSeai(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
else
{
MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
}
}
@ -1516,7 +1538,14 @@ namespace DSWeb.MvcShipping.Controllers
if (isautoop||(isauditautoop&& istrue))
{
var accdate = DateTime.Now.ToString("yyyy-MM");
result = MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
if (headData.TRANSTYPE == "OPSEAI")
{
result = MsSeaeOrderDAL.OrderToOpSeai(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
else
{
result = MsSeaeOrderDAL.OrderToOp(headData, accdate, headData.OP, headData.CUSTSERVICE, headData.FORWARDER, "", Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]));
}
}
else
{

@ -10611,126 +10611,107 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
},
calcDetailTotal: function () {
var rmbdr = 0;
var rmbcr = 0;
var usddr = 0;
var usdcr = 0;
var otdr = 0;
var otcr = 0;
var ttldr = 0;
var ttlcr = 0;
var notaxrmbdr = 0;
var notaxrmbcr = 0;
var notaxusddr = 0;
var notaxusdcr = 0;
var notaxotdr = 0;
var notaxotcr = 0;
var notaxttldr = 0;
var notaxttlcr = 0;
for (var i = 0; i < this.storeDrChFee.getCount(); i += 1) {
var member = this.storeDrChFee.getAt(i);
var value = member.get('Amount');
var notaxvalue = member.get('NoTaxAmount');
var curr = member.get('Currency');
var rate = member.get('ExChangerate');
rmbdr = parseFloat(value);
notaxrmbdr = parseFloat(notaxvalue);
ttldr =parseFloat(value) * parseFloat(rate);
notaxttldr = parseFloat(notaxvalue) * parseFloat(rate);
var isfind = false;
for (j = 0; j < this.storeBodySum.getCount(); j += 1) {
var memberyf = this.storeBodySum.getAt(j);
if (memberyf.data.CURR == curr) {
memberyf.set("NORATEDR", memberyf.data.NORATEDR+notaxrmbdr);
memberyf.set("DR", memberyf.data.DR +rmbdr);
memberyf.set("NORATEPR", memberyf.data.NORATEDR - memberyf.data.NORATEPR);
memberyf.set("PR", memberyf.data.DR - memberyf.data.CR);
memberyf.commit();
isfind = true;
}
}
if (!isfind) {
var record = Ext.create('MsOPGain', {
CURR: curr,
NORATEDR: notaxrmbdr,
DR: rmbdr,
NORATECR: 0,
CR: 0,
NORATEPR: notaxrmbdr,
PR: rmbdr,
});
this.storeBodySum.add(record);
}
//var rmbdr = 0;
//var rmbcr = 0;
//var usddr = 0;
//var usdcr = 0;
//var otdr = 0;
//var otcr = 0;
//var ttldr = 0;
//var ttlcr = 0;
//var notaxrmbdr = 0;
//var notaxrmbcr = 0;
//var notaxusddr = 0;
//var notaxusdcr = 0;
//var notaxotdr = 0;
//var notaxotcr = 0;
//var notaxttldr = 0;
//var notaxttlcr = 0;
//for (var i = 0; i < this.storeDrChFee.getCount(); i += 1) {
// var member = this.storeDrChFee.getAt(i);
// var value = member.get('Amount');
// var notaxvalue = member.get('NoTaxAmount');
// var curr = member.get('Currency');
// var rate = member.get('ExChangerate');
// rmbdr = parseFloat(value);
// notaxrmbdr = parseFloat(notaxvalue);
// ttldr =parseFloat(value) * parseFloat(rate);
// notaxttldr = parseFloat(notaxvalue) * parseFloat(rate);
// var isfind = false;
// for (j = 0; j < this.storeBodySum.getCount(); j += 1) {
// var memberyf = this.storeBodySum.getAt(j);
// if (memberyf.data.CURR == curr) {
// memberyf.set("NORATEDR", memberyf.data.NORATEDR+notaxrmbdr);
// memberyf.set("DR", memberyf.data.DR +rmbdr);
// memberyf.set("NORATEPR", memberyf.data.NORATEDR - memberyf.data.NORATEPR);
// memberyf.set("PR", memberyf.data.DR - memberyf.data.CR);
// memberyf.commit();
// isfind = true;
// }
// }
// if (!isfind) {
// var record = Ext.create('MsOPGain', {
// CURR: curr,
// NORATEDR: notaxrmbdr,
// DR: rmbdr,
// NORATECR: 0,
// CR: 0,
// NORATEPR: notaxrmbdr,
// PR: rmbdr,
// });
}
// this.storeBodySum.add(record);
for (var i = 0; i < this.storeCrChFee.getCount(); i += 1) {
var member = this.storeCrChFee.getAt(i);
var value = member.get('Amount');
var curr = member.get('Currency');
var rate = member.get('ExChangerate');
var notaxvalue = member.get('NoTaxAmount');
rmbcr = parseFloat(value);
notaxrmbcr = parseFloat(notaxvalue);
// }
ttlcr = parseFloat(value) * parseFloat(rate);
notaxttlcr = parseFloat(notaxvalue) * parseFloat(rate);
var isfind = false;
for (j = 0; j < this.storeBodySum.getCount(); j += 1) {
var memberyf = this.storeBodySum.getAt(j);
if (memberyf.data.CURR == curr) {
memberyf.set("NORATECR", memberyf.data.NORATECR + notaxrmbcr);
memberyf.set("CR", memberyf.data.CR + rmbcr);
memberyf.set("NORATEPR", memberyf.data.NORATEDR - memberyf.data.NORATEPR);
memberyf.set("PR", memberyf.data.DR - memberyf.data.CR);
memberyf.commit();
isfind = true;
}
}
if (!isfind) {
//}
var record = Ext.create('MsOPGain', {
CURR: curr,
NORATEDR: 0,
DR: 0,
NORATECR: notaxrmbcr,
CR: rmbcr,
NORATEPR: -notaxrmbdr,
PR: -rmbdr,
});
//for (var i = 0; i < this.storeCrChFee.getCount(); i += 1) {
// var member = this.storeCrChFee.getAt(i);
// var value = member.get('Amount');
// var curr = member.get('Currency');
// var rate = member.get('ExChangerate');
// var notaxvalue = member.get('NoTaxAmount');
// rmbcr = parseFloat(value);
// notaxrmbcr = parseFloat(notaxvalue);
// ttlcr = parseFloat(value) * parseFloat(rate);
// notaxttlcr = parseFloat(notaxvalue) * parseFloat(rate);
// var isfind = false;
// for (j = 0; j < this.storeBodySum.getCount(); j += 1) {
// var memberyf = this.storeBodySum.getAt(j);
// if (memberyf.data.CURR == curr) {
// memberyf.set("NORATECR", memberyf.data.NORATECR + notaxrmbcr);
// memberyf.set("CR", memberyf.data.CR + rmbcr);
// memberyf.set("NORATEPR", memberyf.data.NORATEDR - memberyf.data.NORATEPR);
// memberyf.set("PR", memberyf.data.DR - memberyf.data.CR);
// memberyf.commit();
// isfind = true;
// }
// }
// if (!isfind) {
// var record = Ext.create('MsOPGain', {
// CURR: curr,
// NORATEDR: 0,
// DR: 0,
// NORATECR: notaxrmbcr,
// CR: rmbcr,
// NORATEPR: -notaxrmbdr,
// PR: -rmbdr,
// });
this.storeBodySum.add(record);
// this.storeBodySum.add(record);
}
// }
}
//if (this.FEENOTPR){
// var rmbprofit ="***";
// var usdprofit ="***";
// var otprofit ="***";
// var ttlprofit ="***";
// var notaxrmbprofit ="***";
// var notaxusdprofit ="***";
// var notaxotprofit ="***";
// var notaxttlprofit ="***";
//} else {
//var rmbprofit = parseFloat(rmbdr) - parseFloat(rmbcr);
//var usdprofit = parseFloat(usddr) - parseFloat(usdcr);
//var otprofit = parseFloat(otdr) - parseFloat(otcr);
//var ttlprofit = parseFloat(ttldr) - parseFloat(ttlcr);
//var notaxrmbprofit = parseFloat(notaxrmbdr) - parseFloat(notaxrmbcr);
//var notaxusdprofit = parseFloat(notaxusddr) - parseFloat(notaxusdcr);
//var notaxotprofit = parseFloat(notaxotdr) - parseFloat(notaxotcr);
//var notaxttlprofit = parseFloat(notaxttldr) - parseFloat(notaxttlcr);
//}
this.setTotalHead();
//this.setTotalHead();
},

@ -311,9 +311,18 @@ Ext.extend(Shipping.MsInfoClientEdit, Ext.Panel, {
displayField: 'DISPLAYNAME'
});
this.storeStlName2 = Ext.create('Ext.data.Store', {
fields: ['STLNAME', 'DISPLAYNAME']
});
this.storeStlName2.add({ "STLNAME": "月结", "DISPLAYNAME": Zi.LAN.YUEJIE });
this.storeStlName2.add({ "STLNAME": "半月结", "DISPLAYNAME": Zi.LAN.BANYUEJIE });
this.storeStlName2.add({ "STLNAME": "约定天数", "DISPLAYNAME": Zi.LAN.YUEDINGTIANSHU });
this.storeStlName2.add({ "STLNAME": "周结", "DISPLAYNAME": Zi.LAN.ZHOUJIE });
this.storeStlName2.add({ "STLNAME": "现结买单", "DISPLAYNAME": Zi.LAN.XIANJIEMAIDAN });
this.comboxStlName2 = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: Zi.LAN.STLNAME, //'结费方式',
store: this.storeStlName,
store: this.storeStlName2,
forceSelection: true,
name: 'ACCTYPE',
valueField: 'STLNAME',

@ -42,6 +42,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.MsPeriod = null;
this.copybill = false;
this.copyfee = false;
this.copyctn = false;
this.SALEORDERDEPTBYOP = 0;
this.USEDSINTERFACE = 0;
this.DESTINATIONSAMEASPORTDISCHARGE = 0;
@ -4496,6 +4497,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
var oldbsno = field.getValue();
this.copybill = false;
this.copyfee = false;
this.copyctn = false;
this.LoadCopyData(oldbsno, this.copybill, this.copyfee);
var children = this.tabSeaepanel.items;
@ -4517,6 +4519,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
} else {
this.copybill = false;
this.copyfee = false;
this.copyctn = false;
this.CopyNew();
@ -4559,6 +4562,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
} else {
this.copybill = true;
this.copyfee = false;
this.copyctn = false;
this.CopyNew();
@ -4601,6 +4605,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
} else {
this.copybill = false;
this.copyfee = true;
this.copyctn = true;
this.CopyNew();
@ -4643,6 +4648,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
} else {
this.copybill = true;
this.copyfee = true;
this.copyctn = true;
this.CopyNew();
@ -13201,16 +13207,26 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.opStatus = 'copyadd';
this.copybill = true;
this.copyfee = false;
this.copyctn = true;
}
if (this.opStatus == 'copyaddfee') {
this.opStatus = 'copyadd';
this.copybill = false;
this.copyfee = true;
this.copyctn = true;
}
if (this.opStatus == 'copyaddbillfee') {
this.opStatus = 'copyadd';
this.copybill = true;
this.copyfee = true;
this.copyctn = true;
}
if (this.opStatus == 'copyaddctn') {
this.opStatus = 'copyadd';
this.copybill = false;
this.copyfee = true;
this.copyctn = true;
}
if (this.opStatus == 'edit' || this.opStatus == 'copyadd') {
condition = "BSNO='" + this.editRecord.get('BSNO') + "'";
@ -13565,7 +13581,8 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
params: {
condition: "BSNO='" + bsno + "'",
copybill: CopyBill,
copyfee: CopyFee
copyfee: CopyFee,
copyctn: _this.copyctn
},
callback: function (options, success, response) {
if (success) {
@ -13644,6 +13661,8 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
_this.opStatus = 'add';
_this.copybill = false;
_this.copyfee = false;
_this.copyctn = true;
}
}
},
@ -13654,6 +13673,8 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
_this.opStatus = 'add';
_this.copybill = false;
_this.copyfee = false;
_this.copyctn = true;
}

@ -2208,6 +2208,21 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
DsOpenEditWin('/MvcShipping/MsOpSeae/Edit');
},
scope: this
}, {
text: Zi.LAN.copyadd + "(" + Zi.LAN.CNTRTOTAL2 + ")", //"复制新建",
iconCls: "btnadd",
handler: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
this.SelectedRecord = record;
this.OprationStatus = 'copyaddctn';
DsOpenEditWin('/MvcShipping/MsOpSeae/Edit');
},
scope: this
}, {
text: Zi.LAN.PLcopy , //"复制新建",
iconCls: "btnadd",

@ -44,11 +44,11 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
this.comboxTRANSTYPE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.TRANSTYPE,
store: this.storeCrmKeyCodeCode3,
store: this.StoreTRANSTYPE,
forceSelection: true,
allowBlank: false,
name: 'TRANSTYPE',
valueField: 'EnumValueName',
valueField: 'EnumValueId',
displayField: BLTYPEDFIELDNAME,
value: 'OPSEAE'
});
@ -2519,7 +2519,7 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
field.setValue('录入状态');
field = basicForm.findField('MBLNO');
field.setValue('');
this.LoadPeriodStatus(this.opStatus);
this.panelFee.strBSNO = BSNO;
for (var j = 0; j < this.storeBodyList.getCount(); j += 1) {

Loading…
Cancel
Save